L_OcrPage_IndexOfZone (original) (raw)
Summary
Gets the index of the passed L_OcrZone structure inside the page internal zones list.
Syntax
#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_IndexOfZone(page, ocrZone, L_INT* value)
Parameters
L_OcrPage page
Handle to the OCR page.
const L_OcrZone* ocrZone
Pointer to L_OcrZone structure to find inside the page zones list.
L_INT* value
Address to L_INT variable to be updated with the zone index.
Returns
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Comments
Gets the index of the passed L_OcrZone structure inside the page internal zones list.
This function checks for the L_OcrZone.Id member to determine if the zone exist inside the page so if you tried to find a zone you manually added you might not be able to find it because when the L_OcrPage_AddZone or L_OcrPage_InsertZone is called they change the zones order of all the zones in the list to keep them ordered from 0 to the number of zones - 1. So if the page have 3 zones and you tried to insert new zones at index 1 (which is the second element inside the zones list since its zero-based) then you have to update your copy of the L_OcrZone you just inserted to set the L_OcrZone.Id to 1 before you try to call L_OcrPage_IndexOfZone method if you wish to find the zone you just inserted.
Required DLLs and Libraries
- LTOCR
- For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
See Also
Functions
- L_OcrPage_Destroy
- L_OcrPage_FromBitmap
- L_OcrPage_GetBitmap
- L_OcrPage_SetBitmap
- L_OcrPage_GetOverlayBitmap
- L_OcrPage_SetOverlayBitmap
- L_OcrPage_SetBitmapChangedCallback
- L_OcrPage_IsInverted
- L_OcrPage_GetRotateAngle
- L_OcrPage_GetDeskewAngle
- L_OcrPage_AutoPreprocess
- L_OcrPage_AutoZone
- L_OcrPage_GetZoneCount
- L_OcrPage_InsertZone
- L_OcrPage_AddZone
- L_OcrPage_GetZoneAt
- L_OcrPage_SetZoneAt
- L_OcrPage_RemoveZone
- L_OcrPage_RemoveZoneAt
- L_OcrPage_ClearZones
- L_OcrPage_GetZoneCells
- L_OcrPage_SetZoneCells
- L_OcrPage_HitTestZone
- L_OcrPage_IsRecognized
- L_OcrPage_Recognize
- L_OcrPage_Unrecognize
- L_OcrPage_GetRecognizeStatistics
- L_OcrPage_GetRecognizedCharacters
- L_OcrPage_SetRecognizedCharacters
- L_OcrPage_FreePageCharacters
- L_OcrPage_GetZoneWords
- L_OcrPage_FreeWords
- L_OcrPage_GetText
- L_OcrPage_ExtractZoneMICRData
- L_OcrPage_DetectLanguages
- L_OcrPage_LoadZonesFile
- L_OcrPage_SaveZonesFile
- L_OcrPage_SaveXml
- L_OcrPage_GetAutoPreprocessValues
Topics
- Programming with LEADTOOLS OCR Module - LEAD Engine
- Starting and Shutting Down the OCR Engine
- Recognizing OCR Pages
- Working With OCR Pages
Example
For an example, refer to L_OcrPage_ExtractZoneMICRData