HALCON Reference Manual 10.0.2
Table of Contents / Filters / Edges ClassesClassesClasses | | | Operators

highpass_imagehighpass_imagehighpass_imageHighpassImageHighpassImage (Operator)

Name

highpass_imagehighpass_imagehighpass_imageHighpassImageHighpassImage — Extract high frequency components from an image.

Signature

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)

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

HImage HImage::HighpassImage(const HTuple& Width, const HTuple& Height) const

HImageArray HImageArray::HighpassImage(const HTuple& Width, const HTuple& Height) const

void HOperatorSetX.HighpassImage(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*Highpass, [in] VARIANT Width, [in] VARIANT Height)

IHImageX* HImageX.HighpassImage(
[in] Hlong Width, [in] Hlong Height)

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

HImage HImage.HighpassImage(int width, int height)

Description

highpass_imagehighpass_imagehighpass_imageHighpassImageHighpassImage 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_imagemean_imageMeanImageMeanImage), and then subtracting the original gray value. A value of 128 is added to the result, i.e., zero crossings occur for 128.

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.).

Attention

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

highpass_imagehighpass_imagehighpass_imageHighpassImageHighpassImage can be executed on OpenCL devices. The same limitations as for mean_imagemean_imagemean_imageMeanImageMeanImage and sub_imagesub_imagesub_imageSubImageSubImage apply.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte* / uint2*) *allowed for compute devices

Input image.

HighpassHighpassHighpassHighpasshighpass (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (byte / uint2)

High-pass-filtered result image.

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Width of the filter mask.

Default value: 9

Suggested values: 3, 5, 7, 9, 11, 13, 17, 21, 29, 41, 51, 73, 101

Typical range of values: 3 ≤ Width Width Width Width width ≤ 501

Minimum increment: 2

Recommended increment: 2

Restriction: (Width >= 3) && odd(Width)

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Height of the filter mask.

Default value: 9

Suggested values: 3, 5, 7, 9, 11, 13, 17, 21, 29, 41, 51, 73, 101

Typical range of values: 3 ≤ Height Height Height Height height ≤ 501

Minimum increment: 2

Recommended increment: 2

Restriction: (Height >= 3) && odd(Height)

Example (C)

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

Result

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

Possible Successors

thresholdthresholdthresholdThresholdThreshold, skeletonskeletonskeletonSkeletonSkeleton

Alternatives

mean_imagemean_imagemean_imageMeanImageMeanImage, sub_imagesub_imagesub_imageSubImageSubImage, convol_imageconvol_imageconvol_imageConvolImageConvolImage, bandpass_imagebandpass_imagebandpass_imageBandpassImageBandpassImage

See also

dyn_thresholddyn_thresholddyn_thresholdDynThresholdDynThreshold

Module

Foundation


Table of Contents / Filters / Edges ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH