How to get all xy coordinates within a connected polygon.?

2 views (last 30 days)
I have a polygon using impoly on an image.Is it possible to get all the pixel coordinates within that polygon.

Answers (1)

Image Analyst
Image Analyst on 13 Feb 2014
allPixels = grayImage(maskImage); % 1D vector of all the pixels inside the mask only.

Community Treasure Hunt

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

Start Hunting!