ClassesClassesClassesClasses | | | | Operators

simulate_motionsimulate_motionSimulateMotionsimulate_motionSimulateMotionSimulateMotion (Operator)

Name

simulate_motionsimulate_motionSimulateMotionsimulate_motionSimulateMotionSimulateMotion — Simulation of (linearly) motion blur.

Warning

simulate_motionsimulate_motionSimulateMotionsimulate_motionSimulateMotionSimulateMotion is obsolete and is only provided for reasons of backward compatibility.

Signature

simulate_motion(Image : MovedImage : Blurring, Angle, Type : )

Herror simulate_motion(const Hobject Image, Hobject* MovedImage, double Blurring, const Hlong Angle, const Hlong Type)

Herror T_simulate_motion(const Hobject Image, Hobject* MovedImage, const Htuple Blurring, const Htuple Angle, const Htuple Type)

Herror simulate_motion(Hobject Image, Hobject* MovedImage, const HTuple& Blurring, const HTuple& Angle, const HTuple& Type)

HImage HImage::SimulateMotion(const HTuple& Blurring, const HTuple& Angle, const HTuple& Type) const

HImage HImageArray::SimulateMotion(const HTuple& Blurring, const HTuple& Angle, const HTuple& Type) const

void SimulateMotion(const HObject& Image, HObject* MovedImage, const HTuple& Blurring, const HTuple& Angle, const HTuple& Type)

HImage HImage::SimulateMotion(double Blurring, Hlong Angle, Hlong Type) const

void HOperatorSetX.SimulateMotion(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*MovedImage, [in] VARIANT Blurring, [in] VARIANT Angle, [in] VARIANT Type)

IHImageX* HImageX.SimulateMotion(
[in] double Blurring, [in] Hlong Angle, [in] Hlong Type)

static void HOperatorSet.SimulateMotion(HObject image, out HObject movedImage, HTuple blurring, HTuple angle, HTuple type)

HImage HImage.SimulateMotion(double blurring, int angle, int type)

Description

simulate_motionsimulate_motionSimulateMotionsimulate_motionSimulateMotionSimulateMotion simulates blurring caused by a relative motion between the object and the camera during exposure. The simulated motion moves along an even. AngleAngleAngleAngleAngleangle fixes its direction by specifying the angle between the motion direction and the x-axis (anticlockwise, measured in degrees). Simulation is done by a convolution of the image with a blurring specific impulse response. The convolution is realized by multiplication in the Fourier domain. simulate_motionsimulate_motionSimulateMotionsimulate_motionSimulateMotionSimulateMotion offers five prototypes of impulse responses conforming to different acceleration behaviours. TypeTypeTypeTypeTypetype allows to choose one of the following PSF prototypes:

  1. reverse ramp (crude model for acceleration)

  2. reverse trapezoid (crude model for high acceleration)

  3. square pulse (exact model for constant velocity), this is default

  4. forward trapezoid (crude model for deceleration)

  5. forward ramp (crude model for high deceleration)

(default value is 3.)

The simulated blurring affects all part of the image uniformly. BlurringBlurringBlurringBlurringBlurringblurring controls the extent of blurring. It specifies the number of pixels (lying one after another) that are affetcetd by the blurring. This number is determined by velocity of the motion and exposure time. If BlurringBlurringBlurringBlurringBlurringblurring is a negative number, an adequate blurring in reverse direction is simulated. If AngleAngleAngleAngleAngleangle is a negative number, it is interpreted clockwise. If AngleAngleAngleAngleAngleangle exceeds 360 or falls below -360, it is transformed modulo(360) in an adequate number between [0..360] resp. [-360..0].

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

image to be blurred.

MovedImageMovedImageMovedImageMovedImageMovedImagemovedImage (output_object)  image objectHImageHImageHImageHImageXHobject * (real)

motion blurred image.

BlurringBlurringBlurringBlurringBlurringblurring (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

extent of blurring.

Default value: 20.0

Suggested values: 5.0, 10.0, 20.0, 30.0, 40.0

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

Angle between direction of motion and x-axis (anticlockwise).

Default value: 0

Suggested values: 0, 45, 90, 180, 270

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

impulse response of motion blur.

Default value: 3

List of values: 1, 2, 3, 4, 5

Result

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

Possible Predecessors

gen_psf_motiongen_psf_motionGenPsfMotiongen_psf_motionGenPsfMotionGenPsfMotion, gen_psf_motiongen_psf_motionGenPsfMotiongen_psf_motionGenPsfMotionGenPsfMotion

Possible Successors

simulate_defocussimulate_defocusSimulateDefocussimulate_defocusSimulateDefocusSimulateDefocus, wiener_filterwiener_filterWienerFilterwiener_filterWienerFilterWienerFilter, wiener_filter_niwiener_filter_niWienerFilterNiwiener_filter_niWienerFilterNiWienerFilterNi

See also

gen_psf_motiongen_psf_motionGenPsfMotiongen_psf_motionGenPsfMotionGenPsfMotion, simulate_defocussimulate_defocusSimulateDefocussimulate_defocusSimulateDefocusSimulateDefocus, gen_psf_defocusgen_psf_defocusGenPsfDefocusgen_psf_defocusGenPsfDefocusGenPsfDefocus

References

Anil K. Jain:Fundamentals of Digital Image Processing, Prentice-Hall International Inc., Englewood Cliffs, New Jersey, 1989
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.
Kha-Chye Tan, Hock Lim, B. T. G. Tan:“Restoration of Real-World Motion-Blurred Images”;S. 291-299 in: CVGIP Graphical Models and Image Processing, Vol. 53, No. 3, May 1991

Module

Foundation


ClassesClassesClassesClasses | | | | Operators