Perch landing
Depth estimation from one camera
Estimates a perch's distance and orientation from a single camera.
- Company
University of Utah- Role
- Researcher
- Domains
- Research
- AI/ML
- Hardware

- Error at 25 cm
- 0.7 cm
- Error at 1 m
- 5.7 cm
- Focal length:
- 3.22 mm
On this page
Tools & methods
- C++
- OpenCV
- HSV segmentation
- Image moments
- Kalman filter
- CMake
- Visual servoing
The problem
A drone landing on a perch has no GPS signal, no laser rangefinder, and no dedicated depth sensor: just a camera.
It needs to figure out exactly how far away the landing target is and whether it's correctly aligned, using only what appears in a single video frame. Get the math wrong, and the drone crashes.
The challenge
Autonomous UAV landing on a perch requires knowing the perch's 3D position and the camera's attitude relative to it, without a depth sensor, IMU, or GPS. The system had to recover all of this from a single video frame using only the geometric properties of the detected blob: its centroid, principal axes, and apparent size.
The depth estimation formula Z = f·X/X₀ is simple in principle but sensitive to blob detection noise, so the pipeline needed to be robust to partial occlusion and varying lighting.
System design
The pipeline runs in real time on each video frame: (1) Convert BGR → HSV and threshold for the target color (yellow: H=20–30, S=50–255, V=100–255) to isolate the blob. (2) Compute zeroth, first, and second-order image moments (M00, M10, M01, M20, M02, M11) to recover centroid (cx, cy) and shape covariance. (3) Eigendecompose the 2×2 covariance matrix to get principal axes and orientation angle θ: this gives camera roll/pitch relative to the perch. (4) Depth: Z = f · X_real / X_pixels, where focal length f=3.22 mm was measured via calibration.
Output: [cx, cy, θ, Z] written to a position matrix file and used as the visual error signal for the PID controller. A complementary OpenCV toolkit was developed alongside: Canny edge detection with interactive threshold sliders, HSV range calibration tool, and SURF feature matching.
Results
Depth estimation accuracy: 0.67 cm error at 25 cm, 5.7 cm at 1 m, and 25 cm at 2 m. Error increased with distance at the tested points. Orientation estimation successfully recovered camera attitude (roll/pitch) relative to the perch surface at all tested distances. The full pipeline ran at real-time video rates in C++ on a laptop. Results were validated against a Vicon motion capture ground-truth system and documented in the final project report.
Gallery
Select an image to open the viewer. Choose Actual size for images that offer it.
More from University of Utah

RC glider
Shows how a hand-built RC glider steers with two servos and one brushless motor.
Next case study

Quadrotor
Uses camera input to guide a quadrotor onto a perch when GPS is unavailable.

Quanser
Coordinates two robot arms so they can move a shared load.

Micro-quadrotor
Shows how adaptive control helps a simulated quadrotor recover from disturbances with a swinging load.

iRobot Create
Uses infrared range readings to map a room and plan a route on embedded hardware.
7 other case studies from University of Utah, 5 shown here.
All University of Utah projectsTalk through the research
I can take you through the method behind Perch landing, the data it produced, and what the results mean in practice.