MOCREngineLayoutRecognize Class Reference

API published in: S60 3rd Ed FP 1

Link against: ocrsrv.lib

Capability Information

Required Capabilities

None


#include <ocrsrv.h>

Inherits MOCREngineInterface.


Detailed Description

OCR (Optical Character Recognition) Engine Interfaces with Layout Analysis.

This set of interfaces offers the OCR engine which supports Layout Analysis on full images. User shall pass the handle of the image through LayoutAnalysisL first, and then pass block ids to RecognizeL to complete the recognition.

For Example: After passing the image handle to LayoutAnalysisL, the MOCREngineObserver::LayoutComplete will be called after the process. Then through the TOCRBlockInfo array (const TOCRBlockInfo* aBlock and const TInt aBlockCount), the user knows how many blocks have been identified together with their position information. Those blocks are marked with ids from Zero to aBlockCount - 1.

Then the user must specify which blocks are going to be further processed (Note that layout analysis only gets you the position of those blocks, but does not recognize the characters inside each block). The const RArray<TInt>& aBlock in MOCREngineLayoutRecognize::RecognizeL saves all the ids that are selected to be further processed. e.g. if you have 10 blocks from LayoutComplete, you can append 1, 3, 5, 7 to the TInt array and pass it to RecognizeL

Note that this class shall be used together with TEngineType set to EEngineLayoutRecognize


Public Member Functions

virtual void  LayoutAnalysisL (const TInt aBitmapHandle, const TOCRLayoutSetting aSettings)=0
  This method does the layout analysis for the full image.
virtual void  RecognizeL (const TOCRRecognizeSetting aSettings, const RArray< TInt > &aBlockIdsToRecognize)=0
  This method does the character recognition for the image on base of the result from LayoutAnalysisL.

Member Function Documentation

virtual void MOCREngineLayoutRecognize::LayoutAnalysisL const TInt  aBitmapHandle,
const TOCRLayoutSetting  aSettings
[pure virtual]
 

This method does the layout analysis for the full image.

Parameters:
aBitmapHandle  Handle of the image(get from CFbsBitmap::Handle())
aSettings  Settings for layout analysis
See also:
TOCRLayoutSetting
Returns:
None
Leave:
KErrNotSupported Image shall be in BMP format (24bit colored or 8 bit grayscale) and the size shall not exceed 1600x1200 in pixel
Leave:
KErrNotReady Internal object is not constructed
Leave:
KErrAbort Child thread does not exist or operation is aborted
Leave:
KErrServerBusy OCR service is busy
virtual void MOCREngineLayoutRecognize::RecognizeL const TOCRRecognizeSetting  aSettings,
const RArray< TInt > &  aBlockIdsToRecognize
[pure virtual]
 

This method does the character recognition for the image on base of the result from LayoutAnalysisL.

Parameters:
aSettings  Settings for recognition
aBlockIdsToRecognize  Block Ids to be recognized
Returns:
None
Leave:
KErrNotReady Internal object is not constructed
Leave:
KErrAbort Child thread does not exist or operation is aborted
Leave:
KErrArgument Bolck information is available

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top