Leptonica 1.68
C Image Processing Library
|
DWA morphology with auto-generated comb Sels for composite operations on brick Sels. More...
Go to the source code of this file.
Functions | |
PIX * | pixMorphDwa_2 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname) |
PIX * | pixFMorphopGen_2 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname) |
l_int32 | fmorphopgen_low_2 (l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 index) |
Variables | |
static l_int32 | NUM_SELS_GENERATED = 76 |
static char | SEL_NAMES [][80] |
DWA morphology with auto-generated comb Sels for composite operations on brick Sels.
Definition in file dwacomb.2.c.
Top-level fast binary morphology with auto-generated sels
PIX *pixMorphDwa_2() PIX *pixFMorphopGen_2()
Input: pixd (usual 3 choices: null, == pixs, != pixs) pixs (1 bpp) operation (L_MORPH_DILATE, L_MORPH_ERODE, L_MORPH_OPEN, L_MORPH_CLOSE) sel name Return: pixd
Notes: (1) This simply adds a border, calls the appropriate pixFMorphopGen_*(), and removes the border. See the notes for that function. (2) The size of the border depends on the operation and the boundary conditions.
Definition at line 130 of file dwacomb.2.c.
References ERROR_PTR, getMorphBorderPixelColor(), L_MORPH_CLOSE, L_MORPH_ERODE, NULL, pixAddBorder(), pixCopy(), L_Dewarp::pixd, pixDestroy(), pixFMorphopGen_2(), pixGetDepth(), pixRemoveBorder(), and PROCNAME.
Input: pixd (usual 3 choices: null, == pixs, != pixs) pixs (1 bpp) operation (L_MORPH_DILATE, L_MORPH_ERODE, L_MORPH_OPEN, L_MORPH_CLOSE) sel name Return: pixd
Notes: (1) This is a dwa operation, and the Sels must be limited in size to not more than 31 pixels about the origin. (2) A border of appropriate size (32 pixels, or 64 pixels for safe closing with asymmetric b.c.) must be added before this function is called. (3) This handles all required setting of the border pixels before erosion and dilation. (4) The closing operation is safe; no pixels can be removed near the boundary.
Definition at line 188 of file dwacomb.2.c.
References ERROR_PTR, FALSE, fmorphopgen_low_2(), getMorphBorderPixelColor(), L_MORPH_DILATE, L_MORPH_ERODE, L_MORPH_OPEN, NULL, NUM_SELS_GENERATED, PIX_CLR, PIX_SET, pixCopy(), pixCreateTemplate(), L_Dewarp::pixd, pixDestroy(), pixGetData(), pixGetDepth(), pixGetHeight(), pixGetWidth(), pixGetWpl(), pixResizeImageData(), pixSetOrClearBorder(), PROCNAME, SEL_NAMES, and TRUE.
Referenced by pixCloseCompBrickDwa(), pixDilateCompBrickDwa(), pixErodeCompBrickDwa(), pixMorphDwa_2(), and pixOpenCompBrickDwa().
l_int32 fmorphopgen_low_2 | ( | l_uint32 * | datad, |
l_int32 | w, | ||
l_int32 | h, | ||
l_int32 | wpld, | ||
l_uint32 * | datas, | ||
l_int32 | wpls, | ||
l_int32 | index | ||
) |
a dispatcher to appropriate low-level code
Definition at line 192 of file dwacomblow.2.c.
Referenced by pixFMorphopGen_2().
l_int32 NUM_SELS_GENERATED = 76 [static] |
Definition at line 33 of file dwacomb.2.c.
Referenced by pixFMorphopGen_2().
char SEL_NAMES[][80] [static] |
Definition at line 34 of file dwacomb.2.c.
Referenced by pixFMorphopGen_2().