Tesseract  3.02
tesseract-ocr/cube/cube_const.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  * File:        const.h
00003  * Description: Defintions of constants used by Cube
00004  * Author:    Ahmad Abdulkader
00005  * Created:   2007
00006  *
00007  * (C) Copyright 2008, Google Inc.
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  **********************************************************************/
00019 
00020 #ifndef CUBE_CONST_H
00021 #define CUBE_CONST_H
00022 
00023 // Scale used to normalize a log-prob to a cost
00024 #define PROB2COST_SCALE   4096.0
00025 // Maximum possible cost (-log prob of MIN_PROB)
00026 #define MIN_PROB_COST     65536
00027 // Probability corresponding to the max cost MIN_PROB_COST
00028 #define MIN_PROB          0.000000113
00029 // Worst possible cost (returned on failure)
00030 #define WORST_COST        0x40000
00031 // Oversegmentation hysteresis thresholds
00032 #define HIST_WND_RATIO    0.1f
00033 #define SEG_PT_WND_RATIO  0.1f
00034 
00035 #ifdef _WIN32
00036 #ifdef __GNUC__
00037 #include <climits>
00038 #endif
00039 #endif
00040 
00041 #endif  // CUBE_CONST_H