Utilize Our Camera Field of View Calculator, Focal Length Calculator, and Depth of Field Calculator
Commonlands' Camera Knowledge Base
The camera is a multi-disciplinary engineering feat that requires knowledge across optical, mechanical, electrical, firmware, and software engineering. Therefore, talented engineers from one or two disciplines can run into pitfalls in the disciplines which they are not as familiar with. We come from the optical engineering and image quality testing world, and bring our toolkit to your project. We have put together a preliminary walk-through for the first-order camera design below. We recommend designing mechanical housing after reading the walk-through.
- Calculate Your System Angle of View Requirements
- Select Your Image Sensor and Electronics
- Calculate Your Target Lens Focal Length
- Find Lenses that are in the Focal Length Range
- Calculate the Exact Field of View
- Calculate the Depth of Field of your System
- Design the Mechanics of your Camera
As a bonus to those who are interested, we periodically write articles about our take on a few image quality-related topics. Check out these articles by following the links.
- Debunking the Megapixel Wars: What Resolution Actually Means
- Shutter Speed and High Dynamic Range Imaging: Getting Rid of Motion Blur
Camera Component Selection Starts with an Angle of View Calculator
Start off by Determining the Required Camera Angle of View
The first step of any camera project is to determine the Angle of View (AOV) which you would like the camera to provide. The AOV meaning is synonymous with the definition of Field of View (FOV) however we suggest using AOV in the first step of requirement definition. This allows you to separate your Scene's requirement from the functional performance of a Lens+Sensor combination. This initial AOV calculation allows you to begin a search for the globally optimal camera system architecture.
Once you have answered these questions, we suggest sketching out the camera set up then calculating both the target horizontal AOV and vertical AOV for each camera. You can use our camera angle of view calculator to complete this calculation, without having to deal with the trigonometry. We provide an example of a security system AoV diagram below.
A few initial questions which should be answered are:
- How many cameras do I need to provide full coverage of the scene, if more than one?
- What is the closest distance of the object/scene under inspection? What is the furthest distance of the object?
- What is the minimum distance which the camera needs to see top to bottom?
- What is the minimum distance which the camera needs to see from left to right?
Select Your Camera Electronics (such as the RPi High Quality camera)
Select Your Camera Image Sensor and Lens in Parallel
The next step is to select an image sensor and camera electronics. Many people jump to this step before determining the required system field of view requirements. It is critical to consider the requirements of both the system electronics and camera lens at the same time, otherwise, it can be challenging to find a suitable lens. A few questions to ask are:
- What electronic interface (ouput) requirements does my system have?
- What are the minimum number of pixels across an object?
- What are the total number of output pixels which your camera needs?
Now that you have identified at least one camera which could work, you should find and write down the number of Horizontal Active Pixels and Vertical Active Pixels for your desired mode. Also, find the Pixel Pitch on the sensor specification. In the case you are using the Raspberry Pi High-Quality camera, these values are 4056*3040 and 1.55um if using the "-md -3" mode.
Define your Lens Constraints by using our Camera Focal Length Calculator
Calculate a Range for your Lens Focal Length Requirements
The third step is to calculate a range of acceptable Effective Focal Length values and then establish the opto-mechanical system constraints for your lens. Check whether your target Horizontal Field of View or Vertical Field of View exceeds 100 degrees. If so, the lens will likely have distortion. With these estimated values, you can identify lenses from our portfolio which are in the target EFL range.
Use our M12 Lens Field of View Calculator to determine the Camera FoV
Calculate the FoV of the Lens and Image Sensor Combination
The final step in the first-order selection process is to calculate the exact field of view of your selected lens and sensor combinations. This can then be cross-referenced against your calculated Camera Angle of View Requirements. We recommend then iterating all steps in this process until a globally optimal camera and lens solution is achieved. If you can't find the exact combination with our lenses, please contact us.
The field of view of a lens is dependent upon the Sensor Size as well as the Effective Focal Length (EFL) and Distortion of a lens. In the version of our calculator published in May 2020, we have left out distortion and used the most commonly understood equation.
Use our Depth of Field Calculator to determine the Camera's DoF
Calculate the DoF of the Lens and Image Sensor Combination
Once you have selected an optimal lens and image sensor combination, you can calculate the depth of field of the system. For adjustable aperture (iris) lenses, this calculation allows you to optimize the target F/# of the system. For finite conjugate imaging applications with nominal object distance less than 500mm or lenses with focal length >10mm, we recommend calculating the depth of field at an earlier stage of the component selection process. When utilizing our calculator, you can think of a 2-pixel blur as 'sharply in-focus' and 4-pixel blur as 'moderately in-focus' when considering a theoretically perfect lens.
Many people ask what is the hyperfocal distance of a camera. The textbook definition of the hyperfocal distance (from Mouroulis & Macdonald's Geometrical Optics and Optical Design) is "when a lens is focused at its hyperfocal distance, the depth of field will extend to infinity". A corollary to the hyperfocal distance is the near focus distance, which is the closest distance at which the scene is in focus. When the lens is focused at the hyperfocal distance, this distance is exactly 1/2 of the hyperfocal distance. To better understand the relationship between Depth of Field and EFL and F/#, we've created a depth of field lookup chart for the Sony IMX477 series image sensors (Raspberry Pi HQ) and common M12 lenses. In practice, many people focus the lens closer than the hyperfocal distance, particularly when a lens with EFL greater than 4mm is used. Our Depth of Field Calculator allows you to calculate the near focus distance and far focus distance when you change the nominal focus distance.
As an aside: depth of field is somewhat subjective as one observer may believe an object to be 'in-focus' and another may believe it to be 'out-of-focus' - so much so that Eastman Kodak spent years researching Psychometric 'Just Noticeable Differences' which were compiled in the industry famous Handbook of Image Quality. Thus, many resources calculate the DoF based on the circle of confusion of a theoretically perfect (diffraction-limited) lens to simplify the. Despite our opinions on the shortcomings of the approach, our depth of field calculator utilizes the approach so that the results are more commonly understood.
Read our Walk Through on Lens Adapters and Camera Mount Compatibility.
Select Your Lens Mount and Design Your Housing
We suggest only starting the design of a lens mount and housing after all of the optical and electronic components have been selected. We've provided a dedicated page to help you determine the compatibility of various lens types and camera mounts