Herror ::simulate_defocus (
    Hobject Image,
    Hobject *DefocusedImage,
    const HTuple &Blurring
)
HImage HImage::SimulateDefocus (
    const HTuple &Blurring
) const

Simulate an uniform out-of-focus blurring of an image.

::simulate_defocus simulates out-of-focus blurring of an image. All parts of the image are blurred uniformly. Blurring specifies the extent of blurring by defining the "blur radius" (out-of-focus blurring maps each image pixel on a small circle with a radius of Blurring - specified in "number of pixels"). If specified less than null, the absolute value of Blurring is used. Simulation of blurring is done by a convolution of the image with a blurring specific impulse response. The convolution is realized by multiplication in the Fourier domain.


Attention

As the simulation of the blurring is realized based on the Fourier transform, image height and width must be a power of 2, e.g. 128, 128, 256, 512,...


Parameters

Image (input_object)
image -> Hobject: HImage ( any )
Image to blur.

DefocusedImage (output_object)
image -> Hobject * : HImage ( real )
Blurred image.

Blurring (input_control)
real -> HTuple.double
Degree of blurring.
Default value: 5.0
Suggested values: 1.0, 5.0, 10.0, 15.0, 18.0


Result

::simulate_defocus returns H_MSG_TRUE if all parameters are correct. If the input is empty ::simulate_defocus returns with an error message.


Possible Predecessors

::gen_psf_defocus, ::simulate_motion, ::gen_psf_motion


Possible Successors

::wiener_filter, ::wiener_filter_ni


See also

::gen_psf_defocus, ::simulate_motion, ::gen_psf_motion


References

Reginald L. Lagendijk, Jan Biemond: Iterative Identification and Restoration of Images, Kluwer Academic Publishers Boston/Dordrecht/London, 1991

M. Lückenhaus:"Grundlagen des Wiener-Filters und seine Anwendung in der Bildanalyse"; Diplomarbeit; Technische Universität München, Institut für Informatik; Lehrstuhl Prof. Radig; 1995.


Module

Wiener filter



Copyright © 1996-2002 MVTec Software GmbH