The ultimate step-by-step guide to choosing an M12 lens for your embedded camera application
These days, how camera modules are designed plays a crucial role in meeting the needs of embedded camera applications. Building a camera-enabled embedded system involves choosing the right sensor, interface, lens, processor, etc. In particular, choosing the correct camera lens to meet the unique requirements of the end application is absolutely important.
In this article, we’ll learn what an M12 lens is, the factors you ought to consider during the selection of one, and the type of embedded vision applications that can greatly benefit from using them.
What is an M12 lens?
M12 lens is a standard and compact lens which has a lens thread of 12 mm diameter. Known as an S-mount lens, it is usually attached to a board camera by using the mount lens base like M12 Mount, CS-Mount or C-Mount. M12 lenses can be adjusted for focus by tightening them onto their mount – as there is no fixed distance between the lens and the sensor. An M12 lens is available in the market with a varied set of focal lengths.
Two of e-con Systems’ cameras that are integrated with an M12 lens are NileCAM81_CUOAGX – AR0821 4K HDR GMSL2 camera for NVIDIA Jetson AGX Orin and See3CAM_CU55M – 5MP monochrome USB NIR camera, both of which are shown below:
Figure 1.1: NileCAM81_CUOAGX – AR0821 4K HDR GMSL2 camera for NVIDIA Jetson AGX Orin
Figure 1.2: See3CAM_CU55M – 5MP monochrome USB NIR camera with M12 lens
Factors to consider while picking an M12 lens for your application
Now that you understand what an M12 lens is, let us learn the factors you need to consider while choosing an M12 lens for your application. They are:
- Field of View (FoV)
- Resolution
- NIR sensitivity
- Operating temperature range
- Cost
- Lens compatibility
- Focal length
- Aperture
- Distortion
Let us look each of them in detail.
Field of View (FoV)
Camera applications generally require lens mounts that enable a wide FoV (there are exceptions to this). Since cameras with C/CS-mount have become less preferred and M12 lenses are still pervasive as they offer a wide enough FoV, product developers tend to pick M12 over other lens types nowadays. Some manufacturers offer M12 lenses with a focal length ranging from 1mm to 50mm and an FoV spanning 10° to 230°. The shorter the wavelength, the wider the FoV – enabling the camera to cover a large area. However, a wide FoV can result in a higher level of lens distortion. This can be corrected in the post-processing stage.
The images captured using a narrow-angle and a wide-angle M12 lens are shown below:
Figure 2: Images taken using narrow-angle and wide-angle M12 lenses
In short, if your application requires the camera to cover a wide area or scene, you need to go with an M12 lens that offers wide FoV.
To calculate the FOV required for your lens based on your application, please visit our FOV calculator.
Resolution
Generally, the clarity of an image is improved by using a larger sensor, even with a lower quality lens. But to improve image quality even further, the high-resolution sensor must be complemented by a lens that is able to reproduce the same level of detail the sensor is capable of. This is called the resolving power of a lens. In many embedded vision applications, 4K (which is considered to be a high resolution) M12 lenses are often considered more reliable for improved image quality.
To learn more about the resolving power of a lens and how to calculate it, please visit the article How to calculate the resolving power of a lens.
NIR sensitivity
NIR (Near-Infrared) refers to the region (750 – 2500 nm) adjacent to the visible light band of the electromagnetic spectrum. Cameras with excellent NIR performance are perfect for night vision and low-light applications like license plate recognition systems, iris recognition systems, medical microscopes, surveillance, 3D point cloud imaging devices, etc. For instance, See3CAM_CU27 – a Sony STARVIS IMX462-based NIR camera from e-con Systems is a perfect example of a camera with high NIR sensitivity.
NIR cameras with M12 lenses are also suitable for small-form-factor applications. This is because, they are available with many filters such as visible-block and IR-pass, IR band-pass, IR narrow band filters, and more. However, cameras with C/CS-mount lenses can be an ideal choice for large form factor applications.
Operating Temperature Range
Many latest embedded cameras use liquid autofocus lenses as they dissipate less heat. Also, they tend to operate reliably in wide temperature ranges. Cameras operating in industrial environments typically demand a high-temperature range. In this case, a liquid lens is preferred. And typically, product developers prefer to go with an M12 lens type while embedding liquid lenses into embedded cameras. This lens assembly can enable advanced features like quick autofocus, operation in wider temperature ranges, low power consumption, and increased camera lifetime.
Cost
M12 lenses are more popular because they are low-cost compact alternatives to standard-sized lenses. Although C/CS mount lenses offer better image quality, M12 lenses are usually adequate for a wide range of applications.
Lens compatibility
An M12 lens must be compatible with the camera system for it to function properly. Compatibility can be ensured by considering three factors: mounting interface, sensor size, and resolution.
Therefore, ensuring a perfect fit between the lens and camera guarantees optimal image quality and overall system functionality.
Focal length
The focal length of an M12 lens directly influences the captured image’s magnification and field of view (FOV). Lenses with a longer focal length provide higher magnification, ideal for capturing fine details in close-up shots.
Shorter focal lengths offer a wider FOV, suitable for capturing expansive scenes. The focal length may vary depending on whether we need magnified close-ups or a broader perspective.
Aperture
The aperture M12 lens acts as a light control mechanism, similar to the iris of a human eye. A larger aperture allows for increased light to reach the sensor, proving advantageous in low-light environments. However, this results in a shallower depth of field, where only a specific portion of the image remains in sharp focus.
Conversely, a smaller aperture admits less light but delivers a deeper depth of field, keeping a larger area of the image in focus. When selecting the aperture size, prioritizing lighting conditions is important.
Distortion
Distortion, basically, is any deviation of the captured image from its ideal, perfectly rectilinear form. This warping effect arises from the inherent properties of lens elements. When selecting an M12 lens, it’s crucial to consider the tolerable level of distortion for your specific application.
It is important to note that minimizing distortion is important to ensure high image quality and accurate measurements. This can be crucial for applications demanding high accuracy and details, such as medical imaging, industrial inspection systems, and machine vision applications.
Hence, M12 lens manufacturers often provide specifications for distortion levels, which can help in selecting a lens that meets the requirements of the project.
Final thoughts
With M12 lenses, it’s a balance between size and performance. The lesser the size of the mount, the more difficult would be the lens construction – meaning the poorer the performance. But it is easier to customize an M12 lens when compared to others – owing to its simplistic design.
Popular embedded vision applications where M12 lenses are used
M12 lenses are usually used in applications where compact size is a major priority. They were initially deployed in CCTV cameras for surveillance and later became popular by meeting the demands for miniature designs.
M12/S-mount lenses include the fisheye lens, wide angle lens, low distortion lens, low light sensitive lens, pinhole lens, and automotive lens. Some of the most popular applications where an M12 lens is used include:
- Autonomous mobile robots
- Agricultural automation
- Autonomous shopping systems
- Point of care devices
- Life science equipment
- Smart traffic management systems
- Automated sports broadcasting systems
To learn more about the other embedded camera applications where an M12 lens can be used, please visit our other markets page.
What are the alternatives to M12 lenses?
Obviously, M12 lenses are not the only type of lenses used in embedded vision applications today. We already discussed some of the other options earlier in this article. Given below are the alternatives to M12 lenses:
- M8 for a smaller form factor.
- C/CS mount lens – Threaded mount lens is often used for large form factor applications and can be easily screwed onto a C/CS-mount camera.
- F mount lens – used when the sensor size is too large for the image circle of the C/CS-mount lens.
How can e-con Systems make your lens and camera integration journey easier
e-con Systems, backed by nearly two decades of experience in the embedded vision space, can help you choose the right lens to meet your unique application requirements. We can also aid your product developers in customizing lens fixation and mounting to eliminate issues like lens vignetting and color distortions.
So, if you are looking for help in choosing the right lens or integrating cameras into your embedded vision products, please write to us at camerasolutions@e-consystems.com. Please visit our Camera Selector to find the right camera for your application.
Prabu is the Chief Technology Officer and Head of Camera Products at e-con Systems, and comes with a rich experience of more than 15 years in the embedded vision space. He brings to the table a deep knowledge in USB cameras, embedded vision cameras, vision algorithms and FPGAs. He has built 50+ camera solutions spanning various domains such as medical, industrial, agriculture, retail, biometrics, and more. He also comes with expertise in device driver development and BSP development. Currently, Prabu’s focus is to build smart camera solutions that power new age AI based applications.