how can i calculate area enclosed by contour?
    7 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    dziri halima
 am 11 Jul. 2015
  
    
    
    
    
    Kommentiert: Image Analyst
      
      
 am 15 Jul. 2015
            I used snake to enclosed the left ventricle; how can i calculate area enclosed by contour?
0 Kommentare
Akzeptierte Antwort
  Image Analyst
      
      
 am 11 Jul. 2015
        If you used activecontour, it returns a binary image, so you simply label it and call regionprops:
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, 'Area');
allAreas = [measurements.Area];
7 Kommentare
  Image Analyst
      
      
 am 15 Jul. 2015
				You're just calling some automatic threshold on the image and using that to calculate the area.
nb = im2bw(I, graythresh(I));
labeledImage = bwlabel(nb);
measurements = regionprops(labeledImage, 'Area');
allAreas = [measurements.Area]
You're not even using the results of your snakes algorithm at all! Even so, I'd be surprised if the auth-thresholded image for both images gave the very same areas. But regardless, I don't think that's what you want to do. You can use the snake boundaries and pass them into poly2mask() to create a binary image from the snake boundaries.
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



