help in background subtraction.

6 views (last 30 days)
jeffin
jeffin on 16 Jan 2017
Commented: Image Analyst on 26 Mar 2017
I have a background modeled image. and i try to perform background subtraction for the incoming frames in the video, then apply a threshold to extract a foreground object. When i apply a threshold most of the white intensity pixels has lower values falls in the background pixels, which is supposed to be a foreground. this works good for other coloured intensity pixels. As decreasing the threshold value, more of the background falls in the foreground region.
I am new to background subtraction technique. Is there any advanced technique, any solution to overcome my problem will help me more forward. Expecting some positive reply from experts.

Accepted Answer

Image Analyst
Image Analyst on 16 Jan 2017
It totally depends on your images, which you forgot to attach. Can you attach them so we know what we're talking about? Typically background subtraction is used for things like radiographs (x-rays) and fluorescence while background division is more appropriate for things taken with a regular optical camera. For video you can do either but be aware that things can be either brighter or darker than the background so you might want to do a subtraction but then take the absolute value. Even then it might not work. If you have a gray background and a man with the same color gray shirt walks in but has black pants and shoes and hair, and a white hat on, then if you do abs(image-backgroundImage) then you'll see everything except the graph shirt. So things my have holes or become multiple blobs. Maybe you can fill in the holes. Again it depends on your scene. If you're taking a photo of a sidewalk and building then maybe that is the background so if a car parks there you can detect a difference. But what if the car is parked there for 3 days. Perhaps at that point you might consider the parked car part of the background if you want to see things that have changed only in the last few seconds, minutes, or hours.
  2 Comments
jeffin
jeffin on 26 Mar 2017
Edited: jeffin on 26 Mar 2017
Background Image
Foreground frame for subtraction
Results with threshold 40 and bounding box
We could see, the legs are not getting detected. I understand its because of the same colour between the floor and legs. kindly suggest me any solutions to solve this issue. Thanks in advance.
Image Analyst
Image Analyst on 26 Mar 2017
Lower your threshold.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!