Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
find angle frome centroid area output not true
조회 수: 2 (최근 30일)
이전 댓글 표시
im = imcrop(BW,[min(columns),min(rows),width,height]);
[r,c] = find(im,1,'first');
theta = atan2(cen(1,1)-c,cen(1,2)-r);
theta = radtodeg(theta);
hold on
plot(cen(:,1),cen(:,2),'b*')
line ([cen(:,1) r],[cen(:,2) c]);
%find center
[y, x] = ndgrid(1:size(BW, 1), 1:size(BW, 2));
cen = mean([x(logical(BW)), y(logical(BW))]);
I use this code find angle use find white area first but some picture has output of angle is 30 not true help me
댓글 수: 1
KSSV
2017년 2월 21일
If the angle result, is not true; check whether your cen exactly is center or not.
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!