Typedefs | Functions

Synthetic Image Render
[Image Processing]

Collaboration diagram for Synthetic Image Render:

Typedefs

typedef double(* imRenderFunc )(int x, int y, int d, double *params)
typedef double(* imRenderCondFunc )(int x, int y, int d, int *cond, double *params)

Functions

int imProcessRenderOp (imImage *image, imRenderFunc func, const char *render_name, double *params, int plus)
int imProcessRenderOpAlpha (imImage *image, imRenderFunc func, const char *render_name, double *params, int plus)
int imProcessRenderCondOp (imImage *image, imRenderCondFunc func, const char *render_name, double *params)
int imProcessRenderCondOpAlpha (imImage *image, imRenderCondFunc func, const char *render_name, double *params)
int imProcessRenderAddSpeckleNoise (const imImage *src_image, imImage *dst_image, double percent)
int imProcessRenderAddGaussianNoise (const imImage *src_image, imImage *dst_image, double mean, double stddev)
int imProcessRenderAddUniformNoise (const imImage *src_image, imImage *dst_image, double mean, double stddev)
int imProcessRenderRandomNoise (imImage *image)
int imProcessRenderConstant (imImage *image, double *value)
int imProcessRenderWheel (imImage *image, int internal_radius, int external_radius)
int imProcessRenderCone (imImage *image, int radius)
int imProcessRenderTent (imImage *image, int tent_width, int tent_height)
int imProcessRenderRamp (imImage *image, int start, int end, int vert_dir)
int imProcessRenderBox (imImage *image, int box_width, int box_height)
int imProcessRenderSinc (imImage *image, double x_period, double y_period)
int imProcessRenderGaussian (imImage *image, double stddev)
int imProcessRenderLapOfGaussian (imImage *image, double stddev)
int imProcessRenderCosine (imImage *image, double x_period, double y_period)
int imProcessRenderGrid (imImage *image, int x_space, int y_space)
int imProcessRenderChessboard (imImage *image, int x_space, int y_space)
void imProcessRenderFloodFill (imImage *image, int start_x, int start_y, double *replace_color, double tolerance)

Detailed Description

Renders some 2D mathematical functions as images. All the functions operates in-place and supports all data types except complex.
These functions are mean to be used in gray images, but color images can also be used. For color images the rendering will be repeated for each plane, except for the alpha plane when present.
See im_process_pnt.h

Typedef Documentation

typedef double(* imRenderFunc)(int x, int y, int d, double *params)

Render Funtion.

func(x: number, y: number, d: number, params: table) -> value: number [in Lua 5] 
typedef double(* imRenderCondFunc)(int x, int y, int d, int *cond, double *params)

Render Conditional Function.

func(x: number, y: number, d: number, params: table) -> value: number, cond: boolean [in Lua 5] 

Function Documentation

int imProcessRenderOp ( imImage image,
imRenderFunc  func,
const char *  render_name,
double *  params,
int  plus 
)

Render a synthetic image using a render function.
plus will make the render be added to the current image data, or else all data will be replaced. All the render functions use this or the conditional function.
Returns zero if the counter aborted.

im.ProcessRenderOp(image: imImage, func: function, render_name: string, params: table, plus: boolean) -> counter: boolean [in Lua 5] 
int imProcessRenderOpAlpha ( imImage image,
imRenderFunc  func,
const char *  render_name,
double *  params,
int  plus 
)

Same as imProcessRenderOp but with alpha channel support. (since 3.14) Can also be used if the image does not have alpha.

im.ProcessRenderOpAlpha(image: imImage, func: function, render_name: string, params: table, plus: boolean) -> counter: boolean [in Lua 5] 
int imProcessRenderCondOp ( imImage image,
imRenderCondFunc  func,
const char *  render_name,
double *  params 
)

Render a synthetic image using a conditional render function.
Data will be rendered only if the conditional parameter is true.
Returns zero if the counter aborted.

im.ProcessRenderCondOp(image: imImage, func: function, render_name: string, params: table) -> counter: boolean [in Lua 5] 
int imProcessRenderCondOpAlpha ( imImage image,
imRenderCondFunc  func,
const char *  render_name,
double *  params 
)

Same as imProcessRenderOp but with alpha channel support. (since 3.14) Can also be used if the image does not have alpha.

