highpass_imagehighpass_imageHighpassImageHighpassImagehighpass_image (Operator)

名称

highpass_imagehighpass_imageHighpassImageHighpassImagehighpass_image — Extract high frequency components from an image.

签名

highpass_image(Image : Highpass : Width, Height : )

Herror highpass_image(const Hobject Image, Hobject* Highpass, const Hlong Width, const Hlong Height)

Herror T_highpass_image(const Hobject Image, Hobject* Highpass, const Htuple Width, const Htuple Height)

void HighpassImage(const HObject& Image, HObject* Highpass, const HTuple& Width, const HTuple& Height)

HImage HImage::HighpassImage(Hlong Width, Hlong Height) const

static void HOperatorSet.HighpassImage(HObject image, out HObject highpass, HTuple width, HTuple height)

HImage HImage.HighpassImage(int width, int height)

def highpass_image(image: HObject, width: int, height: int) -> HObject

描述

highpass_imagehighpass_imageHighpassImageHighpassImageHighpassImagehighpass_image extracts high frequency components in an image by applying a linear filter with the following matrix (in case of a 7x5 matrix): 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 This corresponds to applying a mean operator (mean_imagemean_imageMeanImageMeanImageMeanImagemean_image), and then subtracting the original gray value. For byte images, a value of 128 is added to the result, i.e., zero crossings occur for 128. Correspondingly for uint2 images, 32767 is added.

This filter emphasizes high frequency components (edges and corners). The cutoff frequency is determined by the size (Height x Width) of the filter matrix: the larger the matrix, the smaller the cutoff frequency is.

At the image borders the pixels' gray values are mirrored. In case of over- or underflow the gray values are clipped (255 and 0, resp.).

注意

If even values are passed for HeightHeightHeightHeightheightheight or WidthWidthWidthWidthwidthwidth, the operator uses the next larger odd value instead. Thus, the center of the filter mask is always uniquely determined.

highpass_imagehighpass_imageHighpassImageHighpassImageHighpassImagehighpass_image can be executed on OpenCL devices. The same limitations as for mean_imagemean_imageMeanImageMeanImageMeanImagemean_image and sub_imagesub_imageSubImageSubImageSubImagesub_image apply.

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter 滤波器.

执行信息

参数

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / uint2*) *allowed for compute devices

Input image.

HighpassHighpassHighpassHighpasshighpasshighpass (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / uint2)

High-pass-filtered result image.

WidthWidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the filter mask.

默认值: 9

建议值: 3, 5, 7, 9, 11, 13, 17, 21, 29, 41, 51, 73, 101

值范围: 1 ≤ Width Width Width Width width width

最小增量: 2

建议增量: 2

HeightHeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the filter mask.

默认值: 9

建议值: 3, 5, 7, 9, 11, 13, 17, 21, 29, 41, 51, 73, 101

值范围: 1 ≤ Height Height Height Height height height

最小增量: 2

建议增量: 2

示例(C)

highpass_image(Image,&Highpass,7,5);
threshold(Highpass,&Region,60.0,255.0);
skeleton(Region,&Skeleton);

结果

highpass_imagehighpass_imageHighpassImageHighpassImageHighpassImagehighpass_image returns 2 ( H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

可能的后继算子

thresholdthresholdThresholdThresholdThresholdthreshold, skeletonskeletonSkeletonSkeletonSkeletonskeleton

替代算子

mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, sub_imagesub_imageSubImageSubImageSubImagesub_image, convol_imageconvol_imageConvolImageConvolImageConvolImageconvol_image, bandpass_imagebandpass_imageBandpassImageBandpassImageBandpassImagebandpass_image

另见

dyn_thresholddyn_thresholdDynThresholdDynThresholdDynThresholddyn_threshold

模块

Foundation