Remove falsely detected foreground (image segmentation)
3 ビュー (過去 30 日間)
古いコメントを表示
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404639/image.png)
The orginal image, extracted image, binary image, morphologically closed image are as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404644/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404649/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404654/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404659/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404669/image.png)
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 件のコメント
回答 (1 件)
Image Analyst
2023 年 6 月 7 日
Go here for better, and published, algorithms:
2 件のコメント
Image Analyst
2023 年 6 月 8 日
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:
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!