Leptonica
1.54
|
Функции | |
PIX * | pixRotateAM (PIX *pixs, l_float32 angle, l_int32 incolor) |
PIX * | pixRotateAMColor (PIX *pixs, l_float32 angle, l_uint32 colorval) |
PIX * | pixRotateAMGray (PIX *pixs, l_float32 angle, l_uint8 grayval) |
PIX * | pixRotateAMCorner (PIX *pixs, l_float32 angle, l_int32 incolor) |
PIX * | pixRotateAMColorCorner (PIX *pixs, l_float32 angle, l_uint32 fillval) |
PIX * | pixRotateAMGrayCorner (PIX *pixs, l_float32 angle, l_uint8 grayval) |
PIX * | pixRotateAMColorFast (PIX *pixs, l_float32 angle, l_uint32 colorval) |
Переменные | |
static const l_float32 | MIN_ANGLE_TO_ROTATE = 0.001 |
PIX* pixRotateAM | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_int32 | incolor | ||
) |
Input: pixs (2, 4, 8 bpp gray or colormapped, or 32 bpp RGB) angle (radians; clockwise is positive) incolor (L_BRING_IN_WHITE, L_BRING_IN_BLACK) Return: pixd, or null on error
Notes: (1) Rotates about image center. (2) A positive angle gives a clockwise rotation. (3) Brings in either black or white pixels from the boundary.
PIX* pixRotateAMColor | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_uint32 | colorval | ||
) |
Input: pixs (32 bpp) angle (radians; clockwise is positive) colorval (e.g., 0 to bring in BLACK, 0xffffff00 for WHITE) Return: pixd, or null on error
Notes: (1) Rotates about image center. (2) A positive angle gives a clockwise rotation. (3) Specify the color to be brought in from outside the image.
PIX* pixRotateAMColorCorner | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_uint32 | fillval | ||
) |
Input: pixs angle (radians; clockwise is positive) colorval (e.g., 0 to bring in BLACK, 0xffffff00 for WHITE) Return: pixd, or null on error
Notes: (1) Rotates the image about the UL corner. (2) A positive angle gives a clockwise rotation. (3) Specify the color to be brought in from outside the image.
PIX* pixRotateAMColorFast | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_uint32 | colorval | ||
) |
Input: pixs angle (radians; clockwise is positive) colorval (e.g., 0 to bring in BLACK, 0xffffff00 for WHITE) Return: pixd, or null on error
Notes: (1) This rotates a color image about the image center. (2) A positive angle gives a clockwise rotation. (3) It uses area mapping, dividing each pixel into 16 subpixels. (4) It is about 10% to 20% faster than the more accurate linear interpolation function pixRotateAMColor(), which uses 256 subpixels. (5) For some reason it shifts the image center. No attempt is made to rotate the alpha component.
*** Warning: implicit assumption about RGB component ordering ***
PIX* pixRotateAMCorner | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_int32 | incolor | ||
) |
Input: pixs (1, 2, 4, 8 bpp gray or colormapped, or 32 bpp RGB) angle (radians; clockwise is positive) incolor (L_BRING_IN_WHITE, L_BRING_IN_BLACK) Return: pixd, or null on error
Notes: (1) Rotates about the UL corner of the image. (2) A positive angle gives a clockwise rotation. (3) Brings in either black or white pixels from the boundary.
PIX* pixRotateAMGray | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_uint8 | grayval | ||
) |
Input: pixs (8 bpp) angle (radians; clockwise is positive) grayval (0 to bring in BLACK, 255 for WHITE) Return: pixd, or null on error
Notes: (1) Rotates about image center. (2) A positive angle gives a clockwise rotation. (3) Specify the grayvalue to be brought in from outside the image.
PIX* pixRotateAMGrayCorner | ( | PIX * | pixs, |
l_float32 | angle, | ||
l_uint8 | grayval | ||
) |
Input: pixs angle (radians; clockwise is positive) grayval (0 to bring in BLACK, 255 for WHITE) Return: pixd, or null on error
Notes: (1) Rotates the image about the UL corner. (2) A positive angle gives a clockwise rotation. (3) Specify the grayvalue to be brought in from outside the image.
const l_float32 MIN_ANGLE_TO_ROTATE = 0.001 [static] |