See here . http://www.raspberrypi.org/phpBB3/viewt ... 86#p351286
May not be using the full resolution of the sensor. I'll investigate when back at work Monday ( don't have access to firmware source at home)
Re: Camera focus distance and macro lenses
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Camera focus distance and macro lenses
Errmm, wrong thread I think James....
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
Re: Camera focus distance and macro lenses
I’ve strapped the whole assembly to my Zeiss bino and with the right amount of TP roll spacing it gives a fairly clear field of view.
Re: Camera focus distance and macro lenses
That looks like a nice clear view through the microscope, thanks for posting that! At work a few years ago, somebody bought a small video camera that was designed to mount on a microscope eyepiece, and it was definitely less clear than this example.
Re: Camera focus distance and macro lenses
Yes it's good isn't it? Gives me silly ideas about binoculars, SLR camera lenses and all sorts of things.jbeale wrote:That looks like a nice clear view through the microscope, thanks for posting that! At work a few years ago, somebody bought a small video camera that was designed to mount on a microscope eyepiece, and it was definitely less clear than this example.

Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
I happened to walk past Poundland today and popped in for a look. I saw reading glasses and thought of you. Two pairs mysteriously jumped into my hand and before I knew it I was the proud owner of +2 and +3D reading glasses - enough for several Pi cameras.pluggy wrote:Find a pair (or buy a pair - they are very cheap) of +2 or stronger reading glasses, pull one of the lenses out and mount it in front of the camera lens.
Just tried them out - they're seriously good for a quid. They did have +3.5 as well, but I think what I have will do for what I want. I was sceptical, but I think you were right. They seem to be plenty good enough.

Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
Especially since it transpires the stills software is resizing a subset from the middle of the image.
Seriously though, its fixed focus, in phone camera land, that equates to cheap. Poundland reading specs aren't going to degrade the quality by much.
I get stuff like that on-line, the nearest Poundland costs about 10 quid to get to by car, kind of defeats the object. A downside of living in the sticks......
Seriously though, its fixed focus, in phone camera land, that equates to cheap. Poundland reading specs aren't going to degrade the quality by much.
I get stuff like that on-line, the nearest Poundland costs about 10 quid to get to by car, kind of defeats the object. A downside of living in the sticks......
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
Re: Camera focus distance and macro lenses
mmm, I'm just wondering if this DIY solution (link) would work
that or i'm seriously considering trying this Iphone type approach (link)
looks like the lenses actually work quite well
that or i'm seriously considering trying this Iphone type approach (link)
looks like the lenses actually work quite well
dan3008 wrote:Pays your money, takes your choice
Re: Camera focus distance and macro lenses
Single front lenses with 2D for cameras are available for about 6 Euro - but they are rather large, starting at 52 mm. But may be the cheapest solution and won't degrade the image quality very much, I think. And if you build a kind of case for it, you may be able to switch between different lenses (4D and 8D also available).
(here, in German: http://www.fotolinsen24.de/nahlinsen/2- ... ptrien.php )
(here, in German: http://www.fotolinsen24.de/nahlinsen/2- ... ptrien.php )
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer
Re: Camera focus distance and macro lenses
Actually I have one of those already. I thought it would be much better than the cheap and nasty plastic reading glasses. The truth is, I can't tell the difference between them. [edit]I could when I viewed them at the same time[/edit] They both make things beautifully sharp close-up, at the expense of some contrast - even the "proper camera" optic.gkreidl wrote:Single front lenses with 2D for cameras are available for about 6 Euro - but they are rather large, starting at 52 mm. But may be the cheapest solution and won't degrade the image quality very much, I think. And if you build a kind of case for it, you may be able to switch between different lenses (4D and 8D also available).
(here, in German: http://www.fotolinsen24.de/nahlinsen/2- ... ptrien.php )
Actually, scratch that, the camera optic loses less contrast, but the cheap glasses "ain't bad"
Last edited by alexeames on Wed May 22, 2013 8:42 am, edited 2 times in total.
Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
Generally speaking, the more lens surfaces you have in your optical system, the lower the contrast. You know those olde-time photos that have a sort of misty-dream quality? Part of that is low contrast due to uncoated optics. You can improve things if all your surfaces are AR-coated (anti-reflection). AR coatings are often easily scratched, and they always add cost, so cheap lenses are probably not coated.
Re: Camera focus distance and macro lenses
Yes I was thinking last night that it's really doubtful that the £1 reading glasses have any kind of anti-reflective coating.jbeale wrote:Generally speaking, the more lens surfaces you have in your optical system, the lower the contrast. You know those olde-time photos that have a sort of misty-dream quality? Part of that is low contrast due to uncoated optics. You can improve things if all your surfaces are AR-coated (anti-reflection). AR coatings are often easily scratched, and they always add cost, so cheap lenses are probably not coated.

Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
If you want a bit more quality, you could use photographic close-up filters. They come in 1, 2, 4 and 10 dioptre strengths and are usually made of optical glass. a set of all 4 can be bought on Amazon for less than £9, though the qualtiy may not be brilliant for that price, but still better than pound land specs.The diameter is usually 50+mm to fit SLR lenses, so the whole raspicam would fit behind one.
For those not into photography and optics, the dioptre value is the reciprical of the focal length in metres, so 1 dioptre is 1m focal length, 2 dioptre 500mm, 4 = 250mm and 10 = 100mm. By putting them in front of a camera lens you shorten the closest focussing point without affecting the focal length too much.
The formula is:
(New closest point) = x/(Dx +1)
where x is the old closest focus point (in metres) and D is the dioptre value of the close up lens.
So, if the current lens gives sharpish focus to 2 foot = 600mm = 0.6m, then with a 10dioptre lens the new closest focus will be:
0.6/((10 x 0.6) + 1) = 0.6/(6+1) = 0.6/7 = .086m = 86mm
or about 3.4 inches with similar sharpness.
(I will leave the calculation for other dioptre values as an exercise for the reader
)
For those not into photography and optics, the dioptre value is the reciprical of the focal length in metres, so 1 dioptre is 1m focal length, 2 dioptre 500mm, 4 = 250mm and 10 = 100mm. By putting them in front of a camera lens you shorten the closest focussing point without affecting the focal length too much.
The formula is:
(New closest point) = x/(Dx +1)
where x is the old closest focus point (in metres) and D is the dioptre value of the close up lens.
So, if the current lens gives sharpish focus to 2 foot = 600mm = 0.6m, then with a 10dioptre lens the new closest focus will be:
0.6/((10 x 0.6) + 1) = 0.6/(6+1) = 0.6/7 = .086m = 86mm
or about 3.4 inches with similar sharpness.
(I will leave the calculation for other dioptre values as an exercise for the reader

Last edited by Trav on Wed May 22, 2013 8:42 am, edited 1 time in total.
1st Batch Model B (256M) running Raspbian, Pibrow case, with RaspiCam.
Model A (256M) running Raspbmc, caseless.
Model A (256M) running Raspbmc, caseless.
Re: Camera focus distance and macro lenses
Got one of those already. 
It is optically better, but rather large.


It is optically better, but rather large.


Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
You can get them down to 37mm diameter:
http://www.amazon.co.uk/New-~37MM-Close ... oseup+37mm
Once upon a time you could get even smaller ones, like 32mm, but you would probably only find those at camera collectors' fairs nowadys.
http://www.amazon.co.uk/New-~37MM-Close ... oseup+37mm
Once upon a time you could get even smaller ones, like 32mm, but you would probably only find those at camera collectors' fairs nowadys.
1st Batch Model B (256M) running Raspbian, Pibrow case, with RaspiCam.
Model A (256M) running Raspbmc, caseless.
Model A (256M) running Raspbmc, caseless.
Re: Camera focus distance and macro lenses
Will they be any good at four for a tenner though? I remember paying a tenner for that 52mm one in the photo at least 15 years ago. The reading glasses are good enough for most things. The loss of contrast isn't that bad.Trav wrote:You can get them down to 37mm diameter:
http://www.amazon.co.uk/New-~37MM-Close ... oseup+37mm
Once upon a time you could get even smaller ones, like 32mm, but you would probably only find those at camera collectors' fairs nowadys.
Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
Too get as little contrast loss as possible you should hack the glasses so you have a small piece and then make a good lens hood to avoid light falling on it as much as possible.
Re: Camera focus distance and macro lenses
Well you get what you pay for, but the same applies to £1 plastic spectacles. A glass close up lens should give less distortion at the edge than plastic specs, but then with the tiny raspicam lens, you're only going to be using the centre anyway, so not a problem.alexeames wrote: Will they be any good at four for a tenner though? I remember paying a tenner for that 52mm one in the photo at least 15 years ago. The reading glasses are good enough for most things. The loss of contrast isn't that bad.
One advantage to the close up lens set is that you could get a threaded mounting ring glued onto your camera box (old filter or stepping ring) and change and combine the lenses to give you 1-7 or 10-17 dioptre combinations, and fit a lens hood, assuming you mount the camera in a box. Goodness knows what the quality would be like through four cheap lenses at 17 dioptre, though!
1st Batch Model B (256M) running Raspbian, Pibrow case, with RaspiCam.
Model A (256M) running Raspbmc, caseless.
Model A (256M) running Raspbmc, caseless.
Re: Camera focus distance and macro lenses
Yep - I had that thought this afternoon while driving. Make a mount with the right thread on and then the "proper" 52mm slr lenses/filters I already have can be used. That's more in the spirit of Pi - use what you already have (particularly if it's already quite good quality). I have a 52mm circular polariser (and a hood) as well if we ever get any weather bright enough to use it in.Trav wrote:One advantage to the close up lens set is that you could get a threaded mounting ring glued onto your camera box (old filter or stepping ring) and change and combine the lenses to give you 1-7 or 10-17 dioptre combinations, and fit a lens hood, assuming you mount the camera in a box. Goodness knows what the quality would be like through four cheap lenses at 17 dioptre, though!
Looks like it'll be cheaper to buy a crappy skylight filter and smash it for the thread than buying a step-ring.

Alex Eames RasPi.TV, RasP.iO
Re: Camera focus distance and macro lenses
most certainly willalexeames wrote: Looks like it'll be cheaper to buy a crappy skylight filter and smash it for the thread than buying a step-ring.

dan3008 wrote:Pays your money, takes your choice
Re: Camera focus distance and macro lenses
You're way too fast for Youtube. The video is still being processed... 

Re: Camera focus distance and macro lenses
Now it's ok, sorry 

Re: Camera focus distance and macro lenses
Hi Everyone,
my first post - already glad to see how helpful people are here!
Thanks so much for this and related posts about focal length. I lack enough experience at this point to figure out what len(s) are needed to take still shots at about 4 cm away +/- 1 cm. The subject will not be moving. What would be the cheapest way to get that close ? Understood quality is always a factor. ... as in no color fringing, but a little blur on the outside ring would be OK. I'd say similar to what RaspLogic achieved, but a bit closer. I don't have the cam. yet ... soon ... would those cheap +2 lens work, or how about a cheap magnifying glass(**) ?
(**) BTW - at a store where I work, we have those old-style magnifying lenses --- you know, the ones with a handle on a ring --- in 3 sizes for about USD $1 to 1.50 each ... I can get tons of them, if that would be helpful to anyone interested.
- Howard
in North Florida
@my fellow Floridians: maybe we need some KeyLime to go with our Raspberries ?

my first post - already glad to see how helpful people are here!
Thanks so much for this and related posts about focal length. I lack enough experience at this point to figure out what len(s) are needed to take still shots at about 4 cm away +/- 1 cm. The subject will not be moving. What would be the cheapest way to get that close ? Understood quality is always a factor. ... as in no color fringing, but a little blur on the outside ring would be OK. I'd say similar to what RaspLogic achieved, but a bit closer. I don't have the cam. yet ... soon ... would those cheap +2 lens work, or how about a cheap magnifying glass(**) ?
Hi RaspLogic, thanks ! And I'd like to second the comment posted over on your youtube video: "where DID you get that $1 lens ?"RaspLogic wrote:Here is my 1 usd solution to get a perfect DIY near focus camera.
http://youtu.be/ofnxcjKaNnA

(**) BTW - at a store where I work, we have those old-style magnifying lenses --- you know, the ones with a handle on a ring --- in 3 sizes for about USD $1 to 1.50 each ... I can get tons of them, if that would be helpful to anyone interested.
- Howard
in North Florida
@my fellow Floridians: maybe we need some KeyLime to go with our Raspberries ?


Re: Camera focus distance and macro lenses
Despite their name "All Electronics" in the US also sells various small optics pieces. Right now they have a 73mm diameter +3 diopter lens at two for $1.
http://www.allelectronics.com/make-a-st ... 3.0/1.html
http://www.allelectronics.com/make-a-st ... ics/1.html
http://www.allelectronics.com/make-a-st ... 3.0/1.html
http://www.allelectronics.com/make-a-st ... ics/1.html