Leptonica 1.68
C Image Processing Library
|
Alternative (slightly slower) method for rotating color images, with antialiasing. This is here just for comparison with the better methods in the library. More...
#include <string.h>
#include <math.h>
#include "allheaders.h"
Go to the source code of this file.
Functions | |
static PIX * | pixRotateAMColorFast2 (PIX *pixs, l_float32 angle, l_uint8 grayval) |
static PIX * | pixShiftRGB258 (PIX *pixs) |
static void | rotateAMColorFastLow2 (l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_float32 angle, l_uint8 grayval) |
main (int argc, char **argv) | |
Variables | |
static const l_float32 | VERY_SMALL_ANGLE = 0.001 |
Alternative (slightly slower) method for rotating color images, with antialiasing. This is here just for comparison with the better methods in the library.
Definition in file rotatefastalt.c.
Input: pixs angle (radians; clockwise is positive) grayval (0 to bring in BLACK, 255 for WHITE) Return: pixd, or null on error
Notes:
*** Warning: implicit assumption about RGB component ordering ***
Definition at line 95 of file rotatefastalt.c.
References ERROR_PTR, L_ABS, NULL, pixClone(), pixCreateTemplate(), pixDestroy(), pixGetData(), pixGetDepth(), pixGetHeight(), pixGetWidth(), pixGetWpl(), pixShiftRGB258(), PROCNAME, rotateAMColorFastLow2(), and VERY_SMALL_ANGLE.
Referenced by main().
Makes a new 32 bpp image with the R, G and B components right-shifted by 2, 5 and 8 bits, respectively.
Definition at line 138 of file rotatefastalt.c.
References ERROR_PTR, NULL, pixCreate(), pixGetData(), pixGetDepth(), pixGetHeight(), pixGetWidth(), pixGetWpl(), and PROCNAME.
Referenced by pixRotateAMColorFast2().
void rotateAMColorFastLow2 | ( | l_uint32 * | datad, |
l_int32 | w, | ||
l_int32 | h, | ||
l_int32 | wpld, | ||
l_uint32 * | datas, | ||
l_int32 | wpls, | ||
l_float32 | angle, | ||
l_uint8 | grayval | ||
) | [static] |
Alternative version for fast color rotation
*** Warning: explicit assumption about RGB component ordering ***
Definition at line 184 of file rotatefastalt.c.
Referenced by pixRotateAMColorFast2().
main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 43 of file rotatefastalt.c.
References ERROR_INT, filein, IFF_JFIF_JPEG, NULL, pixDestroy(), pixRead(), pixRotateAMColorFast2(), pixWrite(), startTimer(), and stopTimer().
const l_float32 VERY_SMALL_ANGLE = 0.001 [static] |
Definition at line 34 of file rotatefastalt.c.
Referenced by pixRotateAMColorFast2().