Click here to show toolbars of the Web Online Help System: show toolbars |
MIL_ID FontContextOrResultOcrId, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue | //in |
This function allows you to control an OCR read/verify operation setting. This function also allows you to control various settings that affect how results are retrieved by MocrGetResult(). To inquire the current value of a particular control type, use MocrInquire().
After changing the OCR controls or constraints, use MocrPreprocess() to speed up any following read or verify operation.
Specifies the identifier of the OCR font context or the OCR result buffer to control.
Specifies the type of control to set.
See the Parameter associations section for possible values that can be specified.
Specifies the required value for the control.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
The following ControlType and corresponding ControlValue parameter settings are used to specify the characteristics of the font.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Erases a character from the font of the OCR font context. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the ASCII character associated with the character. |
The following ControlType and corresponding ControlValue parameter settings are used to specify operational controls for read and verify operations.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether the space between characters in the target image is read or not. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blank spaces will not be read from the target image into the result string. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blank spaces will be read from the target image into the result string. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the capability to read/verify a broken character. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that, during the read/verify, OCR should not try to compensate for broken characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that broken characters should be identifies as possible characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the acceptance level used to determine a successful match between the font and the characters found within the target image. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the acceptance level for a target character. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the ASCII character for all characters within the selected string or strings during the next read or verify operation whose match scores fall below the character acceptance level. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no special character will replace unrecognized characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the character that will replace unrecognized characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Changes the type of OCR font context. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an OCR font context that works well with degraded target images. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an OCR font context that works well with clean target images. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether to still read and identify the string when the image contains more characters than otherwise expected. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_DISABLE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the read/verify operation should not try to compensate for extra characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the read/verify operation should try to compensate for extra characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the number of iterations of morphological filtering. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the number of iterations. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether to first locate the strings in the target image before trying to identify characters against the OCR font context or to skip this step and save processing time. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the step will not be skipped. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the step will be skipped. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the algorithm's search speed. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a high speed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a low speed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a medium speed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a very high speed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a very low speed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the acceptance level used to determine a successful match between the font and a read/verified string. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the acceptance level for a string. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the interpolation mode to use when reading/verifying a string at an angle. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that bicubic interpolation should be used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that bilinear interpolation should be used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that nearest neighbor interpolation should be used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the capability to read/verify characters that touch each other in the target image. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to disable the identification of touching characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to enable the identification of touching characters. |
The following ControlType and corresponding ControlValue parameter settings are used to set the characteristics of the target characters.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the amount by which the position of the characters in the target string can vary along the X-axis. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the position tolerance, in pixels of the character, not of the target image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the amount by which the position of the characters in the target string can vary along the Y-axis. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the position tolerance, in pixels of the character, not of the target image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the expected angle at which the string can be found. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the angle of the rectangular ROI (set using MbufSetRegion()) associated with the target image buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the angle, in degrees. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the possible angle variation in a clockwise rotation, relative to M_STRING_ANGLE. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the possible clockwise angle variation, in degrees. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the possible angle variation in a counter-clockwise rotation, relative to M_STRING_ANGLE. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the possible counter-clockwise angle variation, in degrees. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the number of strings to be read/verified from the target image. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the number of strings in the target image should be determined automatically. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the number of lines of text in the target image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the length of the string to be read/verified from the target image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the length of the string is unknown. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the string length to read/verify, which must be less than or equal to the maximum string length of the OCR font context. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the width of the target characters. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the character width is found automatically. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the character width in pixels (with subpixel accuracy). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the height of the target characters. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the character height is found automatically. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the character height in pixels (with subpixel accuracy). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the amount of space between characters in the string. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the inter-character spacing is unknown and not the same between the characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the inter-character spacing is the same throughout the target string. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the inter-character spacing, in pixels, with subpixel accuracy. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the ASCII character to be used as a string separator within the text read/verified. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the ASCII code of the character. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the number of character thickening iterations. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the number of times a character should be thickened. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the threshold value used to internally binarize the target image for segmentation of characters. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use an automatically computed threshold value. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the threshold value. |
The following ControlType and corresponding ControlValue parameter settings are used to control settings of the result buffer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether to return results in pixels or world units. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_ACCORDING_TO_CALIBRATION. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that results are returned in world units if the result was calculated on an image associated with a camera calibration context; otherwise, specifies that results are returned in pixel units. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that results are returned in pixel units, with respect to the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that results are returned in world units, with respect to the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Selects the line of text to return from the result buffer, when multiple lines of text are read/verified. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that all strings are selected. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a specific string. |
void MocrControlInt64
(MIL_ID
FontContextOrResultOcrId, MIL_INT64 ControlType,
MIL_INT64 ControlValue)
Parameters
FontContextOrResultOcrId See FontContextOrResultOcrId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. |
void MocrControlDouble
(MIL_ID
FontContextOrResultOcrId, MIL_INT64 ControlType,
MIL_DOUBLE ControlValue)
Parameters
FontContextOrResultOcrId See FontContextOrResultOcrId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib; milocr.lib. |
DLL | Requires mil.dll; milocr.dll. |