Hello, I have a 2D matrix that I have created from filtering a contour map of an image and I created a regional maxima of the final image as shown in the attached photo. now the matrix contains only ones and zeros in a random order. I need now to group all the points with "ones" that are in close proximity into a single group and know the raw and column matrix indexes of the first element of each group. this to be applied to all groups. I do not want to do this manually, as I want to apply this algortihm to thousands of matrices that have their regional maxima distributed randomly. I need to know if there is a certain function/exchange file in matlab that can manage to segregate these groups. please find attached photo for more explanation of what I need. Thanks in advance.
MATLAB: Segregate various elements of a matrix into separate groups based on their close proximity
grouping elements in a matrix into separate groupsStatistics and Machine Learning Toolbox
Best Answer