This function is for advanced users of the pattern matching module. It need not be used under most circumstances because the default settings usually provide the best results for search operations. However, if the default values do not satisfy the requirements of your application, this function can be used to set the model's internal search parameters. These internal search parameters are normally derived from the speed and accuracy settings (see MpatSetSpeed() and MpatSetAccuracy()), but this function gives the experienced user precise control over them. To gain a clearer understanding of how the search algorithm works, see Chapter 6: Pattern matching.
Note that if some of the model's search parameters are changed after a call to MpatPreprocModel(), the model must be preprocessed again. To inquire if your model is in a preprocessed state, use the MpatInquire() function with M_PREPROCESSED.
Note that all of the model's internal parameters, except M_COARSE_SEARCH_ACCEPTANCE, are saved and restored with the model, just like the other parameters such as search region, speed, and accuracy.
Specifies the identifier of the model whose search parameter to change, or of the result buffer.
Specifies the search parameter to set.
See the Parameter associations section for possible values that can be specified.
Specifies the value to which to set the specified parameter.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the Parameter and Value parameters.
The values below are for a model identifier.
For a model identifier
|
|||||||||||||||||||||||||||||||||||||||
Parameter |
Description
|
||||||||||||||||||||||||||||||||||||||
Value | |||||||||||||||||||||||||||||||||||||||
M_ALL |
Sets all search parameters automatically from the current speed and accuracy settings. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies all search parameters. |
||||||||||||||||||||||||||||||||||||||
M_ALLOC_OFFSET_X |
Sets the model's allocation X-offset. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the X-offset. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ALLOC_OFFSET_Y |
Sets the model's allocation Y-offset. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the Y-offset. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COARSE_SEARCH_ACCEPTANCE |
Sets the coarse search acceptance threshold level to use for rejecting candidate model peaks at low resolution levels. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to determine the coarse search acceptance threshold level automatically. |
||||||||||||||||||||||||||||||||||||||
1.0 <= Value <= 100.0 |
Specifies the coarse search acceptance threshold level. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EXTRA_CANDIDATES |
Sets the number of extra candidates to consider. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the number of extra candidates. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAST_FIND |
Sets whether to use fast peak finding. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to use preprocessing to decide if fast peak finding is appropriate. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies not to use fast peak finding. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies to use fast peak finding. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FIRST_LEVEL |
Sets the resolution level for the initial stage (lowest resolution) of the search. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_AUTO_SIZE_BASED. |
||||||||||||||||||||||||||||||||||||||
M_AUTO_CONTENT_BASED |
Specifies the first level based on an analysis of the model contents. |
||||||||||||||||||||||||||||||||||||||
M_AUTO_SIZE_BASED |
Specifies the first level based on the model size. |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= MaxLevel |
Specifies the first level, where MaxLevel is the maximum possible level. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LAST_LEVEL |
Sets the resolution level for the final stage (highest resolution) of the search. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the last level automatically. |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= MaxLevel |
Specifies the last level, where MaxLevel is the maximum possible level. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MAX_INITIAL_PEAKS |
Sets the maximum number of returned peaks after an initial search at the first level for occurrences of multiple models or M_CIRCULAR_OVERSCAN type models. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to limit the returned number of peaks for optimal performance. |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies all occurrences that pass the model acceptance threshold should be returned. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MIN_SPACING_X |
Sets the minimum spacing (in X) between two models in order for them to be considered distinct. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Sets the minimum spacing to 75% of the model width (SizeX of MpatAlloc...()). |
||||||||||||||||||||||||||||||||||||||
1.0 <= Value <= 100.0 |
Specifies the minimum spacing. |
||||||||||||||||||||||||||||||||||||||
M_MIN_SPACING_Y |
Sets the minimum spacing (in Y) between two models in order for them to be considered distinct. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Sets the minimum spacing to 75% of the model height (SizeY of MpatAlloc...()). |
||||||||||||||||||||||||||||||||||||||
1.0 <= Value <= 100.0 |
Specifies the minimum spacing. |
||||||||||||||||||||||||||||||||||||||
M_MODEL_STEP |
Sets whether all or every second pixel in the model is used in the correlation during the high resolution stage of the search. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the model step automatically. |
||||||||||||||||||||||||||||||||||||||
1 |
Specifies all model pixels. |
||||||||||||||||||||||||||||||||||||||
2 |
Specifies every second model pixel (in both the X and Y directions). (more details...) |
The values below are for a result buffer identifier.
For a result buffer
identifier
|
|||||||||||||||||||||||||||||||||||||||
Parameter |
Description
|
||||||||||||||||||||||||||||||||||||||
Value | |||||||||||||||||||||||||||||||||||||||
M_RESULT_OUTPUT_UNITS |
Sets whether to return results in pixels or world units. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ACCORDING_TO_CALIBRATION. |
||||||||||||||||||||||||||||||||||||||
M_ACCORDING_TO_CALIBRATION |
Specifies that results are returned in world units if the result was calculated on an image associated with a 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. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAVE_SUMS |
Sets whether to save the values of the sums used to compute the normalized correlation function for each model occurrence. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies that the sums are not saved. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies that the sums are saved. |
||||||||||||||||||||||||||||||||||||||
M_TARGET_CACHING |
Sets whether the pyramidal representation of the buffer is called or kept in the result buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_DISABLE. |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies that the pyramidal representation of the buffer is generated each time MpatFindModel() or MpatFindMultipleModel() is called. |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies that the pyramidal representation of the buffer (generated when MpatFindModel() or MpatFindMultipleModel() is called) is kept in the result buffer. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milpat.lib. |
DLL | Requires mil.dll; milpat.dll. |