projective_trans_image_size T_projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_image_size (Operator)
Name
projective_trans_image_size T_projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_image_size — Berechnen der projektive Transformation eines Bildes bei vorgegebener
Zielgröße.
Signatur
void ProjectiveTransImageSize (const HObject& Image , HObject* TransImage , const HTuple& HomMat2D , const HTuple& Interpolation , const HTuple& Width , const HTuple& Height , const HTuple& TransformDomain )
HImage HImage ::ProjectiveTransImageSize (const HHomMat2D& HomMat2D , const HString& Interpolation , Hlong Width , Hlong Height , const HString& TransformDomain ) const
HImage HImage ::ProjectiveTransImageSize (const HHomMat2D& HomMat2D , const char* Interpolation , Hlong Width , Hlong Height , const char* TransformDomain ) const
HImage HImage ::ProjectiveTransImageSize (const HHomMat2D& HomMat2D , const wchar_t* Interpolation , Hlong Width , Hlong Height , const wchar_t* TransformDomain ) const
(Nur Windows)
HImage HHomMat2D ::ProjectiveTransImageSize (const HImage& Image , const HString& Interpolation , Hlong Width , Hlong Height , const HString& TransformDomain ) const
HImage HHomMat2D ::ProjectiveTransImageSize (const HImage& Image , const char* Interpolation , Hlong Width , Hlong Height , const char* TransformDomain ) const
HImage HHomMat2D ::ProjectiveTransImageSize (const HImage& Image , const wchar_t* Interpolation , Hlong Width , Hlong Height , const wchar_t* TransformDomain ) const
(Nur Windows)
static void HOperatorSet .ProjectiveTransImageSize (HObject image , out HObject transImage , HTuple homMat2D , HTuple interpolation , HTuple width , HTuple height , HTuple transformDomain )
HImage HImage .ProjectiveTransImageSize (HHomMat2D homMat2D , string interpolation , int width , int height , string transformDomain )
HImage HHomMat2D .ProjectiveTransImageSize (HImage image , string interpolation , int width , int height , string transformDomain )
Beschreibung
projective_trans_image_size projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_image_size wendet die durch die homogene
Transformationsmatrix HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d beschriebene projektive
Transformation (Homographie) auf das Eingabebild Image Image Image Image image image an
und speichert das Ergebnis in das Ausgabebild TransImage TransImage TransImage TransImage transImage trans_image .
TransImage TransImage TransImage TransImage transImage trans_image wird dabei auf die Zielgröße
Height Height Height Height height height xWidth Width Width Width width width beschnitten. Ansonsten
entspricht der Operator der Alternative
projective_trans_image projective_trans_image ProjectiveTransImage ProjectiveTransImage ProjectiveTransImage projective_trans_image .
Achtung
Der Transformation liegt das gleiche Koordinatensystem zugrunde, das
auch bei dem Operator affine_trans_pixel affine_trans_pixel AffineTransPixel AffineTransPixel AffineTransPixel affine_trans_pixel verwendet wird. Das
bedeutet, dass die Transformation nicht mit der
Transformationsmatrix HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d , sondern mit einer
modifizierte Version davon durchgeführt wird. Eine Transformation
mit projective_trans_image_size projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_image_size entspricht für jeden Punkt
(Row_i, Col_i) des Bildes der folgenden
Kette von Transformationen (Ein- und Ausgabekoordinaten als homogene
Vektoren dargestellt):
Dies kann zu unerwarteten Ergebnissen führen, wenn die
Transformationsmatrix unter Verwendung von Koordinaten erstellt
wurde, die von dem Bild mit Operatoren wie
z.B. area_center_gray area_center_gray AreaCenterGray AreaCenterGray AreaCenterGray area_center_gray abgeleitet wurden. Wenn z.B. ein
rotationssymmetrisches Bild unter Verwendung von
hom_mat2d_rotate hom_mat2d_rotate HomMat2dRotate HomMat2dRotate HomMat2dRotate hom_mat2d_rotate um seinen mit area_center_gray area_center_gray AreaCenterGray AreaCenterGray AreaCenterGray area_center_gray
bestimmten Schwerpunkt rotiert wird, so liegt das transformierte
Bild nicht auf dem Originalbild. Dieser Effekt kann dadurch
kompensiert werden, dass vor dem Aufruf von
projective_trans_image_size projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_image_size die Transformationsmatrix
HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d durch die beiden folgenden Translationen
modifiziert wird:
hom_mat2d_translate(HomMat2D, 0.5, 0.5, HomMat2DTmp)
hom_mat2d_translate_local(HomMat2DTmp, -0.5, -0.5, HomMat2DAdapted)
projective_trans_image_size(Image, TransImage, HomMat2DAdapted,
'bilinear', Width, Height, 'false')
Ein Überblick zu den verschiedenen in HALCON verwendeten 2D
Koordinatensystemen ist in der Einleitung zum Kapitel
Transformationen / 2D-Transformationen gegeben.
projective_trans_image_size projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_image_size kann auf OpenCL-Geräten ausgeführt
werden, wenn das Eingangsbild die maximale Größe für Bildobjekte des
ausgewählten Gerätes nicht überschreitet und der Parameter
TransformDomain TransformDomain TransformDomain TransformDomain transformDomain transform_domain auf 'false' "false" "false" "false" "false" "false" gesetzt wird. Das Ergebnis kann
dabei geringfügig von dem auf der CPU berechneten abweichen.
Ausführungsinformationen
Unterstützt OpenCL Compute Devices.
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Automatisch parallelisiert auf Tupelebene.
Automatisch parallelisiert auf Kanalebene.
Automatisch parallelisiert auf interner Datenebene.
Parameter
Image Image Image Image image image (input_object) (multichannel-)image(-array) → object HImage HObject HImage Hobject (byte* / uint2* / real*) *erlaubt für Compute Devices
Eingabebild.
TransImage TransImage TransImage TransImage transImage trans_image (output_object) (multichannel-)image(-array) → object HImage HObject HImage Hobject * (byte / uint2 / real)
Ergebnisbild.
HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d (input_control) hom_mat2d → HHomMat2D , HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Homogene projektive Transformationsmatrix.
Interpolation Interpolation Interpolation Interpolation interpolation interpolation (input_control) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Interpolationsmethode für die Transformation.
Defaultwert:
'bilinear'
"bilinear"
"bilinear"
"bilinear"
"bilinear"
"bilinear"
Werteliste: 'bilinear' "bilinear" "bilinear" "bilinear" "bilinear" "bilinear" , 'nearest_neighbor' "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor"
Width Width Width Width width width (input_control) extent.x → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Breite des Ausgabebildes.
Height Height Height Height height height (input_control) extent.y → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Höhe des Ausgabebildes.
TransformDomain TransformDomain TransformDomain TransformDomain transformDomain transform_domain (input_control) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Soll die Region des Eingabebildes auch
transformiert werden?
Defaultwert:
'false'
"false"
"false"
"false"
"false"
"false"
Werteliste: 'false' "false" "false" "false" "false" "false" , 'true' "true" "true" "true" "true" "true"
Werteliste (für Compute Devices): 'false' "false" "false" "false" "false" "false"
Vorgänger
vector_to_proj_hom_mat2d vector_to_proj_hom_mat2d VectorToProjHomMat2d VectorToProjHomMat2d VectorToProjHomMat2d vector_to_proj_hom_mat2d ,
hom_vector_to_proj_hom_mat2d hom_vector_to_proj_hom_mat2d HomVectorToProjHomMat2d HomVectorToProjHomMat2d HomVectorToProjHomMat2d hom_vector_to_proj_hom_mat2d ,
proj_match_points_ransac proj_match_points_ransac ProjMatchPointsRansac ProjMatchPointsRansac ProjMatchPointsRansac proj_match_points_ransac ,
proj_match_points_ransac_guided proj_match_points_ransac_guided ProjMatchPointsRansacGuided ProjMatchPointsRansacGuided ProjMatchPointsRansacGuided proj_match_points_ransac_guided ,
hom_mat3d_project hom_mat3d_project HomMat3dProject HomMat3dProject HomMat3dProject hom_mat3d_project
Siehe auch
projective_trans_image projective_trans_image ProjectiveTransImage ProjectiveTransImage ProjectiveTransImage projective_trans_image ,
projective_trans_contour_xld projective_trans_contour_xld ProjectiveTransContourXld ProjectiveTransContourXld ProjectiveTransContourXld projective_trans_contour_xld ,
projective_trans_region projective_trans_region ProjectiveTransRegion ProjectiveTransRegion ProjectiveTransRegion projective_trans_region ,
projective_trans_point_2d projective_trans_point_2d ProjectiveTransPoint2d ProjectiveTransPoint2d ProjectiveTransPoint2d projective_trans_point_2d ,
projective_trans_pixel projective_trans_pixel ProjectiveTransPixel ProjectiveTransPixel ProjectiveTransPixel projective_trans_pixel
Modul
Foundation