マシンビジョンにおけるバーコード読み取り:OCR、文書スキャン、生体認証のためのレンズガイド
コード、文字、ページ、顔などを読み取るためのピクセルカバレッジ、被写界深度、歪み補正:これらは、デコードソフトウェアが依存する光学的な余裕です。
By Max Henkart, Commonlands · Updated July 2026 · 10 min read
Barcode reads, OCR, document scans, and biometric captures all fail for the same reason before software ever runs: the optics did not deliver enough pixels, sharp focus, or clean geometry on the feature that matters. The feature differs by task: the narrowest bar for 1D codes, the module for 2D codes, character x-height for OCR, the iris diameter for biometrics. Fix the sampling requirement first, using the decoder vendor's spec and your own read-rate testing. Then verify depth of field, distortion, and illumination against 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 x-height for OCR, iris diameter for biometrics. Under-sampling that feature is one of the most common causes of read failures in new installations.
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 rather than a fixed percentage.
Depth of field across the working-distance range
Conveyor sag, stacked labels, curved packaging, and stand-off variation all 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, the depth of field guide for the derivation, and ask Commonlands for a measured table when fixture tolerance is tight.
有効視野全体にわたる制御された歪み
Distortion deforms bars, modules, characters, and geometry near the frame edges. Barrel (negative) or pincushion (positive) displacement is largest there. Near the center, most decoders and matchers tolerate it. A low-distortion lens cuts that risk and the correction burden that otherwise falls on software.
作業内容に合わせた照明と露出
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. Size exposure and illumination to the aperture and the feature.
1次元バーコード、2次元データマトリックスおよびQRコード、そしてダイレクトパーツマーク(DPM)コードの違い
Different code types make different demands on the optics and illumination, and sorting them out before selecting a lens avoids the mismatched designs Commonlands most often sees in support.
1次元バーコード(Code 128、GS1-128、Code 39、ITF-14)
One-dimensional barcodes encode data along a single axis, so the lens only has to resolve along the reading axis. Blur perpendicular to the bars is tolerable. 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, not ink. That contrast is 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 at all.
一般的な故障モードの比較
| 不具合の症状 | 考えられる光学的な原因 | 最初に確認すべきパラメータ | 考えられる解決策 |
|---|---|---|---|
| デコードの失敗は、画像の縁付近でのみ発生する | 歪みまたは軸外収差 | 使用中の視野範囲における歪み特性およびエッジMTF | 歪みの少ないレンズを使用し、コードが使用可能な像円内に収まるようにしてください |
| ライン速度でのデコードは失敗するが、静的テストでは合格する | 長時間露光によるモーションブラー | 露光時間とコンベア速度(mm/s)の関係 | 露光時間を短縮する;より明るい照明やストロボ照明を追加する |
| さまざまな距離においてデコードに失敗する | 被写界深度が浅すぎる | 絞り設定とセンサーにおける1ピクセルあたりのCoC許容値の関係 | 回折限界以内に絞り込み、それを補うために照度を上げる |
| 短いコードや文字での断続的な不具合 | ピクセルカバレッジが最低閾値を下回っている | 最も狭いバー、モジュール、または文字の高さにわたるピクセル数 | 画角を狭くするか、より長い焦点距離のレンズを使用するか、カメラを被写体に近づける |
| デコードに失敗するのは、光沢のあるラベルまたは金属製のDPMの場合のみです。 | 鏡面反射によるグレアがコントラストを損なっている | 照明角と鏡面反射の幾何学 | 拡散照明または斜光照明に切り替える。LED光源に合わせたバンドパスフィルターを追加する。 |
バーコード読み取りにおける焦点距離と作動距離の選び方
This is exact for rectilinear projection (Hecht, Optics, 5th ed., §5.2), not a thin-lens approximation. 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. 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. Compare that against your decoder vendor's minimum sampling spec.
M12 lenses are typically usable from about 50mm to infinity uncorrected. C-mount lenses run from about 100mm to infinity, both varying by model. For close-range reading on small electronics, check each model's minimum object distance, measured from the front of the lens to the object. Not every datasheet publishes it. See the minimum detectable size guide for how pixel coverage and field of view interact at close range.
OCRおよび文字認識のためのレンズの選定
画素密度と20ピクセルルール
A practical threshold is at least 20 pixels across the x-height of the smallest character, the height of a lowercase x. For the all-caps alphanumerics common on industrial labels, x-height equals full character height. For mixed case, it is roughly half. Below about 10 pixels of x-height, accuracy collapses for most engine and font combinations.
To check a design, multiply the sensor pixel count in the relevant axis by x-height as a fraction of the scene dimension and compare to 20. A 1920-pixel axis over an 80mm scene with 4mm x-height gives 1920 × (4/80) = 96 pixels, well clear; at 0.8mm x-height it drops to 19, which is marginal. 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-number. C-mount wins when depth-of-field control matters, when the sensor exceeds the M12 image circle (typically above 1/1.8 inch, up to 2/3 inch for the largest-coverage designs such as the CIL064), 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, resolve enough pixels for the detail required, and keep page geometry accurate enough that straight edges stay straight. A low-distortion fixed-focal lens is the right default. Telecentric optics are not needed here, and they 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: tighter needs for dimensional accuracy, OCR bounding-box registration, or multi-page alignment call for lower distortion. The CIL052 reaches -0.1% rectilinear distortion for embedded page geometry, with comparable low-distortion C-mount options available. Rolling shutter is usually fine because the scene is static. 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 on the order of 100 to 200 pixels across that diameter, because recognition depends on fine radial and furrow detail. Hitting that at a workable distance usually means a longer focal length or shorter working distance than face capture, since the iris fills a small fraction of the frame.
Iris also depends on illumination near 850nm, matched to the lens and sensor path: 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 for the tradeoff 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 (interpupillary distance, jaw width, feature spacing) near the edges where off-center subjects sit. Many systems add 850nm NIR so capture stays consistent day and night, which again needs an NIR-transmitting lens and matched bandpass filter.
Commonlands does not publish or validate biometric matching-accuracy figures; those depend on the algorithm, enrollment quality, and population statistics, not the lens. This section covers the optical and illumination requirements the lens and filter stack must satisfy. Verify accuracy claims with the biometric software vendor.
データ収集用途向けのCommonlandsレンズの事例
バーコード読み取り、OCR、および文書スキャンに最適なレンズ
| タスク | おすすめのレンズ | マウントとEFL | なぜこれが適しているのか | リンク |
|---|---|---|---|---|
| ライン上での1次元および2次元ラベルの読み取り | CIL064 large format | M12、6mm | The 11mm image circle covers sensors up to 2/3", including 1/1.6" parts such as the IMX676, so pixel density on the code comes from sensor resolution across a wide 86° field. F/2.9 fixed, rated for 6MP at 3µm pitch. | View CIL064 |
| 至近距離でのDPMおよび小型コード | CIL052 低歪み | M12、5.2mm | 近接撮影距離での短焦点EFLは、小型で高密度なコードに高い画素密度をもたらし、-0.1%の直線歪みにより、モジュールがフレームの端近くに収まった場合でもデコードが可能になります。F/3.4固定、最大1/1.8インチセンサーに対応。 | 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 x-height of the smallest character. A low-distortion M12 lens such as the CIL052 works well at 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 is larger than the M12 lens's image circle covers, 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, tolerating blur in the perpendicular direction. 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 be resolvable in two directions, which raises requirements on MTF uniformity, distortion, and focus quality across the full field the code occupies.
顔認識カメラの光学系には何が必要ですか?
顔認識には、撮影領域全体にわたる均一な照明、フレームの端付近で顔の形状が歪まないようにするための低歪み、および使用する照合アルゴリズムに対応するために瞳孔間距離や顔の幅全体にわたって十分な画素数が求められます。多くの入退室管理システムや本人確認システムでは、周囲の可視光照明の影響を受けずに一貫した撮影を行うため、850nm前後の近赤外(NIR)照明を追加しています。そのため、その波長を通過させるレンズとフィルターの構成が必要となります。
データ収集用途に適したレンズ選びについて、サポートが必要ですか?
コードの種類、文字サイズ、文書の寸法、生体認証方式に加え、作動距離、センサー、ライン速度についてもご説明ください。Commonlands Engineeringでは、お客様がハードウェアを決定される前に、ピクセルカバレッジ、被写界深度、歪み、および照明要件について検討いたします。



