crop_rectangle2crop_rectangle2CropRectangle2CropRectangle2crop_rectangle2 (Operator)
Name
crop_rectangle2crop_rectangle2CropRectangle2CropRectangle2crop_rectangle2 — Ausschneiden eines oder mehrerer beliebig orientierter rechteckiger
Bildausschnitte.
Signatur
Herror crop_rectangle2(const Hobject Image, Hobject* ImagePart, double Row, double Column, double Phi, double Length1, double Length2, const char* AlignToAxis, const char* Interpolation)
Herror T_crop_rectangle2(const Hobject Image, Hobject* ImagePart, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Length1, const Htuple Length2, const Htuple AlignToAxis, const Htuple Interpolation)
void CropRectangle2(const HObject& Image, HObject* ImagePart, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HTuple& AlignToAxis, const HTuple& Interpolation)
HImage HImage::CropRectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HString& AlignToAxis, const HString& Interpolation) const
HImage HImage::CropRectangle2(double Row, double Column, double Phi, double Length1, double Length2, const HString& AlignToAxis, const HString& Interpolation) const
HImage HImage::CropRectangle2(double Row, double Column, double Phi, double Length1, double Length2, const char* AlignToAxis, const char* Interpolation) const
HImage HImage::CropRectangle2(double Row, double Column, double Phi, double Length1, double Length2, const wchar_t* AlignToAxis, const wchar_t* Interpolation) const
(Nur Windows)
static void HOperatorSet.CropRectangle2(HObject image, out HObject imagePart, HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, HTuple alignToAxis, HTuple interpolation)
HImage HImage.CropRectangle2(HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, string alignToAxis, string interpolation)
HImage HImage.CropRectangle2(double row, double column, double phi, double length1, double length2, string alignToAxis, string interpolation)
def crop_rectangle2(image: HObject, row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]], phi: MaybeSequence[Union[int, float]], length_1: MaybeSequence[Union[int, float]], length_2: MaybeSequence[Union[int, float]], align_to_axis: str, interpolation: str) -> HObject
Beschreibung
crop_rectangle2crop_rectangle2CropRectangle2CropRectangle2CropRectangle2crop_rectangle2 schneidet aus den Eingabebildern einen oder mehrere
rechteckige Ausschnitte aus und gibt diese in ImagePartImagePartImagePartImagePartimagePartimage_part
zurück. Die Bildausschnitte werden jeweils über den Schwerpunkt
(RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn), die Orientierung PhiPhiPhiPhiphiphi und
die halben Kantenlängen Length1Length1Length1Length1length1length_1 und Length2Length2Length2Length2length2length_2 beschrieben.
PhiPhiPhiPhiphiphi bestimmt im mathematisch positiven Sinn den Winkel
in Bogenmaß zwischen der horizontalen Achse und der ersten Kante (mit Länge
Length1Length1Length1Length1length1length_1). Die Parameter der Rechtecke verwenden Pixel-zentrierte,
subpixel-genaue Koordinaten, siehe
Transformationen / 2D-Transformationen.
Der Parameter AlignToAxisAlignToAxisAlignToAxisAlignToAxisalignToAxisalign_to_axis bestimmt die Ausrichtung der Ausgabebilder.
Mögliche Werte:
-
'true'"true""true""true""true""true": Der Bildausschnitt wird so rotiert, sodass er
an den Koordinatenachsen ausgerichtet ist. Für diese Transformation muss eine
geeignete Interpolation durchgeführt werden. Eine detaillierte Beschreibung
der Interpolationsmodi findet sich in der Beschreibung von
affine_trans_imageaffine_trans_imageAffineTransImageAffineTransImageAffineTransImageaffine_trans_image.
Die Rechtecke dürfen aus dem Eingabebild herausragen. Die Grauwerte von
Pixeln, welche außerhalb des Eingabebildes liegen, werden auf 0 gesetzt.
-
'false'"false""false""false""false""false": Das kleinstmögliche umschließende Rechteck des
Eingabe-Rechtecks wird ausgeschnitten und der Definitionsbereich entsprechend
gesetzt. Die Rechtecke dürfen aus dem Eingabebild herausragen. Jedoch
entspricht dann das Ausgabebild dem Teil des Rechtecks, der innerhalb des
Eingabebildes liegt. Für dieses Verfahren wird keine Interpolation benötigt,
sodass der Parameter InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation keinen Einfluss auf das
Endergebnis hat.
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.
Parameter
ImageImageImageImageimageimage (input_object) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte / int2 / uint2 / real)
Eingabebild(er).
ImagePartImagePartImagePartImagePartimagePartimage_part (output_object) (multichannel-)image(-array) → objectHImageHObjectHImageHobject * (byte / int2 / uint2 / real)
Bildausschnitt(e).
RowRowRowRowrowrow (input_control) rectangle2.center.y(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Zeilenindex des Zentrums des Bildausschnittes.
Defaultwert: 300.0
Wertevorschläge: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Typischer Wertebereich:
Row
Row
Row
Row
row
row
(lin)
Empfohlene Schrittweite: 10.0
ColumnColumnColumnColumncolumncolumn (input_control) rectangle2.center.x(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Spaltenindex des Zentrums des Bildausschnittes.
Defaultwert: 200.0
Wertevorschläge: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Typischer Wertebereich:
Column
Column
Column
Column
column
column
(lin)
Empfohlene Schrittweite: 10.0
PhiPhiPhiPhiphiphi (input_control) rectangle2.angle.rad(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Orientierung des Rechtecks (Bogenmaß).
Defaultwert: 0.0
Wertevorschläge: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097
Typischer Wertebereich: -1.178097
≤
Phi
Phi
Phi
Phi
phi
phi
≤
1.178097 (lin)
Length1Length1Length1Length1length1length_1 (input_control) rectangle2.hwidth(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Länge der ersten Halbachse.
Defaultwert: 100.0
Wertevorschläge: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0
Typischer Wertebereich:
Length1
Length1
Length1
Length1
length1
length_1
(lin)
Empfohlene Schrittweite: 10.0
Length2Length2Length2Length2length2length_2 (input_control) rectangle2.hheight(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Länge der zweiten Halbachse.
Defaultwert: 20.0
Wertevorschläge: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0
Typischer Wertebereich:
Length2
Length2
Length2
Length2
length2
length_2
(lin)
Empfohlene Schrittweite: 10.0
AlignToAxisAlignToAxisAlignToAxisAlignToAxisalignToAxisalign_to_axis (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Gibt an, ob der Bildausschnitt an den Koordinatenachsen
ausgerichtet wird.
Defaultwert:
'true'
"true"
"true"
"true"
"true"
"true"
Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Interpolationsverfahren für die Transformation.
Defaultwert:
'constant'
"constant"
"constant"
"constant"
"constant"
"constant"
Werteliste: 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic", '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"
Nachfolger
disp_imagedisp_imageDispImageDispImageDispImagedisp_image
Alternativen
crop_domaincrop_domainCropDomainCropDomainCropDomaincrop_domain,
crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1crop_rectangle1,
crop_partcrop_partCropPartCropPartCropPartcrop_part,
change_formatchange_formatChangeFormatChangeFormatChangeFormatchange_format,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain
Siehe auch
zoom_image_sizezoom_image_sizeZoomImageSizeZoomImageSizeZoomImageSizezoom_image_size,
zoom_image_factorzoom_image_factorZoomImageFactorZoomImageFactorZoomImageFactorzoom_image_factor
Modul
Foundation