Background Subtraction - OpenCV 3.4 with python 3 Tutorial 32

  Рет қаралды 52,560

Pysource

Pysource

6 жыл бұрын

We’re going to learn in this tutorial how to subtract the background on a video.
Instructions and source code: pysource.com/2018/05/17/backgr...
➤ Full Videocourses:
Object Detection: pysource.com/object-detection...
➤ Follow me on:
Instagram: / pysource7
LinkedIn: / pysource
➤ For business inquiries:
pysource.com/contact

Пікірлер: 51
@stevefox7469
@stevefox7469 5 жыл бұрын
Thanks - Excellent demonstration & tutorial.
@underlecht
@underlecht 2 жыл бұрын
your videos are amazing. just came up here during searching for videos of visual processing for slam
@GabrielAlmeida-pm5yq
@GabrielAlmeida-pm5yq 5 жыл бұрын
Very good video, thank you so much!
@mohammadaliavazpour3268
@mohammadaliavazpour3268 5 жыл бұрын
Thanks , That was a great tutorial
@xiaoyangma4589
@xiaoyangma4589 5 жыл бұрын
amazing work!
@PARTHASARATHISAMANTARAY
@PARTHASARATHISAMANTARAY 4 жыл бұрын
Thank you for explaination
@abubakarsaidu7663
@abubakarsaidu7663 5 жыл бұрын
great tutorial!
@hayoungkim7010
@hayoungkim7010 5 жыл бұрын
Thank you. Helps me a lot. One question. Can we get background image reducing foreground image? I have an image and need to remove foreground. If you know please help me. :)
@jinhuacao253
@jinhuacao253 5 жыл бұрын
thanks for the great video
@kavuruvamsikrishna02
@kavuruvamsikrishna02 4 жыл бұрын
nice explanation...thanks
@bhimsendabby
@bhimsendabby 6 жыл бұрын
Thanku sir good tutorial
@rithvikrthampy
@rithvikrthampy 4 жыл бұрын
How do i just find the background from the video @Pysource
@yacinerouizi844
@yacinerouizi844 Жыл бұрын
thank you
@samirakhrif3098
@samirakhrif3098 4 жыл бұрын
How i can count number of the frame between 2 line,please
@benoitd94
@benoitd94 10 ай бұрын
Good video. For you what is the best solution to extract only shadow of 2 images capture with a camera at 2 seconds of interval?
@sparklesmastiyo1642
@sparklesmastiyo1642 3 жыл бұрын
How to remove shadow in the same example? Can you please help me
@camilomanrique9816
@camilomanrique9816 4 жыл бұрын
Thank you, amazing tutorial !! I am trying to save the result with the VideoWritter class like you did on another of your videos, but it does not work (creates the file, but it can't be read and is only 4kb). Do you know maybe what's going on? Btw the writter works with the original video, so technically I'm able to save videos, but just not the one with the background subtracted.
@zhenyutang4277
@zhenyutang4277 4 жыл бұрын
see pyimagesearch, it has a detailed discussion about videowriters.
@trzywu
@trzywu 6 жыл бұрын
Great tutorials, I almost finished all of your videos. I have one question. Why do you not use this command fps = cap.get(cv2.CAP_PROP_FPS) to get proper speed of the read video? I hope to see new tutorials in close future :)
@pysource-com
@pysource-com 6 жыл бұрын
hi, thanks for your comment, you shared a useful function. I usually try to keep the video as simple as possible for beginners, so I don't use any line of code if not really necessary to reach the goal of the specific video tutorial. But of course using the command that you shared is the right approach :)
@hellilibeth2122
@hellilibeth2122 5 жыл бұрын
Do you have an idea, how can I save into a file the Backgroundmodel, created with BackgroundSubtractorMOG2?
@rubenantonio141
@rubenantonio141 4 жыл бұрын
docs.opencv.org/3.4/df/d23/classcv_1_1cuda_1_1BackgroundSubtractorMOG2.html In this link we found a subfunction to do that, we need declare the method and after this call the method.subfunction. Hope can help you.
@tchamim
@tchamim 4 жыл бұрын
Hi, i have some question. Is it possible after apply the background subtraction, instead of getting the output in binary image, i want to get the original colour of the extracted foreground ?
@rubenantonio141
@rubenantonio141 4 жыл бұрын
Pass the values of the mask into 1 and 0 where all of values equals 255 pass to 1, to do this use a numpy.where. After this multiply this new mask by original frame. Hope can help you. :)
@AI_CANISTER
@AI_CANISTER 3 жыл бұрын
Sir, you have find the difference between a single frame and a looping frame,,, so some of the cars in the single frame stand still and that way the camera have to be stable if not it won't work properly... 👇 I think you should find difference of two frames(looping)...... Both first and second frame should be in the while loop..... It works properly....
@remi-avec-un-i
@remi-avec-un-i 6 жыл бұрын
Hi dude, Once more, it is a good tutorial ! I'm starting to do "big" projects on openCV and I was wondering : how do you get autocompletion when you write (for example, you type 'cv2.' and every functions appeard ? It will save a lot of time Cheers !
@pysource-com
@pysource-com 6 жыл бұрын
hi Remi, I use Pycharm, that function is there by default. So it depends on the idle you've got.
@caspertu8941
@caspertu8941 5 жыл бұрын
I have question !! If camera is dynamic , what the result is ?
@pysource-com
@pysource-com 5 жыл бұрын
With background Subtraction camera CAN'T be dynamic. This method works only with static camera. With a dynamic one it's necessary use different methods involving machine learning.
@augustomenezesbrittodossan5171
@augustomenezesbrittodossan5171 6 жыл бұрын
Hi, my name is Augusto. I really appreciate you tutorials using OpenCV, congratulations! Could you please post a tutorial of how to recognize and detect brazilians or other countries plates, independent of the car color? Thanks a lot, Augusto.
@pysource-com
@pysource-com 6 жыл бұрын
I will do it, but first I have to complete the tutorials with more technical things :)
@augustomenezesbrittodossan5171
@augustomenezesbrittodossan5171 6 жыл бұрын
Pysource thanks. I'll waiting for the next tutorials, congratulations.
@jerrychan3055
@jerrychan3055 6 жыл бұрын
is this what u want? arxiv.org/pdf/1802.09567.pdf
@sunil_bista_
@sunil_bista_ 5 жыл бұрын
What if I wanted to detect the speed of some/all of the vehicle in the video, what should I do? Can you help me out.
@jamshaidusman5809
@jamshaidusman5809 5 жыл бұрын
You can measure the distance that vehicle have traveled in the time span of frame 1 to 2. And by using simple physics formula you can find out the speed of the vehicle.
@sunil_bista_
@sunil_bista_ 5 жыл бұрын
Jamshaid usman Thanks.Can you elaborate on how to find the distance?
@MinecraftLetstime
@MinecraftLetstime 4 жыл бұрын
@@sunil_bista_ You can use something called block matching, use it to get motion vectors for objects, and using that between frames you can get vectors for each object. Then you just need to convert those vectors to real life distances or speed.
@kavithasekar8339
@kavithasekar8339 5 жыл бұрын
What is the software used ?? Please mention it
@demor6144
@demor6144 5 жыл бұрын
pycharm
@wpontog
@wpontog 6 жыл бұрын
hi. would you please post a tutorial how to count the cars as you said?
@pysource-com
@pysource-com 6 жыл бұрын
I will do that in the future
@jawadnaseemkhan
@jawadnaseemkhan 6 жыл бұрын
plz do it fast bro i really need to work on it . i will be waiting for that
@WoFFeN88
@WoFFeN88 5 жыл бұрын
@@jawadnaseemkhan did you finally did it a counting cars project? I am interesting because im working in something similar, could you share the code if you done it!?
@jawadnaseemkhan
@jawadnaseemkhan 5 жыл бұрын
Luis S yes i have done it
@jawadnaseemkhan
@jawadnaseemkhan 5 жыл бұрын
Luis S i will share it with you soon email me
@briwicklab
@briwicklab 5 жыл бұрын
open city function???? is it by default in the opencv????
Object Detection in 10 minutes with YOLOv5 & Python!
10:45
Rob Mulla
Рет қаралды 242 М.
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 129 МЛН
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
00:18
123 GO! HOUSE
Рет қаралды 17 МЛН
[Python] Введение в распознавание контуров через OpenCV
10:30
BeTry | Программирование
Рет қаралды 14 М.
Object Tracking with Opencv and Python
30:03
Pysource
Рет қаралды 601 М.
Background Subtraction
3:30
Udacity
Рет қаралды 35 М.
Background subtraction in imageJ (3 ways)
9:48
Craig Daly
Рет қаралды 68 М.
Text Detection with OpenCV in Python | OCR using Tesseract (2020)
28:36
Murtaza's Workshop - Robotics and AI
Рет қаралды 418 М.
Detect Edges with OpenCV and Python | Computer Vision Tutorial
20:47
Nicholas Renotte
Рет қаралды 30 М.
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22