マシンビジョン・フォーカス・デザイン

マシンビジョンにおけるオートフォーカス:固定焦点、電動式M12マウント、および手動フォーカス機構

固定焦点とオートフォーカスの選択基準、M12レンズを駆動するボイスコイルおよびピエゾ式のハードウェア、そして両者の焦点調整機構について。

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

Commonlands piezoelectric M12 autofocus actuator carrying a small lens on a board-level camera module

Autofocus in machine vision means an actuator moves the lens focus position during operation to keep the target sharp as working distance changes. The lens is a standard fixed-focal-length optic. The mechanism lives in a motorized mount or voice-coil actuator and in the host control loop.

撮影対象が安定している場合は、統合が簡単でキャリブレーションも維持されるため、マニュアルフォーカスの「セット&ロック」方式をデフォルトとして設定するのが望ましい。オートフォーカスを指定するのは、撮影中にカメラと被写体の距離が許容される被写界深度の範囲を超えて変化し、光学系だけではその差を埋められない場合に限る。

マシンビジョンにおけるオートフォーカスとは何ですか?

Autofocus in machine vision means the system adjusts the lens focus position during operation to keep a target sharp as the camera-to-target distance changes. A motorized mount or voice-coil actuator moves a standard fixed-focal-length M12 lens along the optical axis, so the mechanism lives in the mount and its control electronics, not in the glass.

A consumer camera integrates sensing, actuator, and search in one body. A machine vision camera splits those apart, keeping the lens passive while the host decides when and where to move it. Autofocus here is a system-design decision, not a lens purchase. Focus changes where the lens is sharpest, not its focal length, so reframing between products needs a different focal length, not an actuator.

Systems land on one of three architectures: set-and-lock manual focus (the default for stable geometry), motorized refocus at changeover, and continuous autofocus per part or per frame. Each step up adds hardware and failure modes, so the framework below starts from the simplest. Commonlands supplies all three: focus lock rings, and the CLA321 and CLA322 M12 mounts. The hands-on bench procedure is in the guide on how to focus a camera.

Two Commonlands M12 autofocus mounts, a voice-coil actuator beside a larger piezoelectric one
Commonlands offers both: voice-coil motors focus fast, piezo mounts hold position without power.

固定焦点とオートフォーカス:マシンビジョンシステムにはどちらが必要か?

Fixed focus, set once at installation and locked, is the correct default for stable working geometry. Specify autofocus only when the working distance changes during operation by more than the available depth of field, and when a shorter focal length or a smaller aperture cannot cover the variation.

The comparison reads as fixed focus lens vs autofocus lens, but in machine vision it is two architectures built around the same passive optic: a locked M12 lens and one in a motorized mount can be the identical part number, differing only in whether anything moves it after bring-up.

用語集

Fixed focus is not fixed focal length. Fixed focal length describes the optics: one focal length, one angle of view, no zoom. Fixed focus describes the strategy: the lens is set to one distance and locked. Most M12 machine vision lenses are fixed focal length with adjustable focus, so the same lens ships locked or motorized.

ロックされたレンズがなぜキャリブレーションを維持できるのか

A locked lens fixes the lens-to-sensor distance, which sets the intrinsic parameters (focal length in pixels and principal point) that pixel-to-world calibration depends on. Dimension gauging, position detection, and code reading assume those stay put, and an autofocus move changes them. A system that must measure across a focus range has to recalibrate after each move, qualify a tolerance window, or command only positions calibrated at bring-up, which is why calibration-critical systems default to set-and-lock.

ハードウェアを購入する前に、被写界深度を確認してください

Depth of field is the no-moving-parts alternative. On a C-mount lens with an adjustable iris, stopping down trades light for a wider sharp zone. Commonlands M12 lenses have fixed apertures, so their depth of field is set by F-number, focal length, and working distance. That is why autofocus questions come up more often on M12 systems. Run the range through the depth of field calculator before specifying an actuator. If it covers the variation, lock the lens. The depth of field guide covers the underlying math.

