Active Optical Perception: How AI Can Control Zoom and Focus

Traditional machine vision fixes the optics, captures one image, and then runs an algorithm. Active optical perception changes the order: the system captures an image, the AI decides what it needs to see next, and the optics move to a better state before the next capture. The result is a closed loop of image, decision, optical change, and re-inspection.

This is not a marketing concept. It is an integration architecture enabled by motorized zoom lenses, motorized focus trim, and a standard control interface. POMEAS provides the programmable optical hardware and the SDK; the AI detection, focus metric, and decision logic are added by the integrator. This article explains the architecture, what is already implemented, what must be integrated, and where the limits are.

The fixed-optics trap

In a conventional setup, every optical parameter is chosen at design time. The lens has a fixed magnification, a fixed working distance, and a fixed depth of field. The camera captures one field of view, and the algorithm works with whatever is in that frame. This is simple and fast, but it breaks when:

  • The same line produces parts of very different sizes.
  • A large part contains a tiny defect that needs to be resolved.
  • The height of the part varies, so focus drifts between units.
  • A single pass must both locate a feature and inspect it at high resolution.

The usual workaround is to add more cameras and lenses. A better solution is to make the optics programmable so that one system can change its own field of view, magnification, and focus between captures.

What Active Optical Perception means

Active optical perception is a control loop, not a product name. The flow is:

  1. Capture: the camera acquires an image at the current zoom and focus.
  2. Detect: an AI or classical vision model finds regions of interest (ROIs) and classifies them.
  3. Decide: the system evaluates feature size, confidence, or focus quality and decides whether a different zoom, focus, or lighting state is needed.
  4. Move: the motorized optics change to the new state.
  5. Re-capture: a new image is taken under the updated optical conditions.
  6. Re-inspect: the algorithm runs again, this time with better data.

The key difference from fixed optics is that the AI is not just an analyzer; it is also a controller. It changes the sensor’s view of the world based on what it has already seen.

What POMEAS motorized optics already provide

The programmable hardware layer already exists in the POMEAS motorized zoom lens families. These capabilities are implemented and documented:

Capability How it is accessed Status
Motorized zoom to absolute position PMSOptical_MoveTo(pHandle, nPulse) or RS-232 XG command Implemented
Current position readback PMSOptical_GetPos or XN command Implemented
Motion status readback PMSOptical_GetStatus returns 0 (moving), 1 (stopped), 2 (not initialized) Implemented
Preset zoom positions Software “recorded positions” / point motion table Implemented
Motorized focus trim Dual-motor models such as PMS-LZL-12110-Z12 provide 12 mm focus-trim travel Implemented
PLC / PC control RS-232 9600/8/N or TCP 192.168.1.200:4196 Implemented
Home / limit status Encrypted-board API: EncryptCheckHomeStatus Implemented

This is the control plane. The optics can move to a commanded position, report where they are, and tell the host when they have stopped. That is enough to build a software-defined optical loop.

What the integration side must add

The AI and decision layers are not built into the POMEAS hardware. They must be supplied by the integrator or vision platform. The following pieces are required to close the active-perception loop:

  • ROI detection: a model that finds the region to inspect. This can be a classical blob detector or a trained neural network.
  • Feature-size or confidence evaluation: logic that decides whether the ROI is too small, too large, or too uncertain at the current magnification.
  • Zoom decision: a mapping from feature size to a zoom position or preset. This mapping is usually part of the optical recipe.
  • Focus metric: an image-quality metric such as gradient magnitude, Tamura, or Laplacian variance, used to judge focus.
  • Focus search: an algorithm that changes the focus trim or Z position and re-evaluates the metric until the best focus is found.
  • Recipe engine: a table or database that maps product ID, inspection step, and defect class to zoom, focus, lighting, exposure, and acquisition parameters.

These functions are integrable with the POMEAS control interface, but they are not part of it. The correct description is therefore “motorized optics can be integrated into an AI-controlled inspection architecture,” not “POMEAS AI automatically controls the optics.”

The three control modes in practice

Mode What happens POMEAS side Integrator side
Recipe-driven Product ID selects pre-defined zoom, focus, and lighting parameters Move to commanded positions (A) Recipe table and PLC/PC command logic
Confidence-based zoom AI confidence is below threshold, so the system zooms in and re-runs inference Execute zoom move on command (A) Confidence evaluation and retry policy
Autofocus search Focus metric is computed on each frame; the focus axis is moved until the metric peaks Move focus trim on command (A) Focus metric and hill-climbing search

Recipe-driven switching is the most common industrial use case. Confidence-based zoom is useful for mixed-SKU lines. Autofocus search is needed when part height varies.

Worked workflow: multi-scale PCB inspection

