Face & Movement Tracking System Using a Raspberry Pi + OpenCV + Pan-Tilt HAT + Python

preview_player
Показать описание
Utilise computer vision systems to always keep your face in the centre of the frame. Then add a movement detection and a patrol layer to make finding faces easier (just like a portal turret!)

Make sure to use the Previous Raspberry Pi 'Buster' OS with this Guide.

Related Information

Cameras in combination with machine learning create the most powerful sensor you can ever put on a Raspberry Pi Single Board Computer. And now we are making them smart and mobile with artificial intelligence! The intention here is to not only create an easy-to-use face-tracking system with a Pan-Tilt Hat but also do so in a way that can be readily expanded upon no matter what systems or code additions you choose to use. All code utilised is open-source and fully commented. We are going to control a Pan and Tilt system with a Raspberry Pi so that it keeps your face (and the action) in the centre of the frame. I also demonstrate in the Full Article how to control the speed of rotation either making it very smooth or very fast. After achieving the above the next step is to code a patrol phase for the Pan-Tilt system. So, when it does not see a face, the system moves around its degrees of freedom logically to search for one. Then to aid this patrol phase further we can add in the code the ability to automatically turn towards any moving objects that it identifies. Open-CV is a huge resource that we use here to help solve the real-time computer vision and image processing problems.

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

0:00 Intro
0:23 Tracking System Overview
0:55 Open-CV
1:01 What You Need and Terminal Commands
2:01 Simple Face Tracking Code
2:35 First Pay Off
3:10 Specifics on this Face Recognition
3:29 Patrol, Movement and Face Tracking Code
4:32 Second Pay Off
5:30 Code Adjustments
6:10 Acknowledgment
6:24 Where To Now
7:08 Outro
Рекомендации по теме
Комментарии
Автор

This channel has literally everything, thank you!

michaelmanoukian
Автор

The problem i have with all these you tube videos is they're never real world. Been trying to do this for 6 months and move two 6 volt servos not a pan tilt well yes but 12 inches long which NOPE, never happens. So my robot neck sits their gathering dust.

ZenHulk
Автор

very inspiring, well explained, I love this channel

tariklassouaoui
Автор

Sorry you answered my question at the beginning of the video

Videogame
Автор

would this work if i ran the software on an orange pi 5? as long as i installed all the cameras and required stuff.

mr.carrot
Автор

to save electricity or lengthen the lifetime of the servo motor, is it possible to add motion sensor first before switch on the camera module? so, the motion sensor would be the first layer security, then camera will catch that motion in sentry mode -> face recognition ! just my two cents!

afifzuhairr
Автор

Thank you so much.
Could you please do eyes tracking

abdulrhamanalkinani
Автор

Hello, do you happen to know what piece of code i would need to change to use different servos? For context i have a rpi adafruit 16 channel servo hat from your other video. I would like to use that to host my servos but wondering what i need to adjust to use that instead of the board in this video

michaellopez
Автор

when two are identified, which person is identified

geddajayaram
Автор

My pi camera is responding very slow.. I m using rpi 4 model b 4 gb...how can I reduce the response time? Like I m waving my hand in front of picamera and it shows after 3 to 4 seconds

ajaykushwah
Автор

hello sir love from india i have following on youtube since last year very knowledgeable channel is running you come to the point . I need you help on one of my project I am trying to develop face recognition system that system can identify people either he/she in database or not but I didn't get any specific resources I hope you help me out thanks

pritams_vlog
Автор

I wonder if a stepper motor could be used instead? The only thing I could compare it to is how smooth a c-ram / CIWS operates. (Minus all the weapons). I think it would look amazing if that was possible to setup something like that, with a project like this. It seems like the OpenCV you use, works great.

woolfy
Автор

I can do this using a USB camera, instead of one (opencv ai kit)

talismr
Автор

I couldn’t get my hands on Pimoroni Pan tilt hat but I have a ordinary pan tilt bracket. Can you please suggest me how can I manage with that.

Bhardwajkushagra
Автор

ik im a bit late but i want to implement a doppler radar (for increased range). and the radar detects movement somewhere, so it tells the pan tilt to point the camera to the area with detected movement. how would i modify this code?

_bruh_
Автор

Thank you for your video. Do you think the set-up also works with the Raspberry Pi High Quality Camera? Or would it be to heavy for the pan-tilt hat?

MrRubion
Автор

Hi
I have the head (eyes) from inmoov robot but without pimoroni picade pan tilt Hat.
I connected directly to Raspberry pi.
So i need not download software for it?
What i must change from your example.
Can you help me?

thomasgf
Автор

Hello what do I do with this? VIDIOC_S_PARM: failed: Inappropriate ioctl for device
I am using picamera v2.1

fsddsdsd
Автор

can it be implemented by using mobile as camera module????

geddajayaram
Автор

Question: If you disconnect the internet from it, will it still work on tracking moving objects without its connection to the internet, or should it be connected to the internet in order to continue tracking the movement of objects, and if it works, can we make a project to track an object using Arduino Uno

Mohammedalhalabi