![]() |
Leptonica
1.82.0
Image processing and image analysis suite
|
#include <math.h>
#include "allheaders.h"
Go to the source code of this file.
Macros | |
#define | L_BUF_SIZE 512 |
Functions | |
SELA * | selaAddBasic (SELA *sela) |
SELA * | selaAddHitMiss (SELA *sela) |
SELA * | selaAddDwaLinear (SELA *sela) |
SELA * | selaAddDwaCombs (SELA *sela) |
SELA * | selaAddCrossJunctions (SELA *sela, l_float32 hlsize, l_float32 mdist, l_int32 norient, l_int32 debugflag) |
SELA * | selaAddTJunctions (SELA *sela, l_float32 hlsize, l_float32 mdist, l_int32 norient, l_int32 debugflag) |
SELA * | sela4ccThin (SELA *sela) |
SELA * | sela8ccThin (SELA *sela) |
SELA * | sela4and8ccThin (SELA *sela) |
SEL * | selMakePlusSign (l_int32 size, l_int32 linewidth) |
Contains definitions of simple structuring elements
Basic brick structuring elements SELA *selaAddBasic() Linear horizontal and vertical Square Diagonals
Simple hit-miss structuring elements SELA *selaAddHitMiss() Isolated foreground pixel Horizontal and vertical edges Slanted edge Corners
Structuring elements for comparing with DWA operations SELA *selaAddDwaLinear() SELA *selaAddDwaCombs()
Structuring elements for the intersection of lines SELA *selaAddCrossJunctions() SELA *selaAddTJunctions()
Structuring elements for connectivity-preserving thinning operations SELA *sela4ccThin() SELA *sela8ccThin() SELA *sela4and8ccThin()
Other structuring elements SEL *selMakePlusSign()
Definition in file sel2.c.
[in] | sela | [optional] |
Notes: (1) Adds the 2 basic sels for either 4-cc or 8-cc thinning.
Definition at line 846 of file sel2.c.
References selaCreate(), and selCreateFromString().
Referenced by selaMakeThinSets().
[in] | sela | [optional] |
Notes: (1) Adds the 9 basic sels for 4-cc thinning.
Definition at line 764 of file sel2.c.
References selaCreate(), and selCreateFromString().
Referenced by selaMakeThinSets().
[in] | sela | [optional] |
Notes: (1) Adds the 9 basic sels for 8-cc thinning.
Definition at line 805 of file sel2.c.
References selaCreate(), and selCreateFromString().
Referenced by selaMakeThinSets().
[in] | sela | [optional] |
Notes: (1) Adds the following sels: ~ all linear (horiz, vert) brick sels that are necessary for decomposable sels up to size 63 ~ square brick sels up to size 10 ~ 4 diagonal sels
Definition at line 99 of file sel2.c.
References L_BUF_SIZE, and selaCreate().
SELA* selaAddCrossJunctions | ( | SELA * | sela, |
l_float32 | hlsize, | ||
l_float32 | mdist, | ||
l_int32 | norient, | ||
l_int32 | debugflag | ||
) |
[in] | sela | [optional] |
[in] | hlsize | length of each line of hits from origin |
[in] | mdist | distance of misses from the origin |
[in] | norient | number of orientations; max of 8 |
[in] | debugflag | 1 for debug output |
Notes: (1) Adds hitmiss Sels for the intersection of two lines. If the lines are very thin, they must be nearly orthogonal to register. (2) The number of Sels generated is equal to norient. (3) If norient == 2, this generates 2 Sels of crosses, each with two perpendicular lines of hits. One Sel has horizontal and vertical hits; the other has hits along lines at +-45 degrees. Likewise, if norient == 3, this generates 3 Sels of crosses oriented at 30 degrees with each other. (4) It is suggested that hlsize be chosen at least 1 greater than mdist. Try values of (hlsize, mdist) such as (6,5), (7,6), (8,7), (9,7), etc.
Definition at line 438 of file sel2.c.
References generatePtaLineFromPt(), L_BUF_SIZE, L_INSERT, L_SET_PIXELS, lept_mkdir(), pixaAddPix(), pixaCreate(), pixaDisplayTiledAndScaled(), pixaGetPixDimensions(), pixCreate(), pixDestroy(), pixPaintThroughMask(), pixRenderPta(), pixScaleBySampling(), pixSetAll(), pixSetPixel(), ptaDestroy(), ptaJoin(), selaAddSel(), selaCreate(), and selCreateFromColorPix().
[in] | sela | [optional] |
Notes: (1) Adds all comb (horizontal, vertical) Sels that are used in composite linear morphological operations up to 63 pixels in length, which are the sizes over which dwa code can be generated.
Definition at line 368 of file sel2.c.
References L_BUF_SIZE, selaCreate(), and selectComposableSizes().
[in] | sela | [optional] |
Notes: (1) Adds all linear (horizontal, vertical) sels from 2 to 63 pixels in length, which are the sizes over which dwa code can be generated.
Definition at line 326 of file sel2.c.
References L_BUF_SIZE, selaAddSel(), selaCreate(), and selCreateBrick().
[in] | sela | [optional] |
Definition at line 188 of file sel2.c.
References selaAddSel(), selaCreate(), and selCreateBrick().
SELA* selaAddTJunctions | ( | SELA * | sela, |
l_float32 | hlsize, | ||
l_float32 | mdist, | ||
l_int32 | norient, | ||
l_int32 | debugflag | ||
) |
[in] | sela | [optional] |
[in] | hlsize | length of each line of hits from origin |
[in] | mdist | distance of misses from the origin |
[in] | norient | number of orientations; max of 8 |
[in] | debugflag | 1 for debug output |
Notes: (1) Adds hitmiss Sels for the T-junction of two lines. If the lines are very thin, they must be nearly orthogonal to register. (2) The number of Sels generated is 4 * norient. (3) It is suggested that hlsize be chosen at least 1 greater than mdist. Try values of (hlsize, mdist) such as (6,5), (7,6), (8,7), (9,7), etc.
Definition at line 563 of file sel2.c.
References generatePtaLineFromPt(), L_BUF_SIZE, L_INSERT, L_SET_PIXELS, lept_mkdir(), pixaAddPix(), pixaCreate(), pixaDisplayTiledAndScaled(), pixaGetPixDimensions(), pixCreate(), pixDestroy(), pixPaintThroughMask(), pixRenderPta(), pixScaleBySampling(), pixSetAll(), pixSetPixel(), ptaDestroy(), ptaJoin(), selaAddSel(), selaCreate(), and selCreateFromColorPix().
SEL* selMakePlusSign | ( | l_int32 | size, |
l_int32 | linewidth | ||
) |
[in] | size | side of containing square |
[in] | linewidth | of lines |
Notes: (1) Useful for debugging to show location of selected pixels. (2) See displaySelectedPixels() for an example of use.
Definition at line 878 of file sel2.c.
References L_SET_PIXELS, pixCreate(), pixDestroy(), pixRenderLine(), and selCreateFromPix().
|
static |
|
static |
|
static |