Skip to main content

MdlocrGetStringIndex

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Get the index of a string that touches a specified image position, from a Deep Learning OCR result buffer.

Syntax

AIL_INT64 MdlocrGetStringIndex(
AIL_ID ResultDlocrId, //in
AIL_DOUBLE PositionX, //in
AIL_DOUBLE PositionY, //in
AIL_INT64 * StringIndexPtr //out
)

Description

This function retrieves the index of a string that touches a specified image position, from a Deep Learning OCR result buffer. This is useful, for example, in combination with MdlocrDefineModelFromResult to define a string model from a position on an image. You can establish the position of the string of interest by drawing the results using MdlocrDraw.

Parameters

ResultDlocrId (in, AIL_ID)

Specifies the identifier of the Deep Learning OCR result buffer from which to retrieve results.

PositionX (in, AIL_DOUBLE)

Specifies the X-position in the image at which to find a string. You can change whether to use pixel or world coordinates using MdlocrControl with M_RESULT_OUTPUT_UNITS.

PositionY (in, AIL_DOUBLE)

Specifies the Y-position in the image at which to find a string. You can change whether to use pixel or world coordinates using MdlocrControl with M_RESULT_OUTPUT_UNITS.

StringIndexPtr *(out, AIL_INT64)

Specifies the address in which to write the index of the string if one is found touching the specified position. If no string touches the specified position, M_INVALID is written at this address. Since MdlocrGetStringIndex also returns the requested information, you can set this parameter to M_NULL.

Return Value

Type: AIL_INT64

The returned value is the index of the string that touches the specified position. If no string touches, M_INVALID is returned.

Copyright © 2026 Zebra Technologies.