머신 비전에서의 바코드 판독: OCR, 문서 스캔 및 생체 인식용 렌즈 가이드
Pixel coverage, depth of field, and distortion control set the optical margin decoding software depends on, across codes, characters, pages, and faces.
By Max Henkart, Commonlands · Updated July 2026 · 10 min read
Optics is one cause of read failure among several. Print or mark quality, illumination geometry, specular glare, motion, exposure, damaged quiet zones, symbol conformance, and the decoder itself each fail independently.
This guide covers the optical share: pixels, focus, and clean geometry on the feature that matters, which differs by task. Fix the sampling requirement first, using the decoder vendor's spec and your own read-rate testing. Then check depth of field, distortion, and illumination at the real working distance.
데이터 캡처 과정에서 광학 시스템이 읽기 기능에 제공하는 요소
가장 작은 특징의 픽셀 커버리지
The decoder needs a minimum number of pixels across the narrowest element: the X dimension (narrowest bar or space) for 1D barcodes, the module for 2D Data Matrix and QR codes, character body height for OCR, iris diameter for biometrics. Under-sampling it is a common cause of read failure.
Contrast transfer at the feature's spatial frequency
Even with enough pixels, poor MTF at the feature's spatial frequency softens edges, so a megapixel rating alone does not qualify a lens. Check MTF at the sensor plane against your read-rate requirement.
Depth of field across the working-distance range
Conveyor sag, stacked labels, curved packaging, and stand-off variation create a working-distance range the lens must hold focus across. A circle of confusion of about 1 pixel at the sensor is a geometric proxy, not a measured limit: usable depth of field depends on the lens's through-focus MTF. Use the depth of field calculator to estimate it and the depth of field guide for the derivation.
사용 가능한 화각 전반에 걸쳐 제어된 왜곡
Distortion deforms bars, modules, characters, and geometry near the frame edges, where barrel (negative) or pincushion (positive) displacement is largest. Most decoders tolerate it near the center. A low-distortion lens cuts that risk.
작업에 맞춘 조명 및 노출
At line speed, long exposure smears features across pixels: a 250mm/s conveyor during a 2ms exposure creates 0.5mm of blur, enough to erase a 0.3mm bar. For biometric and document capture the constraint shifts to illumination uniformity and, for iris, a specific NIR wavelength.
1D 바코드, 2D 데이터 매트릭스 및 QR 코드, 그리고 직접 부품 마킹 코드의 차이점
Code types differ in what they demand from the optics and illumination.
1차원 바코드 (Code 128, GS1-128, Code 39, ITF-14)
One-dimensional barcodes encode data along a single axis, so sampling is driven along the reading axis and blur along the bars costs less than blur across them. That margin narrows when code rotation varies, bar height is short, quiet zones are damaged, or an image-based decoder searches the whole frame. The driving parameter is the X dimension, the narrowest bar width, which runs from 0.25mm on small labels to 1mm or more on pallet codes.
2D 데이터 매트릭스 및 QR 코드
Two-dimensional codes store data in both axes, so every module must resolve in both directions. That raises the bar on MTF uniformity across the full field, makes edge distortion a real failure mode, and requires uniform focus across the whole code. QR alignment markers tolerate perspective and rotation a little better than Data Matrix.
직접 부품 마킹(DPM) 코드
DPM codes are laser-etched, dot-peened, or chemically etched into metal, so contrast comes from surface texture rather than ink and runs much lower than on a printed label. MTF at the module frequency has to stay high without an aperture so small that diffraction eats the contrast, and the illumination (angled, dark-field, or coaxial with a polarizer) has to make shallow features visible.
일반적인 고장 양상의 비교
| 고장 증상 | 추정되는 광학적 원인 | 가장 먼저 확인해야 할 사항 | 가능성 높은 해결 방법 |
|---|---|---|---|
| 이미지 가장자리 부근에서만 디코딩에 실패합니다 | 왜곡 또는 축외 수차 | 사용 중인 시야 범위에서의 왜곡 사양 및 가장자리 MTF | 왜곡이 적은 렌즈를 사용하고, 코드가 사용 가능한 이미지 서클 내에 있도록 하십시오. |
| 라인 속도에서는 디코딩에 실패하지만 정적 테스트에서는 통과합니다 | 장시간 노출로 인한 모션 블러 | 노광 시간 대 컨베이어 속도 (mm/s) | 노출 시간을 줄이거나, 더 밝은 조명이나 스트로브 조명을 추가하십시오. |
| 다양한 거리에서 디코딩에 실패합니다 | 피사계 심도가 너무 얕음 | Aperture vs a 1-pixel CoC proxy; usable depth follows through-focus MTF | 회절 한계 이내로 조리개를 조이고, 이를 보정하기 위해 조명을 늘리십시오. |
| 작은 코드나 문자에 대한 간헐적인 오류 | 픽셀 커버리지가 최소 기준치 미만입니다. | 가장 좁은 막대, 모듈 또는 문자 높이에 걸친 픽셀 수 | 시야각을 줄이거나, 초점 거리를 더 길게 설정하거나, 카메라를 피사체에 더 가까이 가져가세요 |
| 디코딩 실패는 반짝이는 라벨이나 금속 DPM에서만 발생합니다. | 반사광으로 인해 명암비가 흐려짐 | 조명 각도와 정반사 기하학 | Move the source out of the specular path: diffuse, dark-field, or coaxial geometry, or cross-polarized source and lens. A bandpass filter rejects ambient light, not glare at the source wavelength |
바코드 판독을 위한 초점 거리와 작업 거리를 정하는 방법
This holds in the pinhole rectilinear ray model with WD referenced to the entrance pupil; real finite-conjugate imaging needs principal-plane conjugates, and a housing-referenced WD adds an unstated offset (Hecht, Optics, 5th ed., §5.2). For distortion-corrected values at wide fields, use the field of view calculator.
실제 예시: 포장 라인에서 라벨 판독
A 1/2.3" sensor (6.17mm × 4.55mm active area) reading a 60mm-wide label at 400mm needs an EFL near 400 × 6.17 / 60 = 41.1mm. At a 400mm conjugate, the finite-conjugate estimate adds sensor width to the denominator: 400 × 6.17 / 66.17 is roughly 37mm, and housing-measured WD shifts it further, so bracket 37-41mm against the FOV calculator before choosing the catalog EFL.
With 4000 pixels across the 6.17mm width, each pixel covers 60 / 4000 = 0.015mm in the scene, so a 0.25mm X-dimension bar spans 0.25 / 0.015 = 16.7 pixels. Common industry floors run about 2 to 3 pixels per X dimension for 1D decode and 4 to 8 pixels per module for 2D symbols. Compare those against your decoder vendor's minimum sampling spec.
ISO/IEC 15415 and 15416 are print-quality grading standards: they fix measurement conditions, synthetic aperture, and analysis rules, not a universal pixels-per-module count. Take the verification sampling requirement from the setup those standards specify and from the verifier's manual.
Most Commonlands M12 lenses publish a focus range of roughly 50mm to infinity; the reachable near limit in your build is set by the holder, so check the MOD and holder note on each product page. C-mount lenses typically run 100mm to infinity, varying by model. MOD is measured from the front of the lens and not always published, so verify it for close-range electronics reading. See the minimum detectable size guide for pixel coverage and FOV at close range.
OCR 및 문자 인식용 렌즈 선정
Pixel density and the 20-pixel heuristic
A common starting point is around 20 pixels across the body height of the smallest character: x-height for lowercase, cap height for the all-caps alphanumerics common on industrial labels. The ratio between the two belongs to the typeface, so measure the glyphs on your actual label rather than halving the nominal size. Accuracy tends to fall off below about 10 pixels, though the real minimum shifts with font, stroke width, contrast, preprocessing, and the OCR engine.
To check a design, multiply the sensor pixel count on the relevant axis by that body height as a fraction of the scene dimension. A 1920-pixel axis over an 80mm scene with a 4mm character body gives 1920 × (4/80) = 96 pixels, well clear; at 0.8mm it drops to 19, which is marginal. When under-sampling is the cause, the fix is a longer focal length or a higher-resolution sensor, not a different engine.
Focal length and mount
Longer focal lengths earn their place when the camera cannot move closer and a shorter lens would render characters too small: license plates, overhead text, serial numbers at a fixed robot stand-off. Where geometry allows, moving closer with a shorter lens is usually better, since depth of field shrinks and vibration sensitivity grows with focal length.
M12 fits most compact OCR, and a low-distortion M12 such as the CIL052 gives -0.1% rectilinear distortion with the system built around its fixed F#. C-mount wins when depth-of-field control matters, when the sensor exceeds the M12 image circle (typically above 1/1.8 inch), or when it needs a longer focal length.
문서 스캔을 위한 렌즈 선택
Document scanning is a flat, static imaging problem. The lens must cover the full page at the working distance, put enough pixels on the smallest detail, and keep straight edges straight. A low-distortion fixed-focal lens is the right default. Telecentric optics are not needed here and are not a current Commonlands product.
Distortion and rolling shutter
Barrel or pincushion distortion is worst at the corners, exactly where a document's edges sit. Downstream requirements set the tolerance: dimensional accuracy, OCR bounding-box registration, or multi-page alignment call for lower distortion. The CIL052 holds -0.1% rectilinear distortion for embedded page geometry. Rolling shutter is usually fine on a static scene, though steady light avoids banding from pulsed sources.
얼굴 및 홍채 생체 인식 캡처를 위한 렌즈
Iris imaging: NIR illumination on a small feature
The human iris is roughly 11-12mm across, and standards-oriented capture commonly targets 100 to 200 pixels across that diameter, because recognition depends on fine radial and furrow detail. Hitting that usually means a longer focal length or a shorter working distance than face capture.
Iris also depends on illumination near 850nm: it reveals texture that visible light captures inconsistently and is far less sensitive to ambient lighting and eye color. That needs the standard NIR stack, no IR-cut filter in the path, a bandpass filter matched to the illuminator, and a lens that transmits 850nm. See 850nm vs 940nm and NIR imaging in machine vision for the full stack.
Face recognition: even illumination and low distortion
Face recognition covers a larger feature, so pixel-coverage pressure is lower, but even illumination and low distortion dominate. A single off-axis source throws shadows that shift with subject position, and barrel or pincushion warps facial geometry near the edges where off-center subjects sit. Many systems add 850nm NIR so capture stays consistent day and night, which again needs the NIR stack above.
Commonlands does not publish or validate biometric matching-accuracy figures; those depend on the algorithm, enrollment quality, and population statistics, not the lens. Verify accuracy claims with the biometric software vendor.
데이터 수집 애플리케이션을 위한 Commonlands 렌즈 예시
바코드 판독, OCR 및 문서 스캔에 최적화된 렌즈
| 과제 | 추천 렌즈 | 마운트와 EFL | 왜 적합한가 | 링크 |
|---|---|---|---|---|
| 라인에서 1D 및 2D 라벨 판독 | CIL064 large format | M12, 6mm | The 86° field suits wide or multi-lane belts where several labels cross at once; one small dense code samples better with a longer EFL. The 11mm image circle covers sensors up to 2/3", including 1/1.6" parts such as the IMX676, so pixel density at that field comes from sensor resolution. F/2.9 fixed, rated for 6MP at 3µm pitch. | View CIL064 |
| 근거리 DPM 및 소형 코드 | CIL052 저왜곡 | M12, 5.2mm | Pixel density follows magnification, not focal length alone: at a fixed sensor and working distance a shorter EFL widens the field and lowers it. This 5.2mm design earns the slot by framing a small code from a short standoff, and -0.1% rectilinear distortion keeps modules decodable near the frame edge. F/3.4 fixed, up to 1/1.8" sensors. | CIL052 보기 |
| OCR 및 문서 스캔 | CIL532 C-mount | C-마운트, 12mm | +0.05% distortion across an 11.1mm image circle suits full-page geometry, and the F/2.0-F/16 adjustable iris trades aperture for depth of field on curved labels or uneven documents. Up to 2/3" sensors at 12MP. | View CIL532 |
자주 묻는 질문
머신 비전 분야의 OCR 작업에는 어떤 렌즈를 사용해야 할까요?
Start with a fixed focal length lens sized to put at least 20 pixels across the smallest character's body height, x-height for lowercase and cap height for all-caps. A low-distortion M12 lens such as the CIL052 suits moderate working distances for embedded OCR and label reading. When the camera must stay back, a longer focal length preserves character size on the sensor. C-mount is preferred when an adjustable iris is needed for depth-of-field control, or when the sensor exceeds the M12 lens's image circle, typically above 1/1.8 inch.
머신 비전에서 문서 스캔을 할 때 어떤 렌즈를 사용해야 할까요?
Start with document size, working distance, and sensor size, then calculate the focal length so the full page fills the sensor field at that working distance. Choose a low-distortion fixed focal lens matched to those numbers rather than the widest lens that technically fits. For embedded setups, a low-distortion M12 lens such as the CIL052 is practical. For bench or archival scanning, where aperture control and larger sensors matter, a C-mount lens gives more control.
홍채 인식에는 어떤 렌즈가 필요한가요?
Iris recognition needs an NIR-transmitting lens paired with roughly 850nm illumination and a matching bandpass filter, sized to put enough pixels across the iris diameter (commonly cited targets run from about 100 to 200 pixels across the iris for standards-grade capture). The lens and filter stack must pass 850nm efficiently. A standard visible-only IR-cut path blocks the wavelength the sensor needs. See the Commonlands NIR imaging guide for the full filter and illumination stack.
1D 바코드와 데이터 매트릭스 코드를 읽는 데 있어 어떤 차이가 있나요?
1D barcodes encode data in bars along one axis and can be decoded from a single scan line, so blur along the bars costs less than blur across them. That margin shrinks when orientation varies, bars are short, or quiet zones are damaged. The driving parameter is the X dimension, the narrowest bar width. Data Matrix and QR codes encode data in both axes, so every module must resolve in two directions, raising the requirements on MTF uniformity, distortion, and focus across the code.
얼굴 인식 카메라의 광학 시스템에는 무엇이 필요한가요?
얼굴 인식에는 촬영 영역 전체에 걸쳐 균일한 조명이 필요하며, 프레임 가장자리 근처에서 얼굴 형태가 왜곡되지 않도록 왜곡이 적어야 하고, 사용되는 매칭 알고리즘에 맞춰 동공 간 거리나 얼굴 너비에 걸쳐 충분한 픽셀이 확보되어야 합니다. 많은 출입 통제 및 신원 확인 시스템은 주변 가시광선 조명에 관계없이 일관된 촬영이 가능하도록 약 850nm 파장의 근적외선(NIR) 조명을 추가하는데, 이를 위해서는 해당 파장을 투과하는 렌즈와 필터 경로가 필요합니다.
데이터 수집 용도에 맞는 렌즈를 선택하는 데 도움이 필요하신가요?
Describe the code type, character size, document geometry, or biometric modality, with working distance, sensor, and line speed. Commonlands engineering can work through pixel coverage, depth of field, and illumination before you commit to hardware.