Depth of field shrinks as focal length grows, so telephoto systems reach the threshold sooner. A 35mm telephoto such as the CIL350 holds a much thinner sharp zone than a 12mm lens like the CIL122 at the same distance, because depth of field scales roughly with the square of the focal length ratio. A shorter lens and a revised standoff often remove the need for an actuator entirely. The working distance guide and the depth of field calculator quantify each case.

焦点許容範囲の両端にあるM12レンズ

IR補正済み 12mm M12レンズ

IR補正済み 12mm M12レンズ

$59.00

.STPをダウンロード商品を見る
IR補正済み 16mm M12レンズ

IR補正機能付き 16mm M12レンズ 8MP

$70.00

.STPをダウンロード商品を見る
16mm M12レンズ CIL160 グローバルシャッター

16mm M12 望遠レンズ

$39.00

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

IR補正済み 25mm M12レンズ

$99.00

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

「望遠」を閲覧する

組み込みビジョンにおいて、コントラスト検出式オートフォーカスと位相検出式オートフォーカスはどのように機能するのでしょうか?

Contrast-detect autofocus steps the lens while maximizing an image sharpness metric. It works with any sensor but needs several frames to find the peak. Phase-detect autofocus samples opposite sides of the aperture on dedicated pixels and reads defocus direction and magnitude in one frame, but only on sensors that include those pixels.

A contrast-detect loop computes a focus score, typically gradient energy or Laplacian variance, moves the actuator one step, and compares. It cannot tell it passed the peak until the score falls, so the search overshoots and returns. Budget five to twenty frames per refocus. Machine vision is friendlier than consumer photography, since controlled illumination, high-contrast targets, and a bounded distance range shorten the search. This is the sensing approach behind most embedded systems that drive mounts like the CLA321 and CLA322.

Phase-detect pixels split light from opposite sides of the exit pupil. The disparity gives the distance and direction to best focus, so the controller commands one directed move. The catch is sensor support: mobile-derived rolling-shutter sensors often include these pixels, while many industrial global-shutter sensors do not, so verify support in the image sensor datasheet. A third path skips image feedback: when the target distance is known from an encoder or a time-of-flight sensor, the host commands a position from a bring-up lookup table.

統合に関する注意事項

Commonlandsのオートフォーカスマウントには、いずれもフォーカス探索用コントローラは搭載されていません。ループの制御権はホスト側にあり、ホストが鮮明度を評価したり距離を読み取ったりした後、USB-C(CLA322)または駆動電流(CLA321)を介してアクチュエータに指令を出します。サイクルタイムを計画する際は、探索処理に必要なホスト側の処理時間とデータ取得フレーム数を考慮に入れてください。

M12のオートフォーカスはどのように機能するのでしょうか? ボイスコイル式とピエゾ式マウントの比較

M12 autofocus adds an actuator that moves a standard M12x0.5 threaded lens along the optical axis. The lens is unchanged. The CLA321 voice-coil mount positions the lens with drive current and needs continuous power to hold, dropping to rest on power loss, carrying lenses up to 7g on 23.5mm hole spacing. The CLA322 piezoelectric ultrasonic mount walks a friction-coupled, non-back-drivable stage in sub-micron steps, holds position unpowered, and reaches a 6.5mm stroke. A fixed-focus lens locked with a ring is the third option and the default whenever geometry is stable.

Commonlands CLA321-VCM voice-coil autofocus motor for M12 lenses up to 7g, side view
In the Commonlands CLA321 voice-coil mount, drive current sets the lens position against a spring return.

Liquid lenses: refocus with no stroke at all

A liquid lens changes optical power instead of position. Corning Varioptic drives an electrowetting cell whose water-oil interface reshapes with applied voltage. Optotune deflects a polymer membrane over a fluid reservoir. Neither translates a lens group, so refocus takes milliseconds with no sliding surfaces to wear, which is why fixed-mount barcode readers that see many package heights favor them. Commonlands sells neither. Both are the usual answer when a mechanical mount cannot keep up.

