calculating the area inside boundary
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Farzin
am 22 Dez. 2016
Beantwortet: Image Analyst
am 22 Dez. 2016
Hi,
I am trying to find the number of pixels inside the boundary where I have the boundary points coordinates only.
actually I want to calculate the area inside the boundary. I need some help.
2 Kommentare
David Barry
am 22 Dez. 2016
Please remove the code formatting from your question and upload some example data/code.
Akzeptierte Antwort
Image Analyst
am 22 Dez. 2016
Use polyarea:
area = polyarea(xCoordinates, yCoordinates);
0 Kommentare
Weitere Antworten (1)
Image Analyst
am 22 Dez. 2016
If you have a binary image of the perimeter/boundary, you can fill it and call bwarea() or sum()
binaryImage = imfill(boundaryImage, 'holes');
area1 = sum(binaryImage(:))
area2 = bwarea(binaryImage)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Elementary Polygons 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!