How to choose a specific area of an image?
Afficher commentaires plus anciens
I would like to ask you how to choose a specific area of an image and then use the elements of this content?
5 commentaires
How are you going to selct this particular region? Is the "specific region" defined by coordinates, some properties of the image, some external data, is the region picked randomly? Each of these requires a slightly different approach, so if you tell us how you select this specific region, then we can help you extract those values.
What kind of image do you have? RGB or indexed or B&W? What size is the image array?
Ann G
le 6 Oct 2015
Image Analyst
le 6 Oct 2015
Define "select". I offered to give you masking demos in my answer but you didn't ask. So, I don't know what you mean now by "select". Please define it. Do you want all the pixel in the area in a 1-D list of intensity values? Do you want a 2D image with outside the polygon blacked out? Do you want the polygon part cropped out to a new image? What??? Be specific.
Yap Sam
le 9 Déc 2017
Hi, I have a question here. Lets say, I have defined an area of polygon using its x and y coordinates. But,how do I able to find out the mean pixels intensity of this area of polygon? Secondly,how should I apply the"if" condition to thershold a certain value of mean intensity of this polygon area.
Kindly advice
Image Analyst
le 9 Déc 2017
Make a mask and then use mean on the masked image:
mask = poly2mask(x, y, rows, columns);
theMeanIntensity = mean(grayImage(mask));
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 5 Oct 2015
0 votes
If you want masking demos, ask me.
Catégories
En savoir plus sur Region and Image Properties dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!