开发者

Matlab - longest long axis of the minimum ellipse

I need to find the longest long axis of the minimum ellipse of the components generated using CCL (to use as a thres开发者_如何学JAVAhold). I used matlab for generating connected components (bwlabel method).

I am new to matlab and any help is highly appreciated.

Thanks in advance


Have a look at REGIONPROPS.

stats = regionprops(ccl,'MajorAxisLength');
majAx = cat(1, stats.MajorAxisLength);

%# find the longest long axis, and the 
%# index into connComp.PixelIdxList
%# of the object with the longest long axis
[longestLongAxis,idxOfLongFeature] = max(majAx);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