MATLAB: How to bridge some nearest unconnected image

connect objectimage processingImage Processing Toolbox

Hi all. I am focus on the filament recognition. Obviously, the initial work is the object detection. As the filament is long and thin, the detection result is discontinuous. A filament may have some small fragments. So I want to bridge these fragment into a large one.
Any suggestion to this issue are appreciated.

Best Answer

You could first try morphological closing with imclose(). Or try edge linking ( http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/#edgelink). Where did you upload your image to?