The function performs downsampling step of Gaussian pyramid
decomposition. First it convolves source image with the Gaussian_5x5 filter
and then
downsamples the image by rejecting even rows and columns. So the destination
image
is four times smaller than the source image. So be sure to set the size of
the destination image to be 1/4 of the source image.
![]()
The function performs up-sampling step of Gaussian pyramid decomposition.
First it upsamples the source image by injecting even zero rows and columns
and then
convolves result with Gaussian_5x5 filter multiplied by 4 for interpolation.
So the
destination image is four times larger than the source image.
![]()
The function 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(c¹,c²)=|c¹-c²|. If the input image has three channels (red, green and
blue), then
p(c¹,c²)=0,3·(c¹r-c²r)+0,59·(c¹g-c²g)+0,11·(c¹b-c²b) . There may be more
than one connected component per a cluster.
The images src and dst should be 8-bit single-channel or 3-channel images or
equal size
