M12 Mount Lenses for Machine Vision Systems
M12 lenses (also known as S-mount or board mount lenses) are miniature threaded optics designed for embedded cameras and computer vision applications. These compact lenses use the M12 × 0.5mm thread pitch and are the de facto standard for robotics, drones, security cameras, and autonomous vehicles where size and weight constraints are critical. Modern M12 lenses deliver optical performance comparable to many larger C-mount lenses in a package a fraction of the size and weight.
Commonlands stocks more than 80 M12 optical designs, from 0.8mm ultra-wide fisheye designs (up to 226° DFOV) to a 100mm telephoto (5° DFOV). Sensor format coverage ranges from 1/6" to 1/1.6", supporting resolutions up to 20 megapixels. Commonlands lenses are MTF tested before shipping, with test data available on request.
Which CMOS Sensors Work with M12 Lenses?
M12 lenses are compatible with CMOS sensors from the Sony IMX, OmniVision OV, and onsemi AR families. Compatibility requires verifying three factors: the lens image circle must exceed the sensor diagonal, the chief ray angle (CRA) must match for color sensors, and the back focal length must be compatible with your PCB stack-up height.
Each sensor page lists recommended lenses with computed fields of view, format dimensions, and CRA notes. Two common pairings: the 12.3MP Sony IMX477 behind the Raspberry Pi HQ Camera, a natural match for our low distortion 8mm M12 lens, and the IMX678, an 8.3MP 1/1.8" Starvis 2 sensor built for low-light security cameras.
M12 vs C-Mount vs CS-Mount Lenses
M12 lenses use a 12mm diameter, 0.5mm pitch thread with no standardized flange distance. C-mount lenses use a 1" (25.4mm) diameter, 32 TPI thread with a 17.526mm flange distance. CS-mount shares the same thread but with a 12.526mm flange distance. M12 lenses weigh 3–15g compared to 50–200g for C-mount, making them preferred when size, weight, and cost are prioritized. Only the M12 × 0.5 thread itself is standardized: barrel diameter, length, and lens holder height vary between designs, so verify mount dimensions against the lens drawing before finalizing your housing.
| Specification | M12 / S-Mount | C-Mount | CS-Mount |
|---|---|---|---|
| Thread | M12 × 0.5mm | 1" × 32 TPI | 1" × 32 TPI |
| Flange Distance | Variable | 17.526mm | 12.526mm |
| Weight | 3–15g | 50–200g | 50–150g |
| Best For | Robotics, drones, embedded | Industrial inspection | Compact industrial |
Custom M12 Lens Design and Manufacturing
Our San Diego engineering team provides custom optical design through volume production. Options include specific focal lengths, F-numbers, IR filter wavelengths (650nm, 850nm, 940nm bandpass), barrel dimensions for IP67/IP69K ingress protection, and sensor-specific CRA optimization. Volume capacity reaches 10,000+ units per month. Contact our engineering team with your sensor datasheet and requirements.
Applications for M12 Board Camera Lenses
M12 lenses serve agricultural drones and autonomous mobile robots (AMR), ADAS driver monitoring, medical endoscopy, retail analytics, industrial barcode scanning, and security IP cameras. The compact form factor enables integration into space-constrained enclosures where C-mount optics cannot physically fit. For security and CCTV cameras, match focal length to coverage: 4mm for wide-area monitoring, 6mm for general surveillance, and 12mm for detail at longer range.
Low Distortion M12 Lenses for Machine Vision Measurement
For precision measurement, barcode reading, and inspection applications where geometric accuracy is critical, low distortion M12 lenses deliver <1% barrel distortion without software correction. Our zero-distortion 6mm M12 lens and IP67-rated low distortion model are designed specifically for dimensional measurement in industrial automation. For applications requiring weather sealing, IP67 M12 lenses eliminate protective windows that would degrade optical performance.
How to Select the Right S-Mount Lens for Your Application
Three decisions drive M12 lens selection: field of view, resolution (MTF), and mechanical fit. Get those right and the remaining specifications (F-number, IR filtering, sealing) follow from your operating environment. The notes below cover each parameter and the trade-offs that matter most in embedded systems.
Field of View and Focal Length Considerations
- Field of View (FOV) Requirements Focal length sets how much scene the lens captures. Short focal lengths give mobile robots the wide coverage they need for situational awareness; long focal lengths resolve fine detail for inspection at a distance. Wide-angle M12 lenses generally carry more barrel distortion, which you can correct in software or avoid outright with a low distortion design. Telephoto S-mount lenses hold geometric accuracy over a narrow field. Model exact coverage, including distortion, with our FOV Calculator.
- Depth of Field (DOF) Optimization Depth of field is the range of distances that renders acceptably sharp. Higher f-numbers extend DOF but cut light throughput, a real constraint for board cameras working under variable illumination. Fixed-focus M12 modules rely on generous DOF to avoid refocusing, so if your working distance varies, verify sharpness at both extremes rather than only at the nominal distance. Our DOF Calculator accounts for pixel pitch when estimating acceptable blur.
- Sensor Format Compatibility The lens image circle must equal or exceed the sensor diagonal, or the corners vignette. A larger-than-needed image circle is optically harmless, since the sensor samples the well-corrected center of the field. You do pay for size, weight, and glass you never use, so the format-matched lens usually wins on cost. A 1/2.3" optimized S-mount lens works fine on a 1/3" sensor; the reverse produces dark corners. Our Focal Length Calculator maps sensor format to the focal length that produces your target FOV.
Optical Performance Specifications
- Resolution and MTF Performance The Modulation Transfer Function describes how much contrast the lens preserves at each spatial frequency. It is the standard measure of lens sharpness. A common machine vision benchmark is MTF above roughly 20% at the sensor’s Nyquist frequency (1 / (2 × pixel pitch)); below that, the lens rather than the sensor limits system resolution. Over-specifying MTF adds cost without visible benefit once pixel size becomes the limit, so match the lens to the sensor you actually use. Commonlands publishes measured MTF data on request.
- F-Number and Light Collection The f-number sets light collection: image-plane illuminance scales with 1/N², so an F1.4 lens delivers roughly twice the light of an F2.0 lens. Fast apertures (F1.4–F2.0) raise signal-to-noise in low light and allow the shorter exposures that cut motion blur, but typically show more aberration at the field edges and less depth of field. If the scene is well lit and geometry matters more than speed, a moderate aperture around F2.8 is often the better trade.
- Chief Ray Angle (CRA) Matching CMOS sensors place microlenses over each photodiode, tuned for a ray incidence angle that increases toward the sensor edge. When the lens CRA diverges too far from the sensor’s microlens design, off-axis light partially misses the photodiodes and produces wavelength-dependent shading: the pink-green corner tint that is difficult to remove in post-processing. Keep the lens CRA within a few degrees of the sensor’s published curve; many sensor vendors suggest staying within about 5°. Global shutter machine vision sensors such as the OV9281 and AR0234 publish CRA curves in their datasheets. Compare them against the lens CRA plot before committing.
Environmental and Mechanical Factors
- Ingress Protection Requirements An IP67-rated M12 lens seals at the barrel, removing the protective window an unsealed lens would otherwise need outdoors. Deleting those two air-glass surfaces means less stray light and better contrast, and a sealed barrel prevents the internal fogging that follows temperature cycling in humid environments. For outdoor or washdown applications, specify a sealed lens or budget for a quality window; controlled indoor environments can save the cost with standard barrels.
- Thermal Stability Considerations Optical glass has low thermal expansion and low dn/dT, so all-glass M12 designs hold focus well across −40°C to +85°C, and many are deliberately athermalized. Hybrid glass-plastic S-mount designs cost less but shift focus with temperature, because optical plastics expand more and their refractive index changes faster with heat. Specify all-glass construction for outdoor board cameras that see large temperature swings; for temperature-controlled indoor systems, hybrid designs are a sound cost optimization.
Ingress Protected M12 Lenses
Fisheye M12 Lenses
Wide Angle Low Distortion M12 Lenses
Telephoto M12 Lenses
Camera Module Assembly
Need a complete imaging solution? Commonlands offers full camera module assembly: M12 lens, sensor board, cable, and housing integrated and tested as a single unit. Reduce your supply chain complexity and accelerate time to production.
Learn About Module Assembly






















