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 in this collection) to a 100mm telephoto (5° DFOV). Sensor format coverage ranges from 1/6" to 1/1.8" on most models, and select designs reach 2/3". The highest compatible resolution published for an M12 design is the 16MP class, on the CIL340 and the CIL293, and a megapixel label names the sensor class a lens targets rather than a measured resolving power. 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. Three factors screen the pairing first: the lens image circle must cover the sensor diagonal, the lens chief ray angle (CRA) has to track the sensor’s microlens curve, and the back focal length must reach the sensor through your PCB stack-up.
Those three are a filter, not the whole test. The sensor’s cover glass and filter stack add aberration the lens has to be corrected for, and rear mechanical clearance, working F-number, conjugate distance, and the corner MTF and relative illumination your application tolerates all decide whether the pairing actually works. Send us the sensor part number and we will check the ones that are not on a datasheet.
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
An M12 lens has no flange to register against, so the holder on the sensor board sets how far the lens sits from the sensor, and focus is set by rotating the barrel in its thread before it is locked in place. C-mount lenses use a 1" (25.4mm) diameter, 32 TPI thread, and CS-mount shares that same thread. Compact M12 designs often weigh 3–15g, compared with 50–200g for many C-mount designs; larger lenses fall outside these typical bands. Compact M12 designs suit systems where size, weight, and cost are priorities. 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.
C-mount and CS-mount are flanged mounts that hold the lens at fixed flange focal distances of 17.526mm and 12.526mm. The 5mm difference lets a C-mount lens work on a CS-mount camera through a spacer ring. Reverse the pairing and the CS-mount lens loses infinity focus, because the extra 5mm acts as an extension tube, leaving only close-range focus. Which mount fits comes down to sensor size and back-focus budget: M12 for robotics and embedded modules, C-mount for industrial inspection on larger formats, and CS-mount for compact cameras.
Adapters, flange focal distance, and back focal length are covered in the M12 vs C-mount vs CS-mount guide.
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 or IP6K9K (industry shorthand 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.
Sourcing an M12 lens and comparing suppliers? Our guide to Edmund Optics alternatives for imaging lenses explains where a board-level specialist fits against the larger catalog houses, and where it does not.
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. Cameras that switch to 850nm or 940nm illumination after dark have to hold focus in both bands, which is the job of the IR-corrected M12 lenses collection.
For medical endoscopy: stock optics for device development and non-diagnostic imaging; patient-contact, sterilizable, or regulated uses need a custom qualification program.
Low Distortion M12 Lenses for Machine Vision Measurement
For measurement, barcode reading, and inspection where geometric accuracy matters, low distortion M12 lenses publish distortion with the metric and reference circle behind each figure. The tightest M12 designs sit under 0.2%: the CIL052 holds −0.1% rectilinear at a 7.2mm reference circle. Our Rectilinear 6mm M12 Lens holds −2% rectilinear at an 8.8mm reference circle and the IP67-rated CIL034 publishes 0.07% TV at an 8.0mm reference circle, so calibrate before dimensional work in industrial automation.
Low distortion alone does not make a measurement traceable. Perspective error at finite conjugates, camera calibration against a known artifact, MTF at the feature size you are measuring, illumination, and mechanical stability all still set the accuracy you get. Calibrate the system rather than trusting the distortion figure on its own.
For weather-exposed builds, sealed IP67 variants are the usual first candidates to evaluate, not an automatic answer. Sealing at the barrel makes removing the protective window and its two air-glass surfaces an architecture option, taken only after validating the full installed assembly: the rating covers the tested lens variant in its mounted configuration under IEC 60529, which for IP67 means immersion to 1m for 30 minutes. It does not protect the sensor board or the rest of the camera, and it says nothing about impact, high-pressure jets, chemicals, UV, or serviceability.
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 coverage, distortion included, with our FOV Calculator, then check the result against the lens’s measured distortion data.
- 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 usually acceptable for coverage, since the sensor samples the well-corrected center of the field; run the same CRA, clearance, filter-stack, and MTF checks as any pairing. 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. Our starting point is roughly 20% to 30% MTF at the sensor’s Nyquist frequency (1 / (2 × pixel pitch)). That band is a Commonlands rule of thumb rather than a published standard, so validate it against the contrast your own task needs. When lens contrast at Nyquist falls well below it, the lens rather than the sensor sets the resolution limit. 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. Compare the lens CRA plot against the sensor’s published curve point by point across image height rather than as a single number. How much mismatch you can absorb depends on the working F-number and the width of the ray cone, the wavelengths in use, the pixel and filter stack, and the corner shading and MTF loss your pipeline tolerates. Monochrome sensors escape the color shading but still lose light off-angle. Global shutter machine vision sensors such as the OV9281 and AR0234 publish CRA curves in their datasheets.
Environmental and Mechanical Factors
- Ingress Protection Requirements An IP67-rated M12 lens seals at the barrel, which makes a window-less build an architecture option: dropping the protective window and its two air-glass surfaces means less stray light and better contrast, but take that option only after validating the full installed assembly against your actual exposure. The rating applies to the tested lens variant in its mounted configuration under the dust and water exposures of IEC 60529, and it does not protect the sensor board or the rest of the camera. For outdoor builds, most teams start their evaluation with the sealed IP67 variant; a washdown jet sits outside what the IP67 immersion test covers, which moves the evaluation to a jet-rated IP6K9K option. Both cases still need the installed assembly validated against the actual exposure, and the housing gets sealed on its own terms; controlled indoor environments can save the cost with standard barrels.
- Thermal Stability Considerations All-glass M12 lenses are generally rated for −40°C to +85°C operation. A temperature rating is not a focus guarantee: whether focus holds across that range is a property of the assembled lens, holder, and sensor together, and is verified by measuring focus or MTF across the temperatures the camera will see. Treat element material as descriptive data rather than a thermal rule. Glass and optical plastics differ in expansion and dn/dT, but the net focus shift of a design depends on how the prescription, barrel, holder, and sensor stack combine, and a well-athermalized hybrid glass-plastic design can hold focus over temperature better than an all-glass one. Screen on outcomes instead of construction: shortlist lenses with a stated operating-temperature range, then qualify the shortlisted assembly with an over-temperature focus or MTF measurement, which Commonlands can run on request.
Ingress Protected M12 Lenses
Where Fisheye Designs Fit
A fisheye gives up straight-line rendering to reach published fields of view from 180° to 226° in this collection, across image circles of 2.9mm to 9.3mm. The widest M12 fisheye in the Commonlands catalog, the CIL213 at 230°, sits outside this collection. Stereographic, f-theta, IP67, and IR-corrected models all live in the M12 fisheye lens collection, with the projection math in the wide angle vs fisheye guide.
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





















