OpenCV Python Tutorial For Beginners 24 - Motion Detection and Tracking Using Opencv Contours

preview_player
Показать описание
In this video on OpenCV Python Tutorial For Beginners, I am going to show How to Find Motion Detection and Tracking Using Opencv Contours.
The function retrieves contours from the binary image. The contours are a useful tool for shape analysis and object detection and recognition.

OpenCV is an image processing library created by Intel and later supported by Willow Garage and now maintained by Itseez. opencv is available on Mac, Windows, Linux. Works in C, C++, and Python.
it is Open Source and free. opencv is easy to use and install.

Starting with an overview of what the course will be covering, we move on to discussing morphological operations and practically learn how they work on images. We will then learn contrast enhancement using equalization and contrast limiting. Finally we will learn 3 methods to subtract the background from the video and implement them using OpenCV.

At the end of this course, you will have a firm grasp of Computer Vision techniques using OpenCV libraries. This course will be your gateway to the world of data science.

Feel the real power of Python and programming! The course offers you a unique approach of learning how to code by solving real world problems.

#ProgrammingKnowledge #ComputerVision #OpenCV
★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

if you watch previous tutorials you will understand what is happening behind syntax
briefly,
first step, movement is difference between two frames
second, difference has noises because of details and light on video so gaussian blurring is eliminating the noises,
third, obtaining threshold from clean difference
fourth, dilating for eliminating district small weak threshold lines which corrupt healthy threshold detection
fifth, finding contours from clean threshold
sixth, eliminating small contours which can not be a human by filtering contour area
seventh, drawing rectangles for each detected contour on the frame, rectangle dimensions obtained from cv2.boundingRect(contour)
that is it!

myetis
Автор

You gave me hope dude.You are the man!Thank you so much for helping us about the topics that we can't easily learn from anybody.

efekanefe
Автор

By evaluating the aspect ratio of each rectangle, we can determine whether it is a person or not.
if Height/Width >1 then it may be a person
elif Height/Width <1 then it may be a short person or sitting person or animal etc.
else it may be lying object (for example horizontal safeguard lines in this tutorials)
we can eliminate objects which is different from walking persons to an extent.

myetis
Автор

Thanks for making these videos so easy to follow.

MarcosGarcia-mcoj
Автор

You can change the thresh value in threshold function which eradicates the noise generated by the rope movement behind. I found a value of thresh=50 which worked fine for this input.

sauravsutradhar
Автор

Very good explanation. Congratulations. Do you have a video that counts these people after detection? Thanks for the video.

jonatapaulino
Автор

Top tip: replace 'vtest.avi' with '0' to use your native webcam!

philspaghet
Автор

I've loved the video already before I even watch it a second:)

peacecyebukayire
Автор

I added edited this line with w>h which makes sure no box with a width greater then its height will be detected (which helps with the rope not being detected):

if cv2.contourArea(contour) < 900 or w > h:

umarqureshi
Автор

Awesome tutorial sir, althought harr cascade would be better

ayushagarwal
Автор

Thank you so much bro your really helped me, you made my day

berberlim
Автор

yhank you god bless you. you are the best teacher. you helpt me a lot

jhonjaguer
Автор

which camera and components u have used for implementing as a hardware

mujeebsonlineacademy
Автор

Can you provide the video which you have used in your code. Also can you please explain why have you used frame1

sidranasreen
Автор

Great Video!!
Is there a way to use the concept in the video to count the number of people in the test-video??

darshitjain
Автор

Pls upload tutorial on creating own haar cascade classifier

dhruuvvvv
Автор

Work gan 👍🏻 , thanks 🙏🙏
(Auto subscribe)

riyushachannel
Автор

Hi...
Thank you for the tutorial.. It's impressive. I have one question.
Can we make the animation of moving objects a function of time? the program will run and continuous animation will run???
Thank you

jadavpur
Автор

Thank you so much for this awesome tutorial!!

HM-cwim
Автор

Thank you for the tutorial, I am curious, is it possible to use a stream video as the source video? if yes, how is it can be achieve?

redzalmahdin