Skip to content

simulate_defocusSimulateDefocusSimulateDefocussimulate_defocussimulate_defocus🔗

Short description🔗

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

Signature🔗

simulate_defocus( image Image, out image DefocusedImage, real Blurring )void SimulateDefocus( const HObject& Image, HObject* DefocusedImage, const HTuple& Blurring )static void HOperatorSet.SimulateDefocus( HObject image, out HObject defocusedImage, HTuple blurring )def simulate_defocus( image: HObject, blurring: float ) -> HObject

Herror simulate_defocus( const Hobject Image, Hobject* DefocusedImage, double Blurring )

Herror T_simulate_defocus( const Hobject Image, Hobject* DefocusedImage, const Htuple Blurring )

HImage HImage::SimulateDefocus( double Blurring ) const

HImage HImage.SimulateDefocus( double blurring )

Description🔗

simulate_defocusSimulateDefocus simulates out-of-focus blurring of an image. All parts of the image are blurred uniformly. Blurringblurringblurring 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 Blurringblurringblurring - specified in “number of pixels”). If specified less than null, the absolute value of Blurringblurringblurring 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.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

Parameters🔗

Imageimageimage (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

Image to blur.

DefocusedImagedefocusedImagedefocused_image (output_object) image(-array) → object (real)HObject (real)HImage (real)HObject (real)Hobject * (real)

Blurred image.

Blurringblurringblurring (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Degree of blurring.

Default: 5.05.0
Suggested values: 1.0, 5.0, 10.0, 15.0, 18.01.0, 5.0, 10.0, 15.0, 18.0

Result🔗

simulate_defocusSimulateDefocus returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty simulate_defocusSimulateDefocus returns with an error message.

Combinations with other operators🔗

Combinations

Possible predecessors

gen_psf_defocusGenPsfDefocus, simulate_motionSimulateMotion, gen_psf_motionGenPsfMotion

Possible successors

wiener_filterWienerFilter, wiener_filter_niWienerFilterNi

See also

gen_psf_defocusGenPsfDefocus, simulate_motionSimulateMotion, gen_psf_motionGenPsfMotion

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🔗

Foundation