属性 CLA321-VCM CLA322-AFM
作動 ボイスコイルモーター、バネの復元力に逆らう電流 圧電式超音波リニアアクチュエータ、摩擦結合型ステージ
定格ストローク 5gレンズ使用時、100mAで0.6mm以上 6.5mm
電源が切れても位置を保持する いいえ。連続電流が必要です。 はい。摩擦式カップリングは逆回転防止構造になっています。
停電について 春の元の位置に戻る 最後に指定された位置を維持する
制御インターフェース 標準VCM電流ドライバ 着脱可能なアダプタボードを介したUSB-C
レンズの互換性 M12x0.5レンズ(最大7g) M12x0.5レンズ(最大5g)
価格 $29.00 $199.00

マウントを選ぶ前に、ストロークのサイズを調整してください

Required travel grows with the square of the focal length and falls roughly as 1/WD, so short lenses need microns and long lenses at close range need millimeters. It follows from first-order Gaussian optics: for a unit-focusing lens, one that moves as a rigid assembly, the travel from infinity focus to a working distance WD is approximately:

移動距離 ≈/ (WD − f) 移動量(WD1WD2) =/ (WD1− f) −/ (WD2− f) レンズ全体を移動させて焦点を合わせるレンズにおいて、無限遠から作動距離 WD へ、および 2 つの作動距離間で再焦点合わせを行う際のレンズの移動量。ニュートンの像の式に基づく 1 次近似(Hecht, 『Optics』第 5 版、§5.2);距離は前主平面からのものなので、データシートに記載されている焦点移動量と照らし合わせて確認すること。

A 12mm lens focused from infinity to 200mm needs 12² / (200 − 12) = 0.77mm of travel, which exceeds the CLA321's 0.6mm rated stroke. Few systems refocus from infinity, though: the same lens moving between 300mm and 700mm needs only about 0.29mm, inside the CLA321 stroke. Run the between-distances form across the real working range before selecting the mount. The stroke budget, not the control interface, is usually the binding constraint. The table below extends the calculation and shows which mount covers each case.

Focal length f 旅行用、WD 200mm用インフィニティ トラベル、WD 1000mmまでの無限遠 無限遠からそれを覆う山
6mm 0.19mm 0.04mm CLA321 または CLA322
12mm 0.77mm 0.15mm CLA322:200mm、CLA321:1000mm
25mm 3.57mm 0.64mm CLA322
35mm 7.42mm 1.27mm CLA322:1000mm;200mmの無限遠からはどちらも撮影不可

M12オートフォーカスマウント

調達

Commonlands stocks M12 lens variants in the US, and standard M12x0.5 lenses thread into either mount within its rated payload (7g for the CLA321, 5g for the CLA322). Inside that limit, lens selection and focus architecture are decided independently. Browse the M12 lens collection for the optics and the lens autofocus motors for both mounts.

マニュアルフォーカスレンズとは何ですか?

A manual focus lens is one whose focus position a person sets at installation, by threading an M12 lens in its holder or turning a C-mount focus ring, then locks. After locking it behaves as a fixed-focus optic, but the engineer chose the distance to match the installed geometry, and the lock can be released and reset if that geometry changes.

M12のフォーカス機構:ネジがフォーカス機構そのものです

A standard M12 lens is a rigid optical assembly. Nothing moves inside it. Focus comes from the M12x0.5 mount thread: one full turn moves the whole lens 0.5mm along the axis, so a quarter turn gives 0.125mm, fine enough for bring-up by hand. Threading toward the sensor pushes best focus farther away. Backing it out pulls focus closer. The M12 lens guide covers holder heights and thread engagement.

