Get Indices of all Pixels connected to a specific pixel

3 Ansichten (letzte 30 Tage)
awezmm
awezmm am 31 Aug. 2018
Beantwortet: Image Analyst am 31 Aug. 2018
Hi, this should be simple but how would I the get the indices of all the points that are connected to a specific point? I’m looking for the most efficient way.
Thanks!

Antworten (1)

Image Analyst
Image Analyst am 31 Aug. 2018
You forgot to attach your image, so we don't know what you're visualizing. What does "connected" mean to you? Do you mean like the Magic Wand in Photoshop? Do you mean like in the same blob in a binary image? I have no (definitive) idea. In the meantime, until we see your image and explanation, see the attached Magic Wand demo, if you have a gray scale image, and look into regionprops(), if you have a binary image.
props = regionprops(binaryImage, 'PixelList');
props has a list of all (x,y) locations of all pixels in all blobs.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by