MpatInquire()函数

Synopsis

Inquire about the pattern matching model.

Format

void MpatInquire(PatId, ParamToInquire, UserVarPtr)

MIL_ID PatId; Pattern matching buffer identifier
long InquireType; Parameter to inquire
void *UserVarPtr; Storage location for inquired information

Description

This function returns information about the specified model or result buffer. It is useful to determine, for example, the size of a model that has been restored from disk and its position in the original model source image.

The PatId parameter specifies the identifier of the model or result buffer for which to read the information.

The InquireType parameter specifies the parameter about which to inquire. For a model identifier, this parameter can be set to one of the following values:

InquireType Description
M_ORIGINAL_X X-offset of the model center in relation to the top-left corner of the original source model image (takes into account the MpatSetCenter setting).
M_ORIGINAL_Y Y-offset of the model center in relation to the top-left corner of the original source model image (takes into account the MpatSetCenter setting).
M_ALLOC_OFFSET_X X-offset of model’s top-left corner in relation to top-left corner of source model image (given during model allocation).
M_ALLOC_OFFSET_Y Y-offset of model’s top-left corner in relation to top-left corner of source model image (given during model allocation)
M_ALLOC_SIZE_X Model width (given during model allocation).
M_ALLOC_SIZE_Y Model height (given during model allocation).
M_ALLOC_TYPE Model type (given during model allocation).
M_POSITION_START_X X-coordinate of search region origin within target image (set by MpatSetPosition).
M_POSITION_START_Y Y-coordinate of search region origin within target image (set by MpatSetPosition).
M_POSITION_UNCERTAINTY_X Search region width (set by MpatSetPosition).
M_POSITION_UNCERTAINTY_Y Search region height (set by MpatSetPosition).
M_POSITION_ACCURACY Search position accuracy (set by MpatSetAccuracy).
M_NUMBER_OF_OCCURRENCES Number of model occurrences to search in target image (set by MpatSetNumber).
M_SPEED_FACTOR Model search speed (set by MpatSetSpeed).
M_ACCEPTANCE_THRESHOLD Minimum acceptable match score to be considered as an occurrence of the model (set by MpatSetAcceptance).
M_CERTAINTY_THRESHOLD Match score at which an occurrence is assumed, without looking for better matches elsewhere in the image (set by MpatSetCertainty).
M_CENTER_X X-offset of model center in relation to top-left corner of model (set by MpatSetCenter).
M_CENTER_Y Y-offset of model center in relation to top-left corner of model (set by MpatSetCenter).
M_PREPROCESSED Whether or not the model has been preprocessed (0 = no)
M_SEARCH_ANGLE_MODE State of angular search mode (set by MpatSetAngle).
M_SEARCH_ANGLE The value of the search angle (set by MpatSetAngle).
M_SEARCH_ANGLE_DELTA_MIN Value of the minimum search angle (set by MpatSetAngle).
M_SEARCH_ANGLE_DELTA_MAX Value of the maximum search angle (set by MpatSetAngle).
M_SEARCH_ANGLE_TOLERANCE Search tolerance (accepted angle) (set by MpatSetAngle).
M_SEARCH_ANGLE_ACCURACY Required angle accuracy (set by MpatSetAngle).
M_SEARCH_ANGLE_INTERPOLATION_MODE The interpolation mode.
M_NUMBER_OF_ENTRIES Number of matches to find
(set by MpatSetNumber).
M_FIRST_LEVEL The resolution level for the initial stage of the search (set by MpatSetSearchParameter).
M_LAST_LEVEL The resolution level for the final stage of the search (set by MpatSetSearchParameter).
M_MODEL_STEP Whether all or every second model pixel is used in the high-resolution stage of the search (set by MpatSetSearchParameter).
M_FAST_FIND Whether forcing or preventing fast peak finding (set by MpatSetSearchParameter).
M_MIN_SPACING_X The minimum spacing (in X) between two models in order to be considered distinct (set by MpatSetSearchParameter).
M_MIN_SPACING_Y The minimum spacing (in Y) between two models in order to be considered distinct (set by MpatSetSearchParameter).
M_OWNER_SYSTEM The system on which the model or result buffer is allocated.

If you search for the model, using MpatFindModel or MpatFindMultipleModel, in the original image (the image from which the model was defined) you get the model’s original position (M_ORIGINAL_X, M_ORIGINAL_Y). This position can be directly compared with search results obtained using other images, to calculate the displacement of these images in relation to the original image.

For a result identifier, this parameter can be set to the following value:

M_NUMBER_OF_ENTRIES The number of entries allocated in the result buffer.

Results are returned in the user variable as type “double”. If you want results to be returned as type “long”, combine the specified result type with M_TYPE_LONG (for example, M_ORIGINAL_X+M_TYPE_LONG).

The UserVarPtr parameter specifies the address of the variable in which the requested information is to be written.

《MpatInquire()函数》上有1条评论

评论已关闭。