Leptonica  1.54
Файл src/pixacc.c
#include "allheaders.h"

Функции

PIXACCpixaccCreate (l_int32 w, l_int32 h, l_int32 negflag)
PIXACCpixaccCreateFromPix (PIX *pix, l_int32 negflag)
void pixaccDestroy (PIXACC **ppixacc)
PIXpixaccFinal (PIXACC *pixacc, l_int32 outdepth)
PIXpixaccGetPix (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)

Функции

l_int32 pixaccAdd ( PIXACC pixacc,
PIX pix 
)

pixaccAdd()

Input: pixacc pix (to be added) Return: 0 if OK, 1 on error

PIXACC* pixaccCreate ( l_int32  w,
l_int32  h,
l_int32  negflag 
)

pixaccCreate()

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 
)

pixaccCreateFromPix()

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)

pixaccDestroy()

Input: &pixacc (<can be="" null>="">) Return: void

Notes: (1) Always nulls the input ptr.

PIX* pixaccFinal ( PIXACC pixacc,
l_int32  outdepth 
)

pixaccFinal()

Input: pixacc outdepth (8, 16 or 32 bpp) Return: pixd (8 , 16 or 32 bpp), or null on error

pixaccGetOffset()

Input: pixacc Return: offset, or -1 on error

PIX* pixaccGetPix ( PIXACC pixacc)

pixaccGetPix()

Input: pixacc Return: pix, or null on error

l_int32 pixaccMultConst ( PIXACC pixacc,
l_float32  factor 
)

pixaccMultConst()

Input: pixacc factor Return: 0 if OK, 1 on error

l_int32 pixaccMultConstAccumulate ( PIXACC pixacc,
PIX pix,
l_float32  factor 
)

pixaccMultConstAccumulate()

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 
)

pixaccSubtract()

Input: pixacc pix (to be subtracted) Return: 0 if OK, 1 on error