#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_IndexOfZone(page, ocrZone, L_INT* value)
Gets the index of the passed L_OcrZone structure inside the page internal zones list.
Handle to the OCR page.
Pointer to L_OcrZone structure to find inside the page zones list.
Address to L_INT variable to be updated with the zone index.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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
For an example, refer to L_OcrPage_ExtractZoneMICRData