ClassesClassesClassesClasses | | | | Operators

find_ncc_modelsT_find_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels (Operator)

Name

find_ncc_modelsT_find_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels — Find the best matches of multiple NCC models.

Signature

find_ncc_models(Image : : ModelIDs, AngleStart, AngleExtent, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels : Row, Column, Angle, Score, Model)

Herror T_find_ncc_models(const Hobject Image, const Htuple ModelIDs, const Htuple AngleStart, const Htuple AngleExtent, const Htuple MinScore, const Htuple NumMatches, const Htuple MaxOverlap, const Htuple SubPixel, const Htuple NumLevels, Htuple* Row, Htuple* Column, Htuple* Angle, Htuple* Score, Htuple* Model)

Herror find_ncc_models(Hobject Image, const HTuple& ModelIDs, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model)

HTuple HImage::FindNccModels(const HTuple& ModelIDs, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

HTuple HImageArray::FindNccModels(const HTuple& ModelIDs, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

HTuple HNCCModel::FindNccModels(const HImageArray& Image, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

void FindNccModels(const HObject& Image, const HTuple& ModelIDs, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model)

static void HNCCModel::FindNccModels(const HImage& Image, const HNCCModelArray& ModelIDs, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model)

void HNCCModel::FindNccModels(const HImage& Image, double AngleStart, double AngleExtent, double MinScore, Hlong NumMatches, double MaxOverlap, const HString& SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

void HNCCModel::FindNccModels(const HImage& Image, double AngleStart, double AngleExtent, double MinScore, Hlong NumMatches, double MaxOverlap, const char* SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

void HImage::FindNccModels(const HNCCModelArray& ModelIDs, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& MaxOverlap, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

void HImage::FindNccModels(const HNCCModel& ModelIDs, double AngleStart, double AngleExtent, double MinScore, Hlong NumMatches, double MaxOverlap, const HString& SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

void HImage::FindNccModels(const HNCCModel& ModelIDs, double AngleStart, double AngleExtent, double MinScore, Hlong NumMatches, double MaxOverlap, const char* SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score, HTuple* Model) const

void HOperatorSetX.FindNccModels(
[in] IHUntypedObjectX* Image, [in] VARIANT ModelIDs, [in] VARIANT AngleStart, [in] VARIANT AngleExtent, [in] VARIANT MinScore, [in] VARIANT NumMatches, [in] VARIANT MaxOverlap, [in] VARIANT SubPixel, [in] VARIANT NumLevels, [out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* Angle, [out] VARIANT* Score, [out] VARIANT* Model)

VARIANT HNCCModelX.FindNccModels(
[in] IHImageX* Image, [in] VARIANT AngleStart, [in] VARIANT AngleExtent, [in] VARIANT MinScore, [in] VARIANT NumMatches, [in] VARIANT MaxOverlap, [in] VARIANT SubPixel, [in] VARIANT NumLevels, [out] VARIANT* Column, [out] VARIANT* Angle, [out] VARIANT* Score, [out] VARIANT* Model)

VARIANT HImageX.FindNccModels(
[in] IHNCCModelX* ModelIDs, [in] VARIANT AngleStart, [in] VARIANT AngleExtent, [in] VARIANT MinScore, [in] VARIANT NumMatches, [in] VARIANT MaxOverlap, [in] VARIANT SubPixel, [in] VARIANT NumLevels, [out] VARIANT* Column, [out] VARIANT* Angle, [out] VARIANT* Score, [out] VARIANT* Model)

static void HOperatorSet.FindNccModels(HObject image, HTuple modelIDs, HTuple angleStart, HTuple angleExtent, HTuple minScore, HTuple numMatches, HTuple maxOverlap, HTuple subPixel, HTuple numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple score, out HTuple model)

static void HNCCModel.FindNccModels(HImage image, HNCCModel[] modelIDs, HTuple angleStart, HTuple angleExtent, HTuple minScore, HTuple numMatches, HTuple maxOverlap, HTuple subPixel, HTuple numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple score, out HTuple model)

void HNCCModel.FindNccModels(HImage image, double angleStart, double angleExtent, double minScore, int numMatches, double maxOverlap, string subPixel, int numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple score, out HTuple model)

void HImage.FindNccModels(HNCCModel[] modelIDs, HTuple angleStart, HTuple angleExtent, HTuple minScore, HTuple numMatches, HTuple maxOverlap, HTuple subPixel, HTuple numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple score, out HTuple model)

void HImage.FindNccModels(HNCCModel modelIDs, double angleStart, double angleExtent, double minScore, int numMatches, double maxOverlap, string subPixel, int numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple score, out HTuple model)

Description

The operator find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels finds the best NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches instances of the NCC models that are passed in the tuple ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs in the input ImageImageImageImageImageimage. The models must have been created previously by calling create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel or read_ncc_modelread_ncc_modelReadNccModelread_ncc_modelReadNccModelReadNccModel. In contrast to find_ncc_modelfind_ncc_modelFindNccModelfind_ncc_modelFindNccModelFindNccModel, multiple models can be searched in the same image in one call.

Characteristics of the parameter semantics

Compared to find_ncc_modelfind_ncc_modelFindNccModelfind_ncc_modelFindNccModelFindNccModel, the semantics of all input parameters have changed to some extent. All input parameters must either contain one element, in which case the parameter is used for all models, or they must contain the same number of elements as ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs, in which case each parameter element refers to the corresponding element in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs. (NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels may also contain either two or twice the number of elements as ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs). More details can be found below in the sections containing information for the respective parameters. Note that a call to find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels with multiple values for ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs, NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches and MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap has the same effect as multiple independent calls to find_ncc_modelfind_ncc_modelFindNccModelfind_ncc_modelFindNccModelFindNccModel with the respective parameters. However, a single call to find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels is considerably more efficient.

Input parameters in detail

The image and its domain:

The domain of the image ImageImageImageImageImageimage determines the search space for the reference point of the model, i.e., for the center of gravity of the domain (region) of the image that was used to create the NCC model with create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel. A different origin set with set_ncc_model_originset_ncc_model_originSetNccModelOriginset_ncc_model_originSetNccModelOriginSetNccModelOrigin is not taken into account. The model has to lie completely within the image. This means that the model will not be found if it extends beyond the borders of the image, even if it would achieve a score greater than MinScoreMinScoreMinScoreMinScoreMinScoreminScore (see below).

The input ImageImageImageImageImageimage can contain a single image object or an image object array containing multiple image objects. If ImageImageImageImageImageimage contains a single image object, its domain is used as the region of interest for all models in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs. If ImageImageImageImageImageimage contains multiple image objects, each domain is used as the region of interest for the corresponding model in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs. In this case, the images have to be identical except for their domains, i.e., ImageImageImageImageImageimage cannot be constructed in an arbitrary manner using concat_objconcat_objConcatObjconcat_objConcatObjConcatObj, but must be created from the same image using add_channelsadd_channelsAddChannelsadd_channelsAddChannelsAddChannels or equivalent calls. If this is not the case, an error message is returned.

AngleStart and AngleExtent:

The parameters AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent determine the range of rotations for which the model is searched. If necessary, the range of rotations is clipped to the range given when the model was created with create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel.

Furthermore, it should be noted that in some cases instances with a rotation that is slightly outside the specified range of rotations are found. This may happen if the specified range of rotations is smaller than the range given when the model was created.

MinScore:

The parameter MinScoreMinScoreMinScoreMinScoreMinScoreminScore determines what score a potential match must at least have to be regarded as an instance of the model in the image. The larger MinScoreMinScoreMinScoreMinScoreMinScoreminScore is chosen, the faster the search is. If the model can be expected never to be occluded in the images, MinScoreMinScoreMinScoreMinScoreMinScoreminScore may be set as high as 0.8 or even 0.9. If the matches are not tracked to the lowest pyramid level (see NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels), it might happen that instances with a score slightly below MinScoreMinScoreMinScoreMinScoreMinScoreminScore are found.

NumMatches:

The maximum number of instances to be found can be determined with NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches. If more than NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches instances with a score greater than MinScoreMinScoreMinScoreMinScoreMinScoreminScore are found in the image, only the best NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches instances are returned. If fewer than NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches are found, only that number is returned, i.e., the parameter MinScoreMinScoreMinScoreMinScoreMinScoreminScore takes precedence over NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches. If all model instances exceeding MinScoreMinScoreMinScoreMinScoreMinScoreminScore in the image should be found, NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches must be set to 0.

If NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches contains one element, find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels returns the best NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches instances of the model irrespective of the type of the model. If, for example, two models are passed in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs and NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches = 2 is selected, it can happen that two instances of the first model and no instances of the second model, one instance of the first model and one instance of the second model, or no instances of the first model and two instances of the second model are returned. If, on the other hand, NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches contains multiple values, the number of instances returned of the different models corresponds to the number specified in the respective entry in NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches. If, for example, NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches = [1,1] is selected, one instance of the first model and one instance of the second model is returned.

MaxOverlap:

If the model exhibits symmetries it may happen that multiple instances with similar positions but different rotations are found in the image. The parameter MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap determines by what fraction (i.e., a number between 0 and 1) two instances may at most overlap in order to consider them as different instances, and hence to be returned separately. If two instances overlap each other by more than MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap, only the best instance is returned. The calculation of the overlap is based on the smallest enclosing rectangle of arbitrary orientation (see smallest_rectangle2smallest_rectangle2SmallestRectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2) of the found instances. If MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap=0, the found instances may not overlap at all, while for MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap=1 all instances are returned.

If a single value is passed in MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap, the overlap is computed for all found instances of the different models, irrespective of the model type, i.e., instances of the same or of different models that overlap too much are eliminated. If, on the other hand, multiple values are passed in MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap, the overlap is only computed for found instances of the model that have the same model type, i.e., only instances of the same model that overlap too much are eliminated. In this mode, models of different types may overlap completely.

SubPixel:

The parameter SubPixelSubPixelSubPixelSubPixelSubPixelsubPixel determines whether the instances should be extracted with subpixel accuracy. If SubPixelSubPixelSubPixelSubPixelSubPixelsubPixel is set to 'false'"false""false""false""false""false" the model's pose is only determined with pixel accuracy and the angle resolution that was specified with create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel. If SubPixelSubPixelSubPixelSubPixelSubPixelsubPixel is set to 'true'"true""true""true""true""true", the position as well as the rotation are determined with subpixel accuracy. In this mode, the model's pose is interpolated from the score function.

NumLevels:

The number of pyramid levels used during the search is determined with NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels. If necessary, the number of levels is clipped to the range given when the NCC model was created with create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel. If NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels is set to 0, the number of pyramid levels specified in create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel is used.

In certain cases, the number of pyramid levels that was determined automatically with, for example, create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel may be too high. The consequence may be that some matches that may have a high final score are rejected on the highest pyramid level and thus are not found. Instead of setting MinScoreMinScoreMinScoreMinScoreMinScoreminScore to a very low value to find all matches, it may be better to query the value of NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels with get_ncc_model_paramsget_ncc_model_paramsGetNccModelParamsget_ncc_model_paramsGetNccModelParamsGetNccModelParams and then use a slightly lower value in find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels. This approach is often better regarding the speed and robustness of the matching.

Optionally, NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels can contain a second value that determines the lowest pyramid level to which the found matches are tracked. Hence, a value of [4,2] for NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels means that the matching starts at the fourth pyramid level and tracks the matches to the second lowest pyramid level (the lowest pyramid level is denoted by a value of 1). This mechanism can be used to decrease the runtime of the matching. It should be noted, however, that in general the accuracy of the extracted pose parameters is lower in this mode than in the normal mode, in which the matches are tracked to the lowest pyramid level. If the lowest pyramid level to use is chosen too large, it may happen that the desired accuracy cannot be achieved, or that wrong instances of the model are found because the model is not specific enough on the higher pyramid levels to facilitate a reliable selection of the correct instance of the model. In this case, the lowest pyramid level to use must be set to a smaller value.

If the lowest pyramid level is specified separately for each model, NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels must contain twice the number of elements as ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs. In this case, the number of pyramid levels and the lowest pyramid level must be specified interleaved in NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels. If, for example, two models are specified in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs, the number of pyramid levels is 5 for the first model and 4 for the second model, and the lowest pyramid level is 2 for the first model and 1 for the second model, NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels = [5,2,4,1] must be selected. If exactly two models are specified in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs, a special case occurs. If in this case the lowest pyramid level is to be specified, the number of pyramid levels and the lowest pyramid level must be specified explicitly for both models, even if they are identical, because specifying two values in NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels is interpreted as the explicit specification of the number of pyramid levels for the two models.

Output parameters in detail

Row, Column and Angle:

The position and rotation of the found instances of the model is returned in RowRowRowRowRowrow, ColumnColumnColumnColumnColumncolumn, and AngleAngleAngleAngleAngleangle. The coordinates RowRowRowRowRowrow and ColumnColumnColumnColumnColumncolumn are the coordinates of the origin of the NCC model in the search image. By default, the origin is the center of gravity of the domain (region) of the image that was used to create the NCC model with create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel. A different origin can be set with set_ncc_model_originset_ncc_model_originSetNccModelOriginset_ncc_model_originSetNccModelOriginSetNccModelOrigin.

Note that the coordinates RowRowRowRowRowrow and ColumnColumnColumnColumnColumncolumn do not exactly correspond to the position of the model in the search image. Thus, you cannot directly use them. Instead, the values are optimized for creating the transformation matrix with which you can use the results of the matching for various tasks, e.g., to align ROIs for other processing steps. The example given for find_ncc_modelfind_ncc_modelFindNccModelfind_ncc_modelFindNccModelFindNccModel shows how to create this matrix and use it to display the model at the found position in the search image and to calculate the exact coordinates.

Note also that for visualizing the model at the found position, also the procedure dev_display_ncc_matching_results can be used.

Score:

Additionally, the score of each found instance is returned in ScoreScoreScoreScoreScorescore.

Model:

The type of the found instances of the models is returned in ModelModelModelModelModelmodel. The elements of ModelModelModelModelModelmodel are indices into the tuple ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs, i.e., they can contain values from 0 to |ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs|-1. Hence, a value of 0 in an element of ModelModelModelModelModelmodel corresponds to an instance of the first model in ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs.

Specifying a timeout

Using the operator set_ncc_model_paramset_ncc_model_paramSetNccModelParamset_ncc_model_paramSetNccModelParamSetNccModelParam you can specify a 'timeout'"timeout""timeout""timeout""timeout""timeout" for find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels. If the NCC models referenced by ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs hold different values for 'timeout'"timeout""timeout""timeout""timeout""timeout", find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels uses the smallest one. If find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels reaches this 'timeout'"timeout""timeout""timeout""timeout""timeout", it terminates without results and returns the error code 9400 (H_ERR_TIMEOUT).

Attention

Note that the internally used memory increases with the number of used threads.

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte* / uint2*) *allowed for compute devices

Input image in which the model should be found.

ModelIDsModelIDsModelIDsModelIDsModelIDsmodelIDs (input_control)  ncc_model(-array) HNCCModel, HTupleHTupleHNCCModel, HTupleHNCCModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the models.

AngleStartAngleStartAngleStartAngleStartAngleStartangleStart (input_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Smallest rotation of the models.

Default value: -0.39

Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0

AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent (input_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Extent of the rotation angles.

Default value: 0.79

Suggested values: 6.29, 3.14, 1.57, 0.79, 0.39, 0.0

Restriction: AngleExtent >= 0

MinScoreMinScoreMinScoreMinScoreMinScoreminScore (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Minimum score of the instances of the models to be found.

Default value: 0.8

Suggested values: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Typical range of values: 0 ≤ MinScore MinScore MinScore MinScore MinScore minScore ≤ 1

Minimum increment: 0.01

Recommended increment: 0.05

NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches (input_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of instances of the models to be found (or 0 for all matches).

Default value: 1

Suggested values: 0, 1, 2, 3, 4, 5, 10, 20

MaxOverlapMaxOverlapMaxOverlapMaxOverlapMaxOverlapmaxOverlap (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Maximum overlap of the instances of the models to be found.

Default value: 0.5

Suggested values: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Typical range of values: 0 ≤ MaxOverlap MaxOverlap MaxOverlap MaxOverlap MaxOverlap maxOverlap ≤ 1

Minimum increment: 0.01

Recommended increment: 0.05

SubPixelSubPixelSubPixelSubPixelSubPixelsubPixel (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Subpixel accuracy if not equal to 'none'"none""none""none""none""none".

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels (input_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of pyramid levels used in the matching (and lowest pyramid level to use if |NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels| = 2).

Default value: 0

List of values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

RowRowRowRowRowrow (output_control)  point.y-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Row coordinate of the found instances of the models.

ColumnColumnColumnColumnColumncolumn (output_control)  point.x-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Column coordinate of the found instances of the models.

AngleAngleAngleAngleAngleangle (output_control)  angle.rad-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Rotation angle of the found instances of the models.

ScoreScoreScoreScoreScorescore (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Score of the found instances of the models.

ModelModelModelModelModelmodel (output_control)  integer-array HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Index of the found instances of the models.

Example (HDevelop)

read_image (Image, 'pcb_focus/pcb_focus_telecentric_061')
gen_rectangle1 (ROI_0, 236, 241, 313, 321)
gen_circle (ROI_1, 281, 653, 41)
reduce_domain (Image, ROI_0, ImageReduced1)
reduce_domain (Image, ROI_1, ImageReduced2)
create_ncc_model (ImageReduced1, 'auto', rad(-45), rad(90), 'auto', \
                  'use_polarity', ModelID1)
create_ncc_model (ImageReduced2, 'auto', rad(-45), rad(90), 'auto', \
                  'use_polarity', ModelID2)
ModelIDs:=[ModelID1, ModelID2]
find_ncc_models (Image, ModelIDs, rad(-45), rad(90), 0.7, [1,1], 0.5, \
                 'true', 0, Row, Column, Angle, Score, Model)
dev_display_ncc_matching_results (ModelIDs, 'red', Row, Column, \
                  Angle, Model)

Result

If the parameter values are correct, the operator find_ncc_modelsfind_ncc_modelsFindNccModelsfind_ncc_modelsFindNccModelsFindNccModels returns the value 2 (H_MSG_TRUE). If the input is empty (no input images are available) the behavior can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel, read_ncc_modelread_ncc_modelReadNccModelread_ncc_modelReadNccModelReadNccModel, set_ncc_model_originset_ncc_model_originSetNccModelOriginset_ncc_model_originSetNccModelOriginSetNccModelOrigin

Possible Successors

clear_ncc_modelclear_ncc_modelClearNccModelclear_ncc_modelClearNccModelClearNccModel

Alternatives

find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel, find_scaled_shape_modelfind_scaled_shape_modelFindScaledShapeModelfind_scaled_shape_modelFindScaledShapeModelFindScaledShapeModel, find_aniso_shape_modelfind_aniso_shape_modelFindAnisoShapeModelfind_aniso_shape_modelFindAnisoShapeModelFindAnisoShapeModel, find_shape_modelsfind_shape_modelsFindShapeModelsfind_shape_modelsFindShapeModelsFindShapeModels, find_scaled_shape_modelsfind_scaled_shape_modelsFindScaledShapeModelsfind_scaled_shape_modelsFindScaledShapeModelsFindScaledShapeModels, find_aniso_shape_modelsfind_aniso_shape_modelsFindAnisoShapeModelsfind_aniso_shape_modelsFindAnisoShapeModelsFindAnisoShapeModels

Module

Matching


ClassesClassesClassesClasses | | | | Operators