Lenses for Embedded Vision: Mount Selection, Sensor Matching, and Board-Level Integration
Board-level lens selection for Jetson, Raspberry Pi, and other MIPI-CSI2 camera modules, covering mount choice, sensor and CRA matching, and the power/size/cost tradeoff.
By the Commonlands engineering team · Updated July 2026 · 15 min read
M12 (S-mount) lenses are the default for embedded vision because they thread directly into a PCB-mounted holder at 3g-15g, cover sensors up to roughly 1/1.8 inch (select models reach 1/1.7 to 1/1.6 inch), and cost a fraction of industrial C-mount optics. Use C-mount or CS-mount only when the application needs an adjustable iris, a larger sensor, or industrial-grade correction that C-mount's cam compensation and iris more readily provide.
The rest of this guide covers sensor and chief ray angle matching, board-level integration with Jetson and Raspberry Pi camera modules, and the power/size/cost tradeoff that shapes most embedded lens decisions.
What lens mount is best for embedded cameras?
M12 (S-mount) is the standard for embedded vision. It offers the smallest form factor at 3g-15g, threads directly into a PCB-mounted holder with no adapter plate, and costs less than industrial C-mount alternatives. Most M12 lenses cover sensors up to roughly 1/1.8 inch, with select models reaching 1/1.7 to 1/1.6 inch, which covers the IMX477, IMX219, and IMX708 used in most Jetson and Raspberry Pi camera modules.
Embedded systems do not have the design margin that a factory-floor machine vision station has. A 150g C-mount lens on a fixed inspection stand is a non-issue. The same lens on a drone eats into flight time; on a robotic arm end effector, it adds inertia the servo has to overcome; on a handheld scanner, it adds fatigue over a shift. Weight, power draw, and unit cost compound across every embedded design decision in a way they do not on a bolted-down industrial station.
Thermal range is wider outside a climate-controlled factory, too. An embedded camera in a vehicle or an outdoor enclosure can see -30 degrees C to +70 degrees C across a day, and a drone camera can move from sun-heated ground to cold altitude in minutes. Thermal expansion and the temperature dependence of a plastic element's refractive index shift the focal plane, and all-glass, all-metal construction generally holds focus more stably across temperature than designs using plastic elements, though the exact shift depends on focal length and lens design. At F/2 on a small-pixel sensor, depth of focus is only a few microns, so over a wide enough temperature swing a poorly athermalized lens can drift out of focus with no mechanical fault involved. Verify thermal focus stability against the lens datasheet for your operating temperature range.
| Mount | Thread | Typical weight | Best for | Collection |
|---|---|---|---|---|
| M12 (S-mount) | M12x0.5mm | 3g-15g | Robotics, drones, edge AI, board cameras | M12 lenses |
| M8 | M8x0.35 or M8x0.5 | 1g-5g | Ultra-compact, endoscopy, micro-cameras | M8 vs M12 |
| CS-mount | 1"-32 UN, 12.526mm flange | 50g-150g | Compact industrial, Raspberry Pi HQ camera | CS-mount basics |
| C-mount | 1"-32 UN, 17.526mm flange | 50g-200g | Full industrial, high-resolution inspection | C-mount lenses |
M8 exists for extreme miniaturization: endoscopes, pill cameras, and micro-inspection probes, where sensor coverage is typically up to 1/3 inch and focal length options are narrower. CS-mount and C-mount enter the picture when you need larger sensor coverage, an adjustable iris ring for depth-of-field control, or industrial-grade correction that M12's rigid, fixed-aperture body typically is not designed to provide. The Raspberry Pi HQ camera accepts CS-mount lenses directly and C-mount lenses via the supplied C-CS adapter ring, but the size and weight penalty versus M12 is real. For most embedded designs, M12 is the right starting point; see the full M12 vs C-mount vs CS-mount guide and what is an M12 lens for the mechanical basics.
C-mount and M12 are different optical systems, not two sizes of the same thing. C-mount uses an internal cam mechanism: rotating the focus ring moves lens groups relative to each other, which rebalances aberrations across the focus range and allows an adjustable iris. M12 is a rigid optical assembly with no internal moving groups; focus is set by threading the entire lens in or out of the holder, and there is no aberration rebalancing during that adjustment. Neither is a lesser version of the other; the tradeoff is cam compensation and iris control versus size, weight, and cost.
This also changes what "minimum object distance" (MOD) means for each mount. For C-mount, MOD is a hard limit set by the end of cam travel: the focus ring hits a mechanical stop, and inside that distance the image goes uniformly soft across the whole field. For M12, there is no equivalent flange-driven MOD; the practical near-focus limit is field curvature and astigmatism at the image edge, since the rigid barrel can keep threading in for center focus even as corner sharpness degrades. Do not treat M12's near-field behavior as "the same MOD concept" as C-mount; they are different failure modes with different fixes.
How do I match a lens to my embedded sensor?
A lens-sensor mismatch shows up as vignetting, color shading, or wasted resolution. Four parameters need to line up: image circle versus sensor diagonal, CRA versus sensor microlens design, lens MTF versus sensor Nyquist frequency, and back focal length versus your sensor stack.
Image circle must cover the sensor diagonal
The lens projects a circular image; your rectangular sensor sits inside that circle. An image circle smaller than the sensor diagonal produces vignetting at the corners. Moderate oversizing is usually harmless; undersizing vignettes the corners and fails whenever the image must fill the full frame. Circular-image fisheyes that place the whole image circle inside the frame are the deliberate exception.
| Sensor format | Diagonal |
|---|---|
| 1/4" | 4.5mm |
| 1/3" | 6.0mm |
| 1/2.5" | 7.2mm |
| 1/2.3" (IMX477 class) | 7.9mm |
| 1/1.7" | 9.5mm |
A lens rated for 1/2.5" sensors covers any sensor that size or smaller; it will vignette on a 1/1.7" sensor. Datasheets list image circle in millimeters or as a sensor format designation, and the two are not always published with matching precision, so verify against your sensor's actual diagonal rather than assuming format labels align exactly between vendors. See sensor size and lens compatibility for the full coverage math and image sensor selection for choosing the sensor itself.
Resolution: the lens MTF must clear the sensor's Nyquist frequency
A 12MP sensor with 1.55µm pixels has a Nyquist frequency near 322 lp/mm. If the lens cannot resolve that frequency at your working aperture, the sensor's extra resolution goes to waste. Check the lens MTF chart at the aperture you intend to shoot; MTF above roughly 20%-30% at Nyquist is a reasonable bar for acceptable sharpness. The MTF curve guide explains how to read these charts, and spatial resolution covers the pixel-to-lens relationship in more depth.
Work the focal length math directly
Run your sensor size, target field of view, and working distance through the field of view calculator or the EFL calculator to get the exact focal length for your system, consistent with the same formula used above.
How does chief ray angle affect embedded camera image quality?
Chief ray angle (CRA) is the angle at which the lens delivers light to a given point on the sensor. Small-pixel sensors, common at 1.4µm-2.5µm in embedded cameras, use microlenses over each pixel tuned to a specific CRA curve, typically 20 degrees to 30 degrees at the corners. When the lens CRA does not track the sensor's design CRA, you get color shading (red, green, and blue channels fall off differently toward the edges) and reduced corner brightness that software cannot fully correct, because the mismatch is wavelength- and angle-dependent at the pixel level rather than a uniform gain error.
This matters most on the small-pixel sensors that dominate embedded and board-camera designs. Sensor datasheets specify a CRA curve; lens datasheets specify a matching CRA spec or curve. When selecting a lens for a sensor with sub-2µm pixels, check that the two curves track across the field, not just at the center. The full mismatch mechanics and matching procedure are in the chief ray angle and mismatch guide.
CRA mismatch is easy to miss during bring-up because center-field image quality looks fine. The problem shows up at the corners and edges, often only under specific lighting or after a sensor revision changes the microlens design. Verify CRA compatibility before committing to a lens for a new camera module, not after color shading appears in the field.
How do M12 lenses integrate with Jetson and Raspberry Pi camera modules?
Jetson Nano, Xavier NX, and Orin modules, along with Raspberry Pi and most other MIPI-CSI2 board cameras, connect through M12 lens holders soldered or clipped to the camera PCB. Common sensors on these platforms include the IMX477 (Raspberry Pi HQ camera), IMX219 (Raspberry Pi Camera Module v2), and IMX708. Because M12 has no standardized flange distance, focus is set entirely by how far the lens threads into the holder, and back focal length (BFL) varies by lens design.
That variability is a feature for board-level integration, not a defect. When you swap camera modules, or the same lens design needs to work across two sensor stacks with different cover glass or IR filter thickness, the fix is a holder of the correct height rather than a different lens. Confirm holder height against the lens's specified back focal length and your full sensor stack (bare sensor, cover glass, IR filter, any spacer) before finalizing the PCB footprint. Commonlands' M12 lens holder selection guide covers holder height selection and thread engagement in detail.
For general-purpose vision at arm's length to room scale on Jetson-class platforms, 4mm-8mm focal length covers most use cases; wider options (2mm-3mm) suit surround-view and obstacle detection where source availability supports that field of view. Confirm sensor support against your module's datasheet, since not every Jetson or Raspberry Pi camera vendor publishes a full compatible-lens list.
Multi-camera Jetson and Raspberry Pi designs raise the integration bar further. A stereo pair or a multi-camera array needs matched focal length and matched back focal length across every module, since even a small BFL difference between two nominally identical lens units shows up as a focus mismatch between the left and right images. Bulk-buying from a single production lot reduces that risk but does not eliminate it; verify focus at the corners of the field on each unit during bring-up, not only at the center.
The power, size, and cost triangle in embedded lens selection
Embedded lens selection is a three-way tradeoff: optical performance, physical footprint, and unit cost, with power draw as a secondary axis tied to footprint. Unlike a fixed industrial inspection station, embedded systems usually cannot spend freely on any one corner of that triangle without giving up ground on the other two.
M12 lenses sit at the small-footprint, low-cost corner. A 3g-15g lens with a fixed aperture draws no power itself and costs a fraction of an industrial optic, but gives up the adjustable iris and cam-based aberration compensation that C-mount provides. C-mount and CS-mount sit at the opposite corner: an iris ring lets you trade depth of field for light throughput on demand, and the cam mechanism rebalances aberrations across the focus range, but the lens weighs 3x-10x more and costs more per unit. For a drone or handheld device on battery power, that weight difference is a meaningful chunk of flight time or user fatigue, not just a spec sheet number.
Aperture control also interacts with power in a less obvious way. C-mount's adjustable iris is only practical in machine vision because illumination is usually programmatically controlled (structured lighting, LED ring lights, backlight arrays), which lets the system stop down for depth of field without starving the sensor of light. Embedded systems that rely on ambient or uncontrolled lighting cannot always make that trade, which pushes the decision back toward a fixed-aperture M12 lens paired with a fast F-number instead. Working distance is also a live variable early in the design, not a fixed constraint: brackets, gimbal mounts, and camera placement can still move before the mechanical design is locked, and that flexibility is worth preserving as long as possible when specifying focal length.
Most embedded designs default to M12 with a fixed aperture and accept the loss of iris control, reserving C-mount for the subset of embedded applications, such as high-resolution inspection modules or outdoor enclosures that call for a specific ruggedized SKU, where the extra size and cost buy something the application actually needs. Ruggedization itself is a selective, SKU-specific feature rather than a property of the C-mount format as a whole; see the specs section below.
Lens selection by embedded application
Edge AI and NVIDIA Jetson platforms
Jetson Nano, Xavier NX, and Orin modules typically pair with MIPI-CSI2 camera boards using M12 holders. For general-purpose vision at arm's length to room scale, 4mm-8mm focal length covers most use cases; 2mm-3mm suits surround-view and obstacle detection where wide coverage matters more than fine detail.
Robotics and AMR navigation
Mobile robots typically run two different camera roles on two different lenses. Obstacle avoidance benefits from wide-angle or fisheye coverage where geometric accuracy does not matter. SLAM mapping needs low distortion, since feature matching depends on accurate geometry across the frame.
For a deeper walkthrough of dual-camera architectures and lens choice for mobile robots, see lenses for robotics.
Surveillance and security
Day/night operation needs both a way to admit near-infrared light (a switchable IR-cut filter or no fixed IR-cut) and an IR-corrected lens to hold focus across both bands. A standard lens with a fixed IR-cut filter blocks near-infrared, so the camera goes effectively blind once an 850nm illuminator switches on at night; removing or switching out that filter without an IR-corrected lens instead leaves the image out of focus at night, since standard lenses focus visible and near-infrared light at different planes. For low-light performance, aperture matters more than most other specs: an F/1.4 lens admits roughly four times the light of an F/2.8 lens.
Drones and UAVs
Weight is payload budget on a drone. Motor vibration creates micro-blur, and altitude changes drive fast thermal swings that shift focus more on plastic elements than on all-glass designs. All-glass construction and IP-rated sealing typically matter more here than in any other embedded application. For mapping payloads, prioritize low distortion; for inspection payloads, match focal length to standoff distance and target ground sample distance. See lenses for drones for the GSD math and thermal stability details.
Medical imaging and endoscopy
Ultra-compact M8 lenses fit the space constraints of endoscopes and medical imaging probes, typically at short working distances (5mm-30mm) and small image circles. Sterilization compatibility can require specific barrel and coating materials, so confirm those constraints with engineering before specifying a lens. See lenses for medical imaging and M8 vs M12 for mount-level tradeoffs.
Barcode reading and OCR on embedded readers
Fixed handheld and tunnel-mounted barcode readers are effectively embedded vision systems: a small sensor, a short working distance, and typically little room for a bulky lens. Narrower focal lengths (8mm-16mm) resolve fine barcode modules and small text at short range, and low distortion keeps edge-of-field decode rates close to center-field performance. See barcode reading lens selection for module-size-to-resolution guidance.
Embedded vision lenses in stock
Top M12 lenses for embedded vision
For embedded vision on M12 (S-mount) holders, the Commonlands lenses below span 0.8mm to 7.8mm focal length at F/1.45 to F/2.3, covering general-purpose vision, wide-angle low-light surveillance, low-distortion SLAM, and ultra-wide surround view on Jetson and Raspberry Pi camera modules. All are stocked, all-glass or hybrid designs that thread into a standard M12x0.5mm holder.
Every lens here is an M12 design already used in board-camera integration, ranked from general-purpose coverage to specialized ultra-wide use. We list focal length and F-number because those are fixed lens specifications you select against. Chief ray angle is deliberately not a column: CRA is a per-sensor matching requirement, not a headline lens spec, and each candidate has to be checked against your sensor's microlens CRA curve before you commit.
| Rank | Lens | EFL | F# | Best embedded use |
|---|---|---|---|---|
| 1 | CIL078 7.8mm M12 lens | 7.8mm | F/2.0 | General-purpose vision on 8MP sensors up to 1/1.7 inch (Jetson, Raspberry Pi) |
| 2 | CIL059 5.9mm M12 lens | 5.9mm | F/1.7 | Fast general-purpose, stereo, and inspection cameras; IP67 variant available |
| 3 | CIL326 2.9mm M12 lens | 2.9mm | F/1.45 | Wide-angle low-light surveillance, IP67-rated for exterior cameras |
| 4 | CIL034 3.2mm M12 lens | 3.2mm | F/2.3 | Low-distortion SLAM and outdoor robotics; IP67 on the M12A variant |
| 5 | CIL239 1.8mm M12 fisheye | 1.8mm | F/2.0 | IR-corrected day/night obstacle avoidance on 1/4 inch to 1/3 inch sensors |
| 6 | CIL207 0.8mm M12 fisheye | 0.8mm | F/1.9 | Ultra-wide 220-degree surround view and obstacle detection |
EFL and F-number values are as published on each linked product page; CIL034 lists F/2.3 to F/4.2 across its variants. Ranking reflects breadth of embedded use, not optical quality order.
Camera-module vendors such as Arducam and e-con Systems ship boards with optics already paired to the sensor, which is convenient when you want a single fixed bill of materials. A discrete, spec-controlled M12 lens is the better engineering choice when you need to match chief ray angle to a specific sensor, add or swap an IR-cut or bandpass filter, or hold a distortion and image-circle spec across a production run. Run your sensor, target field of view, and working distance through the field of view calculator or EFL calculator before locking focal length, and browse the full M12 lens range for variants not listed above.
Key specs to evaluate before you commit to a lens
Focal length
Shorter focal length means wider field of view for a given sensor. 2mm-4mm gives ultra-wide coverage for obstacle avoidance. 4mm-8mm covers general-purpose vision. 8mm-16mm gives narrow field of view for inspection and barcode reading. Use the EFL calculator to solve for focal length from your target coverage area and working distance; see how to choose focal length for the full method.
F-number (aperture)
A lower F-number admits more light: an F/1.4 lens passes roughly four times the light of an F/2.8 lens. The tradeoff is a shallower depth of field. Prioritize F/1.4-F/1.8 for low-light embedded vision; F/2.0-F/2.8 is reasonable where depth of field matters more than light gathering. Run the numbers in the depth of field calculator, and see F-number in machine vision for the underlying relationship.
Distortion
Barrel distortion bends straight lines into curves. For SLAM navigation, photogrammetry, and any application that measures geometry from the image, distortion under roughly 1% is typically required. For surveillance and general monitoring where measurement accuracy does not matter, 5%-15% distortion is often acceptable. Standard wide-angle M12 lenses commonly run 10%-20% distortion; low-distortion models bring that under 1%. See low-distortion lens guide and wide-angle and fisheye distortion for measurement and correction methods.
Chief ray angle
Must track your sensor's microlens CRA curve, not just match at the center of the field. Mismatch causes color shading that software cannot fully correct. This matters most on sensors with sub-2µm pixels. See chief ray angle and mismatch for verification methods.
Weight
Matters most for drones, handheld devices, and robotic arms, where added mass affects flight time, user fatigue, or servo load. M12 lenses typically run 3g-15g; C-mount lenses typically run 50g-200g. Choose the lightest lens that still clears your optical requirements.
IP rating
IP67 indicates dust-tight construction that survives temporary water immersion; IP69K adds high-pressure washdown resistance. Required for outdoor, agricultural, and washdown environments; optional for controlled indoor use. See IP rating guide for test methods, and note that ruggedization is a selective feature on specific SKUs, not a property of all C-mount or M12 lenses; see ruggedized lens guide.
Frequently asked questions
How do I choose a lens for an embedded vision system?
Start with four constraints: sensor format, mount type, field of view, and operating environment. Sensor format sets the minimum image circle. Most embedded cameras use M12 for compactness. Calculate focal length from working distance and required field of view, then filter by IP rating, IR correction, and CRA match to your sensor's microlens design.
What lens mount is best for embedded cameras?
M12 (S-mount) is standard for embedded vision: 3g-15g, threads directly into a PCB-mounted holder, and covers sensors up to roughly 1/1.8 inch in most models (select models reach 1/1.7 to 1/1.6 inch), including the IMX477, IMX219, and IMX708. Choose M8 for ultra-compact designs. Choose C-mount or CS-mount when you need a larger sensor, an adjustable iris, or industrial-grade correction that M12 lenses typically are not designed to provide.
Do M12 lenses work with NVIDIA Jetson cameras?
Yes. Most Jetson-compatible camera modules, including the Raspberry Pi HQ Camera M12 variant, Arducam modules, and other MIPI-CSI2 boards, use M12x0.5mm lens holders. M12 has no fixed flange distance, so focus is set by threading the lens in or out, which also lets you compensate for different sensor stack thicknesses between camera modules.
What focal length do I need for embedded vision?
Focal length sets field of view for a given sensor and working distance. At 0.5m-2m, 4mm-8mm covers general-purpose vision. 2mm-4mm suits obstacle avoidance and surround view. 8mm-16mm suits inspection and barcode reading. Use EFL = (WD x sensor_width) / FOV_width, or the Commonlands EFL calculator, to solve for the exact focal length.
How does CRA affect embedded camera image quality?
Chief ray angle (CRA) is the angle at which the lens delivers light to each point on the sensor. Small-pixel sensors have microlenses tuned to a specific CRA curve, typically 20 degrees to 30 degrees at the corners. A lens CRA that does not track the sensor's design CRA produces color shading and corner brightness falloff that software cannot fully correct, because the mismatch is wavelength- and angle-dependent at the pixel level.
Are all-glass M12 lenses better than plastic for embedded systems?
For most industrial, robotics, and outdoor embedded applications, yes. All-glass, all-metal M12 lenses generally hold focus more stably across temperature than plastic-element lenses, and resist UV degradation and scratching better. The exact thermal focus shift depends on focal length and design, so check the datasheet for your temperature range. Plastic elements remain a reasonable choice for cost-sensitive, climate-controlled consumer devices.
How do I size an M12 lens holder for my sensor stack?
Match holder height to the lens back focal length and your full sensor stack: bare sensor, cover glass, IR filter, and any spacer. Because M12 has no standard flange distance, the same lens can need a different holder height depending on the camera module. Confirm holder height against the lens datasheet before finalizing the PCB footprint; see the M12 lens holder selection guide.
Can one M12 lens work across multiple Jetson or Raspberry Pi camera modules?
Often yes, within limits. Because M12 focus is set by threading depth rather than a fixed flange, the same lens design can pair with different MIPI-CSI2 modules as long as holder height accommodates each module's sensor stack and the lens image circle covers the sensor. Field curvature and astigmatism at the image edge should still be checked per module rather than assumed.
What is the power, size, and cost tradeoff in embedded lens selection?
Smaller lenses with fixed apertures cost less and draw no power, but give up light-gathering flexibility and cam-based aberration compensation. C-mount adds an iris and better off-axis correction at 3x-10x the weight and higher unit cost. Battery- and drone-powered embedded systems typically default to M12 and accept the fixed-aperture tradeoff unless the application specifically needs iris control.
What causes color shading in embedded camera images and how do I fix it?
Color shading toward the image edges is usually a chief ray angle mismatch between the lens and the sensor's microlens design, not a software white-balance problem. Because the mismatch is angle- and wavelength-dependent, software correction only partially compensates. The fix is selecting a lens whose CRA curve tracks the sensor's design CRA across the field, verified against both datasheets before integration.
Need help matching a lens to your embedded camera?
Send us your sensor model, target field of view, and operating environment. Our optical engineers can recommend focal length, aperture, and filter configuration, and confirm CRA compatibility before you commit to a design.







