![]() |
Leptonica 1.85.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) |
Variables | |
| static const l_int32 | num_linear = 25 |
| static const l_int32 | basic_linear [] |
| static const char * | sel_4_1 |
| static const char * | sel_4_2 |
| static const char * | sel_4_3 |
| static const char * | sel_4_4 |
| static const char * | sel_4_5 |
| static const char * | sel_4_6 |
| static const char * | sel_4_7 |
| static const char * | sel_4_8 |
| static const char * | sel_4_9 |
| static const char * | sel_8_1 |
| static const char * | sel_8_2 |
| static const char * | sel_8_3 |
| static const char * | sel_8_4 |
| static const char * | sel_8_5 |
| static const char * | sel_8_6 |
| static const char * | sel_8_7 |
| static const char * | sel_8_8 |
| static const char * | sel_8_9 |
| static const char * | sel_48_1 |
| static const char * | sel_48_2 |
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.
| [in] | sela | [optional] |
Notes:
(1) Adds the 9 basic sels for 4-cc thinning.
| [in] | sela | [optional] |
Notes:
(1) Adds the 9 basic sels for 8-cc thinning.
| [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.
| 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 430 of file sel2.c.
References L_BUF_SIZE, L_INSERT, and L_SET_PIXELS.
| [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 362 of file sel2.c.
References L_BUF_SIZE.
| [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 322 of file sel2.c.
References L_BUF_SIZE.
| [in] | sela | [optional] |
| 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 553 of file sel2.c.
References L_BUF_SIZE, L_INSERT, and L_SET_PIXELS.
| 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 866 of file sel2.c.
References L_SET_PIXELS.
|
static |
|
static |
|
static |