Leptonica 1.68
C Image Processing Library

dwamorph1_reg.c File Reference

Implements full regression test, including autogen of code, compilation, and running the result. (Works by running make so won't work under Windows) More...

#include "allheaders.h"

Go to the source code of this file.

Functions

PIXpixMorphDwa_3 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname)
PIXpixFMorphopGen_3 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname)
 main (int argc, char **argv)

Variables

LEPT_DLL l_int32 MORPH_BC

Detailed Description

Implements full regression test, including autogen of code, compilation, and running the result. (Works by running make so won't work under Windows)

Definition in file dwamorph1_reg.c.


Function Documentation

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

Top-level fast binary morphology with auto-generated sels

PIX *pixMorphDwa_3() PIX *pixFMorphopGen_3()

pixMorphDwa_3()

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 178 of file dwalinear.3.c.

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

pixFMorphopGen_3()

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 236 of file dwalinear.3.c.

References ERROR_PTR, FALSE, fmorphopgen_low_3(), getMorphBorderPixelColor(), L_MORPH_DILATE, L_MORPH_ERODE, L_MORPH_OPEN, NULL, NUM_SELS_GENERATED, PIX_CLR, PIX_SET, pixCopy(), pixCreateTemplate(), pixDestroy(), pixGetData(), pixGetDepth(), pixGetHeight(), pixGetWidth(), pixGetWpl(), pixResizeImageData(), pixSetOrClearBorder(), PROCNAME, SEL_NAMES, and TRUE.

Referenced by pixMorphDwa_3().


Variable Documentation

LEPT_DLL l_int32 MORPH_BC

Definition at line 160 of file morph.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines