inspect_clustered_componentsT_inspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponents (Operator)

Name

inspect_clustered_componentsT_inspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponents — überprüfen der im Training ermittelten starren Modellkomponenten.

Signatur

inspect_clustered_components( : ModelComponents : ComponentTrainingID, AmbiguityCriterion, MaxContourOverlap, ClusterThreshold : )

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

void InspectClusteredComponents(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   (Nur Windows)

static void HOperatorSet.InspectClusteredComponents(out HObject modelComponents, HTuple componentTrainingID, HTuple ambiguityCriterion, HTuple maxContourOverlap, HTuple clusterThreshold)

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

Beschreibung

inspect_clustered_componentsinspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponentsInspectClusteredComponents erzeugt eine Repräsentation der starren Modellkomponenten in Form von Konturregionen, auf Grundlage des Trainingsergebnisses ComponentTrainingIDComponentTrainingIDComponentTrainingIDComponentTrainingIDcomponentTrainingID. Die resultierenden starren Modellkomponenten werden in Abhängigkeit des Kriteriums zur Lösung der Mehrdeutigkeiten AmbiguityCriterionAmbiguityCriterionAmbiguityCriterionAmbiguityCriterionambiguityCriterion, der maximalen Konturüberlappung MaxContourOverlapMaxContourOverlapMaxContourOverlapMaxContourOverlapmaxContourOverlap und des Cluster-Schwellwertes ClusterThresholdClusterThresholdClusterThresholdClusterThresholdclusterThreshold berechnet (siehe train_model_componentstrain_model_componentsTrainModelComponentsTrainModelComponentsTrainModelComponents). Der Cluster-Schwellwert beschreibt zum Beispiel das Maß, in dem initiale Komponenten zu starren Modellkomponenten zusammengefasst werden. Je größer der Cluster-Schwellwert gewählt wird, desto weniger Zusammenschlüsse finden statt. Die ermittelten starren Modellkomponenten werden in ModelComponentsModelComponentsModelComponentsModelComponentsmodelComponents zurückgeliefert.

Mit Hilfe von inspect_clustered_componentsinspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponentsInspectClusteredComponents ist es damit möglich, nach einmaligem Trainieren der Komponenten mit train_model_componentstrain_model_componentsTrainModelComponentsTrainModelComponentsTrainModelComponents die Auswirkungen verschiedener Werte der Parameter AmbiguityCriterionAmbiguityCriterionAmbiguityCriterionAmbiguityCriterionambiguityCriterion, MaxContourOverlapMaxContourOverlapMaxContourOverlapMaxContourOverlapmaxContourOverlap und ClusterThresholdClusterThresholdClusterThresholdClusterThresholdclusterThreshold auf die Bildung der starren Modellkomponenten abzuschätzen, ohne das komplette Training mehrmals durchführen zu müssen. Sind die gewünschten Parameterwerte gefunden, können diese effizient in das Trainingsergebnis mit cluster_model_componentscluster_model_componentsClusterModelComponentsClusterModelComponentsClusterModelComponents übernommen werden.

Ausführungsinformationen

Parameter

ModelComponentsModelComponentsModelComponentsModelComponentsmodelComponents (output_object)  region(-array) objectHRegionHRegionHobject *

Konturregionen der starren Modellkomponenten.

ComponentTrainingIDComponentTrainingIDComponentTrainingIDComponentTrainingIDcomponentTrainingID (input_control)  component_training HComponentTraining, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle des Trainingsergebnisses.

AmbiguityCriterionAmbiguityCriterionAmbiguityCriterionAmbiguityCriterionambiguityCriterion (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Kriterium zur Lösung der Mehrdeutigkeiten.

Defaultwert: 'rigidity' "rigidity" "rigidity" "rigidity" "rigidity"

Werteliste: 'distance'"distance""distance""distance""distance", 'distance_orientation'"distance_orientation""distance_orientation""distance_orientation""distance_orientation", 'orientation'"orientation""orientation""orientation""orientation", 'rigidity'"rigidity""rigidity""rigidity""rigidity"

MaxContourOverlapMaxContourOverlapMaxContourOverlapMaxContourOverlapmaxContourOverlap (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Maximale Konturüberlappung gefundener initialer Komponenten.

Defaultwert: 0.2

Wertevorschläge: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Minimale Schrittweite: 0.01

Empfohlene Schrittweite: 0.05

Restriktion: 0 <= MaxContourOverlap && MaxContourOverlap <= 1

ClusterThresholdClusterThresholdClusterThresholdClusterThresholdclusterThreshold (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Schwellwert für das Zusammenfassen initialer Komponenten.

Defaultwert: 0.5

Wertevorschläge: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Restriktion: 0 <= ClusterThreshold && ClusterThreshold <= 1

Beispiel (HDevelop)

* Get the model image.
read_image (ModelImage, 'model_image.tif')
* Define the regions for the initial components.
gen_rectangle2 (InitialComponentRegions, 212, 233, 0.62, 167, 29)
gen_rectangle2 (Rectangle2, 298, 363, 1.17, 162, 34)
gen_rectangle2 (Rectangle3, 63, 444, -0.26, 50, 27)
gen_rectangle2 (Rectangle4, 120, 473, 0, 33, 20)
concat_obj (InitialComponentRegions, Rectangle2, InitialComponentRegions)
concat_obj (InitialComponentRegions, Rectangle3, InitialComponentRegions)
concat_obj (InitialComponentRegions, Rectangle4, InitialComponentRegions)
* Get the training images
gen_empty_obj (TrainingImages)
for i := 1 to 4 by 1
    read_image (TrainingImage, 'training_image-'+i$'02'+'.tif')
    concat_obj (TrainingImages, TrainingImage, TrainingImages)
endfor
* Extract the model components and train the relations.
train_model_components (ModelImage, InitialComponentRegions, \
                        TrainingImages, ModelComponents, 22, 60, 30, 0.65, \
                        0, 0, rad(60), 'speed', 'rigidity', 0.2, 0.5, \
                        ComponentTrainingID)
* Find the best value for the parameter ClusterThreshold.
inspect_clustered_components (ModelComponents, ComponentTrainingID, \
                              'rigidity', 0.2, 0.4)
* Adopt the ClusterThreshold into the training result.
cluster_model_components (ModelComponents, ModelComponents, \
                          ComponentTrainingID, 'rigidity', 0.2, 0.4)
* Create the component model based on the training result.
create_trained_component_model (ComponentTrainingID, -rad(30), rad(60), 10, \
                                0.5, 'auto', 'auto', 'none', \
                                'use_polarity', 'false', ComponentModelID, \
                                RootRanking)

Ergebnis

Ist der Handle des Trainingsergebnisses gültig, dann liefert inspect_clustered_componentsinspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponentsInspectClusteredComponents den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

train_model_componentstrain_model_componentsTrainModelComponentsTrainModelComponentsTrainModelComponents

Nachfolger

cluster_model_componentscluster_model_componentsClusterModelComponentsClusterModelComponentsClusterModelComponents

Modul

Matching