why different answers with roipoly and polyarea
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
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)
댓글 수: 0
답변 (1개)
Sachin Ganjare
2012년 10월 18일
0 개 추천
'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!!!
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!