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 ground station in real time, which is almost standard. Suppose you want something advanced--to process the captured image directly on the drone and implement your own active control. In fact, visual tracking has been in some high-end consumer-class UAV has the application, just play out of the box and never have their own hands-on;).

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: Participated in a blog post FY650 assembly
    • Joystick joystick: For Test and Intervention gimbal (¥8.00)
    • Arduino UNO Development Board: Used for joystick output signal collection 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 Adjustment of self-active 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. So the joystick connected to the Arduino complete the input analog signal of the ad conversion. and send the converted signal through the serial port to the Raspberry Pi.

Through this system and the oscilloscope, it is clear the principle of the gimbal rotation control and the control signal characteristics. Gimbal Debug Phase System Connection diagram For example, see below. Finally, the Raspberry Pi Gpio controls the gimbal tilt and horizontal rotation. I began to want to use GoPro as a video collection device, but looked at a lot of information and tried various methods to find the temporary impossible to achieve (if there is a message please tell me:). So I switched to a cheap webcam.


GoPro can pass the image to the phone or pad in real time via WiFi. Just can't pass it to the Raspberry Pi.

(2) to write the gimbal control algorithm

The characteristics of the gimbal control signal based on the previous step. Write the gimbal control algorithm. 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 of the number of parameters such as debugging.


(2) Copy algorithm to Raspberry Pi debug

Since the Raspberry Pi has multiple Gpio Lianyun stations, gimbal tracking control must be debugged on the Raspberry Pi. The advantage of Python's multiplatform deployment is that it can be debugged by copying the algorithm directly to the Raspberry Pi. The debugging process is slightly complicated and the effect is not good at the beginning. Patient adjustment, patience to change the algorithm, the effect will slowly come out.



Let's take a look at the following content.


third, follow -up demonstration

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

Tracking effect:


Now 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.