Machine Vision Inspection Optics

Machine Vision Lenses for Quality Inspection: How to Choose Optics by Task

This guide matches lenses to label, seal, liquid level, and print inspection by defect size, resolution, working distance, and depth of field.

By Max Henkart, Commonlands · Updated July 2026 · 10 min read

Cマウントレンズとリングライトを備えた天井設置型カメラが、コンベア上の部品を検査している

The lens decides whether a quality inspection system sees 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 decides whether you need a fixed-aperture Commonlands M12 lens or a C-mount lens with an adjustable iris.

Label, seal, liquid level, and print inspection each push on a different constraint: curved-surface depth of field, contrast and presentation, backlighting, and registration-grade distortion.

Start with the Defect: What Are You Trying to See?

Every inspection spec starts with the defect, not the focal length and not the sensor. Surface scratches and cracks need strong MTF (the contrast a lens holds at a given spatial frequency). Go/no-go dimensional measurement needs low distortion, since lens geometric error becomes measurement error directly.

This step outputs one number: minimum detectable feature size. A 50 µm scratch and a 500 µm dimensional deviation drive different specs downstream. When the defect type is unclear, design to the smallest feature that matters. You can open the aperture or reduce magnification later, but you cannot recover detail the optics never captured.

A machine vision camera and ring light reading a printed label on a package
A ring light around the lens flattens shadows for print reading.

Calculate the Required Resolution

Once you have a minimum feature size, a common starting point is 3 to 5 pixels per smallest feature. Three pixels gives marginal detection; five gives reliable detection with margin for thresholding. The pixel count you actually need depends on feature contrast, lens MTF, sensor noise, and the detection algorithm.

Worked example: detecting 50 µm defects across a 100mm field at 5 pixels each needs 100 px/mm, or 10,000 pixels on the critical axis, a 100MP-class requirement for one camera; a 14.1mm sensor imaging 100mm sits near 0.14× magnification, not 1:1. Most real stations relax to 3 pixels, shrink the field, or split it across cameras. A 12MP 1.1" sensor gives only about 2 pixels per 50 µm defect across that field.

Orientation only changes which axis carries the requirement. Lens resolution must also meet the sensor's pixel pitch: a 12MP label names the sensor class a lens targets, not a resolved pitch, so confirm the pairing against measured MTF at your pixel pitch and aperture. A lower-rated lens on a finer sensor means optical blur, not the sensor, sets your resolution. See the spatial resolution guide for the full relationship.

Set the Working Distance First, Then Compute the Focal Length

Working distance is set early by conveyor height, robot reach, enclosure size, and part-loading clearance; once mechanical design is committed, it is effectively fixed. With working distance and field of view set, focal length follows for rectilinear projection:

EFL = (WD × sensor_width) / FOV_width WD = working distance, sensor_width = sensor dimension across the FOV axis, FOV_width = required field of view. A far-conjugate approximation, exact only in a pinhole ray model.

