Name
cluster_model_componentscluster_model_componentsClusterModelComponentscluster_model_componentsClusterModelComponentsClusterModelComponents — Übernahme neuer Parameter zur Bildung der Modellkomponenten in das
Trainingsergebnis.
Herror cluster_model_components(const Hobject TrainingImages, Hobject* ModelComponents, const Hlong ComponentTrainingID, const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold)
Herror T_cluster_model_components(const Hobject TrainingImages, Hobject* ModelComponents, const Htuple ComponentTrainingID, const Htuple AmbiguityCriterion, const Htuple MaxContourOverlap, const Htuple ClusterThreshold)
Herror cluster_model_components(Hobject TrainingImages, Hobject* ModelComponents, const HTuple& ComponentTrainingID, const HTuple& AmbiguityCriterion, const HTuple& MaxContourOverlap, const HTuple& ClusterThreshold)
HRegion HImage::ClusterModelComponents(const HComponentTraining& ComponentTrainingID, const HTuple& AmbiguityCriterion, const HTuple& MaxContourOverlap, const HTuple& ClusterThreshold) const
HRegionArray HImageArray::ClusterModelComponents(const HComponentTraining& ComponentTrainingID, const HTuple& AmbiguityCriterion, const HTuple& MaxContourOverlap, const HTuple& ClusterThreshold) const
HRegionArray HComponentTraining::ClusterModelComponents(const HImageArray& TrainingImages, const HTuple& AmbiguityCriterion, const HTuple& MaxContourOverlap, const HTuple& ClusterThreshold) const
void ClusterModelComponents(const HObject& TrainingImages, HObject* ModelComponents, const HTuple& ComponentTrainingID, const HTuple& AmbiguityCriterion, const HTuple& MaxContourOverlap, const HTuple& ClusterThreshold)
HRegion HComponentTraining::ClusterModelComponents(const HImage& TrainingImages, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const
HRegion HComponentTraining::ClusterModelComponents(const HImage& TrainingImages, const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const
HRegion HImage::ClusterModelComponents(const HComponentTraining& ComponentTrainingID, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const
HRegion HImage::ClusterModelComponents(const HComponentTraining& ComponentTrainingID, const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const
void HOperatorSetX.ClusterModelComponents(
[in] IHUntypedObjectX* TrainingImages, [out] IHUntypedObjectX** ModelComponents, [in] VARIANT ComponentTrainingID, [in] VARIANT AmbiguityCriterion, [in] VARIANT MaxContourOverlap, [in] VARIANT ClusterThreshold)
IHRegionX* HComponentTrainingX.ClusterModelComponents(
[in] IHImageX* TrainingImages, [in] BSTR AmbiguityCriterion, [in] double MaxContourOverlap, [in] double ClusterThreshold)
IHRegionX* HImageX.ClusterModelComponents(
[in] IHComponentTrainingX* ComponentTrainingID, [in] BSTR AmbiguityCriterion, [in] double MaxContourOverlap, [in] double ClusterThreshold)
static void HOperatorSet.ClusterModelComponents(HObject trainingImages, out HObject modelComponents, HTuple componentTrainingID, HTuple ambiguityCriterion, HTuple maxContourOverlap, HTuple clusterThreshold)
HRegion HComponentTraining.ClusterModelComponents(HImage trainingImages, string ambiguityCriterion, double maxContourOverlap, double clusterThreshold)
HRegion HImage.ClusterModelComponents(HComponentTraining componentTrainingID, string ambiguityCriterion, double maxContourOverlap, double clusterThreshold)
Mit cluster_model_componentscluster_model_componentsClusterModelComponentscluster_model_componentsClusterModelComponentsClusterModelComponents lassen sich Parameter ändern
nachdem ein erstes Training mit train_model_componentstrain_model_componentsTrainModelComponentstrain_model_componentsTrainModelComponentsTrainModelComponents
erfolgt ist. cluster_model_componentscluster_model_componentsClusterModelComponentscluster_model_componentsClusterModelComponentsClusterModelComponents ändert das Kriterium
AmbiguityCriterionAmbiguityCriterionAmbiguityCriterionAmbiguityCriterionAmbiguityCriterionambiguityCriterion zur Lösung der Mehrdeutigkeiten, die
maximale Konturüberlappung MaxContourOverlapMaxContourOverlapMaxContourOverlapMaxContourOverlapMaxContourOverlapmaxContourOverlap und den
Cluster-Schwellwert ClusterThresholdClusterThresholdClusterThresholdClusterThresholdClusterThresholdclusterThreshold des
Trainingsergebnisses ComponentTrainingIDComponentTrainingIDComponentTrainingIDComponentTrainingIDComponentTrainingIDcomponentTrainingID auf die
angegebenen Werte ab. Eine detaillierte Beschreibung dieser
Parameter ist in der Dokumentation zu train_model_componentstrain_model_componentsTrainModelComponentstrain_model_componentsTrainModelComponentsTrainModelComponents
nachzulesen. Durch das Ändern dieser Parameter ändert sich die Art,
wie die initialen Komponenten zu starren Modellkomponenten
zusammengefasst werden. Je größer z.B. der Cluster-Schwellwert
gewählt wird, desto weniger Zusammenschlüsse finden statt.
Die für eine bestimmte Anwendung geeigneten Parameterwerte
lassen sich durch wiederholten Aufruf von
inspect_clustered_componentsinspect_clustered_componentsInspectClusteredComponentsinspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponents interaktiv finden. Die
ausgewählten Parameterwerte können dann mit
get_training_componentsget_training_componentsGetTrainingComponentsget_training_componentsGetTrainingComponentsGetTrainingComponents übernommen werden.
Die starren Modellkomponenten werden in ModelComponentsModelComponentsModelComponentsModelComponentsModelComponentsmodelComponents
zurückgeliefert. Um sinnvolle Ergebnisse zu erhalten, ist es wichtig
in TrainingImagesTrainingImagesTrainingImagesTrainingImagesTrainingImagestrainingImages dieselben Trainingsbilder zu übergeben,
die auch zum Trainieren mit train_model_componentstrain_model_componentsTrainModelComponentstrain_model_componentsTrainModelComponentsTrainModelComponents verwendet
wurden. Die Lage der neu zusammengefassten Komponenten in den
Trainingsbildern wird erneut mit Hilfe des formbasierten Matchings
bestimmt. Dabei kann mit
set_system('pregenerate_shape_models',...)set_system("pregenerate_shape_models",...)SetSystem("pregenerate_shape_models",...)set_system("pregenerate_shape_models",...)SetSystem("pregenerate_shape_models",...)SetSystem("pregenerate_shape_models",...) wie bei
train_model_componentstrain_model_componentsTrainModelComponentstrain_model_componentsTrainModelComponentsTrainModelComponents entschieden werden, ob die
entsprechenden Formmodelle vorab generiert werden sollen.
Es kann sein, dass Modelle, die in einer Pyramidenebene den
Bildrand berühren, nicht gefunden werden, auch wenn sie
im ursprünglichen Bild vollständig enthalten sind.
Mittels set_system('border_shape_models',...)set_system("border_shape_models",...)SetSystem("border_shape_models",...)set_system("border_shape_models",...)SetSystem("border_shape_models",...)SetSystem("border_shape_models",...) kann
festgelegt werden, ob die Modelle vollständig in den
Trainingsbildern liegen müssen, oder ob sie auch teilweise über
den Bildrand hinausragen können.
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Zum Trainieren der Modellkomponenten verwendete
Trainingsbilder.
Konturregionen der starren Modellkomponenten.
Handle des Trainingsergebnisses.
Kriterium zur Lösung der Mehrdeutigkeiten.
Defaultwert:
'rigidity'
"rigidity"
"rigidity"
"rigidity"
"rigidity"
"rigidity"
Werteliste: 'distance'"distance""distance""distance""distance""distance", 'distance_orientation'"distance_orientation""distance_orientation""distance_orientation""distance_orientation""distance_orientation", 'orientation'"orientation""orientation""orientation""orientation""orientation", 'rigidity'"rigidity""rigidity""rigidity""rigidity""rigidity"
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
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
* 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 (TrainingImages, 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)
Sind die Parameterwerte korrekt, dann liefert
cluster_model_componentscluster_model_componentsClusterModelComponentscluster_model_componentsClusterModelComponentsClusterModelComponents den Wert 2 (H_MSG_TRUE). Das Verhalten bei leerer
Eingabe (keine Eingabebilder vorhanden) lässt sich
mittels 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>) festlegen.
Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
train_model_componentstrain_model_componentsTrainModelComponentstrain_model_componentsTrainModelComponentsTrainModelComponents,
inspect_clustered_componentsinspect_clustered_componentsInspectClusteredComponentsinspect_clustered_componentsInspectClusteredComponentsInspectClusteredComponents
get_training_componentsget_training_componentsGetTrainingComponentsget_training_componentsGetTrainingComponentsGetTrainingComponents,
create_trained_component_modelcreate_trained_component_modelCreateTrainedComponentModelcreate_trained_component_modelCreateTrainedComponentModelCreateTrainedComponentModel,
modify_component_relationsmodify_component_relationsModifyComponentRelationsmodify_component_relationsModifyComponentRelationsModifyComponentRelations,
write_training_componentswrite_training_componentsWriteTrainingComponentswrite_training_componentsWriteTrainingComponentsWriteTrainingComponents,
get_component_relationsget_component_relationsGetComponentRelationsget_component_relationsGetComponentRelationsGetComponentRelations,
clear_training_componentsclear_training_componentsClearTrainingComponentsclear_training_componentsClearTrainingComponentsClearTrainingComponents
Matching