Upping the Raspberry Pi’s Field of View

My last analemma attempt was only the 22nd successful attempt in the history of mankind and after a break of nearly four years, I’m finally ready to try again. This time I hope to automate the process using a Raspberry Pi computer.


The factory camera for the Raspberry Pi comes with a tiny lens that has a Field of View of about 67 degrees diagonal(53 degrees Horizontal and 41 degrees Vertical). As any analemma enthusiast will tell you, this FOV just barely meets the minimum FOV needed (I will post details on this soon) to achieve a full figure-of-eight image with enough room on the sides for a nice foreground image. So the only way I can get my Pi to capture a full analemma is by changing the factory lens.

Luckily this is done quite easily. I followed the excellent instructions posted here to remove my factory lens and fitted an M12 (12mm) mounting bracket from a old broken webcam in place of the factory lens. Unfortunately the mounting screws did not line up with the holes provided on the Pi’s camera PCB and so I just glued it into place. This is what the result looks like…


Now to determine the exact FOV (Field of View). The lenses I used were about 5$ each and I had purchased these from China over Ebay. They were advertised having focal length = 1.8mm and a FOV of 170 degrees. This data can be very misleading indeed, and can cause much heartache and frustration to someone who buys a lens like this, fits it over their webcam/CCTV camera and finds the FOV is nowhere near the advertised 170 degrees.


Hence this post on how to determine FOV of any lens fitted on your camera….

First. Definition. The Field of View is the angle subtended by your camera’s sensor at the optical centre of the lens. In the picture below, the FOV is angle Q in triangle PQR. Now suppose we extend the lines that form the FOV angle inside the camera into the real world, its easy to make out the angular limits within which our camera can actually “see”.


Look at the picture below, as you can see, angle Q can be measured from the sensor’s horizontal, vertical AND diagonal limits. Each value of Q obtained is different with the vertical Q being the smallest and the diagonal Q being the largest. The diagram is far from perfect since its impossible to draw a 3D image onto a 2D computer screen, but I hope you get the idea.

fov1When manufacturers quote their FOV, they like to make their products sound great and usually tell you the DIAGONAL FOV (which is the largest of course). Though this is not really lying to the customer, it is a little misleading because as photographers, we rarely think in terms of diagonal angles.

To calculate the TRUE FOV some very basic trigonometry is needed and all we need to do is apply the formula shown in the image below. What is important to understand here is that FOV is not just dependent on the Focal Length of the Lens, it also depends on the spatial extent of the camera’s sensor. For a given lens, smaller the sensor, narrower will be the FOV. This is why lens’ FOV often fall short when we place the lens into our cameras – Manufacturers quote the FOV for only ONE particular sensor, typically the one that would provide the largest FOV.

Alright, now coming to how I measured the FOV of my lens on my Raspberry Pi. Remember, the seller advertised this lens as having a focal length of 1.8mm. The Raspberry Pi camera sensor has a horizontal length = 3.67mm. Using the formula shown in the image above, and putting f = 1.8mm, I calculated a horizontal FOV = 91 degrees. As you can see this value is nowhere close to the advertised FOV of 170 degrees (See image below).


But this FOV value assumes that the seller has given me CORRECT VALUE of focal length. Not wanting to trust this value, I performed a small experiment to verify my calculated FOV result.

I placed the camera on my table and used 2 35mm film canisters to physically measure the FOV my camera was actually getting. In the two pictures below, you see the arrangement from the top and in the lower image, you can see a photo taken by the Pi camera showing both canisters are JUST within the horizontal frame.

Now measuring the perpendicular distance of the camera to the line of the canisters, and then measuring the distance between the canisters, I was able to calculate my actual observed FOV. It works out to about 2 x atan(19/(11×2)) = about 81 degrees.

So clearly the lens’ focal length is NOT 1.8mm as advertised. In fact, I used my physically measured FOV to recalculate the focal length of the lens and found it to be = 2.1 mm. Now that I know the exact focal length of my lens and I can calculate the FOV in both horizontal and vertical planes, it should take much of the uncertainty out of my next analemma composition.

I hope this post helps you to understand FOV of a lens and how to treat Manufacturers’ claims with caution.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s