gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapegray_closing_shape (Operator)

Name

gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapegray_closing_shape — Grauwert-Closing mit einer ausgewählten Maske.

Signatur

gray_closing_shape(Image : ImageClosing : MaskHeight, MaskWidth, MaskShape : )

Herror gray_closing_shape(const Hobject Image, Hobject* ImageClosing, double MaskHeight, double MaskWidth, const char* MaskShape)

Herror T_gray_closing_shape(const Hobject Image, Hobject* ImageClosing, const Htuple MaskHeight, const Htuple MaskWidth, const Htuple MaskShape)

void GrayClosingShape(const HObject& Image, HObject* ImageClosing, const HTuple& MaskHeight, const HTuple& MaskWidth, const HTuple& MaskShape)

HImage HImage::GrayClosingShape(const HTuple& MaskHeight, const HTuple& MaskWidth, const HString& MaskShape) const

HImage HImage::GrayClosingShape(double MaskHeight, double MaskWidth, const HString& MaskShape) const

HImage HImage::GrayClosingShape(double MaskHeight, double MaskWidth, const char* MaskShape) const

HImage HImage::GrayClosingShape(double MaskHeight, double MaskWidth, const wchar_t* MaskShape) const   (Nur Windows)

static void HOperatorSet.GrayClosingShape(HObject image, out HObject imageClosing, HTuple maskHeight, HTuple maskWidth, HTuple maskShape)

HImage HImage.GrayClosingShape(HTuple maskHeight, HTuple maskWidth, string maskShape)

HImage HImage.GrayClosingShape(double maskHeight, double maskWidth, string maskShape)

def gray_closing_shape(image: HObject, mask_height: Union[int, float], mask_width: Union[int, float], mask_shape: str) -> HObject

Beschreibung

gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapeGrayClosingShapegray_closing_shape führt ein Grauwert-Closing auf dem Bild ImageImageImageImageimageimage mit einem strukturierenden Element der Form MaskShapeMaskShapeMaskShapeMaskShapemaskShapemask_shape mit der vertikalen Ausdehnung MaskHeightMaskHeightMaskHeightMaskHeightmaskHeightmask_height und der horizontalen Ausdehnung MaskWidthMaskWidthMaskWidthMaskWidthmaskWidthmask_width durch. Die Offsetwerte der Maske sind auf 0 festgelegt. Das Ergebnis wird in ImageClosingImageClosingImageClosingImageClosingimageClosingimage_closing zurückgeliefert.

Die Steuerparameter MaskHeightMaskHeightMaskHeightMaskHeightmaskHeightmask_height und MaskWidthMaskWidthMaskWidthMaskWidthmaskWidthmask_width werden, wenn sie vom Typ Integer sind und einen geraden Wert haben, auf den nächstgrößeren ungeraden Wert transformiert. Ist dagegen mindestens einer der beiden Parameter vom Typ Float, dann wird das Eingabebild ImageImageImageImageimageimage zunächst mit der jeweils nächstgrößeren und nächstkleineren ungeraden Maskengröße gefiltert und das Ergebnisbild ImageClosingImageClosingImageClosingImageClosingimageClosingimage_closing aus den beiden Zwischenergebnissen interpoliert. Es ist daher zu beachten, dass gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapeGrayClosingShapegray_closing_shape für Maskengrößen von z.B. 4 und 4.0 unterschiedliche Ergebnisse liefert!

Im Falle der Maskenformen 'rhombus' und 'octagon' für Steuerparameter MaskShapeMaskShapeMaskShapeMaskShapemaskShapemask_shape müssen die Werte für MaskHeightMaskHeightMaskHeightMaskHeightmaskHeightmask_height und MaskWidthMaskWidthMaskWidthMaskWidthmaskWidthmask_width gleich groß sein. Der Parameterwert 'octagon' für MaskShapeMaskShapeMaskShapeMaskShapemaskShapemask_shape beschreibt eine gleichseitige, achteckige Maske, welche sich als Näherung von kreisförmigen Maskenstrukturen eignet. An den Bildrändern wird eine Spiegelung der Randpunkte durchgeführt.

Das Grauwert-Closing eines Bildes i mit einem strukturierenden Element s ist definiert als d.h. eine Dilatation des Bildes mit s gefolgt von einer Erosion mit s (siehe gray_dilation_shapegray_dilation_shapeGrayDilationShapeGrayDilationShapeGrayDilationShapegray_dilation_shape und gray_erosion_shapegray_erosion_shapeGrayErosionShapeGrayErosionShapeGrayErosionShapegray_erosion_shape).

Achtung

Es ist zu beachten, dass gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapeGrayClosingShapegray_closing_shape für Maskengrößen des Typs Float spürbar mehr Rechenzeit benötigt als für Maskengrößen des Typs Integer. Dies gilt insbesondere für rechteckige Masken mit unterschiedlicher Breite und Höhe!

gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapeGrayClosingShapegray_closing_shape kann auf OpenCL-Geräten ausgeführt werden. Wird eine Maskengröße des Typs Float verwendet, kann das Ergebnis geringfügig von dem der CPU abweichen, da die Interpolation auf dem OpenCL-Gerät in einfacher Genauigkeit durchgeführt wird.

Beachten Sie, dass Filteroperatoren eventuell unerwartete Resultate ausgeben, wenn ein Bild mit einer reduzierten Domäne als Input übergeben wird. Weitere Informationen können im Kapitel Filter gefunden werden.

Ausführungsinformationen

Parameter

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / uint2*) *erlaubt für Compute Devices

Bilder, für deren Grauwerte die Minima berechnet werden sollen.

ImageClosingImageClosingImageClosingImageClosingimageClosingimage_closing (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / uint2)

Bilder, die die Minima enthalten.

MaskHeightMaskHeightMaskHeightMaskHeightmaskHeightmask_height (input_control)  extent.y HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Höhe der Filtermaske.

Defaultwert: 11

Wertevorschläge: 3, 5, 7, 9, 11, 13, 15

Typischer Wertebereich: 1.0 ≤ MaskHeight MaskHeight MaskHeight MaskHeight maskHeight mask_height ≤ 511.0

MaskWidthMaskWidthMaskWidthMaskWidthmaskWidthmask_width (input_control)  extent.x HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Breite der Filtermaske.

Defaultwert: 11

Wertevorschläge: 3, 5, 7, 9, 11, 13, 15

Typischer Wertebereich: 1.0 ≤ MaskWidth MaskWidth MaskWidth MaskWidth maskWidth mask_width ≤ 511.0

MaskShapeMaskShapeMaskShapeMaskShapemaskShapemask_shape (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Form der Maske.

Defaultwert: 'octagon' "octagon" "octagon" "octagon" "octagon" "octagon"

Werteliste: 'octagon'"octagon""octagon""octagon""octagon""octagon", 'rectangle'"rectangle""rectangle""rectangle""rectangle""rectangle", 'rhombus'"rhombus""rhombus""rhombus""rhombus""rhombus"

Ergebnis

gray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShapeGrayClosingShapegray_closing_shape liefert 2 (H_MSG_TRUE) zurück, wenn alle Parameter korrekt sind.

Alternativen

gray_closinggray_closingGrayClosingGrayClosingGrayClosinggray_closing

Siehe auch

gray_dilation_shapegray_dilation_shapeGrayDilationShapeGrayDilationShapeGrayDilationShapegray_dilation_shape, gray_erosion_shapegray_erosion_shapeGrayErosionShapeGrayErosionShapeGrayErosionShapegray_erosion_shape, closingclosingClosingClosingClosingclosing

Modul

Foundation