This function reads one or more strings from the specified target image using the specified String Reader context. All specifications, such as the number of strings to read in the target image, the speed and/or robustness settings, the constraints on the characters in the string, and the font used, depend on the settings of the String Reader context, which can be set using MstrControl(), MstrSetConstraint() and MstrEditFont(). All settings are taken into account by MstrRead(), and results are stored in the specified result buffer. Results can be read from the result buffer using the MstrGetResult() function.
For a string to be read, it must not only meet all of the restrictions placed on it by the String Reader context, but it must also obey the basic rules of a string. That is, it must be a linear sequence of regular characters.
The string read will be ordered in the natural Latin-based reading order. The position of a string is the position of the center of the bounding box of its first character.
You can limit the read operation to a region of the image buffer, using a rectangular ROI set with MbufSetRegion().
The target image must be 1-band 8-bit unsigned, and cannot exceed a maximum size of 65536x65536 pixels.
Note that before performing a read operation, the String Reader context must have at least one font, one character, and one string; it must also be preprocessed (MstrPreprocess()).
Specifies the String Reader context to use for the read operation. The String Reader context must have been previously allocated on the required system using MstrAlloc(), and preprocessed using MstrPreprocess().
Specifies the target image in which to read the strings.
This image buffer can only have a rectangular region of interest (ROI) defined using MbufSetRegion() (with or without rotation). In addition, the region must be defined in vector format from a graphics list (M_VECTOR or M_VECTOR_AND_RASTER). An error will be generated if the ROI is only in raster format (M_RASTER) or a non-rectangular shape.
Header | Include mil.h. |
Library | Use mil.lib; milstr.lib. |
DLL | Requires mil.dll; milstr.dll. |