L_OcrPage_IndexOfZone

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

See Also

Functions

Topics

Example

For an example, refer to L_OcrPage_ExtractZoneMICRData

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.