How to Detect Moving Objects in Video using OpenCV and Python
Eran Feit
In this tutorial, we'll show you how to detect moving objects using Python and OpenCV. Specifically, we'll walk you through the process of taking a video file of moving cars, extracting each frame, and detecting the cars in each frame using a combination of OpenCV functions like createBackgroundSubtractorMOG2, threshold, erode, dilate, and contours. We'll also show you how to mark the detected cars with rectangles and text, so you can easily see where they are in the frame.
We'll start by preprocessing the video frames to extract only the moving pixels, and then use contours to detect the cars in the frame. We'll also show you how to mark the cars with bounding boxes and labels, so you can easily see which cars are moving and where they are in the video
Code for this video: https://github.com/feitgemel/Open-CV/tree/main/Detect%20moving%20objects%20in%20%20fixed%20background
More relevant content in this playlist : https://www.youtube.com/playlist?list=PLdkryDe59y4bxVvpexwR6PMTHH6_vFXjA
A perfect course for learning modern Computer Vision with deep dive in TensorFlow , Keras and Pytorch . You can find it here : http://bit.ly/3HeDy1V
I also recommend this book for deep dive in deep learning : https://amzn.to/3TTZym7
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
đĽď¸ Email : feitgemel@gmail.com
đŚ Twitter - https://twitter.com/eran_feit
đ¸ GitHub - https://github.com/feitgemel
đ¸ Instagram - https://www.instagram.com/eran_feit/
âśď¸ Subscribe - youtube.com/@eranfeit?sub_confirmation=1
đ Facebook - https://www.facebook.com/groups/3080601358933585
~~~~~~~~~~~~~~ SUPPORT ME đ~~~~~~~~~~~~~~
đ
ż Patreon - https://www.patreon.com/EranFeit
#EranFeit #opencv #python
Music by Vincent Rubinetti
Download the music on Bandcamp: https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown
Stream the music on Spotify: https://open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u
...
https://www.youtube.com/watch?v=YSLVAxgclCo
86390292 Bytes