i want to find a connected component of a given pixel, and then test if another pixel belong to this component in matlab.
CC = bwconncomp(BW);
numPixels = cellfun(@numel,CC.PixelIdxList);
...
how to loop for all CC, and for each one, and test if a given pixels belong to it!