ClassesClassesClassesClasses | | | | Operators

gen_filter_maskgen_filter_maskGenFilterMaskgen_filter_maskGenFilterMaskGenFilterMask (Operator)


gen_filter_maskgen_filter_maskGenFilterMaskgen_filter_maskGenFilterMaskGenFilterMask — Store a filter mask in the spatial domain as a real-image.


gen_filter_mask( : ImageFilter : FilterMask, Scale, Width, Height : )

Herror gen_filter_mask(Hobject* ImageFilter, const char* FilterMask, double Scale, const Hlong Width, const Hlong Height)

Herror T_gen_filter_mask(Hobject* ImageFilter, const Htuple FilterMask, const Htuple Scale, const Htuple Width, const Htuple Height)

Herror gen_filter_mask(Hobject* ImageFilter, const HTuple& FilterMask, const HTuple& Scale, const HTuple& Width, const HTuple& Height)

HImage HImage::GenFilterMask(const HTuple& FilterMask, const HTuple& Scale, const HTuple& Width, const HTuple& Height)

void GenFilterMask(HObject* ImageFilter, const HTuple& FilterMask, const HTuple& Scale, const HTuple& Width, const HTuple& Height)

void HImage::GenFilterMask(const HTuple& FilterMask, double Scale, Hlong Width, Hlong Height)

void HImage::GenFilterMask(const HString& FilterMask, double Scale, Hlong Width, Hlong Height)

void HImage::GenFilterMask(const char* FilterMask, double Scale, Hlong Width, Hlong Height)

void HOperatorSetX.GenFilterMask(
[out] IHUntypedObjectX*ImageFilter, [in] VARIANT FilterMask, [in] VARIANT Scale, [in] VARIANT Width, [in] VARIANT Height)

void HImageX.GenFilterMask(
[in] VARIANT FilterMask, [in] double Scale, [in] Hlong Width, [in] Hlong Height)

static void HOperatorSet.GenFilterMask(out HObject imageFilter, HTuple filterMask, HTuple scale, HTuple width, HTuple height)

void HImage.GenFilterMask(HTuple filterMask, double scale, int width, int height)

void HImage.GenFilterMask(string filterMask, double scale, int width, int height)


gen_filter_maskgen_filter_maskGenFilterMaskgen_filter_maskGenFilterMaskGenFilterMask stores a filter mask in the spatial domain as a real-image. The center of the filter mask lies in the center of the resulting image. The parameter ScaleScaleScaleScaleScalescale determines by which amount the values of the filter mask are multiplied (this results in larger values of the Fourier transform of the filter). The corresponding filter matrix, which is given in FilterMaskFilterMaskFilterMaskFilterMaskFilterMaskfilterMask can be generated either from a file or a tuple. The format of the filter matrix is described with the operator convol_imageconvol_imageConvolImageconvol_imageConvolImageConvolImage. Example filter masks can be found in the directory “filter” in the HALCON home directory. This operator is useful for visualizing the frequency response of filter masks (by applying a Fourier transform to the result image of this operator).



ImageFilterImageFilterImageFilterImageFilterImageFilterimageFilter (output_object)  image objectHImageHImageHImageHImageXHobject * (real)

Filter in the spatial domain.

FilterMaskFilterMaskFilterMaskFilterMaskFilterMaskfilterMask (input_control) HTupleHTupleHTupleVARIANTHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong) (BSTR / Hlong) (char* / Hlong)

Filter mask as file name or tuple.

Default value: 'gauss' "gauss" "gauss" "gauss" "gauss" "gauss"

Suggested values: 'gauss'"gauss""gauss""gauss""gauss""gauss", 'laplace4'"laplace4""laplace4""laplace4""laplace4""laplace4", 'laplace8'"laplace8""laplace8""laplace8""laplace8""laplace8", 'lowpas_3_3'"lowpas_3_3""lowpas_3_3""lowpas_3_3""lowpas_3_3""lowpas_3_3", 'lowpas_5_5'"lowpas_5_5""lowpas_5_5""lowpas_5_5""lowpas_5_5""lowpas_5_5", 'lowpas_7_7'"lowpas_7_7""lowpas_7_7""lowpas_7_7""lowpas_7_7""lowpas_7_7", 'lowpas_9_9'"lowpas_9_9""lowpas_9_9""lowpas_9_9""lowpas_9_9""lowpas_9_9", 'sobel_c'"sobel_c""sobel_c""sobel_c""sobel_c""sobel_c", 'sobel_l'"sobel_l""sobel_l""sobel_l""sobel_l""sobel_l"

ScaleScaleScaleScaleScalescale (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Scaling factor.

Default value: 1.0

Suggested values: 0.3, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0

Typical range of values: 0.001 ≤ Scale Scale Scale Scale Scale scale ≤ 10.0

Minimum increment: 0.001

Recommended increment: 0.1

Restriction: Scale > 0.0

WidthWidthWidthWidthWidthwidth (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Width of the image (filter).

Default value: 512

List of values: 128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048, 4096, 8192

HeightHeightHeightHeightHeightheight (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Height of the image (filter).

Default value: 512

List of values: 120, 128, 144, 240, 256, 288, 480, 512, 576, 1024, 2048, 4096, 8192

Example (HDevelop)

* If the filter should be read from a file:
gen_filter_mask (Filter, 'lowpas_3_3', 1.0, 512, 512)
* If the filter should be directly passed as a tuple:
gen_filter_mask (Filter, [3,3,9,1,1,1,1,1,1,1,1,1], 1.0, 512, 512)
fft_image (Filter, FilterFFT)
set_paint (WindowHandle, '3D-plot_hidden')
disp_image (FilterFFT, WindowHandle)

Possible Successors

fft_imagefft_imageFftImagefft_imageFftImageFftImage, fft_genericfft_genericFftGenericfft_genericFftGenericFftGeneric

See also




ClassesClassesClassesClasses | | | | Operators