MATLAB: Connected component of a given pixel connected componentimage processingImage Processing Toolbox i want to find a connected component of a given pixel, and then test if another pixel belong to this component. Thank you. Best Answer % Label the connected components.labeledImage = bwlabel(binaryImage);% Check two points to see if they're in the same blob.if labeledImage(row1, column1) == labeledImage(row2, column2); % They're the same component.else % They're living in different components.end Related SolutionsMATLAB: Remove larger connected components based on pixels You can use the bwareafilt() function. MATLAB: Connected points regionprops() can return the indices of the points for each region.Or more simply,find(a==2) Related QuestionTotal area of a region of binary imageWatershed algorithm: why is the 4-connected watershed 8-connected
Best Answer