how to detect border irregularity?
이전 댓글 표시
I have traced exterior boundaries of this region. now i want to have boundary box and centre of mass around it. How can I do this?

답변 (1개)
KSSV
2020년 3월 20일
If (x,y) are your boundary points.
% Get bounding box
x0 = min(x) ; x1 = max(x) ;
y0 = min(y) ; y1 = max(y) ;
%
A = [x0,y0] ;
B = [x1,y1] ;
Also to get the center, you can find mean.
iwant = [mean(x) mean(y)] ;
댓글 수: 9
joynob ahmed
2020년 3월 20일
B = cell2mat(B) ; % assuming B is two columns
x = B(:,2) ; y = B(:,1) ;
joynob ahmed
2020년 3월 21일
편집: joynob ahmed
2020년 3월 21일
joynob ahmed
2020년 3월 25일
KSSV
2020년 3월 26일
Attach your original image.
joynob ahmed
2020년 3월 26일
KSSV
2020년 3월 26일
Attach B and L into mat file and share.
joynob ahmed
2020년 3월 28일
joynob ahmed
2020년 4월 2일
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


