best_match_rot_mgT_best_match_rot_mgBestMatchRotMgBestMatchRotMgbest_match_rot_mg (Operator)
Name
best_match_rot_mgT_best_match_rot_mgBestMatchRotMgBestMatchRotMgbest_match_rot_mg — Suche des besten Matching zwischen einem Template und einer Pyramide
mit Rotation.
Warnung
best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg ist veraltet und wird nur aus Gründen
der Rückwärtskompatibilität zur Verfügung gestellt. Neue
Applikationen sollten stattdessen die
Form-basierten oder NCC-basierten Operatoren verwenden.
Signatur
Herror T_best_match_rot_mg(const Hobject Image, const Htuple TemplateID, const Htuple AngleStart, const Htuple AngleExtend, const Htuple MaxError, const Htuple SubPixel, const Htuple NumLevels, Htuple* Row, Htuple* Column, Htuple* Angle, Htuple* Error)
void BestMatchRotMg(const HObject& Image, const HTuple& TemplateID, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& MaxError, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error)
void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error) const
void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const
void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const
void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const wchar_t* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const
(Nur Windows)
void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error) const
void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const
void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const
void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const wchar_t* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const
(Nur Windows)
static void HOperatorSet.BestMatchRotMg(HObject image, HTuple templateID, HTuple angleStart, HTuple angleExtend, HTuple maxError, HTuple subPixel, HTuple numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)
void HTemplate.BestMatchRotMg(HImage image, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)
void HTemplate.BestMatchRotMg(HImage image, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out double row, out double column, out double angle, out double error)
void HImage.BestMatchRotMg(HTemplate templateID, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)
void HImage.BestMatchRotMg(HTemplate templateID, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out double row, out double column, out double angle, out double error)
def best_match_rot_mg(image: HObject, template_id: HHandle, angle_start: float, angle_extend: float, max_error: float, sub_pixel: str, num_levels: int) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]
def best_match_rot_mg_s(image: HObject, template_id: HHandle, angle_start: float, angle_extend: float, max_error: float, sub_pixel: str, num_levels: int) -> Tuple[float, float, float, float]
Beschreibung
best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg führt ein Matching zwischen dem Template von
TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id und ImageImageImageImageimageimage durch.
Es arbeitet analog zu best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg mit der Erweiterung,
dass das Muster wie bei best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot gedreht vorliegen kann.
Die Parameter AngleStartAngleStartAngleStartAngleStartangleStartangle_start und AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend
legen die maximale Rotation des Musters fest: AngleStartAngleStartAngleStartAngleStartangleStartangle_start
gibt größte Rotation gegen den Uhrzeiger an und AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend
die größte Rotation im Uhrzeigersinn relativ zu diesem Winkel.
Beide Werte müssen kleiner oder gleich den entsprechenden
Werte des Template bei dessen Erzeugung sein
(siehe create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot).
Als Erweiterung gegenüber best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg liefert
best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg zu zusätzlichen Ausgabeparameter
AngleAngleAngleAngleangleangle der den gefundenen Rotationswinkel des Musters
angibt.
Der Wert von MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error muss gegenüber best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot
größer gewählt werden, da der Matching-Fehler auf höheren
Pyramidenebenen oft größer ist.
Im Fall von SubPixelSubPixelSubPixelSubPixelsubPixelsub_pixel = 'true'"true""true""true""true""true"
wird die Position und der Winkel mit „subpixel“ Genauigkeit
bestimmt.
Der Wert von NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels muss kleiner oder gleich dem Wert
sein, der bei der Erzeugung des Templates verwendet wurde.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf Tupelebene.
Parameter
ImageImageImageImageimageimage (input_object) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte)
Eingabebild, in dem das Pattern gefunden werden soll.
TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (input_control) template → HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Nummer des Templates.
AngleStartAngleStartAngleStartAngleStartangleStartangle_start (input_control) angle.rad → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Kleinster auftretende Rotation des Musters.
Defaultwert: -0.39
Wertevorschläge: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0
MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error (input_control) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Maximale mittlere Differenz der Grauwerte.
Defaultwert: 40.0
Wertevorschläge: 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 11.0, 15.0, 17.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
Typischer Wertebereich: 0
≤
MaxError
MaxError
MaxError
MaxError
maxError
max_error
≤
255
Minimale Schrittweite: 1
Empfohlene Schrittweite: 1
SubPixelSubPixelSubPixelSubPixelsubPixelsub_pixel (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Subpixel Genauigkeit falls 'true'"true""true""true""true""true".
Defaultwert:
'false'
"false"
"false"
"false"
"false"
"false"
Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels (input_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Anzahl der verwendeten Auflösungsebenen.
Defaultwert: 3
Wertevorschläge: 1, 2, 3, 4, 5, 6
RowRowRowRowrowrow (output_control) point.y(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Zeilenposition des Best-Match.
ColumnColumnColumnColumncolumncolumn (output_control) point.x(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Spaltenposition des Best-Match.
AngleAngleAngleAngleangleangle (output_control) angle.rad(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Rotationswinkel des Musters.
ErrorErrorErrorErrorerrorerror (output_control) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Mittlere Abweichung der Grauwerte des Best-Match.
Ergebnis
Sind die Parameterwerte korrekt, dann liefert best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg
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>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)
festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
Vorgänger
create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot,
set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template,
set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template,
adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template,
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region,
draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain
Alternativen
best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot,
best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg,
find_ncc_modelfind_ncc_modelFindNccModelFindNccModelFindNccModelfind_ncc_model,
find_ncc_modelsfind_ncc_modelsFindNccModelsFindNccModelsFindNccModelsfind_ncc_models
Siehe auch
fast_matchfast_matchFastMatchFastMatchFastMatchfast_match
Modul
Matching