IM: Synthetic Image Render

IM - An Imaging Tool

Synthetic Image Render
[Image Processing]


Detailed Description

Renders some 2D mathematical functions as images. All the functions operates in place and supports all data types except IM_CFLOAT.
See im_process_pon.h


Typedefs

typedef float(* imRenderFunc )(int x, int y, int d, float *param)
typedef float(* imRenderCondFunc )(int x, int y, int d, int *cond, float *param)

Functions

int imProcessRenderOp (imImage *image, imRenderFunc render_func, char *render_name, float *param, int plus)
int imProcessRenderCondOp (imImage *image, imRenderCondFunc render_cond_func, char *render_name, float *param)
int imProcessRenderAddSpeckleNoise (const imImage *src_image, imImage *dst_image, float percent)
int imProcessRenderAddGaussianNoise (const imImage *src_image, imImage *dst_image, float mean, float stddev)
int imProcessRenderAddUniformNoise (const imImage *src_image, imImage *dst_image, float mean, float stddev)
int imProcessRenderRandomNoise (imImage *image)
int imProcessRenderConstant (imImage *image, float *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, float x_period, float y_period)
int imProcessRenderGaussian (imImage *image, float stddev)
int imProcessRenderLapOfGaussian (imImage *image, float stddev)
int imProcessRenderCosine (imImage *image, float x_period, float y_period)
int imProcessRenderGrid (imImage *image, int x_space, int y_space)
int imProcessRenderChessboard (imImage *image, int x_space, int y_space)

Typedef Documentation

typedef float(* imRenderFunc)(int x, int y, int d, float *param)
 

Render Funtion.

render_func(x: number, y: number, d: number, param: table of number) -> value: number [in Lua 5] 

typedef float(* imRenderCondFunc)(int x, int y, int d, int *cond, float *param)
 

Render Conditional Funtion.

render_cond_func(x: number, y: number, d: number, param: table of number) -> value: number, cond: boolean [in Lua 5] 


Function Documentation

int imProcessRenderOp imImage image,
imRenderFunc  render_func,
char *  render_name,
float *  param,
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, render_func: function, render_name: string, param: table of number, plus: boolean) -> counter: boolean [in Lua 5] 

int imProcessRenderCondOp imImage image,
imRenderCondFunc  render_cond_func,
char *  render_name,
float *  param
 

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

im.ProcessRenderCondOp(image: imImage, render_cond_func: function, render_name: string, param: table of number) -> counter: boolean [in Lua 5] 

int imProcessRenderAddSpeckleNoise const imImage src_image,
imImage dst_image,
float  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,
float  mean,
float  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,
float  mean,
float  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,
float *  value
 

Render a constant. The number of values must match the depth of the image.

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,
float  x_period,
float  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,
float  stddev
 

Render a centered gaussian.

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

int imProcessRenderLapOfGaussian imImage image,
float  stddev
 

Render the laplacian of a centered gaussian.

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

int imProcessRenderCosine imImage image,
float  x_period,
float  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]