Autofokus in der industriellen Bildverarbeitung: Festfokus, motorisierte M12-Halterungen und Mechanismen für den manuellen Fokus
This guide lays out the decision framework for fixed focus versus autofocus. It covers the voice-coil and piezo hardware that motorizes M12 lenses, and the focus mechanics behind both.
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.
Wenn die Arbeitsgeometrie stabil ist, ist der manuelle Fokus mit „Set-and-Lock“-Funktion die bessere Standardeinstellung, da er einfacher zu integrieren ist und die Kalibrierung beibehält. Legen Sie den Autofokus nur dann fest, wenn sich der Abstand zwischen Kamera und Zielobjekt während des Betriebs um mehr als die verfügbare Schärfentiefe ändert und die Optik allein diese Lücke nicht schließen kann.
Was versteht man unter Autofokus in der industriellen Bildverarbeitung?
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. 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. 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.
Fester Fokus oder Autofokus: Was benötigt Ihr Bildverarbeitungssystem?
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 around the same passive optic: a locked M12 lens and one in a motorized mount can be the identical part number.
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.
Warum ein arretiertes Objektiv die Kalibrierung beibehält
A locked lens fixes the lens-to-sensor distance, which sets the image scale (fx and fy, the focal length in pixels) that pixel-to-world calibration depends on. A decentering or tilting mechanism shifts the principal point outright, and even nominally axial focus motion can move the pupil position, the distortion profile, and the calibrated intrinsics.
Dimension gauging, position detection, and code reading assume that scale stays put, and an axial autofocus move changes it. 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.
Überprüfen Sie die Schärfentiefe, bevor Sie Hardware kaufen
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#, 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. The depth of field guide covers the underlying math.
Depth of field shrinks as focal length grows at a fixed working distance, 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.
Hold the framing constant and most of that advantage cancels: a shorter lens has to sit closer, which returns the working-distance-to-focal-length ratio to where it started. Shortening the focal length buys depth only when the wider field of view is acceptable. The working distance guide and the depth of field calculator quantify each case.
M12-Objektive an den beiden Enden des Fokustoleranzbereichs
Wie funktionieren der Kontrast- und der Phasenautofokus in der Embedded-Vision?
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 the new score to the previous one. It cannot tell it passed the peak until the score falls, so the search overshoots and returns. Budget five to twenty frames per refocus as a starting figure; actuator, search algorithm, scene, and range all move it.
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 a directed move rather than a search. The mapping from disparity to lens position is calibrated per module, and low contrast or actuator backlash can still cost a confirmation frame.
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.
Keine der beiden Autofokus-Halterungen von Commonlands verfügt über eine Steuerung zur Fokussuche. Der Host hat die Kontrolle über den Regelkreis: Er bewertet die Schärfe oder misst die Entfernung und gibt dann über USB-C (CLA322) oder einen Ansteuerstrom (CLA321) Befehle an den Aktuator weiter. Bei der Planung der Zykluszeit sollten Sie die Rechenleistung des Hosts und die für die Suche erforderlichen Bilder einkalkulieren.
Wie funktioniert der Autofokus des M12? Voice-Coil- vs. Piezo-Halterungen
M12 autofocus adds an actuator that moves a standard M12x0.5 threaded lens along the optical axis, and the lens stays unchanged. The CLA321 voice-coil mount positions the lens with drive current and needs continuous power to hold position, dropping to rest on power loss, carrying 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.
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, a fit for fixed-mount barcode readers that see many package heights. Commonlands sells neither. They are worth evaluating when a mechanical mount cannot keep up, against actuator lifetime, optical quality across the tuning range, and drive electronics.
| Attribut | CLA321-VCM | CLA322-AFM |
|---|---|---|
| Betätigung | Schwingspulenmotor, Strom gegen Federkraft | Piezoelektrischer linearer Ultraschallantrieb, reibungskoppelte Plattform |
| Nennhub | ≥ 0,6 mm bei 100 mA mit einer 5-g-Linse | 6,5 mm |
| Behält die Position auch ohne Stromversorgung bei | Nein; es wird Gleichstrom benötigt | Ja; die Reibungskupplung ist nicht rückdrehbar. |
| Bei Stromausfall | Kehrt in die Feder-Ruheposition zurück | Behält die zuletzt befohlene Position bei |
| Steuerungsschnittstelle | Standard-VCM-Stromtreiber | USB-C über abnehmbare Adapterplatine |
| Objektivkompatibilität | M12x0,5-Linsen bis zu 7 g | M12x0,5-Objektive bis zu 5 g |
| Preis | $29.00 | $199.00 |
Legen Sie die Strichstärke fest, bevor Sie die Halterung auswählen.
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. For a unit-focusing lens, one that moves as a rigid assembly, the travel from infinity focus to a working distance WD is approximately:
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.
| Focal length f | Verfahrweg, unendlich bis WD 200 mm | Verfahrweg, unendlich bis WD 1000 mm | Halterung, die es von unendlich weit entfernt abdeckt |
|---|---|---|---|
| 6 mm | 0,19 mm | 0,04 mm | CLA321 oder CLA322 |
| 12 mm | 0,77 mm | 0,15 mm | CLA322 bei 200 mm; CLA321 bei 1000 mm |
| 25 mm | 3,57 mm | 0,64 mm | CLA322 |
| 35 mm | 7,42 mm | 1,27 mm | CLA322 bei 1000 mm; auch nicht bei 200 mm aus der Unendlichkeit |
IR Cut-Off Filter Switchers
IR-Sperrfilter-Umschalter, 20 mm Lochabstand, 7,6 mm Höhe, Tag-/Nacht-Kompensation
$12.00
.STP herunterladenProdukt anzeigen
IR-Sperrfilter / 850-nm-Bandpass-Umschalter, 20 mm Lochabstand, 7,6 mm Höhe, Tag-/Nacht-Kompensation
$12.00
Produkt anzeigenCommonlands 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). Browse the M12 lens collection for the optics and the lens autofocus motors for both mounts.
Was ist ein Objektiv mit manuellem Fokus?
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. The engineer chose the distance to match the installed geometry, and the lock can be released and reset if that geometry changes.
M12-Fokusmechanik: Das Gewinde ist der Fokusmechanismus
A standard M12 lens is a rigid optical assembly, and 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. That is coarse next to the depth of focus of a fast, small-pixel module, which can run from a few micrometers to a few tens, so finish on a fraction of a turn against a live sharpness metric.
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.
An adjustable C-mount lens focuses by turning a ring, not by threading the body. What the ring moves, the whole cell, a front group, or groups on an internal cam, is design-specific, as is image behavior at the near limit; confirm on the datasheet or with Commonlands engineering. 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.
Set-and-Lock-Beschläge
Häufig gestellte Fragen
Was ist der Unterschied zwischen Festfokus und Autofokus in der industriellen Bildverarbeitung?
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.
Was ist der M12-Autofokus?
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.
Was ist ein Objektiv mit manuellem Fokus?
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.
Wann lohnt sich der Einsatz des Autofokus in der industriellen Bildverarbeitung?
Der Autofokus ist dann sinnvoll, wenn sich der Arbeitsabstand während des Betriebs um mehr als die verfügbare Schärfentiefe ändert und wenn eine kürzere Brennweite oder eine kleinere Blende diesen Bereich nicht abdecken können. Typische Anwendungsfälle sind Fördergut unterschiedlicher Höhe, am Roboterarm montierte Kameras und Produktlinien mit verschiedenen Formaten.
Löst der Autofokus ein Problem mit der Schärfentiefe?
No. Autofocus moves the focus plane to track the target. It does not increase depth of field. Evaluate optics first: at a fixed focal length and working distance, stopping a C-mount lens from F/2 to F/8 roughly quadruples geometric depth of field, though diffraction blur grows with the stop and trims the usable gain. Model it in the calculator before specifying autofocus.
Was ist der Unterschied zwischen einer Schwingspule und einer Piezo-Autofokus-Halterung?
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.
Wird bei der industriellen Bildverarbeitung ein Phasendetektions-Autofokus wie bei Consumer-Kameras verwendet?
Im Verbraucherbereich kommt dies selten vor. Der Phasen-Autofokus erfordert Sensorpixel, die gegenüberliegende Seiten der Blende abtasten, und viele industrielle Global-Shutter-Sensoren verzichten darauf. Eingebettete Systeme führen häufiger eine Kontrast-Schärfesuche auf dem Host durch oder steuern den Fokus im offenen Regelkreis anhand einer bekannten oder gemessenen Zielentfernung.
Benötigen Sie Hilfe bei der Auswahl einer Fokusarchitektur?
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 PT typically ship same day from San Diego.









