how can I find the locations of pixels inside a selected region on an image?

7 views (last 30 days)
I am writing to select a region on an image using roipoly tool. The outputs I am getting are BW, xi and yi. I want to find the number of pixels inside this selected region and their pixel locations. I could find the number of pixels inside the polygon by converting it to a binary image but still don't know how I can find the location of the pixels inside the region. Thanks for your help!

Answers (1)

Walter Roberson
Walter Roberson on 21 Jul 2015

Community Treasure Hunt

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

Start Hunting!