gen_filter_maskgen_filter_maskGenFilterMaskGenFilterMaskgen_filter_mask (算子名称)

名称

gen_filter_maskgen_filter_maskGenFilterMaskGenFilterMaskgen_filter_mask — 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)

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 HImage::GenFilterMask(const wchar_t* FilterMask, double Scale, Hlong Width, Hlong Height)   ( Windows only)

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)

def gen_filter_mask(filter_mask: MaybeSequence[Union[int, str]], scale: float, width: int, height: int) -> HObject

描述

gen_filter_maskgen_filter_maskGenFilterMaskGenFilterMaskGenFilterMaskgen_filter_mask 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 FilterMaskFilterMaskFilterMaskFilterMaskfilterMaskfilter_mask can be generated either from a file or a tuple. The format of the filter matrix is described with the operator convol_imageconvol_imageConvolImageConvolImageConvolImageconvol_image. 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).

运行信息

参数表

ImageFilterImageFilterImageFilterImageFilterimageFilterimage_filter (output_object)  image objectHImageHObjectHImageHobject * (real)

Filter in the spatial domain.

FilterMaskFilterMaskFilterMaskFilterMaskfilterMaskfilter_mask (input_control)  filename.read(-array) HTupleMaybeSequence[Union[int, str]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Filter mask as file name or tuple.

Default: '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 HTuplefloatHTupleHtuple (real) (double) (double) (double)

Scaling factor.

Default: 1.0

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

Minimum increment: 0.001

Recommended increment: 0.1

WidthWidthWidthWidthwidthwidth (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the image (filter).

Default: 512

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

HeightHeightHeightHeightheightheight (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the image (filter).

Default: 512

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

例程 (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)
dev_set_paint ('3d_plot')
dev_display (FilterFFT)

可能的后置算子

fft_imagefft_imageFftImageFftImageFftImagefft_image, fft_genericfft_genericFftGenericFftGenericFftGenericfft_generic

参考其它

convol_imageconvol_imageConvolImageConvolImageConvolImageconvol_image

模块

Foundation