why different answers with roipoly and polyarea
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
clear all close all
nrows=300; ncols=400; N=4; % number of vertices
ang=0:360/N:360; ang=ang+45; radius=min(nrows,ncols)/2; h=ncols/2+radius*cosd(ang); v=nrows/2+radius*sind(ang);
im=zeros(nrows,ncols); im=roipoly(im,h,v); area=sum(sum(im)) area2=polyarea(h,v)
Antworten (1)
Sachin Ganjare
am 18 Okt. 2012
0 Stimmen
'roipoly' is used to get manually the region of interest
'polyarea' is used to calculate the ROI area
Example:
% imshow first, then:
[x, y, BW, xi, yi] = roipoly;
area = polyarea(xi,yi);
Hope it helps!!!
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!