create_planar_uncalib_deformable_model_xldT_create_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld (Operator)
Name
create_planar_uncalib_deformable_model_xldT_create_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld — Vorbereiten eines deformierbaren Modells für planares unkalibriertes
Matching aus XLD-Konturen.
Signatur
create_planar_uncalib_deformable_model_xld(Contours : : NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, MinContrast, GenParamName, GenParamValue : ModelID)
Herror T_create_planar_uncalib_deformable_model_xld(const Hobject Contours, const Htuple NumLevels, const Htuple AngleStart, const Htuple AngleExtent, const Htuple AngleStep, const Htuple ScaleRMin, const Htuple ScaleRMax, const Htuple ScaleRStep, const Htuple ScaleCMin, const Htuple ScaleCMax, const Htuple ScaleCStep, const Htuple Optimization, const Htuple Metric, const Htuple MinContrast, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ModelID)
void CreatePlanarUncalibDeformableModelXld(const HObject& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ModelID)
void HDeformableModel::HDeformableModel(const HXLDCont& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableModel::HDeformableModel(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableModel::HDeformableModel(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableModel::HDeformableModel(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
(Nur Windows)
void HDeformableModel::CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableModel::CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableModel::CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
void HDeformableModel::CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)
(Nur Windows)
HDeformableModel HXLDCont::CreatePlanarUncalibDeformableModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const
HDeformableModel HXLDCont::CreatePlanarUncalibDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const
HDeformableModel HXLDCont::CreatePlanarUncalibDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const
HDeformableModel HXLDCont::CreatePlanarUncalibDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const
(Nur Windows)
static void HOperatorSet.CreatePlanarUncalibDeformableModelXld(HObject contours, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, HTuple scaleRMin, HTuple scaleRMax, HTuple scaleRStep, HTuple scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, HTuple metric, HTuple minContrast, HTuple genParamName, HTuple genParamValue, out HTuple modelID)
public HDeformableModel(HXLDCont contours, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, int minContrast, HTuple genParamName, HTuple genParamValue)
public HDeformableModel(HXLDCont contours, int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, int minContrast, HTuple genParamName, HTuple genParamValue)
void HDeformableModel.CreatePlanarUncalibDeformableModelXld(HXLDCont contours, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, int minContrast, HTuple genParamName, HTuple genParamValue)
void HDeformableModel.CreatePlanarUncalibDeformableModelXld(HXLDCont contours, int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, int minContrast, HTuple genParamName, HTuple genParamValue)
HDeformableModel HXLDCont.CreatePlanarUncalibDeformableModelXld(HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, int minContrast, HTuple genParamName, HTuple genParamValue)
HDeformableModel HXLDCont.CreatePlanarUncalibDeformableModelXld(int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, int minContrast, HTuple genParamName, HTuple genParamValue)
def create_planar_uncalib_deformable_model_xld(contours: HObject, num_levels: Union[int, str], angle_start: Sequence[float], angle_extent: Sequence[float], angle_step: Union[float, str], scale_rmin: float, scale_rmax: Sequence[float], scale_rstep: Union[float, str], scale_cmin: float, scale_cmax: Sequence[float], scale_cstep: Union[float, str], optimization: MaybeSequence[str], metric: str, min_contrast: int, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]]) -> HHandle
Beschreibung
create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld erzeugt ein deformierbares
Modell für planares, unkalibriertes Matching aus den XLD Konturen
ContoursContoursContoursContourscontourscontours. Die XLD Konturen repräsentieren dabei die Grauwertkanten
des zu suchenden Objekts. Im Gegensatz zu dem Operator
create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelcreate_planar_uncalib_deformable_model, der ein Modell aus einem Bild
erzeugt, erzeugt der Operator
create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld das deformierbare Modell
aus XLD Konturen.
Das Modell wird für mehrere Pyramidenebenen generiert und im
Speicher abgelegt. Der Ausgabeparameter ModelIDModelIDModelIDModelIDmodelIDmodel_id ist ein Handle für
dieses Modell, der in nachfolgenden Aufrufen von
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model verwendet wird.
Als Ursprung (Referenzpunkt) des Modells wird der Schwerpunkt des
kleinsten umschließenden Rechtecks der Konturen ContoursContoursContoursContourscontourscontours, das
parallel zu den Koordinatenachsen liegt, verwendet. Falls ein
anderer Ursprung gewünscht wird, kann dieser mit
set_deformable_model_originset_deformable_model_originSetDeformableModelOriginSetDeformableModelOriginSetDeformableModelOriginset_deformable_model_origin gesetzt werden.
Eingabeparameter im Detail
- NumLevels:
-
Die Anzahl der Pyramidenebenen wird mit NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels
festgelegt. Sie sollte so groß wie möglich gewählt werden, da
hierdurch das Auffinden des Modells erheblich beschleunigt wird.
Bei der Wahl von NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels ist aber darauf zu achten, dass
das Modell auf der obersten Pyramidenstufe noch erkennbar ist und
genügend viele Punkte besitzt (mindestens vier). Falls
nicht genügend Modellpunkte erzeugt werden, wird die Anzahl der
Pyramidenstufen intern solange reduziert, bis auf der obersten
Pyramidenstufe genügend Modellpunkte vorhanden sind. Falls durch
diese Anpassung ein Modell mit keiner Pyramidenstufe entsteht, d.h.
falls schon auf der untersten Pyramidenstufe zu wenige Modellpunkte vorhanden
sind, liefert create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld eine
Fehlermeldung zurück. Falls für NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels 'auto'"auto""auto""auto""auto""auto" übergeben
wird, wählt create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld die Anzahl der
Pyramidenstufen automatisch. Die gewählte Anzahl von Pyramidenstufen
kann mit get_deformable_model_paramsget_deformable_model_paramsGetDeformableModelParamsGetDeformableModelParamsGetDeformableModelParamsget_deformable_model_params abgefragt werden. In
seltenen Fällen kann es vorkommen, dass
create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld die Anzahl der
Pyramidenstufen zu hoch oder zu niedrig bestimmt. Falls die Anzahl der
Pyramidenstufen zu hoch gewählt wird, kann das dazu führen, dass das Modell
im Suchbild nicht erkannt wird oder dass sehr niedrige Parameter für MinScore
oder Greediness in find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model selektiert
werden müssen, damit das Modell gefunden wird. Falls die Anzahl der
Pyramidenstufen zu niedrig gewählt wird, kann es zu erhöhten
Laufzeiten in find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model kommen. In beiden
Fällen sollte die Anzahl der Pyramidenstufen manuell gewählt werden.
- Winkel- und Skalierungs-Parameter:
-
Beachten Sie, dass die AngleStartAngleStartAngleStartAngleStartangleStartangle_start, AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent,
ScaleRMaxScaleRMaxScaleRMaxScaleRMaxscaleRMaxscale_rmax und ScaleCMaxScaleCMaxScaleCMaxScaleCMaxscaleCMaxscale_cmax nicht von diesem Operator
genutzt werden. Stattdessen müssen sie in dem Operator
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model spezifiziert werden.
ScaleRMinScaleRMinScaleRMinScaleRMinscaleRMinscale_rmin und ScaleCMinScaleCMinScaleCMinScaleCMinscaleCMinscale_cmin können relevant sein, wenn
Matches erwartet werden, die kleiner sind als die übergebenen XLD-Konturen
ContoursContoursContoursContourscontourscontours.
Dann verringert sich eventuell die Anzahl der benutzten Pyramidenebenen,
falls für NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels 'auto'"auto""auto""auto""auto""auto" übergeben wird.
Im Normalfall können die Parameter AngleStepAngleStepAngleStepAngleStepangleStepangle_step, ScaleRStepScaleRStepScaleRStepScaleRStepscaleRStepscale_rstep
und ScaleCStepScaleCStepScaleCStepScaleCStepscaleCStepscale_cstep automatisch bestimmt werden - die
berechneten Winkel- und Skalierungsschrittweiten können mit
get_deformable_model_paramsget_deformable_model_paramsGetDeformableModelParamsGetDeformableModelParamsGetDeformableModelParamsget_deformable_model_params ausgegeben werden. Mehr Informationen
dazu, wie sich diese Parameter auswirken, können in der Dokumentation von
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model gefunden werden.
- Optimization:
-
Bei besonders großen Modellen kann es auch sinnvoll sein, die Anzahl
der Modellpunkte durch Setzen des Parameters OptimizationOptimizationOptimizationOptimizationoptimizationoptimization
auf einen Wert ungleich 'none'"none""none""none""none""none" zu setzen. Falls
OptimizationOptimizationOptimizationOptimizationoptimizationoptimization = 'none'"none""none""none""none""none" gesetzt ist, werden alle
Modellpunkte abgespeichert. Ansonsten wird die Anzahl der Punkte entsprechend
dem Parameter OptimizationOptimizationOptimizationOptimizationoptimizationoptimization reduziert. Falls die Anzahl der
Punkte reduziert wird, kann es bei
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model notwendig werden, den Parameter
Greediness auf einen kleineren Wert, z.B. 0.7 oder 0.8, zu setzen.
Bei kleineren Modellen bewirkt die Reduktion der Anzahl der Punkte keine
Beschleunigung, da dadurch typischerweise wesentlich mehr
potentielle Instanzen des Modells untersucht werden müssen. Falls
für OptimizationOptimizationOptimizationOptimizationoptimizationoptimization 'auto'"auto""auto""auto""auto""auto" übergeben wird, wählt
create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld die Reduktion der Punkte
automatisch.
- MinContrast:
-
Mit MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast wird festgelegt, welchen Grauwertkontrast
die Objektkonturen später bei der Erkennung mit
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model im Bild mindestens besitzen
müssen. Mit anderen Worten stellt dieser Parameter somit eine Abgrenzung des
Objektes von Rauschen im Bild dar. Eine gute Wahl ist deshalb der
Bereich von Grauwertänderungen, der durch das Rauschen im Bild
verursacht wird. Falls die Grauwerte z.B. in einem Bereich von 10
Graustufen durch Rauschen schwanken, sollte MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast auf
10 gesetzt werden. Falls mehrkanalige Bilder für das Modell und für
die Suchbilder verwendet werden, und falls der Parameter
MetricMetricMetricMetricmetricmetric auf 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity" gesetzt wird
(siehe unten), muss das Rauschen in einem Kanal noch mit der Wurzel
der Anzahl der Kanäle multipliziert werden, um MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast
zu bestimmen. Falls die Grauwerte in einem Kanal z.B. in einem
Bereich von 10 Graustufen schwanken, sollte MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast bei
einem dreikanaligen Bild auf 17 gesetzt werden. Falls das
Modell später in sehr kontrastarmen Bildern erkannt werden soll,
muss MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast entsprechend klein gewählt werden. Falls
das Modell mit erheblichen Verdeckungen erkannt werden soll, sollte
MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast etwas größer als der Grauwertbereich, der durch
das Rauschen verursacht wird, gewählt werden, um eine robuste und
genaue Lageschätzung des verdeckten Modells zu gewährleisten.
- Metric:
-
Der Parameter MetricMetricMetricMetricmetricmetric legt fest, unter welchen Bedingungen
das Muster im Bild noch erkannt wird. Falls MetricMetricMetricMetricmetricmetric =
'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity", muss das Objekt im Bild dieselben
Kontrasteigenschaften aufweisen wie das Modell. Wenn z.B. das
Modell ein helles Objekt auf dunklem Hintergrund ist, wird das
Objekt im Bild nur dann gefunden, wenn es auch heller als der
Hintergrund ist. Falls MetricMetricMetricMetricmetricmetric =
'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity", wird das Objekt auch dann im Bild
gefunden, wenn sich der Kontrast global umkehrt. Im obigen Beispiel
würde das Objekt also auch dann gefunden, wenn es dunkler als der
Hintergrund ist. Die Laufzeit von
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model erhöht sich in diesem Fall
geringfügig. Falls MetricMetricMetricMetricmetricmetric = 'ignore_part_polarity'"ignore_part_polarity""ignore_part_polarity""ignore_part_polarity""ignore_part_polarity""ignore_part_polarity" oder
MetricMetricMetricMetricmetricmetric = 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity", wird das Modell auch
dann gefunden, wenn sich die Kontrastverhältnisse lokal ändern. Dieser
Modus kann z.B. dann sinnvoll sein, wenn das Objekt aus einem Teil
mittleren Grauwerts besteht, auf dem entweder dunkle oder helle
Unterobjekte liegen können. Die obigen vier Metriken können nur auf
einkanalige Bilder angewendet werden. Falls in den Suchbildern ein
mehrkanaliges Bild übergeben wird, wird stillschweigend nur der erste Kanal
des Bildes verwendet. Falls MetricMetricMetricMetricmetricmetric =
'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity", wird das Modell auch dann gefunden, falls
sich die Farbkontraste lokal ändern können. Dies ist z.B. der Fall, wenn
Teile des Objektes ihre Farbe ändern können, z.B. von rot auf grün. Dieser
Modus ist insbesondere dann sinnvoll, wenn nicht vorab bekannt ist, in
welchen Kanälen das Objekt zu erkennen ist. Auch hier kann sich die Laufzeit
von find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model erheblich erhöhen. Die
Metrik 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity" kann auf Bilder mit einer beliebigen
Anzahl von Kanälen angewendet werden. Falls sie mit einkanaligen Bildern
verwendet wird, hat sie dieselbe Wirkung wie
'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity". Es ist zu beachten, dass für
MetricMetricMetricMetricmetricmetric = 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity" die
Kanäle nicht einer spektralen Unterteilung des Lichtes (wie z.B. bei
einem RGB-Bild) entsprechen müssen. Die Kanäle können z.B. auch
durch Beleuchtung des Objektes aus unterschiedlichen Richtungen
entstanden sein.
Es ist auch zu beachten, dass die beiden ersten Werte für MetricMetricMetricMetricmetricmetric
('use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity" und 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity") nur dann
verwendet werden können, wenn bei allen Konturen, die in ContoursContoursContoursContourscontourscontours
übergeben wurden, das Attribut 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction" gesetzt ist, da es
die Polarität der Kanten festlegt. Für weitere Informationen zu
Konturattributen wie 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction" siehe
get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld.
Ansonsten besteht die Möglichkeit, die beiden Werte für MetricMetricMetricMetricmetricmetric mit
dem Operator set_planar_uncalib_deformable_model_metricset_planar_uncalib_deformable_model_metricSetPlanarUncalibDeformableModelMetricSetPlanarUncalibDeformableModelMetricSetPlanarUncalibDeformableModelMetricset_planar_uncalib_deformable_model_metric zu setzen,
der die Polarität der Konturen aus einem Bild bestimmt.
Achtung
Im Gegensatz zum Operator create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelcreate_planar_uncalib_deformable_model
ist es nicht möglich die Mindestgröße der Modellkomponenten anzugeben. Um
kleine Modellkomponenten im Modell zu vermeiden, können kurze
Konturen vor dem Aufruf von create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld
mit dem Operator select_contours_xldselect_contours_xldSelectContoursXldSelectContoursXldSelectContoursXldselect_contours_xld eliminiert werden.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Dieser Operator liefert ein Handle zurück. Es ist zu beachten, dass der Zustand einer Instanz dieses Handletyps durch bestimmte Operatoren geändert werden kann, obwohl das Handle als Eingabeparameter in diesen Operatoren verwendet wird.
Parameter
ContoursContoursContoursContourscontourscontours (input_object) xld_cont(-array) → objectHXLDContHObjectHXLDContHobject
Eingabekonturen, die zum Aufbau des Modells verwendet
werden.
NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels (input_control) integer → HTupleUnion[int, str]HTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)
Maximale Anzahl von Pyramidenebenen.
Defaultwert:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Wertevorschläge: 'auto'"auto""auto""auto""auto""auto", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
AngleStartAngleStartAngleStartAngleStartangleStartangle_start (input_control) angle.rad-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Dieser Parameter wird nicht benutzt.
Defaultwert: []
AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent (input_control) angle.rad-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Dieser Parameter wird nicht benutzt.
Defaultwert: []
AngleStepAngleStepAngleStepAngleStepangleStepangle_step (input_control) angle.rad → HTupleUnion[float, str]HTupleHtuple (real / string) (double / string) (double / HString) (double / char*)
Schrittweite der Winkel (Auflösung).
Defaultwert:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Wertevorschläge: 'auto'"auto""auto""auto""auto""auto", 0.0175, 0.0349, 0.0524, 0.0698, 0.0873
Restriktion: AngleStep > 0 && AngleStep <= pi / 16
ScaleRMinScaleRMinScaleRMinScaleRMinscaleRMinscale_rmin (input_control) number → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Kleinste auftretende Skalierung des Musters in
Zeilenrichtung.
Defaultwert: 1.0
Wertevorschläge: 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Restriktion: ScaleRMin > 0
ScaleRMaxScaleRMaxScaleRMaxScaleRMaxscaleRMaxscale_rmax (input_control) number-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Dieser Parameter wird nicht benutzt.
Defaultwert: []
ScaleRStepScaleRStepScaleRStepScaleRStepscaleRStepscale_rstep (input_control) number → HTupleUnion[float, str]HTupleHtuple (real / string) (double / string) (double / HString) (double / char*)
Schrittweite der Skalierung (Auflösung) in
Zeilenrichtung.
Defaultwert:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Wertevorschläge: 'auto'"auto""auto""auto""auto""auto", 0.01, 0.02, 0.05, 0.1, 0.15, 0.2
Restriktion: ScaleRStep > 0
ScaleCMinScaleCMinScaleCMinScaleCMinscaleCMinscale_cmin (input_control) number → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Kleinste auftretende Skalierung des Musters in
Spaltenrichtung.
Defaultwert: 1.0
Wertevorschläge: 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Restriktion: ScaleCMin > 0
ScaleCMaxScaleCMaxScaleCMaxScaleCMaxscaleCMaxscale_cmax (input_control) number-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Dieser Parameter wird nicht benutzt.
Defaultwert: []
ScaleCStepScaleCStepScaleCStepScaleCStepscaleCStepscale_cstep (input_control) number → HTupleUnion[float, str]HTupleHtuple (real / string) (double / string) (double / HString) (double / char*)
Schrittweite der Skalierung (Auflösung) in
Spaltenrichtung.
Defaultwert:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Wertevorschläge: 'auto'"auto""auto""auto""auto""auto", 0.01, 0.02, 0.05, 0.1, 0.15, 0.2
Restriktion: ScaleCStep > 0
OptimizationOptimizationOptimizationOptimizationoptimizationoptimization (input_control) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Art der Optimierung der Modellgenerierung.
Defaultwert:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
Werteliste: 'auto'"auto""auto""auto""auto""auto", 'none'"none""none""none""none""none", 'point_reduction_high'"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_low", 'point_reduction_medium'"point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium"
MetricMetricMetricMetricmetricmetric (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Art der zum Matchen verwendeten Metrik.
Defaultwert:
'ignore_local_polarity'
"ignore_local_polarity"
"ignore_local_polarity"
"ignore_local_polarity"
"ignore_local_polarity"
"ignore_local_polarity"
Werteliste: 'ignore_color_polarity'"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_global_polarity", 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity", 'ignore_part_polarity'"ignore_part_polarity""ignore_part_polarity""ignore_part_polarity""ignore_part_polarity""ignore_part_polarity", 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity"
MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast (input_control) number → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Minimaler Kontrast des Objektes in den Suchbildern.
Defaultwert: 5
Wertevorschläge: 1, 2, 3, 5, 7, 10, 20, 30, 40
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control) string-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Namen der Parameter.
Defaultwert: []
Werteliste: [], 'part_size'"part_size""part_size""part_size""part_size""part_size"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control) integer-array → HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Werte der Parameter.
Defaultwert: []
Werteliste: [], 'big'"big""big""big""big""big", 'medium'"medium""medium""medium""medium""medium", 'small'"small""small""small""small""small"
ModelIDModelIDModelIDModelIDmodelIDmodel_id (output_control) deformable_model → HDeformableModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle des Modells.
Ergebnis
Sind die Parameterwerte korrekt, dann liefert
create_planar_uncalib_deformable_model_xldcreate_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldCreatePlanarUncalibDeformableModelXldcreate_planar_uncalib_deformable_model_xld den Wert TRUE.
Gegebenenfalls wird eine Fehlerbehandlung durchgeführt. Wenn der
Parameter NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels so gewählt wurde, dass das Modell zu wenige
Punkte besitzt, wird die Fehlermeldung 8510 zurückgeliefert.
Vorgänger
read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxfread_contour_xld_dxf,
edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix,
select_contours_xldselect_contours_xldSelectContoursXldSelectContoursXldSelectContoursXldselect_contours_xld
Nachfolger
find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_model
Siehe auch
create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelcreate_planar_uncalib_deformable_model
Modul
Matching