A C-mount lens is different: an internal cam translates lens groups to rebalance aberrations across the focus range (Kingslake, Lens Design Fundamentals, 2nd ed., §18.3), so it moves glass inside a stationary barrel rather than as one rigid body. Factory fixed-focus modules are a third case, set at manufacture and not user-adjustable, suited to high-volume products with one known geometry. The C-mount guide covers the mount standard and iris options.

Locking is not optional. Vibration and thermal cycling can loosen an unlocked lens, letting it rotate and drift out of focus. A Commonlands AL6061 lock nut ring tightened against the holder face holds the position, and a low out-gassing thread adhesive adds margin in high-vibration installations.

手動フォーカス調整時のピークシャープネスを判定するために使用される、シーメンスのスターフォーカスチャート
シーメンスのスターターゲットを使用すると、手動での調整中にシャープネスのピークを容易に判断できます。

セット・アンド・ロック式金具

Gloved fingers turn a Commonlands M12 lens barrel to focus on a Siemens star chart
固定焦点レンズは、レンズバレルをホルダーにねじ込むことで、一度だけピントを合わせます。

よくある質問

マシンビジョンにおいて、固定焦点とオートフォーカスの違いは何ですか?

Fixed focus means the lens is set to one working distance at installation and locked. It does not change during operation. Autofocus means an actuator adjusts the lens focus position during operation as working distance changes. Fixed focus has fewer failure modes and holds calibration. Autofocus earns its complexity only when distance variation exceeds the depth of field.

M12オートフォーカスとは何ですか?

M12 autofocus is a system, not a lens category. An actuator, either a voice-coil mount like the CLA321 or a piezoelectric ultrasonic mount like the CLA322, moves a standard M12x0.5 threaded lens along the optical axis. The autofocus mechanism lives in the mount and its control electronics. The lens itself is a passive fixed-focal-length optic.

マニュアルフォーカスレンズとは何ですか?

A manual focus lens is a lens whose focus position is set by a person during setup rather than by an actuator during operation. In machine vision, the engineer threads an M12 lens in its holder or turns a C-mount focus ring until the image is sharpest at the working distance. Then the engineer locks the position.

マシンビジョンにおいて、オートフォーカスはどのような場合に活用する価値があるのでしょうか?

オートフォーカスは、作業中に作動距離が許容される被写界深度の範囲を超えて変化する場合や、より短い焦点距離や絞り込みではその範囲をカバーできない場合に、活用する価値があります。代表的な例としては、高さが異なるコンベア上の部品、アームに取り付けられたロボットカメラ、および多品種対応の生産ラインなどが挙げられます。

オートフォーカスによって被写界深度の問題は解決されるのでしょうか?

No. Autofocus moves the focus plane to track the target. It does not increase depth of field. Evaluate optics first: a C-mount lens stopped down from F/2 to F/8 gains roughly four times the depth of field. Specify autofocus when aperture and focal length choices alone cannot cover the working distance range.

ボイスコイル式とピエゾ式オートフォーカスマウントの違いは何ですか?

The Commonlands CLA321 voice-coil mount positions the lens with drive current against a spring return and needs continuous power to hold position. Rated stroke is 0.6mm or more at 100mA with a 5g lens. A piezoelectric ultrasonic mount like the CLA322 steps a friction-coupled stage across 6.5mm and holds position with power removed.

マシンビジョンでは、民生用カメラのように位相差オートフォーカスが使われているのでしょうか?

民生用機器ではほとんど見られません。位相差オートフォーカスには、絞りの両側をサンプリングするセンサー画素が必要ですが、多くの産業用グローバルシャッターセンサーでは、こうした画素が省略されています。組み込みシステムでは、ホスト側でコントラスト検出によるシャープネス検索を行うか、既知または測定済みの目標距離に基づいてオープンループ方式でフォーカスを制御することが一般的です。

重点的に取り組むアーキテクチャの選定について、アドバイスが必要ですか?

Send your working distance range, sensor, cycle time, and format count to the engineering team, or request CLA321 and CLA322 samples to prototype the focus loop. Commonlands orders placed before 12 PM PST typically ship same day from San Diego.