Leptonica 1.68
C Image Processing Library

fmorphgen.1.c File Reference

DWA morphology with auto-generated brick sels (high-level) More...

#include <string.h>
#include "allheaders.h"

Go to the source code of this file.

Functions

PIXpixMorphDwa_1 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname)
PIXpixFMorphopGen_1 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname)
l_int32 fmorphopgen_low_1 (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 = 58
static char SEL_NAMES [][80]

Detailed Description

DWA morphology with auto-generated brick sels (high-level)

Definition in file fmorphgen.1.c.


Function Documentation

PIX * pixMorphDwa_1 ( PIX pixd,
PIX pixs,
l_int32  operation,
char *  selname 
)

Top-level fast binary morphology with auto-generated sels

PIX *pixMorphDwa_1() PIX *pixFMorphopGen_1()

pixMorphDwa_1()

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 112 of file fmorphgen.1.c.

References ERROR_PTR, getMorphBorderPixelColor(), L_MORPH_CLOSE, L_MORPH_ERODE, NULL, pixAddBorder(), pixCopy(), L_Dewarp::pixd, pixDestroy(), pixFMorphopGen_1(), pixGetDepth(), pixRemoveBorder(), and PROCNAME.

Referenced by main(), pixDilateBrickDwa(), and pixErodeBrickDwa().

PIX * pixFMorphopGen_1 ( PIX pixd,
PIX pixs,
l_int32  operation,
char *  selname 
)

pixFMorphopGen_1()

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 170 of file fmorphgen.1.c.

References ERROR_PTR, FALSE, fmorphopgen_low_1(), 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 main(), pixCloseBrickDwa(), pixCloseCompBrickDwa(), pixDilateBrickDwa(), pixDilateCompBrickDwa(), pixErodeBrickDwa(), pixErodeCompBrickDwa(), pixMorphDwa_1(), pixOpenBrickDwa(), and pixOpenCompBrickDwa().

l_int32 fmorphopgen_low_1 ( l_uint32 datad,
l_int32  w,
l_int32  h,
l_int32  wpld,
l_uint32 datas,
l_int32  wpls,
l_int32  index 
)

fmorphopgen_low_1()

a dispatcher to appropriate low-level code

Definition at line 156 of file fmorphgenlow.1.c.

Referenced by pixFMorphopGen_1().


Variable Documentation

l_int32 NUM_SELS_GENERATED = 58 [static]

Definition at line 33 of file fmorphgen.1.c.

Referenced by pixFMorphopGen_1().

char SEL_NAMES[][80] [static]

Definition at line 34 of file fmorphgen.1.c.

Referenced by pixFMorphopGen_1().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines