KlassenKlassenKlassenKlassen | | | | Operatoren

zoom_image_sizezoom_image_sizeZoomImageSizezoom_image_sizeZoomImageSizeZoomImageSize (Operator)

Name

zoom_image_sizezoom_image_sizeZoomImageSizezoom_image_sizeZoomImageSizeZoomImageSize — Skalieren von Bildern auf eine vorgegebene Größe.

Signatur

zoom_image_size(Image : ImageZoom : Width, Height, Interpolation : )

Herror zoom_image_size(const Hobject Image, Hobject* ImageZoom, const Hlong Width, const Hlong Height, const char* Interpolation)

Herror T_zoom_image_size(const Hobject Image, Hobject* ImageZoom, const Htuple Width, const Htuple Height, const Htuple Interpolation)

Herror zoom_image_size(Hobject Image, Hobject* ImageZoom, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation)

HImage HImage::ZoomImageSize(const HTuple& Width, const HTuple& Height, const HTuple& Interpolation) const

HImageArray HImageArray::ZoomImageSize(const HTuple& Width, const HTuple& Height, const HTuple& Interpolation) const

void ZoomImageSize(const HObject& Image, HObject* ImageZoom, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation)

HImage HImage::ZoomImageSize(Hlong Width, Hlong Height, const HString& Interpolation) const

HImage HImage::ZoomImageSize(Hlong Width, Hlong Height, const char* Interpolation) const

void HOperatorSetX.ZoomImageSize(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageZoom, [in] VARIANT Width, [in] VARIANT Height, [in] VARIANT Interpolation)

IHImageX* HImageX.ZoomImageSize(
[in] Hlong Width, [in] Hlong Height, [in] BSTR Interpolation)

static void HOperatorSet.ZoomImageSize(HObject image, out HObject imageZoom, HTuple width, HTuple height, HTuple interpolation)

HImage HImage.ZoomImageSize(int width, int height, string interpolation)

Beschreibung

zoom_image_sizezoom_image_sizeZoomImageSizezoom_image_sizeZoomImageSizeZoomImageSize vergrößert das Bild ImageImageImageImageImageimage auf die durch WidthWidthWidthWidthWidthwidth und HeightHeightHeightHeightHeightheight vorgegebene Größe. Der Parameter InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation gibt dabei die Art der verwendeten Interpolationsmethode an (siehe affine_trans_imageaffine_trans_imageAffineTransImageaffine_trans_imageAffineTransImageAffineTransImage). Die Domäne des Eingabebildes wird ignoriert, d.h. es wird die volle Domäne des Bildrechtecks angenommen.

Achtung

Falls der Systemparameter 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" auf 'true'"true""true""true""true""true" gesetzt ist, kann die intern verwendete Integer-Arithmetik in den folgenden beiden Fällen zu Fehlern führen: Zum einen kann das Ergebnisbild leicht fehlerhafte Grauwerte enthalten, wenn zoom_image_sizezoom_image_sizeZoomImageSizezoom_image_sizeZoomImageSizeZoomImageSize auf ein uint2 oder int2 Bild mit hohem Dynamikbereich (das heisst Bilder mit Werten nahe an den Grenzen der entsprechenden Typen) angewendet wird und gleichzeitig Skalierungsfaktoren (Verhältnis von Ausgabe- zu Eingabebildgröße) kleiner als 0.5 verwendet werden. Zum zweiten können undefinierte Grauwerte am unteren und am rechten Bildrand entstehen, wenn für InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation ein anderer Wert als 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor" gewählt wird, ein großer Skalierungsfaktor angewendet wird und außerdem ein großes Ergebnisbild entsteht. Die maximale Breite dieses Randes mit undefinierten Grauwerten kann mit der Formel abgeschätzt werden, wobei S den Skalierungsfaktor in einer Dimension und I die Größe des Ausgabebildes in der entsprechenden Dimension darstellt. In beiden Fällen wird empfohlen, den Systemparameter 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" mittels set_systemset_systemSetSystemset_systemSetSystemSetSystem auf 'false'"false""false""false""false""false" zu setzen.

zoom_image_sizezoom_image_sizeZoomImageSizezoom_image_sizeZoomImageSizeZoomImageSize wird nicht internern parallelisiert, wenn WidthWidthWidthWidthWidthwidth und HeightHeightHeightHeightHeightheight den halben Dimensionen von ImageImageImageImageImageimage entsprechen. Außerdem erfolgt keine interne Parallelisierung für InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation='nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor".

zoom_image_sizezoom_image_sizeZoomImageSizezoom_image_sizeZoomImageSizeZoomImageSize 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.

Parallelisierung

Parameter

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

Eingabebild

ImageZoomImageZoomImageZoomImageZoomImageZoomimageZoom (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte / int2 / uint2 / real)

Skaliertes Ausgabebild.

WidthWidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Breite des Zielbildes.

Defaultwert: 512

Wertevorschläge: 128, 256, 512

Typischer Wertebereich: 2 ≤ Width Width Width Width Width width ≤ 512

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

HeightHeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Höhe des Zielbildes.

Defaultwert: 512

Wertevorschläge: 128, 256, 512

Typischer Wertebereich: 2 ≤ Height Height Height Height Height height ≤ 512

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Art der Interpolation.

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

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

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
zoom_image_size(Image,ZoomImage,200,200,'constant')
dev_display (ZoomImage)

Beispiel (C)

read_image(&Image,"monkey");
disp_image(Image,WindowHandle);
zoom_image_size(Image,&ZoomImage,200,200,"constant");
disp_image(ZoomImage,WindowHandle);

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
zoom_image_size(Image,ZoomImage,200,200,'constant')
dev_display (ZoomImage)

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
zoom_image_size(Image,ZoomImage,200,200,'constant')
dev_display (ZoomImage)

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
zoom_image_size(Image,ZoomImage,200,200,'constant')
dev_display (ZoomImage)

Beispiel (HDevelop)

read_image(Image,'monkey')
dev_display (Image)
zoom_image_size(Image,ZoomImage,200,200,'constant')
dev_display (ZoomImage)

Alternativen

zoom_image_factorzoom_image_factorZoomImageFactorzoom_image_factorZoomImageFactorZoomImageFactor, affine_trans_imageaffine_trans_imageAffineTransImageaffine_trans_imageAffineTransImageAffineTransImage, hom_mat2d_scalehom_mat2d_scaleHomMat2dScalehom_mat2d_scaleHomMat2dScaleHomMat2dScale

Siehe auch

hom_mat2d_scalehom_mat2d_scaleHomMat2dScalehom_mat2d_scaleHomMat2dScaleHomMat2dScale, affine_trans_imageaffine_trans_imageAffineTransImageaffine_trans_imageAffineTransImageAffineTransImage

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren