Machine Vision Lenses for Quality Inspection

C-mount and M12 lenses for label, seal, fill level, and print inspection stations, priced from $19 and matched to defect size, working distance, and distortion budget.

An overhead camera with a C-mount lens and ring light inspecting parts on a conveyor

The lens determines whether an inspection system can see the defects that matter. Start with the defect, not the camera: minimum feature size sets required resolution, working distance sets focal length, and surface geometry (flat versus curved or uneven) decides whether you need a fixed-aperture M12 lens or a C-mount lens with an adjustable iris.

Start With the Defect, Then Compute Resolution

Every inspection lens specification starts with one number: minimum detectable feature size. From there, budget 3 to 5 pixels per smallest defect; three gives marginal detection, five gives reliable detection with margin for thresholding algorithms. Detecting 50 µm defects at 5 pixels each means 100 pixels per millimeter of field.

Lens resolution must meet or exceed the sensor's pixel pitch. A 12MP-rated lens like the CIL512 resolves 3.45 µm pixels on a 1.1" sensor; 25MP sensors with 2.74 µm pixels need a 25MP-rated lens like the CIL553. Pairing a lower-rated lens with a finer-pitch sensor means optical blur, not the sensor, sets your effective resolution.

Working Distance Sets Focal Length

Working distance is fixed early by conveyor height, robot reach, and enclosure dimensions. Once you have it, focal length follows exactly for rectilinear projection: EFL = (WD × sensor width) / FOV width. At a 300mm working distance, a 100mm field of view, and a 14.1mm-wide 1.1" sensor, EFL = 300 × 14.1 / 100 = 42.3mm, pointing to a 50mm lens.

Aperture then trades depth of field against diffraction. For flat parts, run open, MTF permitting; for parts with height variation, stop down. Above F# ≈ 2 × pixel pitch in µm, diffraction softening typically exceeds the gain from stopping down further; for 3.45 µm pixels that ceiling is roughly F/7. Verify your numbers with the field of view calculator and the depth of field calculator.

Machine Vision Lenses for Quality Inspection Collection

Low distortion C-mount and M12 lenses for fixed-station area-scan inspection.

Label and Print Inspection: Distortion First

Barcode and Data Matrix decoders read bar-to-space ratios and cell geometry, so distortion that compresses modules near the image periphery degrades decode confidence before any resolution problem appears. Target 5 or more pixels across the narrowest element and less than 0.3% distortion for code reading, OCR, and registration work.

Print registration is the strictest case: distortion displacement scales with radial distance from field center, so a lens with 2% barrel distortion produces roughly 2mm of apparent position error at the edge of a 200mm zone, against tolerances often ±0.5mm or tighter. On curved containers, the label surface is not a flat plane; an adjustable iris lets you stop down for depth of field and recover exposure with illumination power.

Seal and Fill Level: Contrast and Presentation

Seal-width verification needs sub-0.5% distortion so an identical seal does not look narrower at the image edges than at center. Contamination detection is a contrast and lighting problem first: the lens needs enough spatial resolution and depth of field to hold focus on the seal surface, and lighting geometry does most of the remaining work.

Fill level inspection depends on diffused backlighting, which silhouettes the container and liquid column so the meniscus reads as a sharp edge. Threshold pass/fail checks tolerate about 0.5% TV distortion and favor low-cost M12 lenses per lane; measurement-grade fill estimation, where a pixel row maps to a physical fill height, should target under 0.2% distortion on a C-mount lens.

Lens Direction by Inspection Task

Inspection task Primary optical constraint Lens direction Key metric
Barcode / Data Matrix reading Low distortion, adequate pixels per module M12 (compact) or C-mount (iris needed) <0.3% distortion; ≥5 px per module
OCR / lot code reading Contrast uniformity, resolution per stroke M12 or C-mount; tighter resolution budget <0.5% distortion; ≥5 px per stroke
Seal-width verification Distortion consistency across the field C-mount or M12 low-distortion option ≤0.5% distortion
Threshold fill pass/fail Contrast on meniscus edge, cost per lane Compact low-distortion M12 ≤0.5% TV distortion
Measurement-grade fill estimation Distortion as systematic position bias C-mount, <0.2% distortion ≤0.2% TV distortion
Print-position / registration Low distortion across full field C-mount for larger sensors <0.3% distortion
Curved or uneven surface (any task) Depth-of-field control over height variation C-mount with adjustable iris DOF > surface excursion
A machined part backlit from below under an inspection camera to silhouette its edges
Backlighting sharpens edges for accurate dimensional gauging.

Go Deeper on Inspection Optics

The same selection method covers label, seal, fill level, and print stations: fix the defect size first, then work back through resolution and working distance using the guides below.

Häufig gestellte Fragen

How do I choose a lens for machine vision quality inspection?

Start with your smallest defect size and work backward. Calculate the pixels needed to detect it reliably (3 to 5 pixels per defect minimum), which sets your sensor resolution requirement. Working distance is usually fixed by your physical setup, and it determines focal length through the rectilinear focal length equation. Aperture then sets your depth of field. Work through the specifications in this order: defect size, sensor resolution, working distance, focal length, aperture, sensor format.

Do I need a telecentric lens for quality inspection?

Only if you are measuring dimensions where perspective error is unacceptable, such as checking heights or diameters from above. For most surface defect detection, barcode reading, seal checks, and print verification, a standard entocentric C-mount or M12 lens works and costs significantly less. Telecentric lenses require precise working distance control and have a limited field of view. Commonlands does not currently sell telecentric lenses; reserve them for true metrology applications through a specialist vendor.

Can I use an M12 lens for industrial quality inspection?

Yes, for embedded inline inspection where size and cost are the primary constraints and the inspected surface is flat or near-flat. Most M12 lens models cover sensors up to 1/1.8", with select models reaching 1/1.7" to 1/1.6". For larger sensors, precision measurement requiring an adjustable aperture, or depth-of-field control on curved or uneven surfaces, C-mount is the better tool: its iris ring makes stopping down for depth of field practical when illumination is programmatically controlled.

How does working distance affect inspection lens choice?

Working distance directly determines focal length: EFL = (working distance × sensor width) / field-of-view width. Shorter working distance requires a shorter focal length at a given field of view and sensor size. Longer working distance requires a longer focal length but provides more physical clearance for conveyor hardware, robot arms, or enclosures. Working distance is usually constrained by your physical setup before you ever open a lens catalog.

What aperture should I use for quality inspection?

For flat parts at a fixed working distance, open the aperture for maximum light throughput, MTF permitting; many industrial lenses are aberration-limited wide open and reach peak sharpness one to three stops down. For 3D parts or components with varying heights, stop down to increase depth of field. Diffraction sets a practical ceiling: above F# ≈ 2 × pixel_pitch_µm, diffraction softening typically exceeds the DOF and resolution gain from stopping down further. For a sensor with 3.45 µm pixels, that ceiling is roughly F/7.

When does an adjustable iris matter for seal or label inspection?

When the packaging or label surface is not flat. Bottles, pouches, blister packs, and formed containers create height variation of a few millimeters across the inspection zone, which pressures depth of field at wide apertures. An adjustable iris lets you stop down and recover exposure with illumination power, a routine tradeoff since inspection illumination is usually programmable. M12 lenses typically ship with a fixed aperture, which removes that option and is fine for flat surfaces but a real constraint on curved or uneven ones.

Need Help Sizing a Lens for an Inspection Application?

Commonlands engineering can work through defect size, resolution, working distance, and sensor format with you before you commit to hardware.