Leptonica
1.54
|
#include "allheaders.h"
Функции | |
PIXACC * | pixaccCreate (l_int32 w, l_int32 h, l_int32 negflag) |
PIXACC * | pixaccCreateFromPix (PIX *pix, l_int32 negflag) |
void | pixaccDestroy (PIXACC **ppixacc) |
PIX * | pixaccFinal (PIXACC *pixacc, l_int32 outdepth) |
PIX * | pixaccGetPix (PIXACC *pixacc) |
l_int32 | pixaccGetOffset (PIXACC *pixacc) |
l_int32 | pixaccAdd (PIXACC *pixacc, PIX *pix) |
l_int32 | pixaccSubtract (PIXACC *pixacc, PIX *pix) |
l_int32 | pixaccMultConst (PIXACC *pixacc, l_float32 factor) |
l_int32 | pixaccMultConstAccumulate (PIXACC *pixacc, PIX *pix, l_float32 factor) |
Input: pixacc pix (to be added) Return: 0 if OK, 1 on error
PIXACC* pixaccCreate | ( | l_int32 | w, |
l_int32 | h, | ||
l_int32 | negflag | ||
) |
Input: w, h (of 32 bpp internal Pix) negflag (0 if only positive numbers are involved; 1 if there will be negative numbers) Return: pixacc, or null on error
Notes: (1) Use = 1 for safety if any negative numbers are going to be used in the chain of operations. Negative numbers arise, e.g., by subtracting a pix, or by adding a pix that has been pre-multiplied by a negative number. (2) Initializes the internal 32 bpp pix, similarly to the initialization in pixInitAccumulate().
PIXACC* pixaccCreateFromPix | ( | PIX * | pix, |
l_int32 | negflag | ||
) |
Input: pix negflag (0 if only positive numbers are involved; 1 if there will be negative numbers) Return: pixacc, or null on error
Notes: (1) See pixaccCreate()
void pixaccDestroy | ( | PIXACC ** | ppixacc | ) |
Input: &pixacc (<can be="" null>="">) Return: void
Notes: (1) Always nulls the input ptr.
PIX* pixaccFinal | ( | PIXACC * | pixacc, |
l_int32 | outdepth | ||
) |
Input: pixacc outdepth (8, 16 or 32 bpp) Return: pixd (8 , 16 or 32 bpp), or null on error
l_int32 pixaccGetOffset | ( | PIXACC * | pixacc | ) |
Input: pixacc Return: offset, or -1 on error
PIX* pixaccGetPix | ( | PIXACC * | pixacc | ) |
Input: pixacc Return: pix, or null on error
l_int32 pixaccMultConst | ( | PIXACC * | pixacc, |
l_float32 | factor | ||
) |
Input: pixacc factor Return: 0 if OK, 1 on error
l_int32 pixaccMultConstAccumulate | ( | PIXACC * | pixacc, |
PIX * | pix, | ||
l_float32 | factor | ||
) |
Input: pixacc pix factor Return: 0 if OK, 1 on error
Notes: (1) This creates a temp pix that is multiplied by the constant . It then adds that into .
l_int32 pixaccSubtract | ( | PIXACC * | pixacc, |
PIX * | pix | ||
) |
Input: pixacc pix (to be subtracted) Return: 0 if OK, 1 on error