Applying Median and Wiener Filters
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 linear filter for images degraded by additive noise and blurring. Using Aspose.PSD for .NET API developers can apply a median filter to denoise the image and can apply gauss wiener filter on images. This article demonstrates how the median filter and gauss wiener filter can be applied to images.
Applying Median Filter
Aspose.PSD provides MedianFilterOptions class to apply a filter on a RasterImage. The code snippet provided below demonstrates how to apply the median filter to a raster image.
Applying Gauss Wiener Filter
Aspose.PSD provides GaussWienerFilterOptions class to apply a filter on a RasterImage. The code snippet provided below demonstrates how to apply the gauss wiener filter to a raster image.
Applying Gauss Wiener Filter For Colored image
Aspose.PSD provides GaussWienerFilterOptions for colored images as well. The code snippet provided below demonstrates how to apply the gauss wiener filter to a color image.
Applying Motion Wiener Filter
Aspose.PSD provides MotionWienerFilterOptions class to apply a filter on a RasterImage. The code snippet provided below demonstrates how to apply a motion wiener filter to a raster image.
Apply Correction Filter On An Image
This article demonstrates the usage of Aspose.PSD for .NET to perform correction filters on an image. Aspose.PSD APIs have exposed efficient & easy to use methods to achieve this goal. Aspose.PSD for .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:
- Load an image using the factory method Load exposed by Image class.
- Convert the image into RasterImage.
- Create an instance of BilateralSmoothingFilterOptions and SharpenFilterOptions classes.
- Call the RasterImage.Filter method while specifying rectangle as image bounds and BilateralSmoothingFilterOptions class instance.
- Call the RasterImage.Filter method while specifying rectangle as image bounds and SharpenFilterOptions class instance.
- Adjust the contrast
- Set brightness
- Save the results.
Use Bradley threshold algorithm
Image thresholding is used in graphics applications. The goal of thresholding an image is to classify pixels as either “dark” or “light”. Aspose.PSD API allows you to use Bradley thresholding while converting images. The following code snippet shows you how to define the threshold value and then invoke the Bradley’s threshold algorithm.