Deformations

Last modified: November 20, 2009

Contents

ink_diffuse

Image [OneBit|GreyScale|Grey16|Float|RGB] ink_diffuse (Choice [Linear Horizontal|Linear Vertical|Brownian] diffusion_type, float exponential_decay_constant, int random_seed = -1)

Operates on:Image [OneBit|GreyScale|Grey16|Float|RGB]
Returns:Image [OneBit|GreyScale|Grey16|Float|RGB]
Category:Deformations
Defined in:deformation.py
Author:Albert Brzeczko

Simulates water-driven diffusion of ink in paper.


Example 1: ink_diffuse(0, 20)

images/GreyScale_generic.png images/ink_diffuse_plugin_00.png

inkrub

Image [OneBit|GreyScale|Grey16|Float|RGB] inkrub (int(0, 500) transcription_prob, int random_seed = -1)

Operates on:Image [OneBit|GreyScale|Grey16|Float|RGB]
Returns:Image [OneBit|GreyScale|Grey16|Float|RGB]
Category:Deformations
Defined in:deformation.py
Author:Albert Brzeczko

Simulates rubbing off of ink from another page.


Example 1: inkrub(50)

images/GreyScale_generic.png images/inkrub_plugin_00.png

noise

Image [OneBit|GreyScale|Grey16|Float|RGB] noise (int(0, 500) amplitude, Choice [Horizontal|Vertical] direction, int random_seed = -1)

Operates on:Image [OneBit|GreyScale|Grey16|Float|RGB]
Returns:Image [OneBit|GreyScale|Grey16|Float|RGB]
Category:Deformations
Defined in:deformation.py
Author:Albert Brzeczko

Causes random shifting of pixels within a user-specified range, in a user-specified direction.


Example 1: noise(10, 0)

images/RGB_generic.png images/noise_plugin_00.png

rotate

Image [OneBit|GreyScale|Grey16|RGB|Float|Complex] rotate (float(-180.00, 180.00) angle, Pixel bgcolor, int(1, 3) order = 1)

Operates on:Image [OneBit|GreyScale|Grey16|RGB|Float|Complex]
Returns:Image [OneBit|GreyScale|Grey16|RGB|Float|Complex]
Category:Deformations
Defined in:deformation.py
Author:Michael Droettboom (With code from VIGRA by Ullrich Köthe)

Rotates an image.

angle
The angle of rotation (in degrees)
bgcolor
The color to use for pixels outside of the original image bounds.
order
The order of the spline used for interpolation. Must be between 1 - 3.

Example 1: rotate(32.0, (255, 255, 255), 3)

images/RGB_generic.png images/rotate_plugin_00.png

Example 2: rotate(15.0, 0j, 3)

images/GreyScale_generic.png images/rotate_plugin_01.png

wave

Image [OneBit|GreyScale|Grey16|Float|RGB] wave (int(0, 2147483647) amplitude, int(0, 2147483647) period, Choice [Horizontal|Vertical] direction, Choice [Sinusoid|Square|Sawtooth|Triangle|Sinc] waveform, int offset, float turbulence = 0.00, int random_seed = -1)

Operates on:Image [OneBit|GreyScale|Grey16|Float|RGB]
Returns:Image [OneBit|GreyScale|Grey16|Float|RGB]
Category:Deformations
Defined in:deformation.py
Author:Albert Brzeczko

Causes periodic disturbance of user-defined frequency, amplitude, and direction. Turbulence specifies the amount of random variation from that line.


Example 1: wave(5, 10, 0, 0, 0)

images/RGB_generic.png images/wave_plugin_00.png

Example 2: wave(10, 5, 1, 2, 0)

images/RGB_generic.png images/wave_plugin_01.png