Consider a PCB inspection station that must find a 0.5 mm fiducial mark and then inspect a 5 µm solder-joint defect on the same board:

  1. Low-mag capture: the system starts at 0.7X zoom, covering about 15.7 × 12.6 mm on a 2/3" sensor. The AI model locates the fiducial and computes the board position.
  2. Recipe lookup: based on the board product ID, the recipe selects 4.5X zoom and the corresponding focus trim position for the solder-joint region.
  3. Zoom move: the PC sends PMSOptical_MoveTo to the commanded pulse position and polls GetStatus until the lens reports stopped.
  4. Focus move: if the board warpage is unknown, the PC runs a small focus search around the recipe focus position using the focus-trim motor.
  5. High-mag capture: the camera captures the solder joint at high resolution. The AI classifier now sees the joint at roughly 7–10 pixels per feature dimension.
  6. Decision: the classifier returns pass/fail. The system logs the zoom and focus positions used for traceability.

This workflow is implementable today with the POMEAS SDK. What is not included is the AI model, the recipe database, or the focus metric. Those are the integrator’s scope.

The Optical Recipe concept

An optical recipe connects the physical part to the optical state. A minimal recipe contains:

Field Description
Product ID / SKU The part program that selects this recipe
ROI coordinates Where to look, relative to the fiducial or carrier
Zoom position Pulse position or preset name for the zoom motor
Focus position Focus-trim pulse position or Z-axis position
Lighting Coaxial, ring, fill, or dark-field segment settings
Exposure Camera exposure time and gain
Acquisition trigger Software or hardware trigger source

The recipe turns “inspect this part” into a sequence of concrete optical states. Without a recipe, the system would have to discover the right state on every cycle, which is slower and less repeatable.

Where this architecture is not the right choice

  • Fixed-SKU, fixed-FOV lines: if nothing changes between cycles, a fixed lens is faster, cheaper, and more repeatable.
  • Very high-speed inline inspection: moving zoom and focus takes time. If the required cycle time is shorter than the move-and-settle time, use multiple fixed-magnification stations instead.
  • Sub-micron dimensional metrology: for measurement-grade repeatability, a telecentric lens with a calibrated pixel scale is usually preferable to a zoom lens.
  • Robot guidance or hand-eye coordination: the POMEAS motorized zoom lens is an optical frontend. Robot kinematics, calibration, and path planning must be handled by the robot integrator.
  • Autonomous AI without engineering guardrails: allowing an AI to move optics without position limits, collision checks, and timeout handling is a safety risk, not a feature.

Key takeaways

  • Active optical perception is a control loop in which AI decides to change zoom or focus before re-capturing.
  • POMEAS motorized zoom lenses provide the programmable optical layer: absolute zoom position, focus trim, status readback, and preset positions.
  • The AI detection, focus metric, recipe engine, and decision logic must be added by the integrator.
  • Recipe-driven mode is the most practical industrial starting point. Confidence-based zoom and autofocus search are natural extensions.
  • Cycle time, repeatability, and safety limits must be tested on the real part before deploying the loop in production.

Frequently asked questions

Can AI directly control a POMEAS motorized zoom lens?

The lens is controlled through the POMEAS SDK or RS-232/Ethernet commands. AI software running on a PC or PLC can call these commands, so the AI can indirectly control zoom and focus. The AI algorithm itself is not part of the POMEAS lens.

What is active optical perception?

It is a machine vision architecture in which the system captures an image, evaluates it, changes the optical state (zoom, focus, lighting), and then captures again. The optics become part of the inspection loop rather than a fixed input.

Does POMEAS provide the AI model?

No. POMEAS provides the motorized optics and the control interface. The integrator provides the AI model, focus metric, and decision logic.

What is an optical recipe?

An optical recipe maps a product or inspection step to a set of optical parameters: zoom position, focus position, lighting, exposure, and acquisition trigger. It lets the system switch between inspection configurations without manual adjustment.

What is the difference between adaptive FOV and adaptive magnification?

Adaptive field of view changes how much of the object is visible. Adaptive magnification changes the optical size of the image. They are usually coupled: zooming in reduces the field of view and increases magnification at the same time. The POMEAS zoom lens controls both with one motor position.

Can the system focus automatically?

The MP-series auto-focus video microscope has a built-in auto-focus module. For custom setups using dual-motor zoom lenses, the focus-trim motor can be driven by the SDK, but the focus-search algorithm must be supplied by the integrator.

What communication interface is used?

The motorized zoom lens control cards support RS-232 at 9600 baud with 8 data bits and no parity, or Ethernet to 192.168.1.200 on port 4196. The SDK is available for Windows C++ and C# applications.

Where can I read more about programmable optics?

The programmable optics overview defines the capability tiers and wording rules. For the hardware side, see the equipment integration case and the motorized digital microscope guide.

Need help designing an AI-controlled optical loop? Contact POMEAS with your part size range, defect requirements, and cycle-time target.

Go Back Top
VK Message
WhatsApp

Scan QR Code

WhatsApp QR Code
Wechat

Scan QR Code

Wechat
Phone Number
+8618598102007
Copied!
Online Message

Online Message

Click to refresh