linear_motion ( Image : movedImage : Blurring, Angle, Type : )

Simulation of (linearly) motion blur.

linear_motion simulates blurring caused by a relative motion between the object and the camera during exposure. The simulated motion moves along an even. Angle 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. linear_motion offers five protoypes of impulse responses conforming to different acceleration behaviours. Type 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)
  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. Blurring 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 Blurring is a negative number, a adequate blurring in reverse direction is simulated. If Angle is a negative number, it is interpreted clockwise. If Angle exceeds 360 or falls below -360, it is transformed modulo(360) in a adequate number between [0..360] resp. [-360..0].


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 -> object : any
image to be blurred.

movedImage (output_object)
image -> object : real
motion blurred image.

Blurring (input_control)
real -> real
extent of blurring.
Default value: 20.0
Suggested values: 5.0, 10.0, 20.0, 30.0, 40.0

Angle (input_control)
integer -> integer
Angle between direction of motion and x-axis (anticlockwise).
Default value: 0
Suggested values: 0, 45, 90, 180, 270

Type (input_control)
integer -> integer
impulse response of motion blur.
Default value: 3
List of values: 1, 2, 3, 4, 5


Result

linear_motion returns TRUE if all parameters are correct. If the input is empty linear_motion returns with an error message.


Possible Predecessors

gen_psf_motion, gen_psf_motion


Possible Successors

out_of_focus, wiener_filter, wiener_filter_ni


See also

gen_psf_motion, out_of_focus, gen_psf_defocus


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



Copyright © 1996-1997 MVTec Software GmbH