Vision-Based Precision Landing for Autonomous Drones

A real-time computer vision system enabling autonomous drones to detect an IR marker and land on it precisely using a Raspberry Pi and DroneKit.

Technologies

Python, Raspberry Pi, DroneKit, MAVLink, OpenCV, Computer Vision

Purpose

The goal of this project is to let an autonomous drone land precisely on a defined target - far more accurately than GPS alone allows. The drone navigates to a known GPS position, descends to a set altitude, then uses a downward-facing camera to detect a custom infrared marker and close the remaining distance through closed-loop visual control.

Started in 2022, the project was built on top of a master’s thesis and reworked its detection and control approach end to end. You can access the thesis via avesis.marmara.edu.tr (last accessed: 12 June 2026).

Although the project was started in 2022 and had nearly reached its end by 2024, I only began documenting it in June 2026. Before you make the mistake of asking why it took three years to build and four to document, you can read my blog post - which I’m not proud of.

Features

Usage

The system runs on a Raspberry Pi connected to the flight controller via MAVLink, using DroneKit for vehicle control. Operation proceeds in three stages:

  1. Initialize - arm the vehicle, verify sensor state, establish MAVLink communication.
  2. Takeoff and search - climb to search altitude and scan for the marker; the drone holds position and rotates until the pattern is found.
  3. Navigate and land - compute the marker’s offset from frame center, translate it to a velocity correction, and descend while continuously correcting lateral position.

Altitude is read from LIDAR when in range and the barometer otherwise - used only to gate stage transitions and trigger disarm, not to compute position. The landing pad is a custom T-pattern built from 940 nm infrared LEDs, paired with a matching bandpass filter on the camera.

Limitations

Special Thanks

Access & License

You can access the project’s source code via github.com/caferozpinar/precision-landing-drone.

Released under the MIT License.