Protecting airspace from unauthorized drones needs a camera that keeps sweeping the sky rather than staring at one fixed view.
Wrote Python control software on the Dahua PTZ camera's HTTP API that sweeps a predictable scan pattern and, when the AI computer reports a drone, switches to tracking to keep it in frame.
Delivered the camera-control layer of a drone-detection system at QMIC (2021).
Business Overview
A camera-control system that automatically scans the sky and, when a detection system identifies a drone, directs the camera to keep the object in view.
Potential Business & Industry Use Cases
- Airport, stadium, campus, or critical-site situational awareness workflows.
- Automated PTZ camera patrols for perimeter and large-area surveillance.
- A general moving-camera tracking component for wildlife, traffic, or industrial monitoring after appropriate model adaptation.
Objective
Provide an automated, continuously moving sensor layer for detecting unauthorized drones in protected airspace by driving a PTZ camera through a deterministic sky-scanning pattern and handing off confirmed detections to a downstream AI inference engine.
Tasks Performed
Studied Dahua PTZ HTTP API documentation to understand pan/tilt/zoom control endpoints. Wrote a Python control application that commanded the camera head through a predictable, repeating scan pattern across defined azimuth and elevation angles. Implemented a detection callback interface: when the downstream AI computer identified a drone in frame, the system switched from scan mode to track mode, locking the camera onto the target to keep it within frame. Tuned scan speed and step intervals to balance coverage rate against frame quality for AI inference.
Items Involved
Dahua PTZ IP camera · Dahua HTTP REST API · Python control application · AI inference computer (downstream) · network infrastructure
How the Elements Connect
The Python controller issues sequential HTTP commands to the camera's pan/tilt endpoints, driving a raster scan across the sky sector. Video is simultaneously streamed to the AI inference computer which runs a drone detector. A positive detection triggers a callback to the Python controller which switches from pre-programmed scan coordinates to real-time tracking: it reads the drone's bounding-box position within the frame and issues corrective pan/tilt commands to center it. This sensor-effector loop is directly analogous to a C-UAS cue-track-engage pipeline.
Outcome
Deployed as part of QMIC's counter-drone capability suite. Demonstrated how a commodity PTZ camera can be transformed into a programmable airspace sensor through software alone, with no custom hardware modifications. Established the pattern later used for Smart-Parking PTZ installations.