gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramid (算子)

名称

gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramid — 计算高斯金字塔。

签名

gen_gauss_pyramid(Image : ImagePyramid : Mode, Scale : )

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)

void GenGaussPyramid(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)

static void HOperatorSet.GenGaussPyramid(HObject image, out HObject imagePyramid, HTuple mode, HTuple scale)

HImage HImage.GenGaussPyramid(string mode, double scale)

def gen_gauss_pyramid(image: HObject, mode: str, scale: float) -> HObject

描述

算子 gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramid calculates a pyramid of scaled down images. The scale by which the next image will be reduced is determined by the parameter ScaleScaleScaleScalescalescale. For instance, a value of 0.5 for ScaleScaleScaleScalescalescale will shorten the edge length of ImageImageImageImageimageimage by 50%. This is exactly equivalent to the “normal” pyramid.

The parameter ModeModeModeModemodemode determines the way of averaging. For a more detailed description concerning this parameter see also affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImageaffine_trans_image。In the case that ScaleScaleScaleScalescalescale is equal 0.5 there are the additional modes 'min'"min""min""min""min""min" and 'max'"max""max""max""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_objselect_objSelectObjSelectObjSelectObjselect_obj or copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, respectively.

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image objectHImageHObjectHImageHobject (byte / uint2 / real)

输入图像。

ImagePyramidImagePyramidImagePyramidImagePyramidimagePyramidimage_pyramid (输出对象)  (multichannel-)image-array objectHImageHObjectHImageHobject * (byte / uint2 / real)

输出图像。

元素数量: ImagePyramid > Image

ModeModeModeModemodemode (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Kind of filter mask.

默认值: 'weighted' "weighted" "weighted" "weighted" "weighted" "weighted"

值列表: 'constant'"constant""constant""constant""constant""constant", 'max'"max""max""max""max""max", 'min'"min""min""min""min""min", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor", 'weighted'"weighted""weighted""weighted""weighted""weighted"

ScaleScaleScaleScalescalescale (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Factor for scaling down.

默认值: 0.5

建议值: 0.2, 0.3, 0.4, 0.5, 0.6

值范围: 0.001 ≤ Scale Scale Scale Scale scale scale ≤ 0.9

建议增量: 0.1

示例(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);
}

可能的后继

image_to_channelsimage_to_channelsImageToChannelsImageToChannelsImageToChannelsimage_to_channels, count_objcount_objCountObjCountObjCountObjcount_obj, select_objselect_objSelectObjSelectObjSelectObjselect_obj, copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj

替代

zoom_image_sizezoom_image_sizeZoomImageSizeZoomImageSizeZoomImageSizezoom_image_size, zoom_image_factorzoom_image_factorZoomImageFactorZoomImageFactorZoomImageFactorzoom_image_factor

另见

affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImageaffine_trans_image

模块

基础