| MIL 10 Reference
| Customize Help
| Save Settings

MpatSetAngle



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

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Set the angular search parameters of a model.
Syntax
void MpatSetAngle(
MIL_ID ModelId, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function sets the specified model's angular search parameters. Also, whenever the angular search parameters of a model change, the effect of any preprocessing of the model is undone. Therefore, if the search angle is changed, call MpatPreprocModel() before searching for the model.

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

Specifies the identifier of the model for which to change the angular search parameter. This can be any type of model except a model created using MpatAllocRotatedModel().

ControlType

Specifies the type of control to set.

By default, the ControlType M_SEARCH_ANGLE_MODE is disabled and the search is done at 0° (no rotation). When enabled, the model is searched at angle, respecting all search control parameters.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the value to which to set the control.

See the Parameter associations section for possible values that can be specified.

The tables below list possible values for the ControlType and ControlValue parameters.

The values below determine the range of angles to cover in the search operation; that is, (M_SEARCH_ANGLE - M_SEARCH_ANGLE_DELTA_NEG) to (M_SEARCH_ANGLE + M_SEARCH_ANGLE_DELTA_POS) inclusively, starting at an angle close to M_SEARCH_ANGLE.

function map For specifying the range of angles to cover in the search
CollapseControlType Description
ControlValue
Collapse M_SEARCH_ANGLE

Sets the starting angle value for the search. If using a region of interest (ROI) in MpatFindModel() and MpatFindMultipleModel(), this value must be set to 0.0, even if the ROI is at an angle. There will be an increase in processing time if the ROI is at an angle. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 0.0.

Collapse 0.0 <= Value <= 360.0

Specifies the angle, in degrees.

Collapse M_SEARCH_ANGLE_DELTA_NEG

Sets the maximum negative delta for the search. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value. The default value is 180.0 when the model is of type M_CIRCULAR_OVERSCAN, and 0.0 otherwise.

(summarize)
Collapse 0.0 <= Value <= 180.0

Specifies the angle, in degrees.

Collapse M_SEARCH_ANGLE_DELTA_POS

Sets the maximum positive delta for the search. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value. The default value is 180.0 when the model is of type M_CIRCULAR_OVERSCAN, and 0.0 otherwise.

(summarize)
Collapse 0.0 <= Value <= 180.0

Specifies the angle, in degrees.

Collapse M_SEARCH_ANGLE_MODE

Sets whether an angular search is performed during the search.

Angular searches are not supported when using MpatFindMultipleModel() with M_FIND_BEST_MODELS. INQ

(summarize)
Collapse M_DISABLE

Specifies to disable the angular search mode.

This is the default value.

(summarize)
Collapse M_ENABLE

Specifies to enable the angular search mode.

The values below handle the accuracy, the type of interpolation, and the tolerance of the search.

function map For specifying the accuracy, interpolation, and the tolerance of the search
CollapseControlType Description
ControlValue
Collapse M_ROTATED_MODEL_MINIMUM_SCORE

Sets whether to use angle refinement mode, and sets the score to use for this mode. During preprocessing, the angle refinement mode defines the full range of degrees within which a rotated version of the model can be rotated from the model at a specific angle and still match the angle refinement score. The higher the angle refinement score is set, the smaller the angle refinement step will be.

The lowest value between the determined angle refinement step and the specified angle accuracy (set using M_SEARCH_ANGLE_ACCURACY) is the angle refinement step used when searching for the pattern in the target image. INQ

(summarize)
Collapse M_DEFAULT

Same as M_DISABLE.

Collapse M_DISABLE

Specifies to disable the angle refinement mode.

Collapse 0.0 <= Value <= 100.0

Specifies the minimum score.

Collapse M_SEARCH_ANGLE_ACCURACY

Sets the required precision of the resulting angle. The precision defines an angle range in which to fine-tune the search after the approximate location of a model is found. To be effective, you must set the degree of accuracy to a value smaller than that of the rotation tolerance (M_SEARCH_ANGLE_TOLERANCE). This angular range is further restricted by M_ROTATED_MODEL_MINIMUM_SCORE. INQ

(summarize)
Collapse M_DEFAULT

Same as M_DISABLE.

Collapse M_DISABLE

Specifies that the angular accuracy equals the tolerance.

Collapse 0.1 <= Value <= 180.0

Specifies the angle accuracy, in degrees.

Collapse M_SEARCH_ANGLE_INTERPOLATION_MODE

Sets the type of interpolation to use. INQ

(summarize)
Collapse M_DEFAULT

Same as M_NEAREST_NEIGHBOR.

Collapse M_BICUBIC

Specifies that bicubic interpolation is used when rotating the model.

Collapse M_BILINEAR

Specifies that bilinear interpolation is used when rotating the model.

Collapse M_NEAREST_NEIGHBOR

Specifies that nearest neighbor interpolation is used when rotating the model.

Collapse M_SEARCH_ANGLE_TOLERANCE

Sets the full range of degrees within which the pattern in the target image can be rotated from a model at a specific angle and still meet the acceptance level. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 5.0.

Collapse M_AUTO

Specifies that the tolerance will be automatically determined based on an analysis of the model.

Collapse 0.1 <= Value <= 180.0

Specifies that the given angle is the range of degrees within which the pattern in the target image can be rotated from a model at a specific angle and still meet the acceptance level. For example, if a model can tolerate the target image being offset from its search angle by ±2.5°, specify 5°. The specified tolerance determines the step angle. Note that very small tolerance values should only be used within small angular ranges, otherwise application performance can be adversely affected.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; milpat.lib.
DLL Requires mil.dll; milpat.dll.
SEARCH ANGLE DEFAULT SEARCH ANGLE DELTA NEG DEFAULT SEARCH ANGLE DELTA POS DEFAULT SEARCH ANGLE MODE DISABLE ENABLE ROTATED MODEL MINIMUM SCORE DEFAULT DISABLE SEARCH ANGLE ACCURACY DEFAULT DISABLE SEARCH ANGLE INTERPOLATION MODE DEFAULT BICUBIC BILINEAR NEAREST NEIGHBOR SEARCH ANGLE TOLERANCE DEFAULT AUTO