hom_mat2d_scaleT_hom_mat2d_scaleHomMat2dScaleHomMat2dScale (Operator)

Name

hom_mat2d_scaleT_hom_mat2d_scaleHomMat2dScaleHomMat2dScale — Fügt eine Skalierung zu einer homogenen 2D-Transformationsmatrix hinzu.

Signatur

hom_mat2d_scale( : : HomMat2D, Sx, Sy, Px, Py : HomMat2DScale)

Herror T_hom_mat2d_scale(const Htuple HomMat2D, const Htuple Sx, const Htuple Sy, const Htuple Px, const Htuple Py, Htuple* HomMat2DScale)

void HomMat2dScale(const HTuple& HomMat2D, const HTuple& Sx, const HTuple& Sy, const HTuple& Px, const HTuple& Py, HTuple* HomMat2DScale)

HHomMat2D HHomMat2D::HomMat2dScale(const HTuple& Sx, const HTuple& Sy, const HTuple& Px, const HTuple& Py) const

HHomMat2D HHomMat2D::HomMat2dScale(double Sx, double Sy, double Px, double Py) const

static void HOperatorSet.HomMat2dScale(HTuple homMat2D, HTuple sx, HTuple sy, HTuple px, HTuple py, out HTuple homMat2DScale)

HHomMat2D HHomMat2D.HomMat2dScale(HTuple sx, HTuple sy, HTuple px, HTuple py)

HHomMat2D HHomMat2D.HomMat2dScale(double sx, double sy, double px, double py)

Beschreibung

hom_mat2d_scalehom_mat2d_scaleHomMat2dScaleHomMat2dScaleHomMat2dScale fügt zur homogenen 2D-Transformationsmatrix HomMat2DHomMat2DHomMat2DHomMat2DhomMat2D eine Skalierung um die Skalierungsfaktoren SxSxSxSxsx und SySySySysy hinzu und liefert die resultierende Matrix in HomMat2DScaleHomMat2DScaleHomMat2DScaleHomMat2DScalehomMat2DScale zurück. Die Skalierung wird durch eine 2×2 Skalierungsmatrix S beschrieben. Sie wird relativ zum globalen (d.h. feststehenden) Koordinatensystem ausgeführt; dies entspricht der folgenden Kette von Transformationsmatrizen:

Der Punkt (PxPxPxPxpx,PyPyPyPypy) ist dabei der Fixpunkt der Skalierung, d.h. dieser Punkt bleibt unverändert, wenn man ihn mit HomMat2DScaleHomMat2DScaleHomMat2DScaleHomMat2DScalehomMat2DScale transformiert. Dieses Verhalten wird erreicht, indem zur Eingabe-Transformationsmatrix zuerst eine Translation hinzugefügt wird, die den Fixpunkt in den Ursprung des globalen Koordinatensystems verschiebt. Dann wird die Skalierung hinzugefügt, und zuletzt eine Translation, die den Fixpunkt wieder zurück in seine Ausgangsposition verschiebt. Dies entspricht der folgenden Kette von Transformationsmatrizen:

Um die Transformation im lokalen Koordinatensystem, das durch HomMat2DHomMat2DHomMat2DHomMat2DhomMat2D beschrieben ist, durchzuführen, kann hom_mat2d_scale_localhom_mat2d_scale_localHomMat2dScaleLocalHomMat2dScaleLocalHomMat2dScaleLocal verwendet werden.

Achtung

Es ist zu beachten, dass homogene Transformationsmatrizen sich auf ein allgemeines rechtshändiges mathematisches Koordinatensystem beziehen. Falls eine homogene Transformationsmatrix zur Transformation von Bildern, Regionen, XLD-Konturen oder anderen Daten, die aus Bildern extrahiert wurden, verwendet werden soll, ist zu beachten, dass die Zeilenkoordinaten in den x-Koordinaten und die Spaltenkoordinaten in den y-Koordinaten übergeben werden müssen. Die Übergabereihenfolge von Zeilen- und Spaltenkoordinaten entspricht also der üblichen Reihenfolge (RowRowRowRowrow,ColumnColumnColumnColumncolumn). Diese Konvention ist unerlässlich, um bei der Transformation von Bilddaten ein rechtshändiges Koordinatensystem zu erhalten, so dass z.B. insbesondere Rotationen in der mathematisch korrekten Drehrichtung ausgeführt werden.

