![]() |
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) |
int | imProcessRotateRef (const imImage *src_image, imImage *dst_image, double cos0, double sin0, int x, int y, int to_origin, int order) |
int | imProcessRotate90 (const imImage *src_image, imImage *dst_image, int dir_clockwise) |
int | imProcessRotate180 (const imImage *src_image, imImage *dst_image) |
int | imProcessMirror (const imImage *src_image, imImage *dst_image) |
int | imProcessFlip (const imImage *src_image, imImage *dst_image) |
int | imProcessRadial (const imImage *src_image, imImage *dst_image, double k1, int order) |
int | imProcessLensDistort (const imImage *src_image, imImage *dst_image, double a, double b, double c, int order) |
int | imProcessSwirl (const imImage *src_image, imImage *dst_image, double k1, int order) |
int | imProcessInterlaceSplit (const imImage *src_image, imImage *dst_image1, imImage *dst_image2) |
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.
im.ProcessCalcRotateSize(width: number, height: number, cos0: number, sin0: number) [in Lua 5]
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 target size can be calculated using imProcessCalcRotateSize to fit the new image size, or can be any size, including the original size. The rotation is relative to the center of the image.
Returns zero if the counter aborted.
im.ProcessRotate(src_image: imImage, dst_image: imImage, cos0: number, sin0: number[, order]: number) -> counter: boolean [in Lua 5]
im.ProcessRotateNew(image: imImage, cos0, sin0, order: number) -> counter: boolean, new_image: imImage [in Lua 5]
int imProcessRotateRef | ( | const imImage * | src_image, | |
imImage * | dst_image, | |||
double | cos0, | |||
double | sin0, | |||
int | x, | |||
int | y, | |||
int | to_origin, | |||
int | order | |||
) |
Rotates the image using the given interpolation order (see imProcessResize).
Images must be of the same type. Target can have any size, including the original size.
The rotation is relative to the reference point. But the result can be shifted to the origin.
Returns zero if the counter aborted.
im.ProcessRotateRef(src_image: imImage, dst_image: imImage, cos0: number, sin0: number, x: number, y: number, to_origin: boolean, order: number) -> counter: boolean [in Lua 5]
im.ProcessRotateRefNew(image: imImage, cos0: number, sin0: number, x: number, y: number, to_origin: boolean[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5]
Rotates the image in 90 degrees counterclockwise or clockwise. Swap columns by lines.
Images must be of the same type. Target width and height must be source height and width.
Direction can be clockwise (1) or counter clockwise (-1). Returns zero if the counter aborted.
im.ProcessRotate90(src_image: imImage, dst_image: imImage, dir_clockwise: boolean) -> counter: boolean [in Lua 5]
im.ProcessRotate90New(image: imImage, dir_clockwise: boolean) -> counter: boolean, new_image: imImage [in Lua 5]
Rotates the image in 180 degrees. Swap columns and swap lines.
Images must be of the same type and size. Returns zero if the counter aborted.
im.ProcessRotate180(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5]
im.ProcessRotate180New(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5]
Mirror the image in a horizontal flip. Swap columns.
Images must be of the same type and size. Can be done in-place. Returns zero if the counter aborted.
im.ProcessMirror(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5]
im.ProcessMirrorNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5]
Apply a vertical flip. Swap lines.
Images must be of the same type and size. Can be done in-place. Returns zero if the counter aborted.
im.ProcessFlip(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5]
im.ProcessFlipNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5]
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.
im.ProcessRadial(src_image: imImage, dst_image: imImage, k1: number, order: number) -> counter: boolean [in Lua 5]
im.ProcessRadialNew(image: imImage, k1: number[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5]
int imProcessLensDistort | ( | const imImage * | src_image, | |
imImage * | dst_image, | |||
double | a, | |||
double | b, | |||
double | c, | |||
int | order | |||
) |
Apply a lens distortion correction using the given interpolation order (see imProcessResize).
a, b, and c are the lens parameters.
Images must be of the same type and size. Returns zero if the counter aborted.
im.ProcessLensDistort(src_image: imImage, dst_image: imImage, a, b, c: number, order: number) -> counter: boolean [in Lua 5]
im.ProcessLensDistortNew(image: imImage, a, b, c: number[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5]
Apply a swirl distortion using the given interpolation order (see imProcessResize).
Images must be of the same type and size. Returns zero if the counter aborted.
im.ProcessSwirl(src_image: imImage, dst_image: imImage, k: number, order: number) -> counter: boolean [in Lua 5]
im.ProcessSwirlNew(image: imImage, k: number[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5]
int imProcessInterlaceSplit | ( | const imImage * | src_image, | |
imImage * | dst_image1, | |||
imImage * | dst_image2 | |||
) |
Split the image in two images, one containing the odd lines and other containing the even lines.
Images must be of the same type. Height of the output images must be half the height of the input image. If the height of the input image is odd then the first image must have height equals to half+1. Returns zero if the counter aborted.
im.ProcessInterlaceSplit(src_image: imImage, dst_image1: imImage, dst_image2: imImage) -> counter: boolean [in Lua 5]
im.ProcessInterlaceSplitNew(image: imImage) -> counter: boolean, new_image1: imImage, new_image2: imImage [in Lua 5]