I want to get this actually
how to detect border irregularity?
4 次查看(过去 30 天)
显示 更早的评论
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)] ;
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!