im.ProcessRenderCondOpAlpha(image: imImage, func: function, render_name: string, params: table) -> counter: boolean [in Lua 5] 
int imProcessRenderAddSpeckleNoise ( const imImage src_image,
imImage dst_image,
double  percent 
)

Render speckle noise on existing data. Can be done in-place.

im.ProcessRenderAddSpeckleNoise(src_image: imImage, dst_image: imImage, percent: number) -> counter: boolean [in Lua 5] 
im.ProcessRenderAddSpeckleNoiseNew(src_image: imImage, percent: number) -> counter: boolean, new_image: imImage [in Lua 5] 
int imProcessRenderAddGaussianNoise ( const imImage src_image,
imImage dst_image,
double  mean,
double  stddev 
)

Render gaussian noise on existing data. Can be done in-place.

im.ProcessRenderAddGaussianNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] 
im.ProcessRenderAddGaussianNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] 
int imProcessRenderAddUniformNoise ( const imImage src_image,
imImage dst_image,
double  mean,
double  stddev 
)

Render uniform noise on existing data. Can be done in-place.

im.ProcessRenderAddUniformNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] 
im.ProcessRenderAddUniformNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] 
int imProcessRenderRandomNoise ( imImage image  ) 

Render random noise.

im.ProcessRenderRandomNoise(image: imImage) -> counter: boolean [in Lua 5] 
int imProcessRenderConstant ( imImage image,
double *  value 
)

Render a constant. The number of values must match the depth of the image. Value must have the same number of the image depth including alpha. Alpha channel is supported (since 3.14).

im.ProcessRenderConstant(image: imImage, value: table of number) -> counter: boolean [in Lua 5] 
int imProcessRenderWheel ( imImage image,
int  internal_radius,
int  external_radius 
)

Render a centered wheel.

im.ProcessRenderWheel(image: imImage, internal_radius: number, external_radius: number) -> counter: boolean [in Lua 5] 
int imProcessRenderCone ( imImage image,
int  radius 
)

Render a centered cone.

im.ProcessRenderCone(image: imImage, radius: number) -> counter: boolean [in Lua 5] 
int imProcessRenderTent ( imImage image,
int  tent_width,
int  tent_height 
)

Render a centered tent.

im.ProcessRenderTent(image: imImage, tent_width: number, tent_height: number) -> counter: boolean [in Lua 5] 
int imProcessRenderRamp ( imImage image,
int  start,
int  end,
int  vert_dir 
)

Render a ramp. Direction can be vertical (1) or horizontal (0).

im.ProcessRenderRamp(image: imImage, start: number, end: number, vert_dir: boolean) -> counter: boolean [in Lua 5] 
int imProcessRenderBox ( imImage image,
int  box_width,
int  box_height 
)

Render a centered box.

im.ProcessRenderBox(image: imImage, box_width: number, box_height: number) -> counter: boolean [in Lua 5] 
int imProcessRenderSinc ( imImage image,
double  x_period,
double  y_period 
)

Render a centered sinc.

im.ProcessRenderSinc(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] 
int imProcessRenderGaussian ( imImage image,
double  stddev 
)

Render a centered gaussian.

im.ProcessRenderGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] 
int imProcessRenderLapOfGaussian ( imImage image,
double  stddev 
)

Render the laplacian of a centered gaussian.

im.ProcessRenderLapOfGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] 
int imProcessRenderCosine ( imImage image,
double  x_period,
double  y_period 
)

Render a centered cosine.

im.ProcessRenderCosine(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] 
int imProcessRenderGrid ( imImage image,
int  x_space,
int  y_space 
)

Render a centered grid.

im.ProcessRenderGrid(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] 
int imProcessRenderChessboard ( imImage image,
int  x_space,
int  y_space 
)

Render a centered chessboard.

im.ProcessRenderChessboard(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] 
void imProcessRenderFloodFill ( imImage image,
int  start_x,
int  start_y,
double *  replace_color,
double  tolerance 
)

Render a color or gray flood fill.
If image has the IM_RGB color space, then replace_color must have 3 components, or 4 when alpha is present.
If image has the IM_GRAY or IM_MAP color space, then replace_color must have 1 component.
For IM_MAP images the colors in the palette will be compared instead of the indices (since 3.14). Alpha channel is supported in IM_RGB images (since 3.14), alpha will also be considered in the comparison.

im.ProcessRenderFloodFill(image: imImage, start_x, start_y: number, replace_color: table of 3 numbers, tolerance: number)  [in Lua 5]