Skip to content

determine_ncc_model_paramsDetermineNccModelParamsDetermineNccModelParamsdetermine_ncc_model_paramsT_determine_ncc_model_params🔗

Short description🔗

determine_ncc_model_paramsDetermineNccModelParamsDetermineNccModelParamsdetermine_ncc_model_paramsT_determine_ncc_model_params — Determine the parameters of an NCC model.

Signature🔗

determine_ncc_model_params( image Template, integer NumLevels, angle.rad AngleStart, angle.rad AngleExtent, string Metric, string Parameters, out string ParameterName, out number ParameterValue )void DetermineNccModelParams( const HObject& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& Metric, const HTuple& Parameters, HTuple* ParameterName, HTuple* ParameterValue )static void HOperatorSet.DetermineNccModelParams( HObject template, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple metric, HTuple parameters, out HTuple parameterName, out HTuple parameterValue )def determine_ncc_model_params( template: HObject, num_levels: Union[int, str], angle_start: float, angle_extent: float, metric: str, parameters: MaybeSequence[str] ) -> Tuple[Sequence[str], Sequence[Union[int, float]]]

Herror T_determine_ncc_model_params( const Hobject Template, const Htuple NumLevels, const Htuple AngleStart, const Htuple AngleExtent, const Htuple Metric, const Htuple Parameters, Htuple* ParameterName, Htuple* ParameterValue )

static HTuple HNCCModel::DetermineNccModelParams( const HImage& Template, const HTuple& NumLevels, double AngleStart, double AngleExtent, const HString& Metric, const HTuple& Parameters, HTuple* ParameterValue )

static HTuple HNCCModel::DetermineNccModelParams( const HImage& Template, Hlong NumLevels, double AngleStart, double AngleExtent, const HString& Metric, const HString& Parameters, HTuple* ParameterValue )

static HTuple HNCCModel::DetermineNccModelParams( const HImage& Template, Hlong NumLevels, double AngleStart, double AngleExtent, const char* Metric, const char* Parameters, HTuple* ParameterValue )

static HTuple HNCCModel::DetermineNccModelParams( const HImage& Template, Hlong NumLevels, double AngleStart, double AngleExtent, const wchar_t* Metric, const wchar_t* Parameters, HTuple* ParameterValue ) (Windows only)

static HTuple HNCCModel.DetermineNccModelParams( HImage template, HTuple numLevels, double angleStart, double angleExtent, string metric, HTuple parameters, out HTuple parameterValue )

static HTuple HNCCModel.DetermineNccModelParams( HImage template, int numLevels, double angleStart, double angleExtent, string metric, string parameters, out HTuple parameterValue )

Description🔗

determine_ncc_model_paramsDetermineNccModelParams determines certain parameters of an NCC model automatically from the model image Templatetemplatetemplate. The parameters to be determined can be specified with Parametersparametersparameters. determine_ncc_model_paramsDetermineNccModelParams can be used to determine the same parameters that are determined automatically when the respective parameter in create_ncc_modelCreateNccModel is set to 'auto'"auto": the number of pyramid levels (Parametersparametersparameters \(=\) 'num_levels'"num_levels") and/or the angle step length (Parametersparametersparameters \(=\) 'angle_step'"angle_step"). By passing a tuple of the above values in Parametersparametersparameters, an arbitrary combination of these parameters can be determined. If all of the above parameters should be determined, the value 'all'"all" can be passed.

determine_ncc_model_paramsDetermineNccModelParams is mainly useful to determine the above parameters before creating the model, e.g., in an interactive system, which makes suggestions for these parameters to the user, but enables the user to modify the suggested values.

The automatically determined parameters are returned as a name-value pair in ParameterNameparameterNameparameter_name and ParameterValueparameterValueparameter_value. The parameter names in ParameterNameparameterNameparameter_name are identical to the names in Parametersparametersparameters, where, of course, the value 'all'"all" is replaced by the actual parameter names.

The input parameters (NumLevelsnumLevelsnum_levels, AngleStartangleStartangle_start, AngleExtentangleExtentangle_extent, and Metricmetricmetric) have the same meaning as in create_ncc_modelCreateNccModel. The description of these parameters can be looked up with this operator. These parameters are used by determine_ncc_model_paramsDetermineNccModelParams to calculate the parameters to be determined in the same manner as in create_ncc_modelCreateNccModel.

Note that in determine_ncc_model_paramsDetermineNccModelParams the input parameter NumLevelsnumLevelsnum_levels can also be determined automatically. If this parameter should not be determined automatically, i.e., the name is not passed in Parametersparametersparameters, the parameter must contain a valid value and must not be set to 'auto'"auto". In contrast, if the maximum number of pyramid levels is to be determined automatically, i.e., Parametersparametersparameters contains the value 'num_levels'"num_levels", you can let HALCON determine a suitable value and at the same time specify an upper boundary:

If the maximum number of pyramid levels should be specified in advance, the input parameter NumLevelsnumLevelsnum_levels can be set to the particular value. If in this case Parametersparametersparameters contains the value 'num_levels'"num_levels", the computed number of pyramid levels is at most NumLevelsnumLevelsnum_levels. If NumLevelsnumLevelsnum_levels is set to 'auto'"auto" or 00, the number of pyramid levels is determined without restrictions as large as possible.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Templatetemplatetemplate (input_object) singlechannelimage → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Input image whose domain will be used to create the model.

NumLevelsnumLevelsnum_levels (input_control) integer → (integer / string)HTuple (Hlong / HString)HTuple (int / long / string)Union[int, str]Htuple (Hlong / char*)

Maximum number of pyramid levels.

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

AngleStartangleStartangle_start (input_control) angle.rad → (real)HTuple (double)HTuple (double)floatHtuple (double)

Smallest rotation of the model.

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

AngleExtentangleExtentangle_extent (input_control) angle.rad → (real)HTuple (double)HTuple (double)floatHtuple (double)

Extent of the rotation angles.

Default: 0.790.79
Suggested values: 6.29, 3.14, 1.57, 0.79, 0.396.29, 3.14, 1.57, 0.79, 0.39
Restriction: AngleExtent >= 0

Metricmetricmetric (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Match metric.

Default: 'use_polarity'"use_polarity"
List of values: 'ignore_global_polarity', 'use_polarity'"ignore_global_polarity", "use_polarity"

Parametersparametersparameters (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Parameters to be determined automatically.

Default: 'all'"all"
List of values: 'all', 'angle_step', 'num_levels'"all", "angle_step", "num_levels"

ParameterNameparameterNameparameter_name (output_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Name of the automatically determined parameter.

ParameterValueparameterValueparameter_value (output_control) number-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

Value of the automatically determined parameter.

Result🔗

If the parameters are valid, the operator determine_ncc_model_paramsDetermineNccModelParams returns the value 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

Possible successors

create_ncc_modelCreateNccModel

See also

find_ncc_modelFindNccModel

Module🔗

Matching