Homogene Transformationsmatrizen werden zeilenweise in Form eines Tupels abgespeichert; die letzte Zeile wird im Normalfall nicht gespeichert, da sie für alle affinen Transformationsmatrizen identisch ist. Zum Beispiel wird die Matrix als das Tupel [ra, rb, tc, rd, re, tf] gespeichert. Es ist aber auch möglich, volle 3×3 Matrizen, die eine projektive 2D-Transformation darstellen können, zu verarbeiten.

Ausführungsinformationen

Parameter

HomMat2DHomMat2DHomMat2DHomMat2DhomMat2D (input_control)  hom_mat2d HHomMat2D, HTupleHTupleHtuple (real) (double) (double) (double)

Eingabe-Transformationsmatrix.

SxSxSxSxsx (input_control)  number HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Skalierungsfaktor in x-Richtung.

Defaultwert: 2

Wertevorschläge: 0.125, 0.25, 0.5, 1, 2, 4, 8, 16

Restriktion: Sx != 0

SySySySysy (input_control)  number HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Skalierungsfaktor in y-Richtung.

Defaultwert: 2

Wertevorschläge: 0.125, 0.25, 0.5, 1, 2, 4, 8, 16

Restriktion: Sy != 0

PxPxPxPxpx (input_control)  point.x HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Fixpunkt der Transformation (x-Koordinate).

Defaultwert: 0

Wertevorschläge: 0, 16, 32, 64, 128, 256, 512, 1024

PyPyPyPypy (input_control)  point.y HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Fixpunkt der Transformation (y-Koordinate).

Defaultwert: 0

Wertevorschläge: 0, 16, 32, 64, 128, 256, 512, 1024

HomMat2DScaleHomMat2DScaleHomMat2DScaleHomMat2DScalehomMat2DScale (output_control)  hom_mat2d HHomMat2D, HTupleHTupleHtuple (real) (double) (double) (double)

Ausgabe-Transformationsmatrix.

Ergebnis

hom_mat2d_scalehom_mat2d_scaleHomMat2dScaleHomMat2dScaleHomMat2dScale liefert den Wert 2 (H_MSG_TRUE), falls beide Skalierungsfaktoren verschieden von 0 sind. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

hom_mat2d_identityhom_mat2d_identityHomMat2dIdentityHomMat2dIdentityHomMat2dIdentity, hom_mat2d_translatehom_mat2d_translateHomMat2dTranslateHomMat2dTranslateHomMat2dTranslate, hom_mat2d_scalehom_mat2d_scaleHomMat2dScaleHomMat2dScaleHomMat2dScale, hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotateHomMat2dRotate, hom_mat2d_slanthom_mat2d_slantHomMat2dSlantHomMat2dSlantHomMat2dSlant, hom_mat2d_reflecthom_mat2d_reflectHomMat2dReflectHomMat2dReflectHomMat2dReflect

Nachfolger

hom_mat2d_translatehom_mat2d_translateHomMat2dTranslateHomMat2dTranslateHomMat2dTranslate, hom_mat2d_scalehom_mat2d_scaleHomMat2dScaleHomMat2dScaleHomMat2dScale, hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotateHomMat2dRotate, hom_mat2d_slanthom_mat2d_slantHomMat2dSlantHomMat2dSlantHomMat2dSlant, hom_mat2d_reflecthom_mat2d_reflectHomMat2dReflectHomMat2dReflectHomMat2dReflect

Siehe auch

hom_mat2d_scale_localhom_mat2d_scale_localHomMat2dScaleLocalHomMat2dScaleLocalHomMat2dScaleLocal

Modul

Foundation