affine_trans_pixel T_affine_trans_pixel AffineTransPixel AffineTransPixel affine_trans_pixel (Operator)
Name
affine_trans_pixel T_affine_trans_pixel AffineTransPixel AffineTransPixel affine_trans_pixel — Wendet eine beliebige affine 2D-Transformation auf Pixelkoordinaten an.
Signatur
void AffineTransPixel (const HTuple& HomMat2D , const HTuple& Row , const HTuple& Col , HTuple* RowTrans , HTuple* ColTrans )
void HHomMat2D ::AffineTransPixel (const HTuple& Row , const HTuple& Col , HTuple* RowTrans , HTuple* ColTrans ) const
void HHomMat2D ::AffineTransPixel (double Row , double Col , double* RowTrans , double* ColTrans ) const
static void HOperatorSet .AffineTransPixel (HTuple homMat2D , HTuple row , HTuple col , out HTuple rowTrans , out HTuple colTrans )
void HHomMat2D .AffineTransPixel (HTuple row , HTuple col , out HTuple rowTrans , out HTuple colTrans )
void HHomMat2D .AffineTransPixel (double row , double col , out double rowTrans , out double colTrans )
def affine_trans_pixel (hom_mat_2d : Sequence[float], row : MaybeSequence[Union[float, int]], col : MaybeSequence[Union[float, int]]) -> Tuple[Sequence[float], Sequence[float]]
def affine_trans_pixel_s (hom_mat_2d : Sequence[float], row : MaybeSequence[Union[float, int]], col : MaybeSequence[Union[float, int]]) -> Tuple[float, float]
Beschreibung
affine_trans_pixel affine_trans_pixel AffineTransPixel AffineTransPixel AffineTransPixel affine_trans_pixel wendet eine beliebige affine 2D-Transformation
(Skalierung, Drehung, Verschiebung, Scherung) auf die Eingabepixel
(Row Row Row Row row row ,Col Col Col Col col col ) an und liefert die Ergebnispixel in
(RowTrans RowTrans RowTrans RowTrans rowTrans row_trans ,ColTrans ColTrans ColTrans ColTrans colTrans col_trans ) zurück; die Ein- und Ausgabepixel sind
jeweils subpixelgenaue Punkte. Die Transformation wird durch eine homogene
Transformationsmatrix beschrieben, die in HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d übergeben wird.
Im Gegensatz zu affine_trans_point_2d affine_trans_point_2d AffineTransPoint2d AffineTransPoint2d AffineTransPoint2d affine_trans_point_2d transformiert
affine_trans_pixel affine_trans_pixel AffineTransPixel AffineTransPixel AffineTransPixel affine_trans_pixel die Eingabepixelkoordinaten zuerst vom
HALCON-Standard-Koordinatensystem (mit dem Ursprung im Mittelpunkt des
oberen linken Pixels) in ein Koordinatensystem mit dem Ursprung in der
oberen linken Ecke des oberen linken Pixels. Das Ergebnis der darauf
folgenden Transformation mit HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d wird dann wieder in das
Standard-Koordinatensystem zurücktransformiert. Dadurch ist
affine_trans_pixel affine_trans_pixel AffineTransPixel AffineTransPixel AffineTransPixel affine_trans_pixel mit den Operatoren
affine_trans_image affine_trans_image AffineTransImage AffineTransImage AffineTransImage affine_trans_image , affine_trans_image_size affine_trans_image_size AffineTransImageSize AffineTransImageSize AffineTransImageSize affine_trans_image_size ,
affine_trans_region affine_trans_region AffineTransRegion AffineTransRegion AffineTransRegion affine_trans_region , affine_trans_contour_xld affine_trans_contour_xld AffineTransContourXld AffineTransContourXld AffineTransContourXld affine_trans_contour_xld und
affine_trans_polygon_xld affine_trans_polygon_xld AffineTransPolygonXld AffineTransPolygonXld AffineTransPolygonXld affine_trans_polygon_xld kompatibel.
Eine Transformation mit affine_trans_pixel affine_trans_pixel AffineTransPixel AffineTransPixel AffineTransPixel affine_trans_pixel entspricht der folgenden
Kette von Transformationen (Ein- und Ausgabepixel als homogene Vektoren
dargestellt):
Damit entspricht
affine_trans_pixel(HomMat2D, Row, Col, RowTrans, ColTrans) affine_trans_pixel(HomMat2D, Row, Col, RowTrans, ColTrans) AffineTransPixel(HomMat2D, Row, Col, RowTrans, ColTrans) AffineTransPixel(HomMat2D, Row, Col, RowTrans, ColTrans) AffineTransPixel(HomMat2D, Row, Col, RowTrans, ColTrans) affine_trans_pixel(HomMat2D, Row, Col, RowTrans, ColTrans)
der folgenden Operatorfolge:
affine_trans_point_2d(HomMat2D, Row+0.5, Col+0.5, RowTmp, ColTmp) affine_trans_point_2d(HomMat2D, Row+0.5, Col+0.5, RowTmp, ColTmp) AffineTransPoint2d(HomMat2D, Row+0.5, Col+0.5, RowTmp, ColTmp) AffineTransPoint2d(HomMat2D, Row+0.5, Col+0.5, RowTmp, ColTmp) AffineTransPoint2d(HomMat2D, Row+0.5, Col+0.5, RowTmp, ColTmp) affine_trans_point_2d(HomMat2D, Row+0.5, Col+0.5, RowTmp, ColTmp)
RowTrans := RowTmp-0.5
ColTrans := ColTmp-0.5
Weitere Informationen
Ein Überblick zu den verschiedenen in HALCON verwendeten 2D
Koordinatensystemen ist in der Einleitung zum Kapitel
Transformationen / 2D-Transformationen gegeben.
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Automatisch parallelisiert auf interner Datenebene.
Parameter
HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d (input_control) hom_mat2d → HHomMat2D , HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Eingabe-Transformationsmatrix.
Row Row Row Row row row (input_control) point.x(-array) → HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Eingabepixel (Zeilenkoordinate).
Defaultwert: 64
Wertevorschläge: 0, 16, 32, 64, 128, 256, 512, 1024
Col Col Col Col col col (input_control) point.y(-array) → HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Eingabepixel (Spaltenkoordinate).
Defaultwert: 64
Wertevorschläge: 0, 16, 32, 64, 128, 256, 512, 1024
RowTrans RowTrans RowTrans RowTrans rowTrans row_trans (output_control) point.x(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Ausgabepixel (Zeilenkoordinate).
ColTrans ColTrans ColTrans ColTrans colTrans col_trans (output_control) point.y(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Ausgabepixel (Spaltenkoordinate).
Ergebnis
Falls die Matrix HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d eine affine Abbildung darstellt
(d.h. keine projektive Abbildung), liefert
affine_trans_pixel affine_trans_pixel AffineTransPixel AffineTransPixel AffineTransPixel affine_trans_pixel den Wert 2 (H_MSG_TRUE ) zurück. Ansonsten wird
eine Ausnahmebehandlung durchgeführt.
Vorgänger
hom_mat2d_translate hom_mat2d_translate HomMat2dTranslate HomMat2dTranslate HomMat2dTranslate hom_mat2d_translate ,
hom_mat2d_translate_local hom_mat2d_translate_local HomMat2dTranslateLocal HomMat2dTranslateLocal HomMat2dTranslateLocal hom_mat2d_translate_local ,
hom_mat2d_scale hom_mat2d_scale HomMat2dScale HomMat2dScale HomMat2dScale hom_mat2d_scale ,
hom_mat2d_scale_local hom_mat2d_scale_local HomMat2dScaleLocal HomMat2dScaleLocal HomMat2dScaleLocal hom_mat2d_scale_local ,
hom_mat2d_rotate hom_mat2d_rotate HomMat2dRotate HomMat2dRotate HomMat2dRotate hom_mat2d_rotate ,
hom_mat2d_rotate_local hom_mat2d_rotate_local HomMat2dRotateLocal HomMat2dRotateLocal HomMat2dRotateLocal hom_mat2d_rotate_local ,
hom_mat2d_slant hom_mat2d_slant HomMat2dSlant HomMat2dSlant HomMat2dSlant hom_mat2d_slant ,
hom_mat2d_slant_local hom_mat2d_slant_local HomMat2dSlantLocal HomMat2dSlantLocal HomMat2dSlantLocal hom_mat2d_slant_local ,
hom_mat2d_reflect hom_mat2d_reflect HomMat2dReflect HomMat2dReflect HomMat2dReflect hom_mat2d_reflect ,
hom_mat2d_reflect_local hom_mat2d_reflect_local HomMat2dReflectLocal HomMat2dReflectLocal HomMat2dReflectLocal hom_mat2d_reflect_local
Alternativen
affine_trans_point_2d affine_trans_point_2d AffineTransPoint2d AffineTransPoint2d AffineTransPoint2d affine_trans_point_2d
Modul
Foundation