# Applying Median and Wiener Filters - Denoise Image in Python

Contents
[ ]

## Applying Median and Wiener Filters

The median filter is a nonlinear digital filtering technique, often used to remove noise. Such noise reduction is a typical pre-processing step to improve the results of later processing. The Wiener filter is the MSE(mean squared error) optimal stationary linearfilter for images degraded by additive noise and blurring. Using Aspose.Imaging for Python via .NET API developers can apply median filter to denoise the image and can apply gauss wiener filter on images. This article demonstrates how median filter and gauss wiener filter can be applied to images.

### Applying Median Filter

Aspose.Imaging provides Medianfilteroptions class to apply filter on a RasterImage. The code snippet provided below demonstrates how to apply median filter to a raster image.

### Applying Gauss Wiener Filter

Aspose.Imaging provides GaussWienerFilterOptions class to apply filter on a RasterImage. The code snippet provided below demonstrates how to apply gauss wiener filter to a raster image.

Applying Gauss Wiener Filter For Colored image

### Applying Motion Wiener Filter

Aspose.Imaging provides MotionWienerFilterOptions class to apply filter on a RasterImage. The code snippet provided below demonstrates how to apply motion wiener filter to a raster image.

Aligning Horizontal And Vertical Resolutions

This article demonstrates the usage of Aspose.Imaging for Python via .NET to make sure that the horizontal & vertical resolutions of an image are equal while manipulating its properties. Aspose.Imaging API have exposed efficient & easy to use methods to achieve this goal. Aspose.Imaging for Python via .NET has exposed the align_resolutions method of the Image class for making horizontal & vertical alignment equal. The following code snippet shows you how to use AlignResolutions method.

## Apply Correction Filter On An Image

This article demonstrates the usage of Aspose.Imaging for Python via .NET to perform correction filters on an image. Aspose.Imaging APIs have exposed efficient & easy to use methods to achieve this goal. Aspose.Imaging for Python via .NET has exposed the BilateralSmoothingFilterOptions and SharpenFilterOptions classes for filtration. BilateralSmoothingFilterOptions class needs an integer as size. The steps to perform Resize are as simple as below:

1. Load an image using the factory method load exposed by Image class.
2. Convert the image into RasterImage.
3. Create an instances of BilateralSmoothingFilterOptions and SharpenFilterOptions classes.
4. Call the RasterImage.Filter method while specifying rectangle as image bounds and BilateralSmoothingFilterOptions class instance.
5. Call the RasterImage.Filter method while specifying rectangle as image bounds and SharpenFilterOptions class instance.