ocrcommon.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : ocrcommon.h
00004 *  Part of     : OCR / ocrsrv
00005 *  Interface   : Optical Character Recognition API, OCR APIs 
00006 *
00007 *  Description : APIs of the OCR(Optical Character Recognition), current engine
00008 *                can recognize 24 bit colored image and 8 bit gray scale image
00009 *                in BMP format.
00010 *
00011 *  Version     : %version: 3 %
00012 *
00013 *  Copyright 2002-2005 Nokia.  All rights reserved.
00014 *  This material, including documentation and any related computer
00015 *  programs, is protected by copyright controlled by Nokia.  All
00016 *  rights are reserved.  Copying, including reproducing, storing,
00017 *  adapting or translating, any or all of this material requires the
00018 *  prior written consent of Nokia.  This material also contains
00019 *  confidential information which may not be disclosed to others
00020 *  without the prior written consent of Nokia.
00021 * ============================================================================
00022 * Template version: 4.0
00023 */
00024 
00025 #ifndef OCRCOMMON_H
00026 #define OCRCOMMON_H
00027  
00028 // INCLUDE FILES
00029 #include <e32std.h>
00030 #include <e32def.h>
00031 #include <e32base.h>
00032 
00036 const TInt KErrOcrBadImage (-1001);     
00037 
00041 const TInt KErrOcrBadLanguage (-1002);      
00042 
00046 const TInt KErrOcrBadRegion (-1003);      
00047 
00051 const TInt KErrOcrNotSetLanguage (-1004);      
00052 
00056 const TInt KErrOcrBadDictFile (-1005);      
00057 
00060 enum TOcrLayoutType
00061     {
00064     EOcrLayoutTypeH,
00065     
00068     EOcrLayoutTypeV
00069     };
00070 
00073 enum TOcrTextType   
00074     {
00077     EOcrTextMultiLine,
00078     
00081     EOcrTextSingleLine
00082     };
00083 
00086 enum TOcrBackgroundType
00087     {
00090     EOcrBackgroundLight,
00091     
00094     EOcrBackgroundDark,
00095     
00098     EOcrBackgroundUnknown
00099     };
00100     
00112 class TOCRTextLineInfo
00113     {
00114 public:    
00115 
00120     HBufC16* iText;
00121     
00125     TRect iRect;
00126 
00130     TRect* iCharRect;
00131     
00135     TInt iCharCount;
00136     };
00137 
00148 class TOCRBlockInfo
00149     {
00150 public:
00151     
00155     TRect iRect;
00156     
00160     TOcrLayoutType iType;
00161     
00165     TInt iBlockId;
00166     };
00167 
00179 class TOCRTextRgnInfo
00180     {
00181 public:
00182 
00186     TRect iRect;
00187     
00191     TOcrLayoutType iType;
00192     
00196     TInt iBlockId;
00197 
00201     TOCRTextLineInfo* iLines;
00202     
00206     TInt iLineCount;
00207     };
00208 
00217 class TOCRLayoutSetting
00218     {
00219 public:
00220 
00224     enum TOcrBrightness
00225         {  
00226         ENormal, 
00227         ELight,  
00228         EDark    
00229         };
00230 
00237     TBool iSkew;
00238     
00242     TOcrBrightness iBrightness;
00243     };
00244 
00253 class TOCRRecognizeSetting
00254     {
00255 public:
00256 
00260     TAny* iAny;
00261     };
00262 
00271 class TOCRLayoutBlockInfo
00272     {
00273 public:
00274     
00278     TRect iRect;
00279     
00283     TOcrLayoutType iLayout;
00284     
00288     TOcrTextType iText;
00289     
00293     TOcrBackgroundType iBackgroundColor;
00294     };
00295 
00304 class TRegionInfo
00305     {
00306 public:
00307     
00311     enum TOcrRegionType
00312         {
00313         EEmailAddress,     
00314         ETelephoneNumber,  
00315         EWWWAddress        
00316         };
00317 
00318 public:            
00322     TRect iRect;
00323     
00327     TOcrBackgroundType iBackgroundColor;
00328     
00332     TOcrRegionType iType;
00333     };
00334 
00344 class TOcrEngineEnv
00345     {
00346 public:
00351     TThreadPriority iPriority;
00352     
00359     TInt iMaxHeapSize;
00360     };    
00361 
00362 // OCRCOMMON_H
00363 #endif
00364 
00365 // End of file

Copyright © Nokia Corporation 2001-2008
Back to top