Skip to content

gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramidgen_gauss_pyramidπŸ”—

Short descriptionπŸ”—

gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramidgen_gauss_pyramid β€” Calculating a Gauss pyramid.

SignatureπŸ”—

gen_gauss_pyramid( image Image, out image ImagePyramid, string Mode, real Scale )gen_gauss_pyramid( Image : ImagePyramid : Mode, Scale : )void GenGaussPyramid( const HObject& Image, HObject* ImagePyramid, const HTuple& Mode, const HTuple& Scale )static void HOperatorSet.GenGaussPyramid( HObject image, out HObject imagePyramid, HTuple mode, HTuple scale )def gen_gauss_pyramid( image: HObject, mode: str, scale: float ) -> HObject

Herror gen_gauss_pyramid( const Hobject Image, Hobject* ImagePyramid, const char* Mode, double Scale )

Herror T_gen_gauss_pyramid( const Hobject Image, Hobject* ImagePyramid, const Htuple Mode, const Htuple Scale )

HImage HImage::GenGaussPyramid( const HString& Mode, double Scale ) const

HImage HImage::GenGaussPyramid( const char* Mode, double Scale ) const

HImage HImage::GenGaussPyramid( const wchar_t* Mode, double Scale ) const (Windows only)

HImage HImage.GenGaussPyramid( string mode, double scale )

DescriptionπŸ”—

The operator gen_gauss_pyramidGenGaussPyramid calculates a pyramid of scaled down images. The scale by which the next image will be reduced is determined by the parameter Scalescalescale. For instance, a value of 0.5 for Scalescalescale will shorten the edge length of Imageimageimage by 50%. This is exactly equivalent to the β€œnormal” pyramid.

The parameter Modemodemode determines the way of averaging. For a more detailed description concerning this parameter see also affine_trans_imageAffineTransImage. In the case that Scalescalescale is equal 0.5 there are the additional modes 'min'"min" and 'max'"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 object, with one matrix and its own domain. Single or multiple levels can be selected by using select_objSelectObj or copy_objCopyObj, respectively.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on channel level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image β†’ object (byte / uint2 / real)object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject (byte / uint2 / real)

Input image.

ImagePyramidimagePyramidimage_pyramid (output_object) (multichannel-)image-array β†’ object (byte / uint2 / real)object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject * (byte / uint2 / real)

Output images.

Number of elements: ImagePyramid > Image

Modemodemode (input_control) string β†’ (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Kind of filter mask.

Default: 'weighted'"weighted"
List of values: 'constant', 'max', 'min', 'nearest_neighbor', 'weighted'"constant", "max", "min", "nearest_neighbor", "weighted"

Scalescalescale (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Factor for scaling down.

Default: 0.50.5
Suggested values: 0.2, 0.3, 0.4, 0.5, 0.60.2, 0.3, 0.4, 0.5, 0.6
Value range: 0.001 ≀ Scale ≀ 0.9
Recommended increment: 0.1

ExampleπŸ”—

(C)

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)\;
}

Combinations with other operatorsπŸ”—

Combinations

Possible successors

image_to_channelsImageToChannels, count_objCountObj, select_objSelectObj, copy_objCopyObj

Alternatives

zoom_image_sizeZoomImageSize, zoom_image_factorZoomImageFactor

See also

affine_trans_imageAffineTransImage

ModuleπŸ”—

Foundation