Name
determine_deformable_model_paramsT_determine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParams — Determine the parameters of a deformable model.
determine_deformable_model_params(Template : : NumLevels, AngleStart, AngleExtent, ScaleMin, ScaleMax, Optimization, Metric, Contrast, MinContrast, GenParamName, GenParamValue, Parameters : ParameterName, ParameterValue)
Herror T_determine_deformable_model_params(const Hobject Template, const Htuple NumLevels, const Htuple AngleStart, const Htuple AngleExtent, const Htuple ScaleMin, const Htuple ScaleMax, const Htuple Optimization, const Htuple Metric, const Htuple Contrast, const Htuple MinContrast, const Htuple GenParamName, const Htuple GenParamValue, const Htuple Parameters, Htuple* ParameterName, Htuple* ParameterValue)
void DetermineDeformableModelParams(const HObject& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& ScaleMin, const HTuple& ScaleMax, const HTuple& Optimization, const HTuple& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Parameters, HTuple* ParameterName, HTuple* ParameterValue)
HTuple HImage::DetermineDeformableModelParams(const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& ScaleMin, const HTuple& ScaleMax, const HString& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Parameters, HTuple* ParameterValue) const
HTuple HImage::DetermineDeformableModelParams(Hlong NumLevels, double AngleStart, double AngleExtent, double ScaleMin, double ScaleMax, const HString& Optimization, const HString& Metric, Hlong Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, const HString& Parameters, HTuple* ParameterValue) const
HTuple HImage::DetermineDeformableModelParams(Hlong NumLevels, double AngleStart, double AngleExtent, double ScaleMin, double ScaleMax, const char* Optimization, const char* Metric, Hlong Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, const char* Parameters, HTuple* ParameterValue) const
static void HOperatorSet.DetermineDeformableModelParams(HObject template, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple scaleMin, HTuple scaleMax, HTuple optimization, HTuple metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue, HTuple parameters, out HTuple parameterName, out HTuple parameterValue)
HTuple HImage.DetermineDeformableModelParams(HTuple numLevels, double angleStart, double angleExtent, HTuple scaleMin, HTuple scaleMax, string optimization, string metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue, HTuple parameters, out HTuple parameterValue)
HTuple HImage.DetermineDeformableModelParams(int numLevels, double angleStart, double angleExtent, double scaleMin, double scaleMax, string optimization, string metric, int contrast, int minContrast, HTuple genParamName, HTuple genParamValue, string parameters, out HTuple parameterValue)
determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams determines certain parameters
of a deformable model automatically from the model image
TemplateTemplateTemplateTemplatetemplate. The parameters to be determined can be specified
with ParametersParametersParametersParametersparameters. determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams can
be used to determine the same parameters that are determined
automatically when the respective parameter in
create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel is set to 'auto'"auto""auto""auto""auto":
the number of pyramid levels (ParametersParametersParametersParametersparameters =
'num_levels'"num_levels""num_levels""num_levels""num_levels"), the angle step length (ParametersParametersParametersParametersparameters
= 'angle_step'"angle_step""angle_step""angle_step""angle_step"), the scale step length
(ParametersParametersParametersParametersparameters = 'scale_step'"scale_step""scale_step""scale_step""scale_step" for isotropic scaling
and 'scale_r_step'"scale_r_step""scale_r_step""scale_r_step""scale_r_step" and/or 'scale_c_step'"scale_c_step""scale_c_step""scale_c_step""scale_c_step" for
anisotropic scaling), the kind of optimization (ParametersParametersParametersParametersparameters
= 'optimization'"optimization""optimization""optimization""optimization"), the threshold (ParametersParametersParametersParametersparameters =
'contrast'"contrast""contrast""contrast""contrast") or the hysteresis thresholds
(ParametersParametersParametersParametersparameters = 'contrast_hyst'"contrast_hyst""contrast_hyst""contrast_hyst""contrast_hyst") for the contrast,
the minimum size of the object parts (ParametersParametersParametersParametersparameters =
'min_size'"min_size""min_size""min_size""min_size"), and the minimum contrast (ParametersParametersParametersParametersparameters
= 'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast"). By passing a tuple of the above
values in ParametersParametersParametersParametersparameters, an arbitrary combination of these
parameters can be determined. If all of the above parameters should
be determined, the value 'all'"all""all""all""all" can be passed. In this case
both hysteresis thresholds are determined, i.e., the operator
behaves like passing 'contrast_hyst'"contrast_hyst""contrast_hyst""contrast_hyst""contrast_hyst" instead of
'contrast'"contrast""contrast""contrast""contrast".
determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams 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 ParameterNameParameterNameParameterNameParameterNameparameterName and ParameterValueParameterValueParameterValueParameterValueparameterValue. The
parameter names in ParameterNameParameterNameParameterNameParameterNameparameterName are identical to the names
in ParametersParametersParametersParametersparameters, where, of course, the value 'all'"all""all""all""all"
is replaced by the actual parameter names. An exception is the
parameter 'contrast_hyst'"contrast_hyst""contrast_hyst""contrast_hyst""contrast_hyst", for which the two values
'contrast_low'"contrast_low""contrast_low""contrast_low""contrast_low" and 'contrast_high'"contrast_high""contrast_high""contrast_high""contrast_high" are returned.
The remaining parameters (NumLevelsNumLevelsNumLevelsNumLevelsnumLevels, AngleStartAngleStartAngleStartAngleStartangleStart,
AngleExtentAngleExtentAngleExtentAngleExtentangleExtent, ScaleMinScaleMinScaleMinScaleMinscaleMin, ScaleMaxScaleMaxScaleMaxScaleMaxscaleMax,
OptimizationOptimizationOptimizationOptimizationoptimization, MetricMetricMetricMetricmetric, ContrastContrastContrastContrastcontrast, and
MinContrastMinContrastMinContrastMinContrastminContrast) have the same meaning as in
create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel and
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModel. The description of these
parameters can be looked up with these operators. These parameters
are used by determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams to calculate the
parameters to be determined in the same manner as in
create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel. It should be noted that if
the parameters of a deformable model with isotropic scaling should be
determined, i.e., if ParametersParametersParametersParametersparameters contains
'scale_step'"scale_step""scale_step""scale_step""scale_step" either explicitly or implicitly via
'all'"all""all""all""all", the parameters ScaleMinScaleMinScaleMinScaleMinscaleMin and
ScaleMaxScaleMaxScaleMaxScaleMaxscaleMax must contain one value each. If the parameters of
a deformable model with anisotropic scaling should be determined, i.e.,
if ParametersParametersParametersParametersparameters contains 'scale_r_step'"scale_r_step""scale_r_step""scale_r_step""scale_r_step" or
'scale_c_step'"scale_c_step""scale_c_step""scale_c_step""scale_c_step" either explicitly or implicitly, the
parameters ScaleMinScaleMinScaleMinScaleMinscaleMin and ScaleMaxScaleMaxScaleMaxScaleMaxscaleMax must contain two
values each. In this case, the first value of the respective
parameter refers to the scaling in row direction, while the
second value refers to scaling in the column direction.
Note that in determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams some parameters
appear that can also be determined automatically
(NumLevelsNumLevelsNumLevelsNumLevelsnumLevels, OptimizationOptimizationOptimizationOptimizationoptimization, ContrastContrastContrastContrastcontrast,
MinContrastMinContrastMinContrastMinContrastminContrast). If these parameters should not be determined
automatically, i.e., their name is not passed in
ParameterNameParameterNameParameterNameParameterNameparameterName, the corresponding parameters must contain
valid values and must not be set to 'auto'"auto""auto""auto""auto". In contrast, if
these parameters are to be determined automatically, their values
are treated in the following way: If the optimization or the
(hysteresis) contrast is to be determined automatically, i.e.,
ParameterNameParameterNameParameterNameParameterNameparameterName contains the value 'optimization'"optimization""optimization""optimization""optimization" or
'contrast'"contrast""contrast""contrast""contrast" ('contrast_hyst'"contrast_hyst""contrast_hyst""contrast_hyst""contrast_hyst"), the values passed in
OptimizationOptimizationOptimizationOptimizationoptimization and ContrastContrastContrastContrastcontrast are ignored. In
contrast, if the maximum number of pyramid levels or the minimum
contrast is to be determined automatically, i.e.,
ParameterNameParameterNameParameterNameParameterNameparameterName contains the value 'num_levels'"num_levels""num_levels""num_levels""num_levels" or
'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast", you can let HALCON determine suitable
values and at the same time specify an upper or lower boundary,
respectively:
If the maximum number of pyramid levels should be specified in
advance, NumLevelsNumLevelsNumLevelsNumLevelsnumLevels can be set to the particular value. If
in this case ParametersParametersParametersParametersparameters contains the value
'num_levels'"num_levels""num_levels""num_levels""num_levels", the computed number of pyramid levels is at
most NumLevelsNumLevelsNumLevelsNumLevelsnumLevels. If NumLevelsNumLevelsNumLevelsNumLevelsnumLevels is set to
'auto'"auto""auto""auto""auto" (or 0 for backwards compatibility), the
number of pyramid levels is determined without restrictions as large
as possible.
If the minimum contrast should be specified in advance,
MinContrastMinContrastMinContrastMinContrastminContrast can be set to the particular value. If in this
case ParametersParametersParametersParametersparameters contains the value 'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast",
the computed minimum contrast is at least MinContrastMinContrastMinContrastMinContrastminContrast. If
MinContrastMinContrastMinContrastMinContrastminContrast is set to 'auto'"auto""auto""auto""auto", the minimum contrast
is determined without restrictions.
If the user wishes to create a calibrated, deformable model
with create_planar_calib_deformable_modelcreate_planar_calib_deformable_modelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModel, the internal camera
parameters are needed for the correct estimation of the parameters in
ParameterValueParameterValueParameterValueParameterValueparameterValue. The camera parameters can be provided by setting
GenParamNameGenParamNameGenParamNameGenParamNamegenParamName to 'cam_param'"cam_param""cam_param""cam_param""cam_param" and providing the tuple containing
the camera parameters in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Input image whose domain will be used to create
the model.
Maximum number of pyramid levels.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
List of values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 'auto'"auto""auto""auto""auto"
Smallest rotation of the model.
Default value: -0.39
Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0
Extent of the rotation angles.
Default value: 0.79
Suggested values: 6.28, 3.14, 1.57, 0.79, 0.39
Restriction: AngleExtent >= 0
Minimum scale of the model.
Default value: 0.9
Suggested values: 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Restriction: ScaleMin > 0
Maximum scale of the model.
Default value: 1.1
Suggested values: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5
Restriction: ScaleMax >= ScaleMin
Kind of optimization.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
List of values: 'auto'"auto""auto""auto""auto", 'none'"none""none""none""none", 'point_reduction_high'"point_reduction_high""point_reduction_high""point_reduction_high""point_reduction_high", 'point_reduction_low'"point_reduction_low""point_reduction_low""point_reduction_low""point_reduction_low", 'point_reduction_medium'"point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium"
Match metric.
Default value:
'use_polarity'
"use_polarity"
"use_polarity"
"use_polarity"
"use_polarity"
List of values: 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity", 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity", 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity", 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity"
Threshold or hysteresis thresholds for the contrast
of the object in the template image and optionally
minimum size of the object parts.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto", 'auto_contrast'"auto_contrast""auto_contrast""auto_contrast""auto_contrast", 'auto_contrast_hyst'"auto_contrast_hyst""auto_contrast_hyst""auto_contrast_hyst""auto_contrast_hyst", 'auto_min_size'"auto_min_size""auto_min_size""auto_min_size""auto_min_size", 10, 20, 30, 40, 60, 80, 100, 120, 140, 160
Minimum contrast of the objects in the search images.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
Suggested values: 'auto'"auto""auto""auto""auto", 1, 2, 3, 5, 7, 10, 20, 30, 40
Restriction: MinContrast < Contrast
The general parameter names.
Default value: []
List of values: 'cam_param'"cam_param""cam_param""cam_param""cam_param"
Values of the general parameter.
Default value: []
List of values: []
Parameters to be determined automatically.
Default value:
'all'
"all"
"all"
"all"
"all"
List of values: 'all'"all""all""all""all", 'angle_step'"angle_step""angle_step""angle_step""angle_step", 'contrast'"contrast""contrast""contrast""contrast", 'contrast_hyst'"contrast_hyst""contrast_hyst""contrast_hyst""contrast_hyst", 'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast", 'min_size'"min_size""min_size""min_size""min_size", 'num_levels'"num_levels""num_levels""num_levels""num_levels", 'optimization'"optimization""optimization""optimization""optimization", 'scale_c_step'"scale_c_step""scale_c_step""scale_c_step""scale_c_step", 'scale_r_step'"scale_r_step""scale_r_step""scale_r_step""scale_r_step", 'scale_step'"scale_step""scale_step""scale_step""scale_step"
Name of the automatically determined parameter.
Value of the automatically determined parameter.
If the parameters are valid, the operator
determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams returns the value 2 (H_MSG_TRUE). If
necessary an exception is raised. If the parameters
NumLevelsNumLevelsNumLevelsNumLevelsnumLevels and ContrastContrastContrastContrastcontrast are chosen such that the
model contains too few points, or the input image does not contain a
sufficient number of significant features, the error message 8510 is
raised.
create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel,
create_planar_calib_deformable_modelcreate_planar_calib_deformable_modelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModel,
create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModelCreateLocalDeformableModel
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModel,
find_planar_calib_deformable_modelfind_planar_calib_deformable_modelFindPlanarCalibDeformableModelFindPlanarCalibDeformableModelFindPlanarCalibDeformableModel
Matching