| Customize Help

Locating your text

MIL OCR tries to locate the strings to read/verify automatically. Both the angle of the string and the string length information are used to perform the location. Under the appropriate conditions, the location step can be skipped to improve the speed of a read/verify operation, using MocrControl() with M_SKIP_STRING_LOCATION.

When using an M_CONSTRAINED OCR font context, you can only skip the location step if you create a child buffer that contains only the target string and a minimum amount of space around it. Use other modules in MIL to determine the required buffer size. For more information, refer to the Using child buffers, ROIs, or a copy to manipulate specific data areas section of Chapter 21: Data buffers.

When using an M_GENERAL OCR font context, string location can be skipped if you are using a clean target image.

If results are unsatisfactory, the image might need further processing, such as using MimMorphic() with M_TOP_HAT or M_BOTTOM_HAT. For more information, refer to the Top and bottom hat subsection of the Custom morphological operations section of Chapter 4: Advanced image processing.