Bwlabeln
在二进制图像中连接的标签组件
Description
Examples
Input Arguments
Output Arguments
Tips
The functions
bwlabel
,Bwlabeln
, 和bwconncomp
all compute connected components for binary images.bwconncomp
replaces the use ofbwlabel
和Bwlabeln
。It uses significantly less memory and is sometimes faster than the other functions.功能 Input Dimension Output Form Memory Use 连接性 bwlabel
2-D Label matrix with double-precision 高的 4 or 8 Bwlabeln
N-D 双精度标签矩阵 高的 任何 bwconncomp
N-D CC
structLow 任何 使用二进制图像提取功能
regionprops
with default connectivity, just passBW
directly intoregionprops
使用命令regionprops(BW)
。
Algorithms
Bwlabeln
uses the following general procedure:
Scan all image pixels, assigning preliminary labels to nonzero pixels and recording label equivalences in a union-find table.
Resolve the equivalence classes using the union-find algorithm[1]。
根据已解决的等效类别重新标记像素。
参考
[1]Sedgewick, Robert,Algorithms in C,第三版,Addison-Wesley,1998年,第11-20页。