I am using contourf function with one isoline, i work with binary image. how i can calculate the surface and centroid of the filled contour.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
sassi nizar
am 25 Okt. 2015
Beantwortet: Image Analyst
am 25 Okt. 2015
the image contain two type of objects vehicles and pedestriants. I want get the area and centroid to classify the object.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 25 Okt. 2015
I'm not sure why you did it that way, but anyway, assuming you're happy with the binary image, just use regionprops() and ask for the area and centroid:
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage , 'Area', 'Centroid');
See my Image Segmentation Tutorial for a full demo: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!