Ultralytics YOLO27:
License YOLO
Back to Ultralytics Glossary

Visual Servoing

Visual servoing is a feedback-control method that uses camera images to guide robot motion through continuous visual corrections toward a target.

Visual servoing is a feedback-control technique that uses camera images to continuously adjust a robot's movement toward a desired position or view. The robot observes visual features, measures their difference from a target configuration, and corrects its motion as new images arrive. This connects computer vision, which interprets images, with robotics, which turns those measurements into physical action. Visual servo control is a synonym. J. Hill and W. T. Park introduced the term in 1979 with Real Time Control of a Robot with a Mobile Camera.

How Visual Servoing Works#

A visual servoing system compares current observations with a desired image or relative pose. Feature extraction supplies measurements such as keypoints, line locations, or object contours. A controller converts the resulting error into motion commands. Movement changes the camera's observations, closing the feedback loop and allowing repeated corrections as the robot approaches its goal.

An interaction matrix, also called an image Jacobian, describes how camera motion changes visual measurements. Its pseudoinverse maps feature error into a corrective velocity; the controller gain sets the strength of that correction. Camera mounting defines two common arrangements: eye-in-hand places the camera on the moving tool, while eye-to-hand uses an external camera observing the workspace.

Ultralytics YOLO supplies perception measurements for this loop: YOLO26 produces bounding boxes through object detection, and its ROS integration passes camera-derived detections and depth information between robot software components. A downstream controller uses those measurements to calculate movement.

Image-Based and Position-Based Visual Servoing#

The principal methods differ in the representation of the control error:

  • Image-based visual servoing (IBVS): Minimizes differences between current and desired image features, such as point coordinates. Point-feature controllers use camera geometry and depth estimates to relate image motion to physical movement.
  • Position-based visual servoing (PBVS): Uses pose estimation to recover three-dimensional position and orientation, then reduces the difference from the desired pose. Camera calibration and geometric reconstruction affect its accuracy.
  • Hybrid visual servoing: Combines image-space and three-dimensional measurements. The established 2.5D visual servoing approach combines image features with partial pose information.

Object tracking maintains feature or object correspondence across frames; visual servoing uses those observations to control motion. Visual SLAM estimates camera motion and builds a map. These perception capabilities support different parts of a robot's navigation and control system.

Applications and Practical Constraints#

  • Robotic Grasping: During close-range grasping, an RGB-D camera can cross its minimum depth-sensing distance and lose valid range measurements. Closed-loop visual grasping uses IBVS to continue correcting the final approach with RGB feature measurements, including when the object moves.
  • Mobile Robot Positioning: The ViSP Pioneer demonstration controls a camera-equipped Pioneer P3-DX robot relative to a visual target. Target observations determine corrective robot movement through a position-based controller.

Timing and visibility directly affect control. Image-processing delay introduces tracking lag and can destabilize the loop. Inference latency therefore matters alongside detection accuracy in real-time inference. Occlusion interrupts feature correspondence, while poorly conditioned feature geometry makes velocity estimates sensitive to image noise. Sensor fusion combines visual measurements with information such as joint encoders to maintain useful state estimates during motion.

A Minimal IBVS Simulation#

This Python simulation applies the standard pseudoinverse control law to a camera translating sideways while observing one stationary point. Install NumPy with pip install numpy.

import numpy as np

point = np.array([0.0, 0.0, 2.0])
camera = np.array([-0.4, 0.2, 0.0])
desired = np.zeros(2)
gain, dt, focal_pixels = 1.0, 0.05, 800.0
initial_error = np.linalg.norm((point - camera)[:2] / point[2])

for _ in range(200):
    relative = point - camera
    observed = relative[:2] / relative[2]
    error = observed - desired
    # Interaction matrix for sideways camera translation.
    interaction = -np.eye(2) / relative[2]
    velocity = -gain * np.linalg.pinv(interaction) @ error
    camera[:2] += velocity * dt

final_error = np.linalg.norm((point - camera)[:2] / point[2])
print(f"Pixel error: {initial_error * focal_pixels:.2f} -> {final_error * focal_pixels:.2f}")

The image error falls from approximately 178.89 pixels to 0.01 pixels as repeated corrections center the point. For point features, the translational interaction terms scale inversely with depth: doubling the point's depth halves the image displacement produced by the same sideways camera translation.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning