Herror ::gen_gauss_pyramid (
    Hobject Image,
    Hobject *ImagePyramid,
    const HTuple &Mode,
    const HTuple &Scale
)
HImageArray HImage::GenGaussPyramid (
    const HTuple &Mode,
    const HTuple &Scale
) const

Calculating a Gauss pyramid.

The operator ::gen_gauss_pyramid calculates a pyramid of scaled down images. The scale by which the next image will be reduced is determined by the parameter Scale. For instance, a value of 0.5 for Scale will shorten the edge length of Image by 50. This is exactly equivalent to the ``normal'' pyramid.

The parameter Mode determines the way of averaging. For a more detailed description concerning this parameter see also ::affine_trans_image. In the case that Scale is equal 0.5 there are the additional modes 'min' and 'max' available. In this case the minimum or the maximum of the four neighboring pixels is selected.

Please note that each level will be returned as an individual image, i.e. as one iconic objekt, with one matrix and its own domain. If a multichannel image is needed as a result, the operator ::image_to_channels has to be used. A single level or more than one level can be selected by using ::select_obj respectively ::copy_obj.


Parameters

Image (input_object)
image -> Hobject: HImage ( byte )
Input image.

ImagePyramid (output_object)
image-array -> Hobject * : HImageArray ( byte )
Output images.
Number of elements: ImagePyramid > Image

Mode (input_control)
string -> HTuple.char *
Kind of filtermask.
Default value: 'weighted'
List of values: 'none', 'constant', 'weighted', 'min', 'max'

Scale (input_control)
real -> HTuple.double
Factor for scaling down.
Default value: 0.5
Suggested values: 0.2, 0.3, 0.4, 0.5, 0.6
Typical range of values: 0.1 <= Scale <= 0.9
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: (0.1 < Scale) && (Scale < 0.9)


Example
gen_gauss_pyramid(Image,Pyramid,"weighted",0.5);
count_obj(Pyramid,&num);
for (i=1; i<=num; i++)
{
  select_obj(Pyramid,&Single,i);
  disp_image(Single,WindowHandle);
  clear(Single);
}

Possible Successors

::image_to_channels, ::count_obj, ::select_obj, ::copy_obj


Alternatives

::zoom_image_size, ::zoom_image_factor


See also

::affine_trans_image


Module

Image filters



Copyright © 1996-2002 MVTec Software GmbH