rotate_imagerotate_imageRotateImageRotateImage (Operator)

Name

rotate_imagerotate_imageRotateImageRotateImage — Rotieren von Bildern um das Zentrum.

Signatur

rotate_image(Image : ImageRotate : Phi, Interpolation : )

Herror rotate_image(const Hobject Image, Hobject* ImageRotate, double Phi, const char* Interpolation)

Herror T_rotate_image(const Hobject Image, Hobject* ImageRotate, const Htuple Phi, const Htuple Interpolation)

void RotateImage(const HObject& Image, HObject* ImageRotate, const HTuple& Phi, const HTuple& Interpolation)

HImage HImage::RotateImage(const HTuple& Phi, const HString& Interpolation) const

HImage HImage::RotateImage(double Phi, const HString& Interpolation) const

HImage HImage::RotateImage(double Phi, const char* Interpolation) const

HImage HImage::RotateImage(double Phi, const wchar_t* Interpolation) const   (Nur Windows)

static void HOperatorSet.RotateImage(HObject image, out HObject imageRotate, HTuple phi, HTuple interpolation)

HImage HImage.RotateImage(HTuple phi, string interpolation)

HImage HImage.RotateImage(double phi, string interpolation)

Beschreibung

rotate_imagerotate_imageRotateImageRotateImageRotateImage dreht das Bild ImageImageImageImageimage gegen den Uhrzeigersinn um PhiPhiPhiPhiphi Grad um den Bildmittelpunkt und gibt das Ergebnis im Ausgabebild ImageRotateImageRotateImageRotateImageRotateimageRotate zurück. Das Ausgabebild hat die gleiche Größe wie das Eingabebild. Die einzigen Ausnahmen sind Drehungen um 90 und 270 Grad, wo Breite und Höhe vertauscht werden. Der Definitionsbereich des Eingabebildes wird ignoriert, d.h., als das volle Rechteck des Bildes angenommen. Der Definitionsbereich des Ausgabebildes entspricht der Überschneidung des transformierten Rechtecks und des Rechtecks des Ausgabebildes.

Falls PhiPhiPhiPhiphi ein Vielfaches von 90 Grad ist, ist dieser Operator viel schneller als der allgemeine Operator affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImage. Der Parameter InterpolationInterpolationInterpolationInterpolationinterpolation entspricht der Wirkung bei affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImage. Bei Rotationen um 90, 180 und 270 Grad wird der Parameter ignoriert. Wenn es erforderlich ist, den Definitionsbereich ebenfalls mit zu rotieren, muss der Operator projective_trans_imageprojective_trans_imageProjectiveTransImageProjectiveTransImageProjectiveTransImage genutzt werden.

Für Bilder vom Typ 'byte'"byte""byte""byte""byte", 'int2'"int2""int2""int2""int2" oder 'uint2'"uint2""uint2""uint2""uint2" kann mittels des Systemparameters 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming" (siehe set_systemset_systemSetSystemSetSystemSetSystem) zwischen schneller Berechnung in Festkommaarithmetik ('int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming" = 'true'"true""true""true""true") und hochgenauer Berechung in Fließkommaarithmetik ('int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming" = 'false'"false""false""false""false") gewählt werden. Mit Ausnahme der Rotationen um 90, 180 oder 270 Grad kann es bei der Festkommaberechnung zu leichten Grauwertabweichungen kommen. Auch die Domäne der Ergebnisbilder kann sich in diesem Fall leicht unterscheiden.

Achtung

Der Definitionsbereich des Eingabebildes wird ignoriert, d.h., als das volle Rechteck des Bildes angenommen. Der Definitionsbereich des Ausgabebildes entspricht der Überschneidung des transformierten Rechtecks und des Rechtecks des Ausgabebildes. Der Winkel PhiPhiPhiPhiphi wird in Grad und nicht im Bogenmaß angegeben. rotate_imagerotate_imageRotateImageRotateImageRotateImage wird für Rotationen um 90, 180 und 270 Grad nicht intern parallelisiert!

rotate_imagerotate_imageRotateImageRotateImageRotateImage 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. Aus numerischen Gründen kann es dabei zu geringfügigen Abweichungen des Ergebnisses gegenüber der Ausführung auf der CPU kommen.

Ausführungsinformationen

Parameter

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHobject (byte* / int2* / uint2* / real*) *erlaubt für Compute Devices

Eingabebild.

ImageRotateImageRotateImageRotateImageRotateimageRotate (output_object)  (multichannel-)image(-array) objectHImageHImageHobject * (byte / int2 / uint2 / real)

Rotiertes Ausgabebild.

PhiPhiPhiPhiphi (input_control)  angle.deg HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Rotationswinkel.

Defaultwert: 90

Wertevorschläge: 90, 180, 270

Typischer Wertebereich: 0 ≤ Phi Phi Phi Phi phi ≤ 360

Minimale Schrittweite: 0.001

Empfohlene Schrittweite: 0.2

InterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Art der Interpolation.

Defaultwert: 'constant' "constant" "constant" "constant" "constant"

Werteliste: 'bicubic'"bicubic""bicubic""bicubic""bicubic", 'bilinear'"bilinear""bilinear""bilinear""bilinear", 'constant'"constant""constant""constant""constant", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor", 'weighted'"weighted""weighted""weighted""weighted"

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
rotate_image(Image,RotImage,270,'constant')
dev_display (RotImage)

Beispiel (C)

read_image(&Image,"monkey");
disp_image(Image,WindowHandle);
rotate_image(Image,&RotImage,270,'constant');
disp_image(RotImage,WindowHandle);

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
rotate_image(Image,RotImage,270,'constant')
dev_display (RotImage)

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
rotate_image(Image,RotImage,270,'constant')
dev_display (RotImage)

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
rotate_image(Image,RotImage,270,'constant')
dev_display (RotImage)

Alternativen

hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotateHomMat2dRotate, affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImage

Siehe auch

mirror_imagemirror_imageMirrorImageMirrorImageMirrorImage

Modul

Foundation