Connection算子
Compute connected components of a region.用来计算输入区域中的所有连通域。对应的反向操作是union1。
输入:一个region;输出:所有连通域的组合vector;
返回的连通域的最大数量可通过set_system('max_connection',<Num>)进行设置,默认0则返回所有连通域数目。
connection determines the connected components of the input regions given in Region. The neighborhood used for this can be set via set_system
('neighborhood',<4/8>). The default is 8-neighborhood, which is useful for determining the connected components of the foreground. The maximum
number of connected components that is returned by connection can be set via set_system('max_connection',<Num>). The default value of 0 causes
all connected components to be returned. The inverse operator of connection is union1.