Coding4Fun Drone posts
- Introduction to DJI Tello
- Analyzing Python samples code from the official SDK
- Drone Hello World ! Takeoff and land
- Tips to connect to Drone WiFi in Windows 10
- Reading data from the Drone, Get battery level
- Sample for real time data read, Get Accelerometer data
- How the drone camera video feed works, using FFMPEG to display the feed
- Open the drone camera video feed using OpenCV
- Performance and OpenCV, measuring FPS
- Detect faces using the drone camera
- Detect a banana and land!
- Flip when a face is detected!
Back to some drone posts! I was kind of busy during the last weeks and now I can get back to write about the drone.
OK, in the last posts I described how to connect and work with the drone camera feed using OpenCV. Now with 2 extra lines of code we can also detect faces. Let’s take a look at the final sample.
In the previous image we can see 2 camera feeds. My computer webcam, where you can see how I hold the drone with the drone camera pointing to my face. And the drone camera feed, presented using OpenCV and drawing a frame over each detected face.
Let’s share some code insights:
- As usual, I resize the camera feed to 320 x 240
- The average processing time is between 40 and 70 FPS
- I use a haar cascade classifier to detect the faces in each frame
Note: I need to write about Haar Cascades as part of my face detection post series.
In my next posts, I’ll add some drone specific behaviors for each face detected.
- Anaconda, My steps to install a virtual environment with TensorFlow, Keras, OpenCV and more
- Let’s do some Face Recognition with 20 lines in Python
- OpenCV – Show Image – imshow()