Leptonica  1.54
Файл dwacomb.2.c
#include <string.h>
#include "allheaders.h"

Функции

PIXpixMorphDwa_2 (PIX *pixd, PIX *pixs, l_int32 operation, char *selname)
 
PIXpixFMorphopGen_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)
 

Переменные

static l_int32 NUM_SELS_GENERATED = 76
 
static char SEL_NAMES [][80]
 

Функции

◆ fmorphopgen_low_2()

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 
)

fmorphopgen_low_2()

 a dispatcher to appropriate low-level code

◆ pixFMorphopGen_2()

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

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 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.

◆ pixMorphDwa_2()

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

Top-level fast binary morphology with auto-generated sels

   PIX     *pixMorphDwa_2()
   PIX     *pixFMorphopGen_2()

pixMorphDwa_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.

Переменные

◆ NUM_SELS_GENERATED

l_int32 NUM_SELS_GENERATED = 76
static

◆ SEL_NAMES

char SEL_NAMES[][80]
static