Merging/connecting blobs that belong to same object
9 次查看(过去 30 天)
显示 更早的评论
I am doing background subtraction and trying to extract the foreground object(humans). The problem is that when i am trying to crop the foreground object, due to some gape in the objects they are cropped as several blobs and not one. How can i merge/connect blobs that belong to same object but are disconnected due to some gape in the binary image. I am attaching some image to make my point clear.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154584/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154586/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154587/image.png)
0 个评论
回答(1 个)
Image Analyst
2016-6-30
You could find the centroids of all blobs and then burn a line between the centroids to connect all the blobs with a line. See attached demo.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!