Documentation / IM - An Imaging Tool / IM: Geometric Operations
IM: Geometric Operations
From IM - An Imaging Tool
Detailed Description
Operations to change the shape of the image.
See im_process_loc.h
Functions
void imProcessCalcRotateSize (int width, int height, int *new_width, int *new_height, double cos0, double sin0)
int imProcessRotate (const imImage *src_image, imImage *dst_image, double cos0, double sin0, int order)
void imProcessRotate90 (const imImage *src_image, imImage *dst_image, int dir)
void imProcessRotate180 (const imImage *src_image, imImage *dst_image)
void imProcessMirror (const imImage *src_image, imImage *dst_image)
void imProcessFlip (const imImage *src_image, imImage *dst_image)
int imProcessRadial (const imImage *src_image, imImage *dst_image, float k1, int order)
Function Documentation
void imProcessCalcRotateSize
(
int
width ,
int
height ,
int *
new_width ,
int *
new_height ,
double
cos0 ,
double
sin0
)
Calculates the size of the new image after rotation.
int imProcessRotate
(
const imImage *
src_image ,
imImage *
dst_image ,
double
cos0 ,
double
sin0 ,
int
order
)
Rotates the image using the given interpolation order (see imProcessResize ).
Images must be of the same type. The destiny size can be calculated using imProcessCalcRotateSize .
Returns zero if the counter aborted.
void imProcessRotate90
(
const imImage *
src_image ,
imImage *
dst_image ,
int
dir
)
Rotate the image in 90 degrees counterclockwise or clockwise. Swap columns by lines.
Images must be of the same type. Destiny width and height must be source height and width.
void imProcessRotate180
(
const imImage *
src_image ,
imImage *
dst_image
)
Rotate the image in 180 degrees. Swap columns and swap lines.
Images must be of the same type and size.
void imProcessMirror
(
const imImage *
src_image ,
imImage *
dst_image
)
Mirrors the image in a horizontal flip. Swap columns.
Images must be of the same type and size.
Apply a vertical flip. Swap lines.
Images must be of the same type and size.
int imProcessRadial
(
const imImage *
src_image ,
imImage *
dst_image ,
float
k1 ,
int
order
)
Apply a radial distortion using the given interpolation order (see imProcessResize).
Images must be of the same type and size. Returns zero if the counter aborted.