| Customize Help
| Save Settings

MocrModifyFont



Function Map
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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
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
Click to summarizeValue Description
Click to summarize M_INVERT

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

Click to summarize 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
Click to summarizeValue Description
Click to summarize 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)
Click to summarize M_BICUBIC

Specifies bicubic interpolation. The new value is determined by taking a weighted average of the 16 values (4x4) that surround the source point. Note that the sum of the weights used for bicubic interpolation might be greater than one. If this occurs and the result reflects an overflow or underflow, the result is saturated.

(summarize)
Click to summarize M_BILINEAR

Specifies bilinear interpolation. The new value is determined by taking a weighted average of the 4 values (2x2) that surround the source point.

(summarize)
Click to summarize M_NEAREST_NEIGHBOR

Specifies nearest neighbor interpolation. The new value is that of the pixel closest to the source point.

(summarize)
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