Tesseract
3.02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
intfx.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Filename: intfx.h
3
** Purpose: Interface to high level integer feature extractor.
4
** Author: Robert Moss
5
** History: Tue May 21 15:51:57 MDT 1991, RWM, Created.
6
**
7
** (c) Copyright Hewlett-Packard Company, 1988.
8
** Licensed under the Apache License, Version 2.0 (the "License");
9
** you may not use this file except in compliance with the License.
10
** You may obtain a copy of the License at
11
** http://www.apache.org/licenses/LICENSE-2.0
12
** Unless required by applicable law or agreed to in writing, software
13
** distributed under the License is distributed on an "AS IS" BASIS,
14
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
** See the License for the specific language governing permissions and
16
** limitations under the License.
17
******************************************************************************/
18
#ifndef INTFX_H
19
#define INTFX_H
20
24
#include "
blobs.h
"
25
#include "
intproto.h
"
26
#include "
normalis.h
"
27
#include <math.h>
28
29
class
DENORM
;
30
31
namespace
tesseract
{
32
class
TrainingSample;
33
}
34
35
struct
INT_FX_RESULT_STRUCT
{
36
inT32
Length
;
// total length of all outlines
37
inT16
Xmean
,
Ymean
;
// center of mass of all outlines
38
inT16
Rx
,
Ry
;
// radius of gyration
39
inT16
NumBL
,
NumCN
;
// number of features extracted
40
inT16
Width
;
// Width of blob in BLN coords.
41
uinT8
YBottom
;
// Bottom of blob in BLN coords.
42
uinT8
YTop
;
// Top of blob in BLN coords.
43
};
44
48
void
InitIntegerFX
();
49
50
// Returns a vector representing the direction of a feature with the given
51
// theta direction in an INT_FEATURE_STRUCT.
52
FCOORD
FeatureDirection
(
uinT8
theta);
53
54
tesseract::TrainingSample
*
GetIntFeatures
(
55
tesseract::NormalizationMode
mode
,
TBLOB
*blob,
56
const
DENORM
& denorm);
57
58
int
ExtractIntFeat
(
TBLOB
*Blob,
59
const
DENORM
& denorm,
60
INT_FEATURE_ARRAY
BLFeat,
61
INT_FEATURE_ARRAY
CNFeat,
62
INT_FX_RESULT_STRUCT
* Results,
63
inT32
*FeatureOutlineArray = 0);
64
65
uinT8
BinaryAnglePlusPi
(
inT32
Y,
inT32
X);
66
67
int
SaveFeature
(
INT_FEATURE_ARRAY
FeatureArray,
68
uinT16
FeatureNum,
69
inT16
X,
70
inT16
Y,
71
uinT8
Theta);
72
73
uinT16
MySqrt
(
inT32
X,
inT32
Y);
74
75
uinT8
MySqrt2
(
uinT16
N,
uinT32
I,
uinT8
*Exp);
76
77
void
ClipRadius
(
uinT8
*RxInv,
uinT8
*RxExp,
uinT8
*RyInv,
uinT8
*RyExp);
78
#endif
FeatureDirection
FCOORD FeatureDirection(uinT8 theta)
Definition:
intfx.cpp:93
INT_FX_RESULT_STRUCT::Xmean
inT16 Xmean
Definition:
intfx.h:37
GetIntFeatures
TrainingSample * GetIntFeatures(tesseract::NormalizationMode mode, TBLOB *blob, const DENORM &denorm)
Definition:
intfx.cpp:97
INT_FX_RESULT_STRUCT::Ymean
inT16 Ymean
Definition:
intfx.h:37
INT_FX_RESULT_STRUCT::NumCN
inT16 NumCN
Definition:
intfx.h:39
tesseract::TrainingSample
Definition:
trainingsample.h:53
blobs.h
INT_FX_RESULT_STRUCT::Width
inT16 Width
Definition:
intfx.h:40
tesseract-c_api-demo.tesseract
tuple tesseract
Definition:
tesseract-c_api-demo.py:42
InitIntegerFX
void InitIntegerFX()
Definition:
intfx.cpp:74
INT_FX_RESULT_STRUCT::YTop
uinT8 YTop
Definition:
intfx.h:42
DENORM
Definition:
normalis.h:59
inT32
int inT32
Definition:
host.h:102
MySqrt2
uinT8 MySqrt2()
TBLOB
Definition:
blobs.h:174
INT_FX_RESULT_STRUCT::YBottom
uinT8 YBottom
Definition:
intfx.h:41
mode
CMD_EVENTS mode
Definition:
pgedit.cpp:115
uinT16
unsigned short uinT16
Definition:
host.h:101
ClipRadius
void ClipRadius()
FCOORD
Definition:
points.h:189
inT16
short inT16
Definition:
host.h:100
INT_FEATURE_ARRAY
INT_FEATURE_STRUCT INT_FEATURE_ARRAY[MAX_NUM_INT_FEATURES]
Definition:
baseapi.h:66
tesseract::NormalizationMode
NormalizationMode
Definition:
normalis.h:42
normalis.h
ExtractIntFeat
int ExtractIntFeat(TBLOB *Blob, const DENORM &denorm, INT_FEATURE_ARRAY BLFeat, INT_FEATURE_ARRAY CNFeat, INT_FX_RESULT_STRUCT *Results, inT32 *FeatureOutlineArray)
Definition:
intfx.cpp:143
MySqrt
uinT16 MySqrt(inT32 X, inT32 Y)
Definition:
intfx.cpp:505
uinT8
unsigned char uinT8
Definition:
host.h:99
INT_FX_RESULT_STRUCT
Definition:
intfx.h:35
INT_FX_RESULT_STRUCT::NumBL
inT16 NumBL
Definition:
intfx.h:39
uinT32
unsigned int uinT32
Definition:
host.h:103
INT_FX_RESULT_STRUCT::Length
inT32 Length
Definition:
intfx.h:36
BinaryAnglePlusPi
uinT8 BinaryAnglePlusPi(inT32 Y, inT32 X)
Definition:
intfx.cpp:429
intproto.h
INT_FX_RESULT_STRUCT::Rx
inT16 Rx
Definition:
intfx.h:38
SaveFeature
int SaveFeature()
INT_FX_RESULT_STRUCT::Ry
inT16 Ry
Definition:
intfx.h:38
home
abuild
rpmbuild
BUILD
tesseract-ocr-3.02.02
classify
intfx.h
Generated on Mon Mar 23 2015 22:22:37 for Tesseract by
1.8.5