マシンビジョンにおけるバーコード読み取り: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.
1次元バーコード、2次元データマトリックスおよびQRコード、そしてダイレクトパーツマーク(DPM)コードの違い
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 | なぜこれが適しているのか | リンク |
|---|---|---|---|---|
| ライン上での1次元および2次元ラベルの読み取り | 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.
1次元バーコードとデータマトリックスコードの読み取りには、どのような違いがありますか?
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.



