rkinch wrote:My lens measurements and characterization as 4mm f/3.2 at http://www.truetex.com/raspberrypi differ from the 3.6mm f/2 report at http://elinux.org/Rpi_Camera_Module . Since the latter doesn't state the primary measurement data or metrological methods, I cannot review that report to try to account for the difference.
We should also consider the unhappy possibility that there may be more than one type of lens being delivered in the camera module, leading to this confusion of characterizations. As is typical of these fine parts and their diligent Asian manufacturers, they bear neither make nor model indicia, making proper engineering applications difficult. Interchangeable parts and standardization were key to the industrial revolution and remain critical today, which implies part numbering and marking, but that bit of engineering discipline seems not to get across when it comes to offshore sources. Rather, "it is what it is" seems to be the rule.
To remedy this, we could photograph the specimen lenses, but at 6mm diameter this will require a microscope to get decent resolution.
Variant characterizations of the camera module lens
Update: I stand corrected. After repeating my measurements, I am retracting my original finding of f=4mm for the lens, and agreeing with the f=3.6mm f/2.9 finding that others have made. Here is my original report:
Last edited by rkinch on Fri Jun 07, 2013 4:57 am, edited 1 time in total.
Re: Variant characterizations of the camera module lens
I have access to the equipment. Can you advise how to measure the pupil properly? Does the refraction of the lens affect estimating the pupil diameter?
Re: Variant characterizations of the camera module lens
Don't forget it's a cheap camera with a cheap lens.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Variant characterizations of the camera module lens
But it has an aperture? I mean not a bladed diaphragm but an aperture.
Re: Variant characterizations of the camera module lens
Well, it certainly has a hole where the light gets in! Not sure if there is any specific bit of 'aperture' plastic in there apart from the lens mount and the IR filter.towolf wrote:But it has an aperture? I mean not a bladed diaphragm but an aperture.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Variant characterizations of the camera module lens
No no, aperture merely refers to "the cone of light that the light falls through" or rather its diameter.
Re: Variant characterizations of the camera module lens
I was the one who added the camera info to the elinux wiki site, relying on this post from "fastmapper" who quoted 3.60 mm +/- 0.01 mm http://www.raspberrypi.org/phpBB3/viewt ... 25#p357018
With such an inexpensive lens I don't expect exact standardization. I know that many $50 SLR "50mm" lenses vary at least a few percent in focal length. I assume this lens is a plastic molding; that is usually used for the similar-sized lenses in optical mice, anyway. A difference of 10% suggests there might be different manufacturers, I would not expect polycarbonate index to vary that much. I will try to measure my own device and report back.
With such an inexpensive lens I don't expect exact standardization. I know that many $50 SLR "50mm" lenses vary at least a few percent in focal length. I assume this lens is a plastic molding; that is usually used for the similar-sized lenses in optical mice, anyway. A difference of 10% suggests there might be different manufacturers, I would not expect polycarbonate index to vary that much. I will try to measure my own device and report back.
Re: Variant characterizations of the camera module lens
Regarding aperture the difference between f/2 and f/3.2 is 1.3 stops, i.e., more than twice as much light. Don't think that falls under tolerance threshold. It would invalidate the calibrations.jbeale wrote:I know that many $50 SLR "50mm" lenses vary at least a few percent in focal length. I assume this lens is a plastic molding; that is usually used for the similar-sized lenses in optical mice, anyway.
Re: Variant characterizations of the camera module lens
Which calibrations? There's only auto exposure at the moment so the actual f-stop doesn't really matter.
Re: Variant characterizations of the camera module lens
Thinking about lens focal length... the OV5647 datasheet quotes the image area dimensions to 5 digits, with a resolution of 100 nanometers [1] so I'm going to assume those dimensions are well known. So if we can measure field of view, we then know focal length with similar accuracy. A simple way to measure field of view is to take a photo of a 1-meter stick at a distance of 2 meters (for example). Another way is to take a 360 panorama with photos every 30 degrees (for example) rotating the camera about the zero-parallax point (in this case, front of lens element probably good enough) and then use "panotools" [2] or similar to stitch the photos and in the process, determine true focal length and lens distortion parameters through self-consistency. This would require no manual measurements at all. I'll see what I can do.
[1] Image Area 3673.6 x 2738.4 microns, page 2, http://www.ovt.com/download_document.ph ... ensorid=66
[2] http://wiki.panotools.org/
[1] Image Area 3673.6 x 2738.4 microns, page 2, http://www.ovt.com/download_document.ph ... ensorid=66
[2] http://wiki.panotools.org/
Re: Variant characterizations of the camera module lens
You can start with just measuring the diameter of the aperture in the front. In general for lenses this may or may not be the actual pupil, but it certainly is an upper bound because nothing further back can enlarge the appearance of the front aperture. In the case of these simple lens designs, however, the front aperture *is* the entrance pupil, unlike an SLR lens where the aperture stop is a mechanical iris further inside the multiple elements.towolf wrote:Can you advise how to measure the pupil properly?
The entrance pupil is defined to be the *image* of the aperture stop as you see it looking in from the front. That is, what is the smallest passage limiting (stopping) the light getting through the lens to the sensor. Since this can be inside the lens behind some glass when there are multiple elements, one must measure how the aperture appears from the front, when refracted by any intervening glass. On an SLR lens the aperture stop is the iris providing f/stop adjustment in the middle of the lens. In this little Raspberry Pi fixed lens, the aperture stop is just the front opening.
On the human eye, the pupil created by the iris is the entrance pupil. It is actually smaller in size than it appears, because you only see it magnified by the cornea. This apparent diameter is what determines the f/stop of your eye.
See http://en.wikipedia.org/wiki/Entrance_pupil
Re: Variant characterizations of the camera module lens
Shhhh, you're giving the game away........jamesh wrote:Don't forget it's a cheap camera with a cheap lens.

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: Variant characterizations of the camera module lens
I though the fact it's $25 gave the game away...pluggy wrote:Shhhh, you're giving the game away........jamesh wrote:Don't forget it's a cheap camera with a cheap lens.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Variant characterizations of the camera module lens
No, it is not a toy or a cheap gadget, although the price is cheap. This is a sophisticated board-level camera which has a potential to fulfill many applications that have been 10s or 100s of times more costly in the recent past. Applying cameras like this is my engineering field (http://www.truetex.com/micad). But this work cannot proceed without first properly characterizing the optical, mechanical, electronic, and software details making up the device. So while we have detailed published specifications on aspects like the OmniVision chip, we have nothing on the optics and mechanics. Those of us who envision serious applications for this sort of camera want to reverse-engineer specifications for details that have gone missing or non-disclosed from the Asian manufacturers. And we would want to come up with adapters to be able to use our own optics, as I have.jamesh wrote:Don't forget it's a cheap camera with a cheap lens.
Why not? As a technical product they should all be coming off the assembly line with only tiny variations. The problem of standardization here is not that there isn't consistency in the product, but rather that Asian sourcing typically omits technical details of specifically what you're getting, or in marking and identifying parts. Or maybe they want latitude to slipstream whatever optics they have on hand at the last minute. In any case, such loose characterizations make serious applications impossible, unless you want to refit with custom optics.jbeale wrote:With such an inexpensive lens I don't expect exact standardization.
Re: Variant characterizations of the camera module lens
Personally, I suspect this is the case. As far as I know, like the R-Pi itself, this camera board is designed for and provided to the educational market- and whoever else finds it useful. If you can find commercial or technical applications for it, so much the better, but it's up to you to make it work. I believe the camera module is made for the mobile phone market. Do cheap cellphones typically specify an exact focal length? Perhaps they do, but it seems no one at the foundation even knew what the focal length on their camera was (at least they have never said), suggesting to me it is not specified. But I am sure all parties have agreed on a price, and I daresay the vendor will use the cheapest available options to fulfill the contract.rkinch wrote:Or maybe they want latitude to slipstream whatever optics they have on hand at the last minute. In any case, such loose characterizations make serious applications impossible, unless you want to refit with custom optics.
In other words, yes it is a sophisticated board-level camera, but also it is built to a price, and to some unknown specification which may not include the parameters you expect from a device 10x or 100x as expensive. Actually I can be more precise: it is a sophisticated sensor chip from OmniVision in Santa Clara California, attached to some unknown lens housing & lens, mounted on a PCB designed & tested by the RPi Foundation team in Cambridge, and assembled by Sony Pencoed in Wales.
Re: Variant characterizations of the camera module lens
Thanks, nicely done. This lens looks like mine.towolf wrote:... this pretty much confirms ~ 1.25mm.
Re: Variant characterizations of the camera module lens
Right, well, fastmapper's measurements seem credible, so I still do not understand why mine differ, unless somehow we have been shipped different lenses.jbeale wrote:I was the one who added the camera info to the elinux wiki site, relying on this post from "fastmapper" who quoted 3.60 mm +/- 0.01 mm http://www.raspberrypi.org/phpBB3/viewt ... 25#p357018
So I am waiting for fastmapper to confirm his 1.8mm pupil measurement, versus my 1.25mm. Here is my metrology with a millimeter scale (B&L StereoZoom 10x with eyepiece reticle). Click the image to see full resolution, as the forum presentation below seems to scale it down.

-
- Posts: 27
- Joined: Wed Mar 27, 2013 3:54 am
Re: Variant characterizations of the camera module lens
Please don't wait. I made a quick estimate of pupil diameter using a photo that was not as good as I would like and I only intended it to provide an upper bound.rkinch wrote:So I am waiting for fastmapper to confirm his 1.8mm pupil measurement, versus my 1.25mm.
The measurements I made with any level of seriousness were regarding focal length. I intend to use those measurements for photogrammetric applications where I can infer the geometry of those things that are imaged.
Re: Variant characterizations of the camera module lens
OK, but could you at least look at my photo above, and at towolf's farther above, and compare to the lens you measured at f=3.6mm? Are they similarly featured with the spline edge? The 2.2mm OD bevel around the pupil? Do they look otherwise similar in proportions?fastmapper wrote:The measurements I made with any level of seriousness were regarding focal length.
Re: Variant characterizations of the camera module lens
My quick experiment tonight suggests the horizontal field of view of my camera more closely matches fastmapper's. I see 1723 mm +/- 2 mm wide HFOV at a distance from front of lens of 1712 mm +/- 3 mm. Full-width crop of test image here: http://bealecorner.org/best/RPi/RPi-819mm-HFOV.jpg
Note: The length reference bar is at an angle of about 1.5 degrees, but I measured only X pixels, meaning above numbers overestimate field of view by 1/cos(1.5 deg) = 1.0003 or 0.03%, which in this case is about half a millimeter.
The above measurements imply my lens focal length is 3.650 mm +/- 0.008 mm
If we assume the lens aperture is 1.25 mm in diameter, that gives us 3.65/1.25 which is an f-stop of 2.9 so my lens is 3.65 mm, f/2.9
NOTE: as rkinch pointed out, my estimate is a narrow-field approximation which is not accurate for wide-angle lenses such as this one.
If anyone else would like to try measuring their lens, including estimated uncertainty, it would be interesting to compare.
Note: The length reference bar is at an angle of about 1.5 degrees, but I measured only X pixels, meaning above numbers overestimate field of view by 1/cos(1.5 deg) = 1.0003 or 0.03%, which in this case is about half a millimeter.
The above measurements imply my lens focal length is 3.650 mm +/- 0.008 mm
If we assume the lens aperture is 1.25 mm in diameter, that gives us 3.65/1.25 which is an f-stop of 2.9 so my lens is 3.65 mm, f/2.9
NOTE: as rkinch pointed out, my estimate is a narrow-field approximation which is not accurate for wide-angle lenses such as this one.
If anyone else would like to try measuring their lens, including estimated uncertainty, it would be interesting to compare.
Last edited by jbeale on Thu Jun 06, 2013 10:35 pm, edited 5 times in total.
Re: Variant characterizations of the camera module lens
I don't have a camera yet, so I cannot test anything, but perhaps the distance between lens and chip differs slightly due to some inacurracy during assembly.
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: Variant characterizations of the camera module lens
If the focal length is the same that would mean different focus. I've seen differences in focus between cameras but only slightly; I'm sure every single camera is focused on a test bench and then glued in to place.gkreidl wrote:I don't have a camera yet, so I cannot test anything, but perhaps the distance between lens and chip differs slightly due to some inacurracy during assembly.
-
- Posts: 27
- Joined: Wed Mar 27, 2013 3:54 am
Re: Variant characterizations of the camera module lens
Here is a photo of my camera.rkinch wrote:could you at least look at my photo above, and at towolf's farther above, and compare to the lens you measured at f=3.6mm? Are they similarly featured with the spline edge? The 2.2mm OD bevel around the pupil? Do they look otherwise similar in proportions?
- Attachments
-
- A photo of my camera
- Raspberry Pi Camera.jpg (45.88 KiB) Viewed 8616 times
-
- Posts: 60
- Joined: Sun Oct 28, 2012 2:01 pm
Re: Variant characterizations of the camera module lens
@ RKinch
Just photographed my RPi camera lens and obtained the following:
Camera Body (measured with vernier calipers): 7.96 mm +/- 0.02 mm
Camera Body (Pixel Count: 1209 - 618 = 519 +/- 2): 7.96 mm
Lens (Pixel Count: 964 - 870 = 94 +/- 2): 1.27 mm
Looks like 1.25 mm is within the error bounds. The lens assembly looks very similar to yours and the one posted by fastmapper.
For reference, photograph taken with Nikon D3100, 55 mm Focal length, f/5.6.
Hope it helps.
Just photographed my RPi camera lens and obtained the following:
Camera Body (measured with vernier calipers): 7.96 mm +/- 0.02 mm
Camera Body (Pixel Count: 1209 - 618 = 519 +/- 2): 7.96 mm
Lens (Pixel Count: 964 - 870 = 94 +/- 2): 1.27 mm
Looks like 1.25 mm is within the error bounds. The lens assembly looks very similar to yours and the one posted by fastmapper.
For reference, photograph taken with Nikon D3100, 55 mm Focal length, f/5.6.
Hope it helps.