Tesseract
3.02
|
00001 00002 // File: ccstruct.h 00003 // Description: ccstruct class. 00004 // Author: Samuel Charron 00005 // 00006 // (C) Copyright 2006, Google Inc. 00007 // Licensed under the Apache License, Version 2.0 (the "License"); 00008 // you may not use this file except in compliance with the License. 00009 // You may obtain a copy of the License at 00010 // http://www.apache.org/licenses/LICENSE-2.0 00011 // Unless required by applicable law or agreed to in writing, software 00012 // distributed under the License is distributed on an "AS IS" BASIS, 00013 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 // See the License for the specific language governing permissions and 00015 // limitations under the License. 00016 // 00018 00019 #ifndef TESSERACT_CCSTRUCT_CCSTRUCT_H__ 00020 #define TESSERACT_CCSTRUCT_CCSTRUCT_H__ 00021 00022 #include "cutil.h" 00023 #include "image.h" 00024 00025 namespace tesseract { 00026 class CCStruct : public CUtil { 00027 public: 00028 CCStruct(); 00029 ~CCStruct(); 00030 00031 // Globally accessible constants. 00032 // APPROXIMATIONS of the fractions of the character cell taken by 00033 // the descenders, ascenders, and x-height. 00034 static const double kDescenderFraction; // = 0.25; 00035 static const double kXHeightFraction; // = 0.5; 00036 static const double kAscenderFraction; // = 0.25; 00037 // Derived value giving the x-height as a fraction of cap-height. 00038 static const double kXHeightCapRatio; // = XHeight/(XHeight + Ascender). 00039 00040 protected: 00041 Image image_; 00042 }; 00043 00044 class Tesseract; 00045 } // namespace tesseract 00046 00047 00048 #endif // TESSERACT_CCSTRUCT_CCSTRUCT_H__