At 300mm working distance, a 100mm field, and a 14.1mm sensor width (1.1" sensor): the approximation gives EFL = 300 × 14.1 / 100 = 42.3mm; exact thin-lens conjugates, measured from the object-side principal plane, give about 37mm. Round down to the nearest stock value, not up: by those conjugates a 35mm lens frames roughly 107mm and covers the field; a 50mm frames roughly 70mm and clips it. Verify your numbers with the Commonlands field of view or EFL calculator. The focal length selection guide has more examples.

Choose the Right Aperture

Aperture trades depth of field against diffraction. For flat parts at a fixed working distance, open up for maximum light and resolution, typically F/2.8 to F/5.6, MTF permitting. For parts with height variation, stop down using the depth of field calculator.

Diffraction sets a practical ceiling. A starting heuristic we use: above F# ≈ 2 × pixel_pitch_µm, diffraction softening often outweighs the depth-of-field gain from stopping down further. That multiplier assumes light near 550nm and a tolerant blur criterion; a stricter two-pixel Airy diameter at 550nm lands near 1.5 × the pitch, and the crossover shifts with wavelength, blur tolerance, and task. For 3.45 µm pixels the heuristic gives roughly F/7 at 550nm; with 2.74 µm pixels, closer to F/5.5. See the f-number guide for the full tradeoff.

Aperture and illumination are coupled: stopping down for depth of field costs light, and in machine vision you recover it with brighter or strobed illumination. Commonlands M12 lenses ship with a fixed aperture, which moves the choice to lens selection: the f-number is fixed per variant, and depth of field is managed through working distance, magnification, and lighting geometry.

What Machine Vision Lens Should I Use for Label Inspection?

Label inspection is a resolution and glare problem on curved, reflective surfaces. It splits into tasks: barcode and Data Matrix reading, OCR and lot code reading, placement verification, and print-defect inspection. Barcode and 2D decoders read bar-to-space ratios, so distortion that compresses modules near the periphery hurts decode confidence before resolution does. A common target is 5 or more pixels across the narrowest element, with the minimum set by symbology, decoder, and print contrast.

A few millimeters of height excursion on a curved container pressures depth of field, so a C-mount lens is the usual choice once labels sit on bottles or formed packs. For most label decode work, a lens under about 0.3% TV distortion drops distortion low on the list of concerns, though whether it clears entirely depends on field position, calibration, and the measurement tolerance. See what is a low distortion lens for how the specs relate.

The Commonlands CIL522 12mm C-mount fits curved-container labels, and the CIL052 5.2mm M12 suits compact reads on flat labels. Telecentric optics are rarely right for decode or pass/fail tasks, and Commonlands does not sell them.

What Machine Vision Lens Should I Use for Seal Inspection?

Seal inspection is a contrast and presentation problem that splits into tasks that do not share one lens. Contamination detection reads contrast between residue and seal material, where lighting geometry does more than lens choice.

Seal-width verification is where distortion bites: barrel distortion makes an identical seal look narrower at the edges, so a pass/fail width threshold is more reliable at low distortion, commonly sub-0.5%, read against a stated metric and image height since TV and rectilinear figures are not interchangeable, with the figure it needs set by the seal dimensions, where it falls in the field, the calibration state, and the allowed error.

Packaging is rarely flat: pouches swell and blister packs raise cavities, while sachets sag between guides. That height variation pressures depth of field. Confirm the lens publishes corner MTF: low distortion does not guarantee sharp edges, since field curvature and astigmatism degrade corners independently.

The Commonlands CIL522 12mm C-mount handles general seal work where depth of field is the pressure. The CIL544 25mm C-mount suits contamination detection or wider seal lanes at longer standoff, and the CIL052 5.2mm M12 fits narrow pouch seals where the head must stay compact.

What Machine Vision Lens Should I Use for Liquid Level Inspection?

Liquid level and fill inspection depends on transparent-container backlighting more than on lens choice. Diffused backlighting silhouettes the container and liquid column, so the meniscus reads as a sharp edge for most liquids. Container positioning matters as much: a container that shifts between frames moves the apparent meniscus even at constant fill.

The first optical decision is whether the station passes a threshold or measures fill height. For threshold pass/fail, moderate distortion of 0.5% TV or less is usually enough: the reference mark and meniscus sit close in the frame, so distortion shifts both similarly and partly cancels, a local effect that needs repeatable container presentation and is not a calibrated mapping.

Compact M12 lenses win here: the Commonlands CIL083 8mm M12 at $19, F/2.8, and -0.5% TV distortion covers 1/1.8" sensors and keeps cost per lane low, where the $100 gap against a $119 C-mount lens is $800 across eight lanes.

For measurement-grade fill, where a pixel row maps to a physical height, distortion becomes systematic bias rather than noise that averages out.

A common target is under 0.2% distortion, with the exact figure set by the station's calibration state and dimensional error budget: the CIL533 16mm C-mount at -0.1% from rectilinear or the CIL553 16mm C-mount at -0.09% from rectilinear, figures that do not compare directly against a TV number such as the CIL083's. Commonlands does not sell pericentric, liquid-lens, or line-scan optics for 360-degree single-pass bottle inspection or continuous-web line scan; that is a specialist-vendor architecture.

What Machine Vision Lens Should I Use for Print Inspection?

Print inspection is a registration and fine-feature contrast problem that splits by task. Date and lot code reading is the least demanding, since fixed-format decoders know the character set. OCR and character verification is tighter: the algorithm must distinguish stroke geometry with no prior knowledge, so contrast uniformity and resolution per stroke matter.

Print-position and registration is the strictest distortion case in this hub. Distortion displacement grows toward the field edge, not at a fixed rate: on a 200mm zone the edge sits 100mm out, where a lens with 2% barrel distortion produces roughly 2mm of apparent position error. Against registration tolerances often ±0.5mm or tighter, low distortion is a prerequisite, not an optimization.

C-mount is the practical default for fixed-station print inspection, for the iris, larger sensor coverage, and higher-resolution designs: the CIL522 12mm for general work, the CIL544 25mm for small-character inspection at longer standoff, and the CIL052 5.2mm M12 for flat-surface date code heads.

Match the Sensor Format to the Lens

The lens image circle must fully cover the sensor diagonal. A 2/3" lens has about an 11mm image circle, while a 1.1" sensor has a 17.6mm diagonal, so that pairing vignettes badly: dark corners and collapsing edge MTF that no software recovers.

Oversizing is not automatically safe on resolution: a lens rated for a coarser pixel pitch can under-resolve a finer sensor, so confirm the resolution rating matches the sensor's pixel pitch. Commonlands lists a target sensor format and pixel pitch for each lens. See the sensor size and lens compatibility guide.

Top Machine Vision Lenses for Quality Inspection

Commonlands covers six quality-inspection tasks with C-mount and M12 lenses priced from $19 to $349.

How we picked: each row starts from the constraint that governs the task, then names the lowest-cost Commonlands lens that meets it with sensor-format margin. Distortion values come from each product page.

# 点検作業 レンズ マウント EFL 歪み この選手を選んだ理由
1 Surface defect detection CIL512 Cマウント 12mm Not the deciding spec Rated to the 12MP 1.1" sensor class with a 17.6mm image circle for the wide field scratch and blemish scans need; check measured MTF at your pitch. Pass/fail defect work tolerates moderate distortion.
2 ラベル検査 CIL522 Cマウント 12mm 0.4% F/1.4 adjustable iris recovers depth of field on curved containers. The CIL052 5.2mm M12 at -0.1% is the flat-label, compact-head alternative.
3 印刷および登録検査 CIL533 Cマウント 16mm -0.1% Low distortion holds registration-mark geometry across the field, where a 2% barrel figure would exceed ±0.5mm tolerances. F/2.0, 2/3" up to 12MP.
4 Seal and contamination inspection CIL544 Cマウント 25mm Not the deciding spec 20MP-plus resolution and a 17.6mm image circle cover contamination detection and wider seal lanes at longer standoff, with an adjustable iris for uneven packaging.
5 液面および充填量の検査 CIL083 M12 8mm -0.5% テレビ At $19 it keeps cost per lane low on multi-lane threshold pass/fail fill checks up to a 1/1.8" sensor. Measurement-grade fill moves to CIL533 or CIL553.
6 Dimensional gauging and measurement CIL553 Cマウント 16mm -0.09% Lowest published distortion in this set with 25MP-class resolution, so geometric error stays under tight measurement tolerances.

Dimensional gauging at the tightest tolerances calls for a telecentric lens, a third-party metrology class Commonlands does not sell. The lenses above cover the tiers beneath it.

Product detail for the lenses named above. Confirm sensor-format coverage before ordering.

6mm 2/3インチレンズ

6mm Cマウントレンズ 2/3型 5MP

$249.00

CIL530-F1.8-CMANIR — 2 in stock

.STPをダウンロード商品を見る
8mm Cマウントレンズ Kowa Computar 2/3インチ

8mm Cマウントレンズ 2/3インチ 12MP

$149.00

CIL531-F2.8-CMANIR — 49 in stock

.STPをダウンロード商品を見る
12mm Cマウントレンズ Kowa Lucid Vision

12mm Cマウントレンズ 2/3型 12MP

$149.00

CIL532-F2.0-CMANIR — 39 in stock

.STPをダウンロード商品を見る
16mm Cマウントレンズ Kowa Computar Lucid Vision Edmund Optics

16mm Cマウントレンズ 2/3インチ 12MP

$149.00

CIL533-F2.0-CMANIR — 10 in stock

.STPをダウンロード商品を見る
25mm Cマウントレンズ Amazon

25mm Cマウントレンズ 2/3型 12MP

$149.00

CIL534-F2.0-CMANIR — 16 in stock

.STPをダウンロード商品を見る
35mm Cマウントレンズ Computar

35mm Cマウントレンズ 2/3型 12MP

$149.00

CIL535-F2.0-CMANIR — 54 in stock

.STPをダウンロード商品を見る
Lucid Vision Basler Cマウントレンズ IMX566

50mm Cマウントレンズ 2/3インチ 12MP

$149.00

CIL536-F2.8-CMANIR — 25 in stock

.STPをダウンロード商品を見る
12mm Cマウントレンズ Hikrobot Basler

12mm Cマウントレンズ 1.2インチ 25MP

$249.00

CIL552-F2.8-CMANIR — 20 in stock

.STPをダウンロード商品を見る

品質検査用マシンビジョンレンズを閲覧する

A machined part backlit from below under an inspection camera to silhouette its edges
Backlighting silhouettes the part so edge position depends on geometry, not surface reflectance.

よくある質問

マシンビジョンによる品質検査用のレンズは、どのように選べばよいでしょうか?

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

ラベル検査には、どのようなマシンビジョンレンズを使用すべきでしょうか?

Name the task first: barcode/Data Matrix reading, OCR/lot code reading, placement verification, or print-defect inspection. Barcode reading needs low distortion and enough pixels per module. OCR needs tighter resolution and contrast uniformity. Most stations choose a compact M12 lens for flat surfaces or a C-mount lens with an adjustable iris for curved containers. Telecentric optics are rarely the right answer for label inspection.

シール検査には、どのようなマシンビジョンレンズを使用すべきでしょうか?

Start with the task: contamination detection needs contrast and spatial resolution, with lighting geometry doing more than lens choice. Seal-width verification needs low distortion (commonly sub-0.5%) to keep apparent width consistent across the field. Seal-position and continuity checks need field coverage and resolution along the seal length. Choose a C-mount lens with an adjustable iris when packaging presentation is variable, and a compact M12 lens when the head must stay small.

液面検査には、どのようなマシンビジョンレンズを使用すべきでしょうか?

For threshold pass/fail fill checks, moderate distortion around 0.5% TV is usually enough and cost per lane matters. The CIL083 8mm M12 at $19 and -0.5% TV distortion handles these on multi-lane systems. For measurement-grade fill where image height maps to physical volume, a common target is under 0.2% distortion once the calibration state and error budget are settled, such as the CIL533 at -0.1% or the CIL553 at -0.09%, both from rectilinear. Rectilinear-referenced figures do not compare directly against TV numbers.

印刷検査には、どのようなマシンビジョンレンズを使用すべきでしょうか?

Date and lot code reading needs enough pixels per character and low distortion to keep character geometry consistent. OCR and character verification is more demanding, since the algorithm must distinguish individual strokes. Print-position and registration checks need low distortion across the full field. A lens with 2% barrel distortion can introduce position errors beyond registration tolerances. C-mount with an adjustable iris is the practical default for fixed-station area-scan work. M12 fits a compact head on a flat surface.

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.