Remove falsely detected foreground (image segmentation)
3 views (last 30 days)
Show older comments
Hi,
I am working on moving object detection in video compressed domain. I have extracted compressed domain features from VVC reference software to create an image(frame).
However, the extracted image falsely detects some part of the background as foreground. For example, in a paragliding video, due to the movement of the camera the slightly changing background(trees) is also beaing detected as foreground. I want to eliminate that part and just have the segmentated image of the person in the parachute. As shown in 0001.png.
The orginal image, extracted image, binary image, morphologically closed image are as follows:
I used yanqi liu's code from: https://www.mathworks.com/matlabcentral/answers/1565216-how-to-remove-unwanted-portion-from-background as part of the process.
It seems to be the right way to go since it gets rid of the unwanted trees but for some reason the paragliding person is not fully detected.
I tried to change the value for the length in strel in imopen from 9 to 10, 12, 16, etc. but it gives me an error
bw = imopen(bw, strel('line', 9, 90));
Error using ~=
Matrix dimensions must agree.
Error in imseg_y (line 61)
bw(L~=ind) = 0;
I even tried to change the value for
bw = bwareaopen(bw, 100);
I changed it 500, 250, etc. I get the same error as above, no matter what value I choose.
Can anyone please help correctly detect the foreground while removing the falsely detected foreground?
Looking forward to everyone's suggestions! :)
P.S. I have attached my code for reference.
0 Comments
Answers (1)
Image Analyst
on 7 Jun 2023
Go here for better, and published, algorithms:
2 Comments
Image Analyst
on 8 Jun 2023
I find it hard to believe out of all those papers you read, that this algorithm was the best. What paper was it from?
If you have the Computer Vision Toolbox, there are functions to detect foregrounds and moving objects:
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!