Leptonica 1.68
C Image Processing Library

fhmtgen.1.c File Reference

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

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

Go to the source code of this file.

Functions

PIXpixHMTDwa_1 (PIX *pixd, PIX *pixs, char *selname)
PIXpixFHMTGen_1 (PIX *pixd, PIX *pixs, char *selname)
l_int32 fhmtgen_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 = 6
static char SEL_NAMES [][80]

Detailed Description

DWA morphology with auto-generated hit-miss sels (high-level)

Definition in file fhmtgen.1.c.


Function Documentation

PIX * pixHMTDwa_1 ( PIX pixd,
PIX pixs,
char *  selname 
)

Top-level fast hit-miss transform with auto-generated sels

PIX *pixHMTDwa_1() PIX *pixFHMTGen_1()

pixHMTDwa_1()

Input: pixd (usual 3 choices: null, == pixs, != pixs) pixs (1 bpp) sel name Return: pixd

Notes: (1) This simply adds a 32 pixel border, calls the appropriate pixFHMTGen_*(), and removes the border. See notes below for that function.

Definition at line 56 of file fhmtgen.1.c.

References ERROR_PTR, NULL, pixAddBorder(), pixCopy(), L_Dewarp::pixd, pixDestroy(), pixFHMTGen_1(), pixGetDepth(), pixRemoveBorder(), and PROCNAME.

Referenced by main().

PIX * pixFHMTGen_1 ( PIX pixd,
PIX pixs,
char *  selname 
)

pixFHMTGen_1()

Input: pixd (usual 3 choices: null, == pixs, != pixs) pixs (1 bpp) sel name Return: pixd

Notes: (1) This is a dwa implementation of the hit-miss transform on pixs by the sel. (2) The sel must be limited in size to not more than 31 pixels about the origin. It must have at least one hit, and it can have any number of misses. (3) This handles all required setting of the border pixels before erosion and dilation.

Definition at line 102 of file fhmtgen.1.c.

References ERROR_PTR, FALSE, fhmtgen_low_1(), NULL, NUM_SELS_GENERATED, pixCopy(), pixCreateTemplate(), L_Dewarp::pixd, pixDestroy(), pixGetData(), pixGetDepth(), pixGetHeight(), pixGetWidth(), pixGetWpl(), pixResizeImageData(), PROCNAME, SEL_NAMES, and TRUE.

Referenced by main(), and pixHMTDwa_1().

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

fhmtgen_low_1()

a dispatcher to appropriate low-level code

Definition at line 45 of file fhmtgenlow.1.c.

Referenced by pixFHMTGen_1().


Variable Documentation

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

Referenced by pixFHMTGen_1().

char SEL_NAMES[][80] [static]
Initial value:
 {
                             "sel_3hm",
                             "sel_3de",
                             "sel_3ue",
                             "sel_3re",
                             "sel_3le",
                             "sel_sl1"}

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

Referenced by pixFHMTGen_1().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines