DIY A UAV Vision tracking system based on Raspberry Pi and Python

Source: Internet
Author: User


DIYA UAV Vision tracking system based on Raspberry Pi and Python


The drone's image is stored and transmitted to the Earth station in real time, almost standard. If you want a bit more advanced-how do you do it directly on the drone and automate the shooting process? In fact, the visual tracking has been in some high-end consumer-class UAV has the application, but play ready-made never do their own hands;). Some time ago DIY a UAV three-axis gimbal Vision Tracking system, the removal of the gimbal spent ¥370, this article will design ideas and experimental results to share.


first, the basic configuration

1.1Hardware
    • Computing platform: Raspberry Pi 3 (¥219.00)
    • Webcam: USB Webcam (¥108.00)
    • Gimbal: Refer to the previous post FY650 assembly
    • Joystick joystick: For testing and Intervention gimbal (¥8.00)
    • Arduino UNO Development Board: For joystick output signal acquisition and ad conversion and communication with Raspberry Pi serial port (¥35.00)

1.2Software

    • Programming Language: Python
    • Integrated development environment 1:eclipse, programmatic debugging of visual algorithms on the Windows platform
    • Integrated development Environment 2:geany, the algorithm on the Linux platform and the Cloud Tsu tune

1.3 Preparation Knowledge
Some of the previous blogs describe the basics of this system:

    • Raspberry Pi Machine Vision Programming Environment setup (point me)
    • Python Machine Vision Programming environment construction
    • PID regulation of automatic control system
    • Flying over 650 drone installations

second, the design steps

2.1 gimbal Commissioning

(1) Build a system to control gimbal rotation with joystick

Because the Raspberry Pi Gpio does not have an analog input port, the joystick connect the Arduino to complete the ad conversion of the input analog signal and send the converted signal to the Raspberry Pi via the serial port. Through this system and the oscilloscope, it is clear the principle of the gimbal rotation control and the control signal characteristics. The system connection diagram for the gimbal commissioning phase is shown below. Finally, the gimbal tilt and horizontal rotation are controlled by the Raspberry Pi Gpio. Initially wanted to use GoPro as a video capture device, but looked up a lot of information also tried various methods found temporarily unable to achieve (if any, please leave a message to tell me:), so changed a cheap webcam.

GoPro can pass the image to the phone or pad in real time via WiFi, which is not transmitted to the Raspberry Pi.

(2) to write the gimbal control algorithm

According to the characteristics of the gimbal control signal, the Gimbal control algorithm is developed. The input is the offset of the target center and the image Center x, y, the output is the gimbal pitch, the horizontal control variable Dx,dy.

Yes, the camera shell is a-_-of paper paste.

2.2 Algorithm Debugging

(1) Write tracking algorithms on the Windows platform

USB camera connected to the computer with eclipse write tracking algorithm, output deviation and other parameters debugging.


(2) Copy algorithm to Raspberry Pi debug

Because the Raspberry Pi has multiple Gpio Lianyun, the gimbal tracking control must be debugged on the Raspberry Pi. The benefits of a Python multiplatform deployment are reflected in this, and the algorithm is copied directly to the Raspberry Pi to run debugging. Debugging process a little bit complex, the first effect is not good, patient adjustment, patience to change the algorithm, the effect will slowly come out.


The effect of the motion let's look at the following content.


third, follow -up demonstration

Indoor Tracking Effect video link:http://www.tudou.com/programs/view/68JDFqex1yM/

Tracking effect:


At present, the gimbal and the camera have installed 650 unmanned aerial vehicles, the effect of aerial shooting has yet to be tested. Welcome message or email [email protected] discussion:)


Reprint please indicate the source (this article update link): http://blog.csdn.net/iracer/article/details/54837636


DIY A UAV Vision tracking system based on Raspberry Pi and Python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.