BilateralSmoothingFilterOptions Klasse
Inhalt
[
Ausblenden
]Summary: The Bilateral Smoothing Filter Options.
Module: aspose.imaging.imagefilters.filteroptions
Full Name: aspose.imaging.imagefilters.filteroptions.BilateralSmoothingFilterOptions
Inheritance: FilterOptionsBase
Constructors
| Name | Beschreibung |
|---|---|
| BilateralSmoothingFilterOptions() | Initialisiert eine neue Instanz der BilateralSmoothingFilterOptions Klasse. |
| BilateralSmoothingFilterOptions(size) | Initialisiert eine neue Instanz der BilateralSmoothingFilterOptions Klasse. |
Properties
| Name | Type | Access | Beschreibung |
|---|---|---|---|
| color_factor | float | r/w | Liest oder setzt den Farbfaktor. |
| color_power | float | r/w | Liest oder setzt die Farbleistung. |
| size | int | r/w | Liest oder setzt die Größe des Kerns. |
| spatial_factor | float | r/w | Liest oder setzt den räumlichen Faktor. |
| spatial_power | float | r/w | Liest oder setzt die räumliche Leistung. |
Constructor: BilateralSmoothingFilterOptions()
BilateralSmoothingFilterOptions()
Initialisiert eine neue Instanz der BilateralSmoothingFilterOptions Klasse.
Constructor: BilateralSmoothingFilterOptions(size)
BilateralSmoothingFilterOptions(size)
Initialisiert eine neue Instanz der BilateralSmoothingFilterOptions Klasse.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| size | int | Größe des Kerns. |
Examples
The following example applies various types of filters to a raster image.
from aspose.pycore import as_of
from aspose.imaging import Image, RasterImage
from aspose.imaging.imagefilters.filteroptions import *
from os.path import join as join_path
directory = r"c:\temp"
with Image.load(join_path(directory, "sample.png")) as image:
rasterImage = as_of(image, RasterImage)
# Wenden Sie einen Medianfilter mit einer Rechteckgröße von 5 auf das gesamte Bild an.
rasterImage.filter(rasterImage.bounds, MedianFilterOptions(5))
rasterImage.save(join_path(directory, "sample.MedianFilter.png"))
with Image.load(join_path(directory, "sample.png")) as image:
rasterImage = as_of(image, RasterImage)
# Wenden Sie einen bilateralen Glättungsfilter mit einer Kernelgröße von 5 auf das gesamte Bild an.
rasterImage.filter(rasterImage.bounds, BilateralSmoothingFilterOptions(5))
rasterImage.save(join_path(directory, "sample.BilateralSmoothingFilter.png"))
with Image.load(join_path(directory, "sample.png")) as image:
rasterImage = as_of(image, RasterImage)
# Wenden Sie einen Gaußschen Unschärfefilter mit einem Radius von 5 und einem Sigma‑Wert von 4,0 auf das gesamte Bild an.
rasterImage.filter(rasterImage.bounds, GaussianBlurFilterOptions(5, 4.0))
rasterImage.save(join_path(directory, "sample.GaussianBlurFilter.png"))
with Image.load(join_path(directory, "sample.png")) as image:
rasterImage = as_of(image, RasterImage)
# Wenden Sie einen Gauss‑Wiener‑Filter mit einem Radius von 5 und einem Glättungswert von 4,0 auf das gesamte Bild an.
rasterImage.filter(rasterImage.bounds, GaussWienerFilterOptions(5, 4.0))
rasterImage.save(join_path(directory, "sample.GaussWienerFilter.png"))
with Image.load(join_path(directory, "sample.png")) as image:
rasterImage = as_of(image, RasterImage)
# Wenden Sie einen Bewegungs‑Wiener‑Filter mit einer Länge von 5, einem Glättungswert von 4,0 und einem Winkel von 90,0 Grad auf das gesamte Bild an.
rasterImage.filter(rasterImage.bounds, MotionWienerFilterOptions(10, 1.0, 90.0))
rasterImage.save(join_path(directory, "sample.MotionWienerFilter.png"))
}
with Image.load(join_path(directory, "sample.png")) as image:
rasterImage = as_of(image, RasterImage)
# Wenden Sie einen Schärfungsfilter mit einer Kernelgröße von 5 und einem Sigma‑Wert von 4,0 auf das gesamte Bild an.
rasterImage.filter(rasterImage.bounds, SharpenFilterOptions(5, 4.0))
rasterImage.save(join_path(directory, "sample.SharpenFilter.png"))