L_OcrPage_GetSortedZonesIndexMap

Summary

Generates an array that contains page zone indices listed such that the corresponding zones are in order from top to bottom and left to right., The first zone's index in the array corresponds to the top-left zone while the last zone's index in the array corresponds to the bottom-right zone.

Syntax

#include "ltocr.h"

L_LTOCR_API L_INT L_OcrPage_GetSortedZonesIndexMap(page, options, map, count)

Parameters

L_OcrPage page

OCR page of interest to sort its zones, if any.

const L_OcrPageSortedZonesIndexMapOptions *options

Provides information to control the process of generating sorted zone index map.

L_UINT **map

A pointer to pointer for an allocated array that contains the page zone indices listed such that the corresponding zones are in order from top to bottom and left to right.

L_UINT *count

The number of zones in the allocated map array. This value should be equivalent to the number of zones in the page.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function does not change the index of any zone. It virtually sorts the zones from top to bottom and left to right, then it reports the indices of the virtually sorted zones. The first zone's index reproted is the first top-left zone, and the last zone's index reported is the last bottom-right zone.

The allocated map array should be freed using L_OcrMemory_Free.md function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to L_OcrPage_GetRecognizedCharacters.

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.