| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This is an example using the Tello SDK v1.3.0.0 and above to receive video stream from Tello camera and do real-time body pose recognition processing on PC. You're welcome to fork/clone/copy this example and let Tello fly creatively.
In order to facilitate you to install python2.7 and various dependencies, we have written a one-click installation script for windows, Linux and macos. You can choose to run this script for the one-click installation, or you can download python2.7 and related libraries and dependencies online. If you have questions about the actions that the script performs, you can open the script with an editor and look up the comments for each instruction in the script. In addition, we have additionally written an uninstall script that cleans and restores all downloaded and configured content from the one-click installation script.
Windows
Go to the "install\Windows" folder,select and run the correct "windows_install.bat" according to your computer operating system bits.
Linux (Ubuntu 14.04 and above)
Go to the "install\Linux" folder in command line, run
chmod +x linux_install.sh ./linux_install.sh
Mac
chmod a+x ./mac_install.sh ./mac_install.sh
If you see no errors during installation, you are good to go!
You can get the pose recognition model by run the script named "getModels.bat" or "getModels.bat"(according to your os type) under the path of "./model/".And it will take some time to download the model.
Step1. Turn on Tello and connect your computer device to Tello via wifi.
Step2. Open project folder in terminal. Run:
python main.py
Step3. A UI will show up, you can now:
Watch live video stream from the Tello camera;
Take snapshot and save jpg to local folder;
Open Command Panel, which allows you to:
Turn on Pose Recognition mode. A 17-joints skeleton based on your body will appear on the screen. Raise your arm UP or FLAT (like a "Y" or "T"), Tello will move forward 0.5 meters. Raise both your arm DOWN (your body be like '/|'), Tello will move back 0.5 meters.Raise your arm bending(your body be like 'v|v'),Tello will land.
Wrapper class to interact with Tello drone. Modified from https://github.com/microlinux/tello
The object starts 2 threads:
You can use read() to read the last frame from Tello camera, and pause the video by setting video_freeze(is_freeze=True).
Modified from: https://www.pyimagesearch.com/2016/05/30/displaying-a-video-feed-with-opencv-and-tkinter/
Build with Tkinter. Display video, control video play/pause and control Tello using buttons and arrow keys. The object starts 4 threads:
Code modifed from:https://github.com/spmallick/learnopencv/tree/master/OpenPose Using pre-trained caffe model from https://github.com/CMU-Perceptual-Computing-Lab/openpose.
Detect Body Pose and draw a 17-joints skeleton. Analyze pose by calculating angles between joints.
From https://github.com/DaWelter/h264decoder.
A c++ based class that decodes raw h264 data. This module interacts with python language via python-libboost library, and its decoding functionality is based on ffmpeg library.
After compilation, a libh264decoder.so or libh264decoder.pyd file will be placed in the working directory so that the main python file can reference it.
If you have to compile it from source,with Linux or Mac,you can:
cd h264decoder mkdir build cd build cmake .. make cp libh264decoder.so ../../
With Windows,you can create a project through visual studio, add files in h264decoder and dependencies such as ffmpeg and libboost, compile the project and generate a libh264decoder.pyd file.We have generated a libh264decoder.pyd and put it in the "\h264decoder\Windows"foleder so that you can copy put it to "python/site-package".
| Back | FazBrowse Home | New Git URL |