Skip to content

inspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponentsinspect_clustered_componentsT_inspect_clustered_components🔗

Short description🔗

inspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponentsinspect_clustered_componentsT_inspect_clustered_components — Inspect the rigid model components obtained from the training.

Warning🔗

inspect_clustered_componentsInspectClusteredComponents is obsolete and is only provided for reasons of backward compatibility. The operator will be removed with HALCON 26.11.

Signature🔗

inspect_clustered_components( out region ModelComponents, component_training ComponentTrainingID, string AmbiguityCriterion, real MaxContourOverlap, real ClusterThreshold )void InspectClusteredComponents( HObject* ModelComponents, const HTuple& ComponentTrainingID, const HTuple& AmbiguityCriterion, const HTuple& MaxContourOverlap, const HTuple& ClusterThreshold )static void HOperatorSet.InspectClusteredComponents( out HObject modelComponents, HTuple componentTrainingID, HTuple ambiguityCriterion, HTuple maxContourOverlap, HTuple clusterThreshold )def inspect_clustered_components( component_training_id: HHandle, ambiguity_criterion: str, max_contour_overlap: float, cluster_threshold: float ) -> HObject

Herror T_inspect_clustered_components( Hobject* ModelComponents, const Htuple ComponentTrainingID, const Htuple AmbiguityCriterion, const Htuple MaxContourOverlap, const Htuple ClusterThreshold )

HRegion HComponentTraining::InspectClusteredComponents( const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold ) const

HRegion HComponentTraining::InspectClusteredComponents( const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold ) const

HRegion HComponentTraining::InspectClusteredComponents( const wchar_t* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold ) const (Windows only)

HRegion HComponentTraining.InspectClusteredComponents( string ambiguityCriterion, double maxContourOverlap, double clusterThreshold )

Description🔗

inspect_clustered_componentsInspectClusteredComponents creates a representation of the rigid model components based on the training result ComponentTrainingIDcomponentTrainingIDcomponent_training_id in form of contour regions. The resulting rigid model components are computed depending on the criterion that is used to solve the ambiguities AmbiguityCriterionambiguityCriterionambiguity_criterion, the maximum allowable contour overlap MaxContourOverlapmaxContourOverlapmax_contour_overlap, and the cluster threshold ClusterThresholdclusterThresholdcluster_threshold (see train_model_componentsTrainModelComponents). The cluster threshold, for example, influences the merging of the initial components. The greater the threshold is chosen, the fewer initial components are merged. The determined rigid model components are returned in ModelComponentsmodelComponentsmodel_components.

Hence, after the components have been trained once by using train_model_componentsTrainModelComponents, inspect_clustered_componentsInspectClusteredComponents can be used to estimate the effect of different values for the parameters AmbiguityCriterionambiguityCriterionambiguity_criterion, MaxContourOverlapmaxContourOverlapmax_contour_overlap, and ClusterThresholdclusterThresholdcluster_threshold without performing the complete training procedure several times. Once the desired parameter values have been found, they can be efficiently adopted into the training result by using cluster_model_componentsClusterModelComponents.

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🔗

ModelComponentsmodelComponentsmodel_components (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

Contour regions of rigid model components.

ComponentTrainingIDcomponentTrainingIDcomponent_training_id (input_control) component_training → (handle)HTuple (HHandle)HComponentTraining, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the training result.

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

Criterion for solving the ambiguities.

Default: 'rigidity'"rigidity"
List of values: 'distance', 'distance_orientation', 'orientation', 'rigidity'"distance", "distance_orientation", "orientation", "rigidity"

MaxContourOverlapmaxContourOverlapmax_contour_overlap (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum contour overlap of the found initial components.

Default: 0.20.2
Suggested values: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Minimum increment: 0.01
Recommended increment: 0.05
Restriction: 0 <= MaxContourOverlap && MaxContourOverlap <= 1

ClusterThresholdclusterThresholdcluster_threshold (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Threshold for clustering the initial components.

Default: 0.50.5
Suggested values: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Restriction: 0 <= ClusterThreshold && ClusterThreshold <= 1

Result🔗

If the handle of the training result is valid, the operator inspect_clustered_componentsInspectClusteredComponents returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Module🔗

Matching