| MIL 10 Reference
| Customize Help
| Save Settings

MocrModifyFont



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
None.
Synopsis
Invert or resize the font of an OCR font context to match the target image characters.
Syntax
void MocrModifyFont(
MIL_ID FontContextOcrId, //in
MIL_INT64 Operation, //in
MIL_INT64 OperationFlag //in
)
Description

This function physically modifies the polarity and sizing of the font of an OCR font context.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
FontContextOcrId

Specifies the identifier of the OCR font context to modify.

Operation

Specifies the type of operation to perform. This parameter can be set to one or more of the following values:

function map For specifying the type of operation
CollapseValue Description
Collapse M_INVERT

Physically inverts the character representation of the font (for example, if the foreground is white, this will change it to black).

Collapse M_RESIZE

Scales the font.

This operation physically changes the size of the characters of the font to match the target character size (M_TARGET_CHAR_SIZE_X and M_TARGET_CHAR_SIZE_Y). Once performed, all of the font's specifications, which were set at allocation (MocrAllocFont()), are modified to this new size.

Note that changing the size of the font permanently in the OCR font context can save time when compared to resizing the font before each read/verify operation. Increasing the size of the font might be slower because the resize time might be less than the additional processing time required during a read or verify operation to find characters of a larger font.

(summarize)
OperationFlag

Specifies the interpolation mode for the function. This parameter can be set to one of the following:

function map For specifying the interpoaltion mode
CollapseValue Description
Collapse M_DEFAULT

Same as M_BILINEAR.

Note that if the Operation parameter is set to M_INVERT, this parameter should be set to M_DEFAULT. No interpolation is done with M_INVERT.

(summarize)
Collapse M_BICUBIC

Sets the interpolation mode to bicubic interpolation.

Collapse M_BILINEAR

Sets the interpolation mode to bilinear interpolation.

Collapse M_NEAREST_NEIGHBOR

Sets the interpolation mode to nearest neighbor interpolation.

Compilation information
Header Include mil.h.
Library Use mil.lib; milocr.lib.
DLL Requires mil.dll; milocr.dll.
INVERT RESIZE DEFAULT BICUBIC BILINEAR NEAREST NEIGHBOR INVERT