McodeControl
| Board | Supported |
|---|---|
| Host System | Yes |
| V4L2 | Yes |
| Clarity UHD | Yes |
| Concord PoE | No |
| GenTL | Yes |
| GevIQ | Yes |
| GigE Vision | Yes |
| Indio | No |
| Iris GTX | Yes |
| Radient eV-CL | Yes |
| Rapixo CL | Yes |
| Rapixo CoF | Yes |
| Rapixo CXP | Yes |
| USB3 Vision | Yes |
Control a code context, code model, or code result buffer setting.
Syntax
void McodeControl(
AIL_ID CodeId, //out
AIL_INT64 ControlType, //in
AIL_DOUBLE ControlValue //in
)
Description
This function changes the setting of a specified code context, code model, or code result buffer.
Parameters
CodeId (out, AIL_ID)
Specifies the identifier of the code context, code model, or code result buffer.
ControlType (in, AIL_INT64)
Specifies the setting to change.
ControlValue (in, AIL_DOUBLE)
Specifies the setting's new value.
Parameter Associations
Code context settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified for a code context, to control an McodeRead, McodeGrade, or McodeTrain operation. In this case, a code context must be passed to the CodeId parameter. > Note: Note that besides code type restrictions listed explicitly in the values below, McodeGrade does not support M_4_STATE, M_PHARMACODE, M_POSTNET, and M_PLANET code types. Although all these control types affect the results of McodeTrain, see the description of the control types to determine if they can be activated for training; you can also use filters to limit the control types in the table to those that can be trained.
M_INITIALIZATION_MODE
Changes the initialization mode of the context; this changes the default of several code context and code model settings. The default value of the setting in each mode is indicated within the description of the control type. When you change the initialization mode, control types that have already been set to some value (other than default) are not changed. Instead, the initialization mode only changes those control values that are set to their default value (M_DEFAULT).
| Value | Description |
|---|---|
M_DEFAULT | |
M_IMPROVED_RECOGNITION | Specifies a code context that might provide a more robust McodeRead, McodeGrade, or McodeTrain operation. This initialization mode is recommended if your target images lack similarity (for example, some but not all include complex or noisy backgrounds), contain distorted code occurrences, or contain code occurrences that are at an angle or even flipped. It is also recommended when searching for 2D matrix codes that are composed of dots. > Note: Note that when selecting this mode, the default of the affected code context and code model settings might change between Aurora Imaging Library releases to improve robustness, given new features or standard recommendations. This initialization mode is not recommended with M_PHARMACODE code types. |
M_TYPICAL_RECOGNITION (default) | Specifies a code context that might provide a quicker McodeRead or McodeGrade operation, but might potentially produce less robust results. |
M_MINIMUM_CONTRAST
Sets the minimum possible contrast between the foreground and background in the target image for 1D code types (excluding M_PLANET and M_POSTNET), the M_DOTCODE code type, and the M_MICROPDF417 code type when using the M_ADAPTIVE threshold mode. For 1D code types (except for M_GS1_DATABAR, M_PLANET, and M_POSTNET) and 2D cross-row code types, regardless of the threshold mode, M_MINIMUM_CONTRAST is also used to help the localization. When using the M_ADAPTIVE threshold mode for 1D code types, the M_DOTCODE code type, and the M_MICROPDF417 code type, increasing the minimum contrast will typically improve McodeRead operations, particularly in the presence of noise and non-uniform lighting. However, if the minimum contrast is higher than the contrast of a code, the code will not be read correctly. For 2D code types (excluding M_DOTCODE and M_MICROPDF417), the minimum contrast is determined automatically, so the adaptive threshold mode does not use the M_MINIMUM_CONTRAST setting. For 1D code types (excluding M_PLANET and M_POSTNET) and 2D cross-row code types, regardless of threshold mode, you should set this control type if the contrast is less than 50 and there are difficulties decoding the code. Note that training this control type (M_TRAIN) is only supported for the M_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value; the default value is 50. > Note: Note that setting M_MINIMUM_CONTRAST to M_DEFAULT is not equivalent to setting M_MINIMUM_CONTRAST to 50. When M_DEFAULT is specified, some internal steps might use a minimum contrast other than 50. |
0 <= Value <= 255 | Specifies the minimum contrast. Only integer values are accepted. For the M_DOTCODE code type, this setting should be set to a value greater than or equal to 10. Only integer values are accepted. |
M_SCANLINE_HEIGHT
Sets the height (or thickness) of the scanlines. A scanline is a line along which the code occurrence is read. When locating a code occurrence, a scanline is usually first taken across the middle of the image or the image's region of interest (ROI), if one is associated. If a code occurrence is not found, a scanline is taken either higher or lower in the image or its ROI. Usually, setting this control type to a higher value increases the robustness of McodeRead, McodeGrade, and McodeTrain operations. This is especially true in noisy images. However, defects in the code can cause the need for a lower value. Using the default value is recommended. > Note: Note that during an McodeGrade operation, after locating the code, when taking scanlines within the inspection band, Aurora Imaging Library uses a scanline height of a single pixel regardless of the value of M_SCANLINE_HEIGHT, as per the ISO standard. This control type is only available for 1D code types (excluding M_4_STATE, M_PLANET, and M_POSTNET), 2D cross-row code types, and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies a default scanline height that is based on the code type. The table below shows the default value for some code types. |
Value | Specifies the scanline height, relative to the input coordinate system specified using M_SCANLINE_INPUT_UNITS. When entering a value in pixel units, this value must be between 1 and 256, inclusive. The value entered is rounded to the nearest integer. The recommended range of values for linear bar codes is: 1 < Value <= (BarcodeHeight / 2). For M_MICROPDF417 and M_COMPOSITECODE, the recommended range of values is: 1 <= Value <= (RowHeight / 2). |
M_SCANLINE_INPUT_UNITS
Sets the units with which to interpret the M_SCANLINE_HEIGHT and M_SCANLINE_STEP control types. This essentially sets the input coordinate system to use. This control type is only available for 1D code types (excluding M_4_STATE, M_PLANET, and M_POSTNET), 2D cross-row code types, and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT | |
M_PIXEL (default) | Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the values in world units, with respect to the relative coordinate system. If world units are specified, calling McodeRead, McodeGrade, or McodeTrain generates an error if the operation is not performed on a calibrated image. |
M_SCANLINE_STEP
Sets the scanline step. The scanline step is the distance, or gap, between scanlines taken in the image or the image's region of interest (ROI), if one is associated. In general, the higher the value for this control type, the faster the code is read, but the greater the chance of missing a readable line of code. Using the default value is recommended; the default value is dependent upon the search speed. > Note: Note that during an McodeGrade operation, after locating the code, when taking scanlines within the inspection band, Aurora Imaging Library uses a scanline step distance based on the height of the inspection band and the required number of scanlines, regardless of the value of M_SCANLINE_STEP, as per the ISO standard; the ISO standard requires ten evenly spaced scanlines within the inspection band. This control type is only available for 1D code types (excluding M_4_STATE, M_PLANET, and M_POSTNET), 2D cross-row code types, and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies a default scanline step that is based on the value of M_SPEED. When dealing with 1D code types (excluding M_4_STATE, M_PLANET, and M_POSTNET) and M_COMPOSITECODE code types, the following values are associated with M_DEFAULT. |
Value | Specifies the scanline step, relative to the input coordinate system specified using M_SCANLINE_INPUT_UNITS. When entering a value in pixel units, this value must be greater than or equal to 1. The value entered is rounded to the nearest integer. |
M_SEARCH_ANGLE_MODE
Sets whether to enable the search angular range algorithm for the code context. When enabled, codes are sought at the angular range defined by M_SEARCH_ANGLE - M_SEARCH_ANGLE_DELTA_NEG to M_SEARCH_ANGLE + M_SEARCH_ANGLE_DELTA_POS. For 1D codes, the Code module will not use the search angular range algorithm if M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE_DELTA_POS both have a value of less than 5°, regardless of M_SEARCH_ANGLE_MODE. For linear code types, if you expect that the codes sought are close to their nominal angle, you can try disabling the search angular range algorithm to see if the Code module can still find the required code occurrences. Disabling this algorithm might speed up the search depending on the code type and the target image. For M_PDF417 and M_TRUNCATED_PDF417, you can set M_DECODE_ALGORITHM to M_SCANLINE_AT_ANGLE if you are having issues reading your code at an angle. Note that although this improves robustness, this might affect the speed of the operation. You can try disabling M_SEARCH_ANGLE_MODE to see if the Code module can still find the required code occurrences; this might improve the speed. Note that M_SEARCH_ANGLE_MODE is automatically activated for training if you activate M_SEARCH_ANGLE for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE | Specifies that the search angular range algorithm is not used. |
M_ENABLE (default) | Specifies that the search angular range algorithm is used. |
M_SPEED
Sets the search speed. The faster the search speed, the less robust the operation. For 1D code types, consider reducing the search speed when the pixel height of the bar code is small. For 2D code types, consider reducing the search speed when the cell size is small relative to the image size. This control type is available for all code types except M_DOTCODE. > Note: For 1D code types, M_COMPOSITECODE, and M_MICROPDF417, you can also affect the search speed by adjusting the value for M_SCANLINE_STEP.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value isM_VERY_LOW. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is M_MEDIUM. |
M_HIGH | Specifies a high search speed. |
M_LOW | Specifies a low search speed. |
M_MEDIUM | Specifies a medium search speed. |
M_VERY_HIGH | Specifies a very high search speed. |
M_VERY_LOW | Specifies a very low search speed. |
M_STOP_READ
Stops the current McodeRead or McodeGrade operation being performed on the code context passed to CodeId. You must call McodeControl with M_STOP_READ from another thread, typically of higher priority. After making this call, the results returned to the result buffer of the McodeRead or McodeGrade operation are invalid and discarded.
| Value | Description |
|---|---|
M_DEFAULT | Implements the default behavior. |
M_THRESHOLD_MODE
Sets the threshold mode used to internally binarize the source image. If the lighting is non-uniform across the code, use M_ADAPTIVE mode or process the image before performing the McodeRead or McodeGrade operation so that the background is strictly darker or strictly lighter than the code.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value for M_MICROPDF417 and linear (1D) code types (except M_PHARMACODE) is M_GLOBAL_SEGMENTATION, and the default value for the remaining code types is M_ADAPTIVE. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value for M_DOTCODE is M_ADAPTIVE, and the default value for the remaining code types is M_GLOBAL_SEGMENTATION. |
M_ADAPTIVE | Specifies to use a fast dynamic local threshold. This mode selects an individual threshold for each pixel based on the range of intensity values in its local neighborhood. For linear (1D) code types (excluding M_PLANET and M_POSTNET), the M_DOTCODE code type, and the M_MICROPDF417 code type, you must specify the minimum contrast (McodeControl with M_MINIMUM_CONTRAST) between the foreground and background in the target image when using the M_ADAPTIVE mode. It is highly recommended that M_CELL_SIZE_MIN is set to a valid value that is not M_DEFAULT; if your code is not decoded properly, increase the value of M_CELL_SIZE_MIN. For 2D code types (excluding M_DOTCODE and M_MICROPDF417), the minimum contrast is determined automatically, so the adaptive threshold mode does not use the M_MINIMUM_CONTRAST setting. 2D and 1D code types (excluding M_PLANET and M_POSTNET) are the code types that support M_ADAPTIVE. |
M_GLOBAL_SEGMENTATION | Specifies to use a global threshold value. Specify the value using M_THRESHOLD_VALUE. |
M_GLOBAL_WITH_LOCAL_RESEGMENTATION | Specifies that the source image will be globally thresholded and then the edges in the binarized image are resegmented according to the intensities of the surrounding bars and spaces in the original source image. These individual local thresholds, calculated per region, help enhance the edge positions in the code. Specify the global threshold value using M_THRESHOLD_VALUE. This binarization method is compatible with the methods described in the various ISO code grading standards. For more information, refer to Technical code information. This control value is available for all 1D code types (except M_4_STATE, M_POSTNET, and M_PLANET) and the M_MICROPDF417 code type. |
M_THRESHOLD_VALUE
Sets the threshold value used to internally binarize the source image, depending on the specified threshold mode. Note that if M_THRESHOLD_MODE is set to M_ADAPTIVE, this control type is ignored. Note that this control type is automatically activated for training if you activate M_THRESHOLD_MODE for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO_COMPUTE (default) | Specifies the threshold value automatically. |
0 <= Value <= 255 | Specifies the threshold value. Only integer values are accepted. |
M_TIMEOUT
Specifies the maximum decoding time for an McodeRead or McodeGrade operation, in msec. Note that this control type can still affectMcodeTrain.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE | Specifies that there is no maximum decoding time. |
Value >= 0 (default) | Specifies the maximum decoding time, in msec. |
M_TOTAL_NUMBER
Sets the maximum number of code occurrences to read or grade in one source image. Note that this number is limited by the maximum number of occurrences of each code model to read or grade (M_NUMBER). To avoid obtaining false positives when searching for a specific number of occurrences, set M_CODE_SEARCH_MODE to M_BEST. Note that M_BEST is not supported for 2D code types other than the M_DOTCODE code type. The following table lists the code types that support searching for multiple occurrences: | Code type | Multiple occurrences | | --- | --- | | Linear bar codes (excluding M_GS1_DATABAR, M_4_STATE, M_PLANET, and M_POSTNET) | Yes | | M_DATAMATRIX | Yes | | M_DOTCODE | Yes | Only the code types in the table above support this control type. When dealing with all other code types, M_TOTAL_NUMBER must be set to M_DEFAULT. Note that for M_DATAMATRIX and M_DOTCODE code types, M_TOTAL_NUMBER should be set to the same value as M_NUMBER or to M_DEFAULT because a code context can only contain multiple code models of the above-mentioned 1D code types.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ALL (default) | Specifies to read/grade all code occurrences in the source image, up to the maximum number of occurrences to read/grade of each code model (M_NUMBER). |
Value > 0 | Specifies the maximum number of codes to read/grade in one source image. Only integer values are accepted. |
Code context settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified for a code context, to control an McodeGrade operation. In this case, a code context must be passed to the CodeId parameter. > Note: Note that besides code type restrictions listed explicitly in the values below, McodeGrade does not support M_4_STATE, M_PHARMACODE, M_POSTNET, and M_PLANET code types.
M_ABSOLUTE_APERTURE_SIZE
Sets the absolute size (diameter) of the aperture. Use this control type when using an absolute aperture mode (using M_APERTURE_MODE set to M_ABSOLUTE).
| Value | Description |
|---|---|
M_DEFAULT | |
Value >= 0 (default) | Specifies the absolute aperture size, relative to the input coordinate system specified using M_ABSOLUTE_APERTURE_SIZE_INPUT_UNITS. |
M_ABSOLUTE_APERTURE_SIZE_INPUT_UNITS
Sets the units with which to interpret the M_ABSOLUTE_APERTURE_SIZE control type. This essentially sets the input coordinate system to use.
| Value | Description |
|---|---|
M_DEFAULT | |
M_PIXEL (default) | Specifies to interpret the value in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the value in world units, with respect to the relative coordinate system. If world units are specified, calling McodeGrade generates an error if the operation is not performed on a calibrated image. |
M_APERTURE_MODE
Sets the way in which the aperture size is determined.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ABSOLUTE | Specifies to use the absolute aperture size, set using M_ABSOLUTE_APERTURE_SIZE. |
M_DISABLE | Specifies to disable the aperture. Note that this is provided for backwards compatibility with older code. In this case, the McodeGrade operation's returned results will more closely resemble the results of an McodeRead operation. |
M_RELATIVE (default) | Specifies to use a relative aperture size, based on the cell size (using M_CELL_SIZE...) and the relative aperture factor (using M_RELATIVE_APERTURE_FACTOR). |
M_DPM_CALIBRATION_RESULTS
Sets the expected reflectance and mean light values derived during the reflectance calibration phase. This control type is an alternative to separately obtaining the reflectance and mean light values from the result buffer used during the reflectance calibration phase, and setting M_REFLECTANCE_CALIBRATION and M_MEAN_LIGHT_CALIBRATION to these two values, respectively, in the code context associated with the target code.
| Value | Description |
|---|---|
Result buffer identifier | Specifies the result buffer used during the reflectance calibration phase. |
M_EXTENDED_AREA_REFLECTANCE_CHECK
Sets whether the grading must perform an additional reflectance check over an area containing the code occurrence and its extended area (that is, 20 times the cell size beyond the quiet zone on all sides). This control type is only available for M_AZTEC, M_DATAMATRIX, M_DOTCODE, M_QRCODE, andM_MICROQRCODE code types. Note that this control type must be set before an McodeRead operation if you intend to use the result for an McodeGrade operation.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE (default) | Specifies to disable the additional reflectance check. |
M_ENABLE | Specifies to enable the additional reflectance check. > Note: Note that you can only enable this control type when performing an ISO grading (that is, when M_GRADING_STANDARD is set to M_ISO_GRADING). |
M_GRADE_QUIET_ZONE
Sets whether to include the quiet zone when performing an McodeGrade operation.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE | Specifies to exclude the quiet zone. |
M_ENABLE (default) | Specifies to include the quiet zone. |
M_GRADING_STANDARD
Sets the grading standard to use when performing an McodeGrade operation. To specify a particular grading standard edition, use M_GRADING_STANDARD_EDITION. The results of the McodeGradeoperation are dependent on the standard used; some control types have a different implementation or meaning depending on the standard used. These differences are outlined in the control types' description. Note that this control type must be set before an McodeRead operation if you intend to use the result for an McodeGrade operation.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ISO_DPM_GRADING | Specifies to use an ISO/IEC 29158 specification. Note that this is the replacement for the AIM DPM-1-2006 standard. This control value must be used at the beginning of the target grading phase, and should not be used during the reflectance calibration phase. This control value is available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types. |
M_ISO_GRADING (default) | Specifies to use an ISO/IEC 15416 or ISO/IEC 15415 specification. |
M_SEMI_T10_GRADING | Specifies to use a Semi T10 specification. This control value is available for the M_DATAMATRIX code type. This control type requires that M_APERTURE_MODE, M_MAXIMUM_CALIBRATED_REFLECTANCE, and M_MINIMUM_CALIBRATED_REFLECTANCE are set to M_DEFAULT. |
M_INSPECTION_BAND_RATIO
Sets the height of the inspection band as a percentage of the average bar height. The inspection band is the area of the code occurrence from which the scanlines to grade the code occurrence are taken, after it has been located. This control type is only available for 1D code types, 2D cross-row code types, and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default percentage. The default value is 80% of average bar height. |
0.0 < Value < 100.0 | Specifies the percentage of the average bar height to set as the height of the inspection band. |
M_LIGHTING_CONFIGURATION
Sets the tilted coaxial lighting and camera angle position (TCL) relative to the marked object. There is a tolerance of +/- 3 degrees between the angle of the light and the angle of the camera. See the ISO/IEC 29518:2020 specifications for further details. This control type is only available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types.
| Value | Description |
|---|---|
M_DEFAULT | |
M_90_DEGREE | Specifies the TCL is 90 degrees relative to the marked object. If M_GRADING_STANDARD_EDITION is set to M_ISO_29158_2020, this will cause M_MINIMUM_REFLECTANCE and M_MINIMUM_REFLECTANCE_GRADE to return M_CODE_GRADE_NOT_AVAILABLE. If M_GRADING_STANDARD_EDITION is set to M_ISO_29158_2011, this setting will have no effect. |
M_UNSPECIFIED (default) | Specifies that the TCL is none of the other values. |
M_MAXIMUM_CALIBRATED_REFLECTANCE
Sets the maximum possible grayscale value in the target image. This control type is used in the scan reflectance profile analysis. If this control type does not accurately represent the actual maximum grayscale value from the target image, the resulting values from the scan reflectance profile are invalid. Note that this value must be higher than the value of M_MINIMUM_CALIBRATED_REFLECTANCE.
| Value | Description |
|---|---|
M_DEFAULT | |
0 <= Value <= 255 (default) | Specifies the maximum calibrated reflectance. Only integer values are accepted. |
M_MEAN_LIGHT_CALIBRATION
Sets the expected mean light (MLcal). This corresponds to the expected mean intensity of the centers of the white elements of the code occurrence. This control type is used during the target grading phase of the ISO/IEC 29158 specification.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value; the default value is equal to the setting of M_MAXIMUM_CALIBRATED_REFLECTANCE. |
0 <= Value <= 255 | Specifies the mean intensity. This value is typically derived during the reflectance calibration phase. |
M_MINIMUM_CALIBRATED_REFLECTANCE
Sets the minimum possible grayscale value in the target image. This control type is used in the scan reflectance profile analysis. If this control type does not accurately represent the actual minimum grayscale value from the target image, the resulting values from the scan reflectance profile are invalid. Note that this value must be lower than the value of M_MAXIMUM_CALIBRATED_REFLECTANCE.
| Value | Description |
|---|---|
M_DEFAULT | |
0 <= Value <= 255 (default) | Specifies the minimum calibrated reflectance. Only integer values are accepted. |
M_NUMBER_OF_SCANLINES
Sets the number of scanlines inside the inspection band to inspect during the McodeGrade operation, after the code occurrence has been located. Set the height of the inspection band using M_INSPECTION_BAND_RATIO. This control type is only available for 1D code types, 2D cross-row code types, and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value. The default value is 10 scanlines. |
M_ALL | Specifies to use all possible scanlines inside the inspection band. |
Value > 0 | Specifies the number of scanlines to inspect. This value is equivalent to M_ALL if it exceeds the inspection band height. Only integer values are accepted. |
M_PIXEL_SIZE_IN_MM
Sets the scale between a pixel and its physical measurement in mm. To simplify the computation of this value, measure the length of the entire code and divide it by its pixel length; this yields a good approximation. Alternatively, calculate the scale using the following formula: (_size of the object_) / (_number of pixels in object_). For more information, see point 3 in Relative aperture setting. Code specifications generally specify constraints in mm units. To compare values known in Aurora Imaging Library (for example, the cell size in pixels) to the values in the code specifications, this control type is used. Note that this control type can impact other control types, for example, the aperture size selection, and the M_SCAN_INTERCHARACTER_GAP_GRADE result (retrieved using McodeGetResult). Note that this value is needed even when operating on calibrated images because Aurora Imaging Library does not know the relationship between mm and the world units of the calibrated context.
| Value | Description |
|---|---|
M_DEFAULT | |
M_UNKNOWN (default) | Specifies that the scale between a pixel and its physical measurement is not known, in mm per pixel units. |
Value > 0 | Specifies the scale between a pixel and its physical measurement, in mm per pixel units. |
M_REFLECTANCE_CALIBRATION
Sets the expected reflectance value (Rcal). This control type is used during the target grading phase of the ISO/IEC 29158 specification.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value; the default value is equal to the setting of M_MAXIMUM_CALIBRATED_REFLECTANCE. |
0 <= Value <= 255 | Specifies the reflectance value. This value is typically derived during the reflectance calibration phase. Only integer values are accepted. |
M_RELATIVE_APERTURE_FACTOR
Sets the aperture factor to use when M_APERTURE_MODE is set to M_RELATIVE. The aperture factor is multiplied by the M_CELL_SIZE_MIN to determine the aperture's diameter.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO (default) | Specifies that the aperture factor is chosen according to the ISO/IEC 15416 specification for all supported code types except 2D matrix code types; for the latter, the aperture factor is chosen according to the ISO/IEC 15415 or ISO/IEC 29158 specification (depends on M_GRADING_STANDARD). Note that if the nominal bar width is less than 0.1 mm, the aperture factor is 0.5. When dealing with EAN/UPC code types, the aperture factor is 0.15. When dealing with 2D matrix code types, the aperture factor is 0.8. Note that the recommended aperture size in the ISO/IEC 15415 specification has changed. The 2004 specification states that the aperture size should be 0.8 times the diameter. The 2011 specification recommends an aperture size between 50% and 80% of the smallest X-dimension encountered. M_AUTO complies with the 2004 version of the specification. Since the new specification now permits alternative aperture sizes, using an aperture factor of 0.5 with 2D matrix code types can often lead to better results. |
0 <= Value <= 2 | Specifies the aperture factor. |
M_SYSTEM_RESPONSE_CALIBRATION
Sets the System Response value derived during the reflectance calibration phase (SRcal) of the ISO/IEC 29158 specification. The System Response value is a user-defined aggregate of the settings of environmental factors, such as exposure time and/or gain factor, that create the conditions for an acceptable image of the code. For example, you could define the System Response value as: (_Exposure time_ * _Gain factor_). During the reflectance calibration phase, adjust the exposure time and/or gain factor until you obtain an acceptable image of the code, and then multiply the two values together. At the beginning of the target grading phase, set this result as the System Response value of the reflectance calibration phase. Note that you should use the same formula to calculate the System Response value, in both the reflectance calibration phase and the target grading phase. This control type is only available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types.
| Value | Description |
|---|---|
M_DEFAULT | |
Value > 0.0 (default) | Specifies the System Response value for the reference code. |
M_SYSTEM_RESPONSE_TARGET
Sets the System Response value derived during the target grading phase (SRtarget) of the ISO/IEC 29158 specification. To set this control type, use the same aggregate of environmental factors that was used to calculate M_SYSTEM_RESPONSE_CALIBRATION. For example, if you set the System Response value of the reflectance calibration phase to the multiplication of the exposure time by the gain factor, set the System Response value of the target grading phase to the multiplication of the exposure time by the gain factor used to create the conditions for an acceptable image of the target code. During the target grading phase, you should not alter any environmental factors other than those used to calculate the System Response value. This control type is only available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types.
| Value | Description |
|---|---|
M_DEFAULT | |
Value > 0.0 (default) | Specifies the System Response value for the target code. |
Code context settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified when dealing with an McodeTrain operation. In this case, a code context must be passed to the CodeId parameter.
M_RESET_FROM_TRAINED_RESULTS
Resets the code context using the results in the code train result buffer. Existing code models are discarded and code models used for training are added to the context. If a control type was not trained, it is set to its value used during training; if a control type was trained, it is set to its trained value. The results in the code train result buffer can be applied to any code context. To reconfigure the code context that was used during training, you might find it useful to selectively change some control types to their recommended setting, established during training. To do so, you can use McodeGetResult to retrieve their recommended setting, and then use McodeControl to set them explicitly. Note that some control types are inter-dependent. Changing the setting of one control type to its trained value might not be optimal if the settings of other control types are not also changed. This is especially true for control types that are automatically activated for training if another control type is activated (for example, M_CELL_NUMBER_...).
| Value | Description |
|---|---|
CodeTrainResultBufId | Specifies the identifier of the code train result buffer to use to reset the code context. The result buffer must have been previously allocated usingMcodeAllocResult with M_CODE_TRAIN_RESULT and must contain results from a successful McodeTrain. Use McodeGetResult with M_STATUS to ensure that the result buffer contains results from a successful operation (M_STATUS_TRAIN_OK). |
M_SET_TRAINING_STATE_ALL
Resets whether all trainable control types will be trained when McodeTrainis called. Using this control type is equivalent to using the M_TRAIN combination value with every trainable control type. After activating or deactivating all trainable control types usingM_SET_TRAINING_STATE_ALL, you can then activate or deactivate the training of specific control types using M_TRAIN, if necessary. M_SET_TRAINING_STATE_ALL modifies the training status of M_CELL_NUMBER_X, M_CELL_NUMBER_Y, M_CELL_SIZE_MAX, M_CELL_SIZE_MIN, M_CODE_FLIP, M_DATAMATRIX_SHAPE, M_DECODE_ALGORITHM, M_DOT_SPACING_MAX, M_DOT_SPACING_MIN, M_ENCODING, M_ERROR_CORRECTION, M_FOREGROUND_VALUE, M_SEARCH_ANGLE, M_SPEED, M_THRESHOLD_MODE, and M_USE_PRESEARCH.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default activation; the default activation depends on the control type and code model type. For a given trainable control type, if an unsupported code model is included in the training, the default value will be M_DISABLE, otherwise it will be M_ENABLE. |
M_DISABLE | Specifies to not train any of the trainable control types. |
M_ENABLE | Specifies to train all trainable control types. |
M_STOP_TRAIN
Stops the current McodeTrain operation being performed on the code context passed to CodeId. This must be called from another thread, typically of higher priority. After making this call, the results returned to the result buffer of the McodeTrain operation are invalid and discarded.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default behavior. |
M_TRAIN_TIMEOUT
Sets the maximum training time for an McodeTrain operation.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE (default) | Specifies to disable the timeout. |
Value >= 0 | Specifies the timeout limit, in msec. |
Code model settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified for a code model to control an McodeRead, McodeGrade, or McodeTrain operation. If you pass a code context to the CodeId parameter, the specified control type setting is applied to all the code models in the context. If none of the code models support the specified control type, an error will occur. If only some code models do not support the specified control type, the control type setting is ignored for these code models. > Note: Note that besides code type restrictions listed explicitly in the values below, McodeGrade does not support M_4_STATE, M_PHARMACODE, M_POSTNET, and M_PLANET code types. Although all these control types affect the results of McodeTrain, see the description of the control types to determine if they can be activated for training; you can also use filters to limit the control types in the table to those that can be trained.
M_BEARER_BAR
Sets whether bearer bars run along the top and bottom of the code occurrences to read (such as, the edge of a sticker). Note that this control type is only taken into account when the search angle is not specified. This value is available only for 1D code types. In situations where bearer bars don't run along both the top and the bottom of the code occurrence to read, setting M_SPEED to M_VERY_LOW will provide more robust results.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ABSENT (default) | Specifies that no bearer bars are above and below the code. |
M_PRESENT | Specifies that there are bearer bars above and below the code. |
M_CELL_NUMBER_X_MAX
Sets the maximum number of cells for which to search, in the X-direction of a 2D code. Note that this control type is automatically activated for training if you activate M_CELL_NUMBER_X for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for code occurrences with any number of cells. |
Value > 0 | Specifies the maximum number of cells for which to search. If a value is specified, it must be larger than M_CELL_NUMBER_X_MIN, otherwise an error occurs. For the M_DOTCODE code type, this setting should be set to a value greater than 4. Only integer values are accepted. |
M_CELL_NUMBER_X_MIN
Sets the minimum number of cells for which to search, in the X-direction of a 2D code. Note that this control type is automatically activated for training if you activate M_CELL_NUMBER_X for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for code occurrences with any number of cells. |
Value > 0 | Specifies the minimum number of cells for which to search. If a value is specified, it must be smaller than M_CELL_NUMBER_X_MAX, otherwise an error occurs. For the M_DOTCODE code type, this setting should be set to a value greater than 4. Only integer values are accepted. |
M_CELL_NUMBER_Y_MAX
Sets the maximum number of cells for which to search, in the Y-direction of a 2D code. Note that this control type is automatically activated for training if you activate M_CELL_NUMBER_Y for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for code occurrences with any number of cells. |
Value > 0 | Specifies the maximum number of cells for which to search. If a value is specified, it must be larger than M_CELL_NUMBER_Y_MIN, otherwise an error occurs. For the M_DOTCODE code type, this setting should be set to a value greater than 4. Only integer values are accepted. |
M_CELL_NUMBER_Y_MIN
Sets the minimum number of cells for which to search, in the Y-direction of a 2D code. Note that this control type is automatically activated for training if you activate M_CELL_NUMBER_Y for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for code occurrences with any number of cells. |
Value > 0 | Specifies the minimum number of cells for which to search. If a value is specified, it must be smaller than M_CELL_NUMBER_Y_MAX, otherwise an error occurs. For the M_DOTCODE code type, this setting should be set to a value greater than 4. Only integer values are accepted. |
M_CELL_SIZE_MAX
Sets the maximum cell size. Note that setting the maximum and minimum cell size increases both the speed and robustness of the operation.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies to automatically select an appropriate size, which is dependent on the code type and the initialization mode. For an M_DOTCODE code type, the default is always 255 whenM_INITIALIZATION_MODE is set to M_IMPROVED_RECOGNITION. For all code types, the default is always 24 when M_INITIALIZATION_MODE is set to M_TYPICAL_RECOGNITION. |
Value | Specifies the maximum cell size, relative to the input coordinate system specified using M_CELL_SIZE_INPUT_UNITS. When entering a value in pixel units, this value must be between 1 and 256, inclusive. |
M_CELL_SIZE_MIN
Sets the minimum cell size. Note that setting the maximum and minimum cell size increases both the speed and robustness of the operation.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies the default cell size, in pixels, which is dependent on the operation and code type. Setting the default ignores the input unit type chosen with M_CELL_SIZE_INPUT_UNITS. For an McodeRead operation, M_DEFAULT is equivalent to 1, except for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE (which have a default of 3). For an M_DOTCODE code type regardless of the operation, the default is always 2. |
Value | Specifies the minimum cell size, relative to the input coordinate system specified using M_CELL_SIZE_INPUT_UNITS. When entering a value in pixel units, this value must be between 1 and 256, inclusive. |
M_CHECK_FINDER_PATTERN
Sets whether checking for a false Data Matrix pattern is enabled. If this control type is enabled, McodeRead and McodeGrade operations are more robust, and false Data Matrix code types are not read. This control type should only be enabled if it is possible that parts of your image could be falsely interpreted as a Data Matrix code types.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE (default) | Specifies that the Code module will not check for false M_DATAMATRIX code types. |
M_ENABLE | Specifies that the Code module will check for false M_DATAMATRIX code types. |
M_CHECK_QUIET_ZONE
Sets whether the presence of the quiet zone is necessary for a successful McodeRead or McodeGrade operation of this code type. > Note: Note that the specifications of a code's quiet zone are dependent upon the code type.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. The default value for M_DOTCODE is M_DISABLE. For all other code types, the default is M_ENABLE. |
M_DISABLE | Specifies that a quiet zone is not necessary. When set to M_DISABLE, the McodeRead or McodeGrade operation can be less robust, especially for 1D code types. |
M_ENABLE | Specifies that a quiet zone is necessary. |
M_CODE_FLIP
Sets whether code occurrences need to be flipped or read in the opposite direction to be read properly.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value isM_ANY. When using a code context with M_INITIALIZATION_MODE set toM_TYPICAL_RECOGNITION, the default value is M_NO_FLIP. |
M_ANY | Allows Aurora Imaging Library to decide whether a code occurrence needs to be flipped or read in the opposite direction to be read properly. |
M_FLIP | Specifies that code occurrences need to be flipped or read in the opposite direction to be read properly. When dealing with 1D code types, a code occurrence will be read from left-to-right and from right-to-left. When dealing with 2D code types, a code occurrence will be flipped before being read. |
M_NO_FLIP | Specifies that code occurrences don't need to be flipped or read in the opposite direction. When dealing with 1D code types, a code occurrence will be read from left-to-right. When dealing with 2D code types, a code occurrence will not be flipped. |
M_CODE_SEARCH_MODE
Sets the behavior of the decoding algorithm. Note that the default setting is M_FAST in the majority of cases. To avoid obtaining false positives when searching for a specific number of occurrences (M_NUMBER and M_TOTAL_NUMBER), set M_CODE_SEARCH_MODE to M_BEST. This control type is available for 1D code types (excluding M_4_STATE, M_PLANET, and M_POSTNET), the M_DOTCODE code type, and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. The default value is M_FAST for all code types except M_PHARMACODE, in which case, the default value is M_BEST. |
M_BEST | Specifies to search and return the best quality code occurrences. |
M_FAST | Specifies to search and return the first code occurrences decoded. |
M_DATAMATRIX_SHAPE
Sets the shape of the Data Matrix code type.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies that the M_DATAMATRIX code type can be any shape. |
M_RECTANGLE | Specifies that the M_DATAMATRIX code has a rectangular shape. This shape can only use the M_ECC_200 error correction scheme. |
M_SQUARE | Specifies that the M_DATAMATRIX code has a square shape. The number of cells in X and Y must be equal, and the aspect ratio of cell sizes in the X and Y direction must be near 1:1. |
M_DECODE_ALGORITHM
Sets the decoding algorithm to use to read the code occurrences. This control type is available for M_AZTEC, M_DATAMATRIX, M_DOTCODE, M_QRCODE, M_PDF417, and M_TRUNCATED_PDF417 code types. Note that training this control type (M_TRAIN) is not supported for the M_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value for M_PDF417 and M_TRUNCATED_PDF417 isM_CODE_NOT_DEFORMED, and the default value for the remaining code types is M_CODE_DEFORMED. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is M_CODE_NOT_DEFORMED for all code types except M_DOTCODE, in which case, the default value is M_CODE_DEFORMED. |
M_CODE_DEFORMED | Specifies to use the algorithm to decode deformed code occurrences. This algorithm is only available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_DOTCODE code types. > Note: Note that selecting this algorithm might lead to longer processing times. |
M_CODE_NOT_DEFORMED | Specifies to use the algorithm to decode non-deformed code occurrences. |
M_SCANLINE_AT_ANGLE | Specifies to use the algorithm to decode M_PDF417 or M_TRUNCATED_PDF417 code occurrences using rotated scanlines, without any localization. The angle of the scanlines is determined using M_SEARCH_ANGLE. Select this algorithm if you have codes that do not completely respect their specification (for example, they are missing their quiet zone). To get the best performance, specify a precise M_SEARCH_ANGLE or use M_SEARCH_ANGLE_STEP; also, ensure M_SCANLINE_HEIGHT is not set to a value higher than the row height. This algorithm is only available for M_PDF417 and M_TRUNCATED_PDF417 code types. |
M_DOT_SIZE_INPUT_UNITS
Sets the units with which to interpret the M_DOT_SIZE_MINand M_DOT_SIZE_MAX control types. This essentially sets the input coordinate system to use. This control type is only available for the M_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT | |
M_PIXEL (default) | Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the values in world units, with respect to the relative coordinate system. If world units are specified, calling McodeRead, McodeGrade, McodeTrain, or McodeWrite generates an error if the operation is not performed on a calibrated image. |
M_DOT_SIZE_MAX
Sets the maximum diameter of the dots for which to search. This control type is only available for theM_DOTCODE code type. Note that setting the maximum and minimum dot size increases both the speed and robustness of the operation.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies the default value, which is dependent on the initialization mode. The default is always 255 whenM_INITIALIZATION_MODE is set to M_IMPROVED_RECOGNITION. Whereas the default is always 24 when M_INITIALIZATION_MODE is set to M_TYPICAL_RECOGNITION. |
M_AUTO | Specifies to select an appropriate size, automatically. |
Value > 0 | Specifies the maximum dot size, relative to the input coordinate system specified using M_DOT_SIZE_INPUT_UNITS. |
M_DOT_SIZE_MIN
Sets the minimum diameter of the dots for which to search. This control type is only available for theM_DOTCODE code type. Note that setting the maximum and minimum dot size increases both the speed and robustness of the operation.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO | Specifies to select an appropriate size, automatically. |
Value > 0 (default) | Specifies the minimum dot size, relative to the input coordinate system specified using M_DOT_SIZE_INPUT_UNITS. |
M_DOT_SPACING_INPUT_UNITS
Sets the units with which to interpret the M_DOT_SPACING_MIN and M_DOT_SPACING_MAXcontrol types. This essentially sets the input coordinate system to use. This control type is only available for M_AZTEC, M_DATAMATRIX, M_MAXICODE, M_QRCODE, andM_MICROQRCODE code types.
| Value | Description |
|---|---|
M_DEFAULT | Specifies what convention is used, automatically. |
M_PIXEL (default) | Specifies to interpret the value in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the value in world units, with respect to the relative coordinate system. If world units are specified, calling McodeRead or McodeGrade generates an error if the operation is not performed on a calibrated image. |
M_DOT_SPACING_MAX
Sets the maximum distance between 2 dots in a matrix code type composed of dots. Note that the value entered represents half the distance between two dark cells (dots). To set the minimum distance between 2 dots, use M_DOT_SPACING_MIN. When the dark cells in a printed code are oversized (for example, due to printing artifacts) and overlap, set M_DOT_SPACING_MAXto a negative value equal to half the width of the overlap. The image below illustrates dark cells overlapping, the gray circle represents the actual cell size, while the black dot represents the expected cell size. [Image: code_dotspacing_bleeding2.png] By contrast, when the dots are too far apart, specify a positive dot spacing equal to half the distance between the two dots. [Image: code_dotspacing_regular.png] This control type is only available for M_AZTEC, M_DATAMATRIX, M_MAXICODE, M_QRCODE, andM_MICROQRCODE code types. Note that overestimating this value will severely impair reading results.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies the default value, which is dependent on the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value is 2. When using a code context with M_INITIALIZATION_MODE set toM_TYPICAL_RECOGNITION, the default value is the same as M_DOT_SPACING_MIN. Note that if M_DOT_SPACING_MIN is also set to M_DEFAULT, the result is no spacing. |
-256 <= Value <= 256 | Specifies the distance, relative to the input coordinate system specified using M_DOT_SPACING_INPUT_UNITS. Specifying a positive value means that you are specifying half the distance between the edges of the dots. Specifying a negative value means you are specifying the half-depth of the overlap. If M_DOT_SPACING_INPUT_UNITS is set to M_WORLD, the distance is specified in world units. Aurora Imaging Library transforms the value to pixel units according to the camera calibration of the target image that is specified when reading the code occurrence. > Note: Whether to use a negative or positive dot spacing is a situation best determined by testing. For more information, refer to Dot spacing. |
M_DOT_SPACING_MIN
Sets the minimum distance between 2 dots in a matrix code type composed of dots. Note that the value entered represents half the distance between two dark cells (dots). For more information, refer to M_DOT_SPACING_MAX. This control type is only available for M_AZTEC, M_DATAMATRIX, M_MAXICODE, M_QRCODE, andM_MICROQRCODE code types. Note that overestimating this value will severely impair reading results.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies the default value, which is dependent on the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value is the same as -1. When using a code context with M_INITIALIZATION_MODE set toM_TYPICAL_RECOGNITION, the default value is the same as M_DOT_SPACING_MAX. Note that if M_DOT_SPACING_MAX is also set to M_DEFAULT, the result is no spacing. |
-256 <= Value <= 256 | Specifies the distance, relative to the input coordinate system specified using M_DOT_SPACING_INPUT_UNITS. Specifying a positive value means that you are specifying half the distance between the edges of the dots. Specifying a negative value means you are specifying the half-depth of the overlap. If M_DOT_SPACING_INPUT_UNITS is set to M_WORLD, the distance is specified in world units. Aurora Imaging Library transforms the value to pixel units according to the camera calibration of the target image that is specified when reading the code occurrence. > Note: Whether to use a negative or positive dot spacing is a situation best determined by testing. For more information, refer to Dot spacing. When entering a value in pixel units, this value must be between -256 and 256, inclusive. |
M_ECC_CORRECTED_NUMBER
Sets whether McodeRead or McodeGradeare forced to perform a more robust operation to minimize the number of errors to correct. Enabling M_ECC_CORRECTED_NUMBER decreases performance, particularly in good quality images or in images where the error count is not important. This control type is only available for M_PDF417 and M_TRUNCATED_PDF417 code types.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE (default) | Specifies not to perform a more robust operation. |
M_ENABLE | Specifies to perform a more robust operation. |
M_FINDER_PATTERN_EXHAUSTIVE_SEARCH
Sets whether to search for the L-shaped finder pattern (the gray boxed area in the following image) to help localize the Data Matrix code. Note that enabling this control type increases the operation time, but is more reliable when a Data Matrix code has little contrast between foreground and background colors or when dealing with complex images. [Image: mcode-datamatrix-finder-pattern.png] This control type is only available when M_DECODE_ALGORITHM is set to M_CODE_DEFORMED or when M_USE_PRESEARCH is set to M_FINDER_PATTERN_BASE. In addition, this control type is only available for the M_DATAMATRIX code type.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE (default) | Specifies to not perform an exhaustive search. |
M_ENABLE | Specifies to perform an exhaustive search. |
M_FINDER_PATTERN_INPUT_UNITS
Sets the units with which to interpret the M_FINDER_PATTERN_MAX_GAP and M_FINDER_PATTERN_MINIMUM_LENGTH control types. This essentially sets the input coordinate system to use. This control type is only available when M_DECODE_ALGORITHM is set to M_CODE_DEFORMED or when M_USE_PRESEARCH is set to M_FINDER_PATTERN_BASE. In addition, this control type is only available for the M_DATAMATRIX code type.
| Value | Description |
|---|---|
M_DEFAULT | |
M_PIXEL (default) | Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the values in world units, with respect to the relative coordinate system. If world units are specified, calling McodeRead or McodeGrade generates an error if the operation is not performed on a calibrated image. |
M_FINDER_PATTERN_MAX_GAP
Sets the maximum tolerable gap in the finder pattern of a Data Matrix code. A gap is an unintentional space (area of background color), in the solid foreground color area of an M_DATAMATRIX code's finder pattern. A code occurrence that has a finder pattern with a gap larger than the specified value is not read. This control type is only available when M_DECODE_ALGORITHM is set to M_CODE_DEFORMED or when M_USE_PRESEARCH is set to M_FINDER_PATTERN_BASE. In addition, this control type is only available for the M_DATAMATRIX code type.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO (default) | Specifies that the maximum tolerable gap in the finder pattern is 6 times the minimum cell size specified using M_CELL_SIZE_MIN. |
Value | Specifies the maximum gap allowed, in input units specified using M_FINDER_PATTERN_INPUT_UNITS. |
M_FINDER_PATTERN_MINIMUM_LENGTH
Sets the shortest acceptable length of either "arm" of the finder pattern of an M_DATAMATRIX code occurrence. If either "arm" is shorter than the minimum, the code occurrence is not read. This control type is only available when M_DECODE_ALGORITHM is set to M_CODE_DEFORMED or when M_USE_PRESEARCH is set to M_FINDER_PATTERN_BASE. In addition, this control type is only available for the M_DATAMATRIX code type.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO (default) | Specifies that the minimum acceptable finder pattern "arm" length is 6 times the minimum cell size specified using M_CELL_SIZE_MIN. |
Value | The minimum acceptable finder pattern "arm" length, in input units specified using M_FINDER_PATTERN_INPUT_UNITS. |
M_NUMBER
Sets the maximum number of code occurrences of the specified code model to read, grade, or train. Note that this number is limited by the specified maximum total number of code occurrences in the image to read, grade, or train (McodeControl with M_TOTAL_NUMBER). To avoid obtaining false positives when searching for a specific number of occurrences, set M_CODE_SEARCH_MODE to M_BEST. Note that M_BEST is not supported for 2D code types other than the M_DOTCODE code type. The following table lists the code types that support searching for multiple occurrences: | Code type | Multiple occurrences | | --- | --- | | Linear bar codes (excluding M_GS1_DATABAR, M_4_STATE, M_PLANET, and M_POSTNET) | Yes | | M_DATAMATRIX | Yes | | M_DOTCODE | Yes | Only the code types in the table above support this control type. When dealing with all other code types, M_NUMBER must be set to 0 or 1 (or M_DEFAULT). Note that training this control type (M_TRAIN) is only supported for the M_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value is 1 for all code types except M_DOTCODE, in which case, the default value is M_ALL. When using a code context with M_INITIALIZATION_MODE set toM_TYPICAL_RECOGNITION, the default value is 1. |
M_ALL | Specifies that all code model occurrences are read/graded up to the maximum number limited by M_TOTAL_NUMBER. |
Value >= 0 (default) | Specifies the maximum number of code occurrences of the specified code model to read or grade. Only integer values are accepted. Only 1D code types (excluding M_GS1_DATABAR, M_4_STATE, M_PLANET, and M_POSTNET code types), the M_DOTCODE code type, and the M_DATAMATRIX code type support specifying a value greater than 1. |
M_POSITION_ACCURACY
Sets the accuracy of positional results. Accuracy depends on the settings of the code context and its models. It is always recommended to set this control type to M_HIGH when performing an McodeGrade operation; for higher accuracy, this is also recommended when performing an McodeRead on multiple code occurrences. Note that this can result in longer read times. This control type must be set to M_HIGHbefore an McodeRead operation if you want to use its result for an McodeGrade operation.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value is M_HIGH for all code types except M_DOTCODE, in which case, the default value is M_LOW. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is M_LOW. |
M_HIGH | Specifies to report the positional results of the code operation with high accuracy. |
M_LOW | Specifies to report the positional results of the code operation with low accuracy. |
M_SEARCH_ANGLE
Sets the nominal search angle. The search is performed between the range of angles defined by: (M_SEARCH_ANGLE - M_SEARCH_ANGLE_DELTA_NEG) to (M_SEARCH_ANGLE + M_SEARCH_ANGLE_DELTA_POS), inclusively, starting with an angle closest to that of M_SEARCH_ANGLE. > Note: Note that M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE_DELTA_POS must be set to M_DEFAULT when dealing with the following code types: M_PHARMACODE, M_COMPOSITECODE, and M_MICROPDF417. Their default angular search range will be used.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ACCORDING_TO_REGION | Specifies that the nominal angle is set to the angle of the target image's ROI (MbufSetRegion); recall that for McodeGrade and McodeRead, the ROI must be rectangular. If this value is chosen but no ROI has been defined, the angle is set to 0.0°. |
0.0 <= Value <= 360.0 (default) | Specifies the nominal angle, in degrees, relative to the input coordinate system specified using M_SEARCH_ANGLE_INPUT_UNITS. An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see Angle convention in Aurora Imaging Library. |
M_SEARCH_ANGLE_DELTA_NEG
Sets the negative angular range of the search. Note that M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE_DELTA_POS must be set to M_DEFAULT when dealing with the following code types: M_PHARMACODE and M_COMPOSITECODE. Their default angular search range will be used: | Code type | Maximum search angle | | --- | --- | | M_PHARMACODE | ±5° | | M_COMPOSITECODE | ±5° | Note that this control type is automatically activated for training if you activate M_SEARCH_ANGLE for training.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value is 180.0°. Note that if your code type is M_PHARMACODE or M_COMPOSITECODE, the default value is 5.0°. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is 5.0°. |
0.0 <= Value <= 180.0 | Specifies a negative angular range, in degrees, relative to the nominal angle set by M_SEARCH_ANGLE. Note that while the nominal angle is relative to the input coordinate system specified using M_SEARCH_ANGLE_INPUT_UNITS, M_SEARCH_ANGLE_DELTA_NEG is not affected by the coordinate system used. For 1D codes, the Code module will not use the search angular range algorithm if M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE_DELTA_POS both have a value of less than 5°, regardless of M_SEARCH_ANGLE_MODE. |
M_SEARCH_ANGLE_DELTA_POS
Sets the positive angular range of the search. Note that M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE_DELTA_POS must be set to M_DEFAULT when dealing with the following code types: M_PHARMACODE and M_COMPOSITECODE. Their default angular search range will be used: | Code type | Maximum search angle | | --- | --- | | M_PHARMACODE | ±5° | | M_COMPOSITECODE | ±5° | Note that this control type is automatically activated for training if you activate M_SEARCH_ANGLE for training.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set to M_IMPROVED_RECOGNITION, the default value is 180.0°. Note that if your code type is M_PHARMACODE or M_COMPOSITECODE, the default value is 5.0°. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is 5.0°. |
0.0 <= Value <= 180.0 | Specifies a positive angular range, in degrees, relative to the nominal angle set by M_SEARCH_ANGLE. Note that while the nominal angle is relative to the input coordinate system specified using M_SEARCH_ANGLE_INPUT_UNITS, M_SEARCH_ANGLE_DELTA_POS is not affected by the coordinate system used. For 1D codes, the Code module will not use the search angular range algorithm if M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE_DELTA_POS both have a value of less than 5°, regardless of M_SEARCH_ANGLE_MODE. |
M_SEARCH_ANGLE_INPUT_UNITS
Sets the units with which to interpret the M_SEARCH_ANGLE control type. This essentially sets the input coordinate system to use.
| Value | Description |
|---|---|
M_DEFAULT | |
M_PIXEL (default) | Specifies to interpret the value in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the value in world units, with respect to the relative coordinate system. If world units are specified, calling McodeRead or McodeGrade generates an error if the operation is not performed on a calibrated image. > Note: If there is distortion in the target image, you should correct the image before performing an McodeRead or McodeGrade operation. |
M_SEARCH_ANGLE_STEP
Sets the angle increment/decrement used when searching for codes through an angular range. When M_SEARCH_ANGLE_STEP is enabled, the search angular range algorithm will first search at the specified nominal angle. It will then toggle between incrementing and decrementing from the nominal angle, with each iteration moving further away from the initial search angle by the value of M_SEARCH_ANGLE_STEP. The process will continue either until the code is found, or the search falls outside of the range defined by M_SEARCH_ANGLE - M_SEARCH_ANGLE_DELTA_NEG and M_SEARCH_ANGLE + M_SEARCH_ANGLE_DELTA_POS. Note that setting theM_SEARCH_ANGLE_STEP will affect both the speed and robustness of the search. > Note: Note that this control type is ignored if M_SPEED is set to M_VERY_LOW, or M_SEARCH_ANGLE_MODE is set to M_DISABLE. This control type is available for 1D code types (excluding M_4_STATE, M_PLANET, and M_POSTNET). It is also available for M_PDF417 and M_TRUNCATED_PDF417 code types when M_DECODE_ALGORITHM is set to M_SCANLINE_AT_ANGLE. Note that for M_PDF417 and M_TRUNCATED_PDF417 code types, this control type is automatically activated for training if you activate M_SEARCH_ANGLE for training.
| Value | Description |
|---|---|
M_DEFAULT | |
M_DISABLE (default) | Specifies that no explicit increment/decrement is used. The actual increment/decrement used during the search is determined by the search angular range algorithm. |
0.1 <= Value <= 180.0 | Specifies the explicit angle increment/decrement, in degrees. |
M_STRING_SIZE_MAX
Sets the maximum size (number of characters) of the string encoded in a code occurrence. For M_QRCODE, M_MICROQRCODE, M_COMPOSITECODE, and M_GS1_DATABAR code types, the maximum string size is ignored when performing McodeRead and McodeGrade operations.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. For the M_IATA25 code type, the default value is 15. For all other code types, the default value is M_ANY. |
M_ANY | Specifies that there is no maximum string size. |
0 <= Value <= 65535 | Specifies the maximum string size. For a 1D code (except M_POSTNET, M_PLANET and M_CODABAR codes), the range of possible values starts at 1. For an M_POSTNET code, the value must be either 5, 9, or 11. For an M_PLANET code, the value must be 11 or 13. For an M_CODABAR code, the value must be at least 3. For all 2D codes and cross-row codes (except M_AZTEC with M_ENCODING set to M_ENC_AZTEC_RUNE and M_MAXICODE with M_ENCODING set to eitherM_ENC_MODE2or M_ENC_MODE3) the value can start at 0. Only integer values are accepted. |
M_STRING_SIZE_MIN
Sets the minimum size (number of characters) of the string encoded in a code occurrence. For M_QRCODE, M_MICROQRCODE, M_COMPOSITECODE, and M_GS1_DATABAR code types, the minimum string size is ignored when performing McodeRead and McodeGrade operations.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. For the M_IATA25 code type, the default value is 15. For all other code types, the default value is M_ANY. |
M_ANY | Specifies that there is no minimum string size. |
0 <= Value <= 65535 | Specifies the minimum string size. For a 1D code (except M_POSTNET, M_PLANET and M_CODABAR codes), the range of possible values starts at 1. For an M_POSTNET code, the value must be either 5, 9, or 11. For an M_PLANET code, the value must be 11 or 13. For an M_CODABAR code, the value must be at least 3. For all 2D codes and cross-row codes (except M_AZTEC with M_ENCODING set to M_ENC_AZTEC_RUNE and M_MAXICODE with M_ENCODING set to eitherM_ENC_MODE2or M_ENC_MODE3) the value can start at 0. Only integer values are accepted. |
M_SUB_TYPE
Sets the particular code sub-types for which to search. Enabling fewer sub-types will help increase the speed of the operation. Some versions of M_GS1_DATABAR codes only differ by their bar height and not their structure. In these cases, the operation is successful even if only one of the sub-types is enabled. For example, GS1 Databar Omnidirectional and GS1 Databar Truncated can be decoded if either M_GS1_DATABAR_OMNI or M_GS1_DATABAR_TRUNCATED is enabled. The sub-types are additive. If you set the sub-type to M_UPC_A + M_GS1_DATABAR_OMNI, you can search for M_UPC_A and M_GS1_DATABAR codes. If you enabled other sub-types previously, they are no longer enabled. This value is available only for M_GS1_DATABAR and M_COMPOSITECODE code types.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for all of the code sub-types that can be specified for M_SUB_TYPE. |
M_EAN8 | Specifies that the EAN 8 code sub-type is enabled. M_COMPOSITECODE is the only code type that supports this setting. |
M_EAN13 | Specifies that the EAN 13 code sub-type is enabled. M_COMPOSITECODE is the only code type that supports this setting. |
M_GS1_128 | Specifies that the GS1-128 code sub-type is enabled. M_COMPOSITECODE is the only code type that supports this setting. |
M_GS1_DATABAR_EXPANDED | Specifies that the GS1 Databar Expanded code sub-type is enabled. |
M_GS1_DATABAR_EXPANDED_STACKED | Specifies that the GS1 Databar Expanded Stacked code sub-type is enabled. |
M_GS1_DATABAR_LIMITED | Specifies that the GS1 Databar Limited code sub-type is enabled. |
M_GS1_DATABAR_OMNI | Specifies that the GS1 Databar Omnidirectional code sub-type is enabled. |
M_GS1_DATABAR_STACKED | Specifies that the GS1 Databar Stacked code sub-type is enabled. |
M_GS1_DATABAR_STACKED_OMNI | Specifies that the GS1 Databar Stacked Omnidirectional code sub-type is enabled. |
M_GS1_DATABAR_TRUNCATED | Specifies that the GS1 Databar Truncated code sub-type is enabled. |
M_UPC_A | Specifies that the UPC-A code sub-type is enabled. M_COMPOSITECODE is the only code type that supports this setting. |
M_UPC_E | Specifies that the UPC-E code sub-type is enabled. M_COMPOSITECODE is the only code type that supports this setting. |
M_USE_PRESEARCH
Sets whether the localization operation is performed prior to the decoding step of an operation. Note that, when reading multiple occurrences of M_DATAMATRIX codes, the setting of this control type is ignored. This control type is available for 2D code types, excluding theM_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set toM_IMPROVED_RECOGNITION and the code type is M_DATAMATRIX, the default value is M_FINDER_PATTERN_BASE. For supported 2D code types other than M_DATAMATRIX, the default value is M_STAT_BASE. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is M_DISABLE. |
M_DISABLE | Specifies that the operation is not performed. |
M_FINDER_PATTERN_BASE | Specifies that the localization operation is only performed on the base pattern of the M_DATAMATRIX code (an "L" starting at the top-most left corner, and ending on the bottom-most right corner of the code). This localization operation is more robust than an M_STAT_BASElocalization operation. Note that if the surrounding image is very complex, better results might be obtained by settingM_FINDER_PATTERN_EXHAUSTIVE_SEARCH to M_ENABLE. M_DATAMATRIX is the only code type that supports this setting. |
M_STAT_BASE | Specifies to localize the code within the image with the statistical characteristics of a 2D bar code (for example, local variance and the presence of a lot of edges). This localization operation is performed faster than an M_FINDER_PATTERN_BASE localization operation. Note that this localization operation might be less efficient when a code occurrence's cell size is greater than a particular value, depending on the code type. To obtain the best results from this operation, you should specify the cell size as a range, using M_CELL_SIZE_MIN and M_CELL_SIZE_MAX, when the cell sizes of the codes in your images are greater than the cell sizes listed in the table below. If they are less than or equal to these values, you can leave M_CELL_SIZE_MIN and M_CELL_SIZE_MAX to their default values. |
Code model settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified for a code model to control an McodeRead, McodeGrade, McodeTrain, or McodeWrite operation. If you pass a code context to the CodeId parameter, the specified control type setting is applied to all the code models in the context. If none of the code models support the specified control type, an error occurs. If only some code models do not support the specified control type, the control type setting is ignored for these code models. > Note: Note that besides code type restrictions listed explicitly in the values below, McodeGrade does not support M_4_STATE, M_PHARMACODE, M_POSTNET, and M_PLANET code types. Although all these control types affect the results of McodeTrain, see the description of the control types to determine if they can be activated for training; you can also use filters to limit the control types in the table to those that can be trained.
M_CELL_NUMBER_X
Sets the number of cells of a 2D code in the X-direction. Note that setting the number of cells in both the X- and Y-direction, increases the robustness of the operation. This control type is only used for 2D code types. The number of cells is not required for M_MAXICODE because it is a fixed size.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for a code with any number of cells, when performing an McodeRead or McodeGrade operation. Fits the string to be encoded into the smallest possible number of cells, when performing an McodeWrite operation. |
Value > 0 | Specifies the number of cells. This can be any integer value. Note that for the M_PDF417 code type, the value that you pass must be equal to 17_c_ + 35, where c is the required number of columns, and 35 represents the number of cells required for the start and stop characters. For the M_TRUNCATED_PDF417 code type, the value that you pass must be equal to 17_c_ + 18, where c is the required number of columns, and 18 represents the number of cells required for the start and stop characters. For the M_MICROPDF417 code type, this setting should be set to 38 for a one-column code, 55 for a two-column code, 82 for a three-column code, and 99 for a four-column code. Only integer values are accepted. For the M_DOTCODE code type, this setting should be set to a value greater than 4. Only integer values are accepted. |
M_CELL_NUMBER_Y
Sets the number of cells of a 2D code in the Y-direction. Note that setting the number of cells in both the X- and Y-direction, increases the robustness of the operation. This control type is only used for 2D code types. The number of cells is not required for M_MAXICODE because it is a fixed size. When used with M_PDF417, M_TRUNCATED_PDF417, and M_MICROPDF417, this represents the number of rows.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ANY (default) | Specifies to search for a code with any number of cells, when performing an McodeRead or McodeGrade operation. Fits the string to be encoded into the smallest possible number of cells, when performing an McodeWrite operation. |
Value > 0 | Specifies the number of cells. For exact values, refer to the standard documentation of the code used. For the M_PDF417 and M_TRUNCATED_PDF417 code types, M_CELL_NUMBER_Y should have a value between 3 and 90. The value of M_CELL_NUMBER_Y is used when calculating the value ofM_CELL_NUMBER_X. Only integer values are accepted. For the M_MICROPDF417 code type, M_CELL_NUMBER_Y should have a value between 4 and 44. Only integer values are accepted. For the M_DOTCODE code type, this setting should be set to a value greater than 4. Only integer values are accepted. |
M_CELL_SIZE_INPUT_UNITS
Sets the units with which to interpret the M_CELL_SIZE_MAX and M_CELL_SIZE_MIN control types. This essentially sets the input coordinate system to use.
| Value | Description |
|---|---|
M_DEFAULT | |
M_PIXEL (default) | Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies to interpret the values in world units, with respect to the relative coordinate system. If world units are specified, calling McodeRead, McodeGrade, McodeTrain, or McodeWrite generates an error if the operation is not performed on a calibrated image. |
M_ENCODING
Sets the type of encoding scheme. Note that training this control type (M_TRAIN) is not supported for the M_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies to use the default encoding scheme, which is dependent on the code type and the initialization mode. The following table lists the default encoding scheme. Note that when performing an McodeWrite operation, M_DEFAULT is not supported in all circumstances. If your specific code type corresponds to M_ANY, check the description of M_ANY to see if it can be used with an McodeWrite operation. |
M_ANY | Specifies any type of encoding scheme. M_AZTEC, M_DATAMATRIX, M_MAXICODE and M_QRCODE are the code types that can use this encoding scheme for McodeWrite operations. M_EAN8, M_EAN13,M_UPC_A, M_UPC_E,M_AZTEC, M_DATAMATRIX, M_MAXICODE, and M_QRCODE are the code types that can use this encoding scheme for McodeRead and McodeGrade operations. |
M_ENC_ALPHA | Specifies an encoding scheme that supports uppercase alphabetical characters, along with the space. M_DATAMATRIX is the code type that can use this encoding scheme. |
M_ENC_ALPHANUM | Specifies an encoding scheme that supports alphanumeric characters, as well as the space. M_DATAMATRIX is the code type that can use this encoding scheme. |
M_ENC_ALPHANUM_PUNC | Specifies a similar encoding scheme to M_ENC_ALPHANUM, except it also supports the following characters: (,), (-), (/) and (.). M_DATAMATRIX is the code type that can use this encoding scheme. |
M_ENC_ASCII | Specifies an encoding scheme that supports ASCII characters. M_CODE39, M_CODE93, M_CODE128, M_EAN14, and M_DATAMATRIX are the code types that can use this encoding scheme. |
M_ENC_AUSTRALIA_MAIL_C | Specifies an encoding scheme for a 4-state format used with the C encoding table by the Australian Mail service. M_4_STATE is the code type that can use this encoding scheme. |
M_ENC_AUSTRALIA_MAIL_N | Specifies an encoding scheme for a 4-state format used with the N encoding table by the Australian Mail service. M_4_STATE is the code type that can use this encoding scheme. |
M_ENC_AUSTRALIA_MAIL_RAW | Specifies an encoding scheme for a 4-state format used by the Australian Mail service. M_4_STATE is the code type that can use this encoding scheme. |
M_ENC_AZTEC_COMPACT | Specifies an encoding scheme for a compact Aztec code. M_AZTEC is the code type that can use this encoding scheme. |
M_ENC_AZTEC_FULL_RANGE | Specifies an encoding scheme for a full-range (not compact) Aztec code. M_AZTEC is the code type that can use this encoding scheme. |
M_ENC_AZTEC_RUNE | Specifies an encoding scheme for an Aztec rune (the smallest version of an Aztec code). M_AZTEC is the code type that can use this encoding scheme. |
M_ENC_EAN8 | Specifies an encoding scheme for a composite code whose 1D portion uses an EAN 8 format and whose 2D portion uses a MicroPDF417 format. M_COMPOSITECODE is the code type that can use this encoding scheme. |
M_ENC_EAN8_ADDON | Specifies an encoding scheme for an EAN 8 format with a supplemental 2 or 5 digit add-on. When a code occurrence is read, the character " |
M_ENC_EAN13 | Specifies an encoding scheme for a composite code whose 1D portion uses an EAN 13 format and whose 2D portion uses a MicroPDF417 format. M_COMPOSITECODE is the code type that can use this encoding scheme. |
M_ENC_EAN13_ADDON | Specifies an encoding scheme for an EAN 13 format with a supplemental 2 or 5 digit add-on. When a code occurrence is read, the character " |
M_ENC_GS1_128_MICROPDF417 | Specifies an encoding scheme for a composite code whose 1D portion uses a GS1 128 format and whose 2D portion uses a MicroPDF417 format. M_COMPOSITECODE is the code type that can use this encoding scheme. |
M_ENC_GS1_128_PDF417 | Specifies an encoding scheme for a composite code whose 1D portion uses a GS1 128 format and whose 2D portion uses a PDF417 format. M_COMPOSITECODE is the code type that can use this encoding scheme. |
M_ENC_GS1_DATABAR_EXPANDED | Specifies an encoding scheme that uses a GS1 Databar format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar Expanded format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_GS1_DATABAR_EXPANDED_STACKED | Specifies an encoding scheme that uses a GS1 Databar Expanded Stacked format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar Expanded Stacked format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_GS1_DATABAR_LIMITED | Specifies an encoding scheme that uses a GS1 Databar Limited format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar Limited format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_GS1_DATABAR_OMNI | Specifies an encoding scheme that uses a GS1 Databar format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_GS1_DATABAR_STACKED | Specifies an encoding scheme that uses a GS1 Databar Stacked format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar Stacked format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_GS1_DATABAR_STACKED_OMNI | Specifies an encoding scheme that uses a GS1 Databar Stacked Omnidirectional format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar Stacked Omnidirectional format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_GS1_DATABAR_TRUNCATED | Specifies an encoding scheme that uses a GS1 Databar Truncated format. For a composite code, this encoding scheme specifies that the 1D portion uses a GS1 Databar Truncated format and the 2D portion uses a MicroPDF417 format. M_GS1_DATABAR and M_COMPOSITECODE are the code types that can use this encoding scheme. |
M_ENC_ISO8 | Specifies a similar encoding scheme as M_ENC_ASCII, but supports the extended ASCII character set. M_DATAMATRIX and M_DOTCODE are the code types that can use this encoding scheme. |
M_ENC_KOREA_MAIL | Specifies an encoding scheme for a 4-state format used by the Korean Mail service. M_4_STATE is the code type that can use this encoding scheme. |
M_ENC_MODE2 | Specifies an encoding scheme that requires a Structured Carrier Message. This encoding scheme can be used for a numeric postal code. M_MAXICODE is the code type that can use this encoding scheme. |
M_ENC_MODE3 | Specifies an encoding scheme that requires a Structured Carrier Message. This encoding scheme can be used for an alphanumeric postal code. M_MAXICODE is the code type that can use this encoding scheme. |
M_ENC_MODE4 | Specifies an encoding scheme that requires a Free Format Message. M_MAXICODE is the code type that can use this encoding scheme. |
M_ENC_MODE5 | Specifies an encoding scheme that requires a Free Format Message. This data type has a higher level of error correction than M_ENC_MODE4. M_MAXICODE is the code type that can use this encoding scheme. |
M_ENC_MODE6 | Specifies an encoding scheme that requires a Free Format Message. This encoding scheme indicates that the resulting code is used to program a code reader. M_MAXICODE is the code type that can use this encoding scheme. |
M_ENC_NUM | Specifies an encoding scheme that only supports numbers. M_EAN8, M_EAN13, M_INDUSTRIAL25, M_INTERLEAVED25, M_PHARMACODE, M_PLANET, M_POSTNET, M_UPC_A, M_UPC_E, and M_DATAMATRIX are the code types that can use this encoding scheme. If the code type is M_DATAMATRIX, spaces are also allowed. |
M_ENC_QRCODE_MODEL1 | Specifies an encoding scheme that uses an older version of the QR code format. M_QRCODE is the code type that can use this encoding scheme. |
M_ENC_QRCODE_MODEL2 | Specifies an encoding scheme that uses a newer version of the QR code format. This version can handle more data and is more robust than model 1. M_QRCODE is the code type that can use this encoding scheme. |
M_ENC_STANDARD | Specifies different types of encoding schemes, depending on what code type is used. If M_CODE39 or M_CODE93 is the code type, M_ENC_STANDARD supports the alphabet (capital letters), digits 0 - 9, and the (-), space, ($), (/), (+), (.), (%) characters. If M_BC412 is the code type, M_ENC_STANDARD supports numbers and the alphabet (capital letters), except for the letter O. If M_PDF417, M_TRUNCATED_PDF417, or M_MICROPDF417 is the code type, M_ENC_STANDARD supports ASCII and extended ASCII characters. If M_CODABAR is the code type, M_ENC_STANDARD supports digits 0 - 9, the (-), ($), (:), (/), (.), and (+) characters, and the a, b, c, and d characters. It uses the latter four characters as start and stop characters. |
M_ENC_UK_MAIL | Specifies an encoding scheme for a 4-state format used by the UK Mail service. M_4_STATE is the code type that can use this encoding scheme. |
M_ENC_UPCA | Specifies an encoding scheme for a composite code whose 1D portion uses an UPC-A format and whose 2D portion uses a MicroPDF417 format. M_COMPOSITECODE is the code type that can use this encoding scheme. |
M_ENC_UPCA_ADDON | Specifies an encoding scheme for an UPC-A format with a supplemental 2 or 5 digit add-on. When a code occurrence is read, the character " |
M_ENC_UPCE | Specifies an encoding scheme for a composite code whose 1D portion uses an UPC-E format and whose 2D portion uses a MicroPDF417 format. M_COMPOSITECODE is the code type that can use this encoding scheme. |
M_ENC_UPCE_ADDON | Specifies an encoding scheme for an UPC-E format with a supplemental 2 or 5 digit add-on. When a code occurrence is read, the character " |
M_ENC_US_MAIL | Specifies the Intelligent Mail Barcode encoding scheme for a 4-state format used by the US Mail service. M_4_STATE is the code type that can use this encoding scheme. |
5 <= Value <= 95 | Specifies the minimum amount of the symbol that contains error correction information, as a percentage. M_4_STATE is the code type that can use this encoding scheme. Only integer values are accepted. |
M_ERROR_CORRECTION
Sets the type of error correction. > Note: Note that if the size of an M_MICROQRCODE code is the smallest possible size, 11x11 (M1 version), M_ERROR_CORRECTION must be set to either M_ANY or M_DEFAULT when performing McodeRead or McodeGrade operations. Note that training this control type (M_TRAIN) is not supported for the M_DOTCODE code type.
| Value | Description |
|---|---|
M_DEFAULT (default) | Specifies to use the default error correction scheme for the code type. The following table lists the default error correction scheme: |
M_ANY | Specifies that the error correction type for McodeRead and McodeGrade operations is detected automatically. This error correction scheme is only supported for write operations (McodeWrite) when dealing with M_AZTEC, M_QRCODE, M_MICROQRCODE, M_PDF417, or M_TRUNCATED_PDF417. When dealing with M_AZTEC, this value specifies that error correction will make up 23% of the symbol. M_AZTEC, M_DATAMATRIX, M_DOTCODE,M_QRCODE,M_MICROQRCODE, M_PDF417, and M_TRUNCATED_PDF417 are the code types that can use this error correction scheme. |
M_ECC_4STATE | Specifies to use the Reed-Solomon-based algorithm or a check digit type of error correction scheme, depending on the specification of the encoding. M_4_STATE is the code type that can use this error correction scheme. |
M_ECC_200 | Specifies to use a Reed-Solomon-based algorithm as an error correction scheme. M_DATAMATRIX is the code type that can use this error correction scheme. |
M_ECC_CHECK_DIGIT | Specifies to use an additional digit to check whether there is an error or not. There is error detection but not correction. M_4_STATE M_BC412, M_EAN8, M_EAN13, M_CODE39, M_CODE93, M_CODE128, M_GS1_DATABAR, M_INDUSTRIAL25, M_INTERLEAVED25, M_POSTNET, M_PLANET, M_UPC_A, and M_UPC_E are the code types that can use this error correction scheme. |
M_ECC_COMPOSITE | Specifies to use the default error correction scheme for the 1D and 2D portions of the composite code. M_COMPOSITECODE is the code type that can use this error correction scheme. |
M_ECC_H | Specifies to use the highest-level error correction scheme. M_QRCODE is the code type that can use this error correction scheme. |
M_ECC_L | Specifies to use the lowest-level error correction scheme. M_QRCODE and M_MICROQRCODE are the code types that can use this error correction scheme. |
M_ECC_M | Specifies to use a medium-low level error correction scheme. M_QRCODE and M_MICROQRCODE are the code types that can use this error correction scheme. |
M_ECC_NONE | Specifies no error correction. M_BC412, M_CODABAR, M_CODE39, M_INDUSTRIAL25, M_INTERLEAVED25, andM_PHARMACODE are the code types that can use this error correction scheme. |
M_ECC_Q | Specifies to use a medium-high level error correction scheme. M_QRCODE and M_MICROQRCODE are the code types that can use this error correction scheme. |
M_ECC_REED_SOLOMON | Specifies to use a Reed-Solomon type of error correction scheme. M_DOTCODE, M_MAXICODE and M_MICROPDF417 are the code types that can use this error correction scheme. |
M_ECC_REED_SOLOMON_n | Specifies to use a Reed-Solomon type of error correction scheme. n is an integer from 0 to 8. The higher the number, the higher the level of error correction. M_PDF417 and M_TRUNCATED_PDF417 are the code types that can use this error correction scheme. |
5 <= Value <= 95 | Specifies the minimum percentage of the symbol that contains error correction information. M_AZTEC is the only code type that can use this error correction scheme. Only integer values are accepted. |
M_FOREGROUND_VALUE
Sets the foreground color of the code.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type and the initialization mode. When using a code context with M_INITIALIZATION_MODE set toM_IMPROVED_RECOGNITION, the default value is M_FOREGROUND_ANY. When using a code context with M_INITIALIZATION_MODE set to M_TYPICAL_RECOGNITION, the default value is M_FOREGROUND_BLACK for all code types except M_DOTCODE, in which case, the default value is M_FOREGROUND_WHITE. |
M_FOREGROUND_ANY | Specifies the foreground color as black or white. Note that using this value will impact the performance of McodeRead and McodeGrade operations and should be used only when the foreground can change or cannot be known beforehand. When used for McodeWrite operations, the default color (M_FOREGROUND_WHITE for M_DOTCODE and M_FOREGROUND_BLACK for all other code types) is used. |
M_FOREGROUND_BLACK | Specifies that the foreground color is black. |
M_FOREGROUND_WHITE | Specifies that the foreground color is white. |
Combination Constants — For training a control type
Optional.
Usage: You can add one of the following values to the above-mentioned values to set whether the control is to be trained.
M_TRAIN
Sets whether to activate or deactivate a specified control type for training. Note that training one control type might automatically train some other related control types that cannot be combined with M_TRAIN. For example, activating M_SEARCH_ANGLE for training, also automatically activates M_SEARCH_ANGLE_STEP, M_SEARCH_ANGLE_MODE, M_SEARCH_ANGLE_DELTA_POS, and M_SEARCH_ANGLE_DELTA_NEG for training.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default activation; the default activation depends on the control type and code model type. For a given trainable control type, if an unsupported code model is included in the training, the default value will be M_DISABLE, otherwise it will be M_ENABLE. |
M_DISABLE | Disables the training of the specified control type. |
M_ENABLE | Enables the training of the specified control type. |
Code model settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified when dealing with an McodeGrade operation. If you pass a code context to the CodeId parameter, the specified control type setting is applied to all the code models in the context. If none of the code models support the specified control type, an error will occur. If only some code models do not support the specified control type, the control type setting is ignored for these code models. > Note: Note that besides code type restrictions listed explicitly in the values below, McodeGrade does not support M_4_STATE, M_PHARMACODE, M_POSTNET, and M_PLANET code types.
M_GRADING_STANDARD_EDITION
Sets the grading standard edition to use when performing an McodeGrade operation. Note that the grading standard edition must correspond to the grading standard specified using M_GRADING_STANDARD. This control type is available for all code types except M_MAXICODE.
| Value | Description |
|---|---|
M_DEFAULT | Specifies to use the most recent grading standard edition that is supported, which is dependent on the code type. When M_GRADING_STANDARD is set to M_ISO_GRADING, the default value for 1D code types supported by McodeGrade is the same as M_ISO_15416_2016. For supported 2D code types and M_COMPOSITECODE code types, the default value is the same as M_ISO_15415_2011_15416_2016. When M_GRADING_STANDARDis set to M_ISO_DPM_GRADING, the default value is the same asM_ISO_29158_2020. When M_GRADING_STANDARDis set to M_SEMI_T10_GRADING, the default value is the same asM_SEMI_T10_0701. |
M_ISO_15415_2011_15416_2000 | Specifies to use the ISO/IEC 15415:2011 and ISO/IEC 15416:2000 specifications. This control value is available for 2D and M_COMPOSITECODE code types, excluding M_MAXICODE. |
M_ISO_15415_2011_15416_2016 | Specifies to use the ISO/IEC 15415:2011 and ISO/IEC 15416:2016 specifications. This control value is available for 2D and M_COMPOSITECODE code types, excluding M_MAXICODE. |
M_ISO_15416_2000 | Specifies to use the ISO/IEC 15416:2000 specification. This control value is available for 1D code types. |
M_ISO_15416_2016 | Specifies to use the ISO/IEC 15416:2016 specification. This control value is available for 1D code types. |
M_ISO_29158_2011 | Specifies to use the ISO/IEC 29158:2011 specification. This control value is available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types. |
M_ISO_29158_2020 | Specifies to use the ISO/IEC 29158:2020 specification. This control value is available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types. |
M_SEMI_T10_0701 | Specifies to use the Semi T10-0701 specification. This control value is available for the M_DATAMATRIX code type. |
Code model settings for an
The following ControlType and corresponding ControlValue parameter settings can be specified when dealing with an McodeWrite operation. If you pass a code context to the CodeId parameter, the specified control type setting is applied to all the code models in the context. If none of the code models support the specified control type, an error will occur. If only some code models do not support the specified control type, the control type setting is ignored for these code models.
M_CELL_SIZE_MODE
Sets how to establish the cell size to use when performing an McodeWrite operation.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO (default) | Specifies to use the largest possible cell size such that the code will be resized as to just fit into the target image of the operation. |
M_USER_DEFINED | Specifies that the cell size corresponds to the value of M_CELL_SIZE_VALUE. |
M_CELL_SIZE_VALUE
Sets the cell size to use when performing an McodeWrite operation and M_CELL_SIZE_MODE is set to M_USER_DEFINED. If M_CELL_SIZE_INPUT_UNITS is set to M_WORLD, specify the cell size in world units. The specified cell size is transformed to pixel units according to the calibration of the target image used for writing.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. This value is equivalent to 7 pixels for M_DOTCODE, 10 pixels for M_MAXICODE, or 4 pixels for all other codes types. |
Value > 0.0 | Specifies the cell size. > Note: Note that if the cell size is specified in pixel units, the minimum value that this control type can take is 1. |
M_DOT_SHAPE
Sets the shape of the dots used to draw foreground cells when performing an McodeWriteoperation. This control type is only available for M_AZTEC, M_DATAMATRIX, M_DOTCODE, M_QRCODE, andM_MICROQRCODE code types.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. The default value for M_DOTCODE is M_CIRCLE. For all other code types that use M_DOT_SHAPE, the default is M_SQUARE. |
M_CIRCLE | Specifies that the foreground cells will be drawn with circular dots. |
M_SQUARE | Specifies that the foreground cells will be drawn with square dots. |
M_DOT_SIZE
Sets the size of the dot (or square) when performing an McodeWrite operation. The dot size corresponds to the circle diameter if M_DOT_SHAPE is set to M_CIRCLE or to the length of the square if it is set to M_SQUARE. If M_CELL_SIZE_INPUT_UNITS is set to M_WORLD, specify the dot size in world units. The specified dot size is transformed to pixel units according to the calibration of the target image used for writing. This control type is only available for M_AZTEC, M_DATAMATRIX,M_DOTCODE, M_QRCODE, andM_MICROQRCODE code types.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default value, which is dependent on the code type. The default value for M_DOTCODE is 7 pixels. For all other code types that use M_DOT_SIZE, the default value is equivalent to the size of the cell set by M_CELL_SIZE_VALUE. |
Value > 0.0 | Specifies the size of the dot or square. |
Result buffer settings dealing with an
The following ControlType and corresponding ControlValue parameter settings can be specified when dealing with an McodeRead, McodeGrade, McodeDetect, McodeTrain, or McodeWrite operation.
M_RESULT_OUTPUT_UNITS
Sets whether to return results in pixels or world units. This essentially sets the output coordinate system to use. The setting of this control type will only affect functions within this module which return positional results. This control type can be changed at any time to return results in the required output units.
| Value | Description |
|---|---|
M_DEFAULT | |
M_ACCORDING_TO_CALIBRATION (default) | 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. |
M_PIXEL | Specifies that results are returned in pixel units, with respect to the pixel coordinate system. |
M_WORLD | Specifies that results are returned in world units, with respect to the relative coordinate system. If world units are specified, calling McodeGetResult generates an error if the result was not calculated on a calibrated image. |
Result buffer settings dealing with an
The following ControlType and corresponding ControlValue parameter settings can be specified when dealing with an McodeRead, McodeGrade, McodeTrain, or McodeWrite operation.
M_STRING_FORMAT
Sets the format in which to return the string, retrieved using McodeGetResult with M_STRING.
| Value | Description |
|---|---|
M_DEFAULT | |
M_AUTO_FORMAT (default) | Specifies that the string is returned in the string format associated with the code type. Graphical interpretations are assigned depending on corresponding character sets, allowing for the use of character set ECIs. |
M_GS1_HUMAN_READABLE | Specifies that the string is returned in a format that is human-readable. Note that this is the default format for both an M_EAN14 and M_GS1_128 code type. This format is only available when reading the following code types:M_CODE128, M_EAN14, M_GS1_128, M_GS1_DATABAR, M_AZTEC, M_DATAMATRIX, M_DOTCODE, M_QRCODE, and M_COMPOSITECODE. |
M_JAPANESE | Specifies that the string is returned in the Japanese (Windows-932) encoding. |
M_KOREAN | Specifies that the string is returned in the Korean (Windows-949) encoding. |
M_LATIN | Specifies that the returned string uses Latin (Windows-1252) encoding. |
M_RAW_DATA | Specifies that the string is returned in a raw data format. This format will have the FNC1 separator at the beginning of the string (represented by the è character) and the group separators (GS) will be included in the string (represented by the ascii=29 character or \x1D) (for example, è01034531200000111708050810ABCD1234\x1D4109501101020917). This format is only available when reading the following code types:M_CODE128, M_EAN14, M_GS1_128, M_GS1_DATABAR, all 2D code types (except M_MICROQRCODE), and M_COMPOSITECODE code types. When decoding character set ECIs for M_AZTEC, M_DATAMATRIX, M_MAXICODE,M_MICROPDF417, M_QRCODE, M_PDF417, or M_TRUNCATED_PDF417 code types, encodable ECIs are inserted at the appropriate locations. All back slashes () in the string are doubled (\); while typically unprintable characters, such as Arabic characters, are put in a \xnnnnnn format, where nnnnnn is the hexadecimal value representing the unprintable character. |
M_SIMPLIFIED_CHINESE | Specifies that the returned string uses Simplified Chinese (Windows-936) encoding. |
M_UPCE_COMPRESSED | Specifies that the returned string is in the UPCE compressed string format. Note that this is only available when reading an M_UPC_E code. Otherwise, an error will occur. |
M_UTF8 | Specifies that the returned string is in the UTF-8 string format. |
Result buffer settings dealing with
The following ControlType and corresponding ControlValue parameter settings can be specified when dealing with an McodeDetect operation. In this case, an M_CODE_DETECT_RESULT result buffer must be passed to the CodeId parameter.
M_STOP_DETECT
Stops the current McodeDetect operation being performed on the code result buffer passed to CodeId. This must be called from another thread, typically of higher priority. After making this call, the results returned to the result buffer of the McodeDetect operation are invalid and discarded.
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default behavior. |
This control type is available for M_DATAMATRIX,M_DOTCODE, M_QRCODE, and M_MICROQRCODE code types.
This control type is available for M_AZTEC, M_DATAMATRIX, M_QRCODE, and M_MICROQRCODE code types.
This format is only available when reading the following code types: M_AZTEC, M_PDF417, M_MICROPDF417, M_TRUNCATED_PDF417, M_QRCODE, M_MICROQRCODE, M_DOTCODE, and M_DATAMATRIX.
This control type is only available for 2D code types.
This control type is only available for the M_DATAMATRIX code type.
When entering a value in world units, the number that results from the internal transformation of world units to pixel units must still respect the value's pixel unit constraint. To find the range of allowed values in world units, according to your associated camera calibration, use McalTransformResult.
When M_SEARCH_ANGLE_MODE is enabled, codes are sought at the angular range defined by M_SEARCH_ANGLE - M_SEARCH_ANGLE_DELTA_NEG to M_SEARCH_ANGLE + M_SEARCH_ANGLE_DELTA_POS. When M_SEARCH_ANGLE_MODE is disabled, this setting has no effect.
For the M_AZTEC,M_DATAMATRIX, M_DOTCODE,M_QRCODE, M_MICROQRCODE, M_MAXICODE, M_PDF417, and M_TRUNCATED_PDF417code types, the angular range does not affect the speed of the operation.
Note that the value of this control type can also be set using M_DPM_CALIBRATION_RESULTS.
When the search speed M_SPEED is set to M_VERY_LOW, a more exhaustive search algorithm is enabled that can exceed the specified angle range. In this case, the specified angle range is used as a starting reference for the search instead of as a search restriction.
Note that McodeControl generates an error if you set both a range of cells for which to search (using M_CELL_NUMBER_X_MAX, M_CELL_NUMBER_X_MIN, M_CELL_NUMBER_Y_MAX, and/or M_CELL_NUMBER_Y_MIN) and an explicit number of cells for which to search (using M_CELL_NUMBER_X and/or M_CELL_NUMBER_Y).
This format is not available with Windows Embedded Compact.
Note that this control type can be trained using McodeTrain; activate it for training with the combination constant M_TRAIN or with M_SET_TRAINING_STATE_ALL.