ABBYY Mobile OCR Engine 4

Go to: Contents | Native Library API Reference | Functions

FineRecognizeRegion Function

This function recognizes all text lines in the specified region. A region is an array of bounding rectangles. Each rectangle represents one text line. This function is useful when you need to recognize a specific business card field with the help of a custom dictionary.

C Syntax
TFineErrorCode FineRecognizeRegion( 
  const TLanguageID                 languages[], 
  const TFinePatternsPtr            patterns,
  const TFinePatternsPtr*           cjkPatterns,
  const TFineDictionaryPtr          dictionaries[],
  const CFineImage*                 image,
  int                               regionLength,
  const RECT*                       regionRects,
  TFineImageProcessingOptions       imageProcessingOptions,
  TFineRecognitionMode              recMode,
  TFineRecognitionConfidenceLevel   confidenceLevel,
  CFineLayout**                     layoutBuff,
  TFineRotationType*                rotation,
  TFineProgressCallbackFunction     progressCallback,
  TFinePrebuiltDataCallbackFunction prebuiltDataCallback
);

Parameters

languages[]
[in] The list of language IDs as an array of the TLanguageID constants terminated by LID_Undefined. We do not recommend adding more than two recognition languages to the list.
patterns
[in] The address of patterns as a TFinePatternsPtr variable.
cjkPatterns
[in] The zero-terminated list of pointers to the patterns for CJK languages.
dictionaries[]
[in] The zero-terminated list of dictionaries as an array of the TFineDictionaryPtr variables.
image
[in] The image to be recognized as a CFineImage variable.
regionLength
[in] The number of rectangles of the specified region.
regionRects
[in] The array of rectangles of the specified region.
imageProcessingOptions
[in] OR combination of the TFineImageProcessingOptionsFlags constants which define the image processing parameters.
recMode
[in] The TFineRecognitionMode constant which sets the recognition mode.
confidenceLevel
[in] The TFineRecognitionConfidenceLevel constant which sets the recognition confidence level.
layoutBuff
[out] A pointer to pointer variable that receives the interface pointer of a CFineLayout variable which describes the recognized text. This pointer must be released afterwards with the help of the FineFreeMemory function.
rotation
[out] The TFineRotationType constant which specifies the rotation angle of an input image before recognition if the FIPO_DetectPageOrientation flag is set in the imageProcessingOptions parameter, otherwise, it contains 0.
Note:
The recognized text coordinates correspond to a rotated image.
progressCallback
[in] The TFineProgressCallbackFunction callback function that delivers the progress information. It can be 0.
prebuiltDataCallback
[in] The TFinePrebuiltDataCallbackFunction callback function that delivers the information about the document layout, text blocks and lines before the text recognition. It can be 0.

Return value

The function returns the standard return values of ABBYY Mobile OCR Engine functions.

See also

Working with Languages
Working with Dictionaries