gen_filter_mask ( : ImageFilter : FilterMask, Scale, Width, Height : )
Store a filter mask in the spatial domain as a real-image.
gen_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 Scale 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
FilterMask can be generated either from a file or a
tuple. The format of the filter matrix is described with the
operator convol_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).
Parameters
ImageFilter (output_object)
|
image -> object : real
|
|
Filter in the spatial domain. |
FilterMask (input_control)
|
string(-array) -> string / integer
|
|
Filter mask as file name or tuple. |
|
Default value: 'gauss' |
|
Suggested values: 'gauss', 'laplace4', 'laplace8', 'lowpas_3_3', 'lowpas_5_5', 'lowpas_7_7', 'lowpas_9_9', 'sobel_c', 'sobel_l' |
Scale (input_control)
|
real -> real
|
|
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 <= 10.0 |
|
Minimum increment: 0.001
|
Recommended increment: 0.1
|
|
Restriction: Scale > 0.0 |
Width (input_control)
|
integer -> integer
|
|
Width of the image (filter). |
|
Default value: 512 |
|
List of values: 128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048, 4096, 8192 |
Height (input_control)
|
integer -> integer
|
|
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
* 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)
Parallelization Information
gen_filter_mask is reentrant and processed without parallelization.
Possible Successors
fft_image,
fft_generic
See also
convol_image
Module
Foundation
Copyright © 1996-2008 MVTec Software GmbH