#include "ltocr.h"
L_LTOCR_API L_INT L_OcrPage_GetSortedZonesIndexMap(page, options, map, count)
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.
OCR page of interest to sort its zones, if any.
Provides information to control the process of generating sorted zone index 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.
The number of zones in the allocated map array. This value should be equivalent to the number of zones in the page.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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.
For an example, refer to L_OcrPage_GetRecognizedCharacters.