0

我需要找到使用 CCL 生成的组件的最小椭圆的最长长轴(用作阈值)。我使用 matlab 生成连接组件(bwlabel 方法)。

我是 matlab 新手,非常感谢任何帮助。

提前致谢

4

1 回答 1

0

看看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);
于 2011-03-24T12:55:35.140 回答