Leptonica 1.68
C Image Processing Library

dwalinear.3.c File Reference

Top-level fast binary morphology with auto-generated sels. More...

#include <string.h>
#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)
l_int32 fmorphopgen_low_3 (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 = 124
static char SEL_NAMES [][80]

Detailed Description

Top-level fast binary morphology with auto-generated sels.

Definition in file dwalinear.3.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.

References ERROR_PTR, getMorphBorderPixelColor(), L_MORPH_CLOSE, L_MORPH_ERODE, NULL, pixAddBorder(), pixCopy(), pixDestroy(), pixFMorphopGen_3(), pixGetDepth(), pixRemoveBorder(), and PROCNAME.

Referenced by main().

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

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

fmorphopgen_low_3()

a dispatcher to appropriate low-level code

Definition at line 288 of file dwalinearlow.3.c.

References fdilate_3_0(), fdilate_3_1(), fdilate_3_10(), fdilate_3_100(), fdilate_3_101(), fdilate_3_102(), fdilate_3_103(), fdilate_3_104(), fdilate_3_105(), fdilate_3_106(), fdilate_3_107(), fdilate_3_108(), fdilate_3_109(), fdilate_3_11(), fdilate_3_110(), fdilate_3_111(), fdilate_3_112(), fdilate_3_113(), fdilate_3_114(), fdilate_3_115(), fdilate_3_116(), fdilate_3_117(), fdilate_3_118(), fdilate_3_119(), fdilate_3_12(), fdilate_3_120(), fdilate_3_121(), fdilate_3_122(), fdilate_3_123(), fdilate_3_13(), fdilate_3_14(), fdilate_3_15(), fdilate_3_16(), fdilate_3_17(), fdilate_3_18(), fdilate_3_19(), fdilate_3_2(), fdilate_3_20(), fdilate_3_21(), fdilate_3_22(), fdilate_3_23(), fdilate_3_24(), fdilate_3_25(), fdilate_3_26(), fdilate_3_27(), fdilate_3_28(), fdilate_3_29(), fdilate_3_3(), fdilate_3_30(), fdilate_3_31(), fdilate_3_32(), fdilate_3_33(), fdilate_3_34(), fdilate_3_35(), fdilate_3_36(), fdilate_3_37(), fdilate_3_38(), fdilate_3_39(), fdilate_3_4(), fdilate_3_40(), fdilate_3_41(), fdilate_3_42(), fdilate_3_43(), fdilate_3_44(), fdilate_3_45(), fdilate_3_46(), fdilate_3_47(), fdilate_3_48(), fdilate_3_49(), fdilate_3_5(), fdilate_3_50(), fdilate_3_51(), fdilate_3_52(), fdilate_3_53(), fdilate_3_54(), fdilate_3_55(), fdilate_3_56(), fdilate_3_57(), fdilate_3_58(), fdilate_3_59(), fdilate_3_6(), fdilate_3_60(), fdilate_3_61(), fdilate_3_62(), fdilate_3_63(), fdilate_3_64(), fdilate_3_65(), fdilate_3_66(), fdilate_3_67(), fdilate_3_68(), fdilate_3_69(), fdilate_3_7(), fdilate_3_70(), fdilate_3_71(), fdilate_3_72(), fdilate_3_73(), fdilate_3_74(), fdilate_3_75(), fdilate_3_76(), fdilate_3_77(), fdilate_3_78(), fdilate_3_79(), fdilate_3_8(), fdilate_3_80(), fdilate_3_81(), fdilate_3_82(), fdilate_3_83(), fdilate_3_84(), fdilate_3_85(), fdilate_3_86(), fdilate_3_87(), fdilate_3_88(), fdilate_3_89(), fdilate_3_9(), fdilate_3_90(), fdilate_3_91(), fdilate_3_92(), fdilate_3_93(), fdilate_3_94(), fdilate_3_95(), fdilate_3_96(), fdilate_3_97(), fdilate_3_98(), fdilate_3_99(), ferode_3_0(), ferode_3_1(), ferode_3_10(), ferode_3_100(), ferode_3_101(), ferode_3_102(), ferode_3_103(), ferode_3_104(), ferode_3_105(), ferode_3_106(), ferode_3_107(), ferode_3_108(), ferode_3_109(), ferode_3_11(), ferode_3_110(), ferode_3_111(), ferode_3_112(), ferode_3_113(), ferode_3_114(), ferode_3_115(), ferode_3_116(), ferode_3_117(), ferode_3_118(), ferode_3_119(), ferode_3_12(), ferode_3_120(), ferode_3_121(), ferode_3_122(), ferode_3_123(), ferode_3_13(), ferode_3_14(), ferode_3_15(), ferode_3_16(), ferode_3_17(), ferode_3_18(), ferode_3_19(), ferode_3_2(), ferode_3_20(), ferode_3_21(), ferode_3_22(), ferode_3_23(), ferode_3_24(), ferode_3_25(), ferode_3_26(), ferode_3_27(), ferode_3_28(), ferode_3_29(), ferode_3_3(), ferode_3_30(), ferode_3_31(), ferode_3_32(), ferode_3_33(), ferode_3_34(), ferode_3_35(), ferode_3_36(), ferode_3_37(), ferode_3_38(), ferode_3_39(), ferode_3_4(), ferode_3_40(), ferode_3_41(), ferode_3_42(), ferode_3_43(), ferode_3_44(), ferode_3_45(), ferode_3_46(), ferode_3_47(), ferode_3_48(), ferode_3_49(), ferode_3_5(), ferode_3_50(), ferode_3_51(), ferode_3_52(), ferode_3_53(), ferode_3_54(), ferode_3_55(), ferode_3_56(), ferode_3_57(), ferode_3_58(), ferode_3_59(), ferode_3_6(), ferode_3_60(), ferode_3_61(), ferode_3_62(), ferode_3_63(), ferode_3_64(), ferode_3_65(), ferode_3_66(), ferode_3_67(), ferode_3_68(), ferode_3_69(), ferode_3_7(), ferode_3_70(), ferode_3_71(), ferode_3_72(), ferode_3_73(), ferode_3_74(), ferode_3_75(), ferode_3_76(), ferode_3_77(), ferode_3_78(), ferode_3_79(), ferode_3_8(), ferode_3_80(), ferode_3_81(), ferode_3_82(), ferode_3_83(), ferode_3_84(), ferode_3_85(), ferode_3_86(), ferode_3_87(), ferode_3_88(), ferode_3_89(), ferode_3_9(), ferode_3_90(), ferode_3_91(), ferode_3_92(), ferode_3_93(), ferode_3_94(), ferode_3_95(), ferode_3_96(), ferode_3_97(), ferode_3_98(), and ferode_3_99().

Referenced by pixFMorphopGen_3().


Variable Documentation

l_int32 NUM_SELS_GENERATED = 124 [static]

Definition at line 33 of file dwalinear.3.c.

Referenced by pixFMorphopGen_3().

char SEL_NAMES[][80] [static]

Definition at line 34 of file dwalinear.3.c.

Referenced by pixFMorphopGen_3().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines