Tesseract  3.02
tesseract-ocr/classify/mfdefs.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  **     Filename:    mfdefs.h
00003  **     Purpose:     Definition of micro-features
00004  **     Author:      Dan Johnson
00005  **     History:     Mon Jan 22 08:42:13 1990, DSJ, Created.
00006  **
00007  **     (c) Copyright Hewlett-Packard Company, 1988.
00008  ** Licensed under the Apache License, Version 2.0 (the "License");
00009  ** you may not use this file except in compliance with the License.
00010  ** You may obtain a copy of the License at
00011  ** http://www.apache.org/licenses/LICENSE-2.0
00012  ** Unless required by applicable law or agreed to in writing, software
00013  ** distributed under the License is distributed on an "AS IS" BASIS,
00014  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  ** See the License for the specific language governing permissions and
00016  ** limitations under the License.
00017  ******************************************************************************/
00018 #ifndef   MFDEFS_H
00019 #define   MFDEFS_H
00020 
00024 #include "oldlist.h"
00025 #include "matchdefs.h"
00026 #include "xform2d.h"
00027 
00028 /* definition of a list of micro-features */
00029 typedef LIST MICROFEATURES;
00030 
00031 /* definition of structure of micro-features */
00032 #define MFSIZE        6
00033 typedef FLOAT32 MFBLOCK[MFSIZE];
00034 typedef FLOAT32 *MICROFEATURE;
00035 
00036 /* definitions of individual micro-feature parameters */
00037 #define XPOSITION     0
00038 #define YPOSITION     1
00039 #define MFLENGTH      2
00040 #define ORIENTATION     3
00041 #define FIRSTBULGE      4
00042 #define SECONDBULGE     5
00043 
00048 /* macros for accessing micro-feature lists */
00049 #define NextFeatureOf(L)  ( (MICROFEATURE) first_node ( L ) )
00050 
00054 MICROFEATURE NewMicroFeature();
00055 
00056 void FreeMicroFeatures(MICROFEATURES MicroFeatures);
00057 #endif