MATLAB: Connected points

connected pointdigital image processing

Hi, I need to know if there is any way to find the indices of connected points. To be more specific, is there any way that to preserve those indices so that it could be used for comparison in an altered matrix( the matrix comes from a picture). Thanks for the help.

Best Answer

regionprops() can return the indices of the points for each region.
Or more simply,
find(a==2)