MATLAB: I want to close an open blob in edge image, i have end point coordinates open edge blob, Can anyone please help me in this concern

blob connectingedge connecting

Hello,
I have an open edge of a blob with start and end point coordinates in an image, Can anyone help me in joining these two start and end points with a straight line or else with interpolation function based on the intermediate points?
Thank You.

Best Answer

See my attach demo to burn a line into an image.
The key code is this:
% Create a binary image ("mask") from the ROI object.
singleLineBinaryImage = hLine.createMask();
% OR it in to the "all lines" binary image mask we're building up.
cumulativeBinaryImage = cumulativeBinaryImage | singleLineBinaryImage;
Related Question