The function cvPyrSegmentation implements image segmentation by pyramids. The pyramid builds up to the level level. The links between any pixel a on level i and its candidate father pixel b on the adjacent level are established if
p(c(a),c(b))>threshold1. After the connected components are defined, they are joined into several clusters. Any two segments A and B belong to the same cluster, if
p(c(A),c(B))>threshold2. The input image has only one channel, then
p(c1,c2)=|c1-c2|. If the input image has three channels (red, green and blue), then
p(c1,c2)=0.3*(c1r-c2r)+0.59 * (c1g-c2g)+0.11 *(c1b-c2b) . There may be more than one connected component per a cluster.
Namespace:
Emgu.CV
Assembly:
Emgu.CV (in Emgu.CV.dll) Version: 2.0.1.0 (2.0.1.0)
Syntax
Parameters
- src
- Type: System..::.IntPtr
The source image, should be 8-bit single-channel or 3-channel images
- dst
- Type: System..::.IntPtr
The destination image, should be 8-bit single-channel or 3-channel images, same size as src
- storage
- Type: System..::.IntPtr
Storage; stores the resulting sequence of connected components
- comp
- Type:
System..::.IntPtr
%
Pointer to the output sequence of the segmented components
- level
- Type: System..::.Int32
Maximum level of the pyramid for the segmentation
- threshold1
- Type: System..::.Double
Error threshold for establishing the links
- threshold2
- Type: System..::.Double
Error threshold for the segments clustering
See Also