Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef INTFX_H
00019 #define INTFX_H
00020
00024 #include "blobs.h"
00025 #include "intproto.h"
00026 #include "normalis.h"
00027 #include <math.h>
00028
00029 class DENORM;
00030
00031 namespace tesseract {
00032 class TrainingSample;
00033 }
00034
00035 struct INT_FX_RESULT_STRUCT {
00036 inT32 Length;
00037 inT16 Xmean, Ymean;
00038 inT16 Rx, Ry;
00039 inT16 NumBL, NumCN;
00040 inT16 Width;
00041 uinT8 YBottom;
00042 uinT8 YTop;
00043 };
00044
00048 void InitIntegerFX();
00049
00050
00051
00052 FCOORD FeatureDirection(uinT8 theta);
00053
00054 tesseract::TrainingSample* GetIntFeatures(
00055 tesseract::NormalizationMode mode, TBLOB *blob,
00056 const DENORM& denorm);
00057
00058 int ExtractIntFeat(TBLOB *Blob,
00059 const DENORM& denorm,
00060 INT_FEATURE_ARRAY BLFeat,
00061 INT_FEATURE_ARRAY CNFeat,
00062 INT_FX_RESULT_STRUCT* Results,
00063 inT32 *FeatureOutlineArray = 0);
00064
00065 uinT8 BinaryAnglePlusPi(inT32 Y, inT32 X);
00066
00067 int SaveFeature(INT_FEATURE_ARRAY FeatureArray,
00068 uinT16 FeatureNum,
00069 inT16 X,
00070 inT16 Y,
00071 uinT8 Theta);
00072
00073 uinT16 MySqrt(inT32 X, inT32 Y);
00074
00075 uinT8 MySqrt2(uinT16 N, uinT32 I, uinT8 *Exp);
00076
00077 void ClipRadius(uinT8 *RxInv, uinT8 *RxExp, uinT8 *RyInv, uinT8 *RyExp);
00078 #endif