I Need to Remove Noise from My Image
Despeckle
The Despeckle method is used to remove small groups of pixels, called specks, from the image. Specks are removed by examining each group of 4-way connected pixels and removing any group below the selected size threshold. Despeckle works only on bitonal images, and is designed to remove randomly distributed specks from the image.
Example of Despeckle:
AutoDespeckle
AutoDespeckle works only on bitonal images. This operation automatically detects and removes small groups of black pixels, called specks, that may have been introduced into the image from dust on the scanner or through the binarization process. You do not require to specify the size of the specks in this process.
When the resolution of the input images vary from image to image, the typical speck size in pixels can vary as well.
- If you expect to have a diverse set of images and can't set the speck size for each image, then use AutoDespeckle.
- If you know the resolution of every image and the font size of characters on the images, then use Despeckle and specify the maximum spec height and width.
Example of AutoDespeckle
Auto Smooth Background
AutoSmoothBackground works only on color and grayscale images. This operation smoothes background colors to eliminate or de-emphasize noise that may have originated from dust on scanners or artifacts introduced from the scanning process. It leaves text and other prominent foreground features alone, not modifying their pixels.
Example of AutoSmoothBackground - before & after
Dot Shading Removal
The RemoveDotShading method is designed to remove shaded regions from bitonal images. These regions may be caused by halftone printing, or by halftone or dither patterns applied during thresholding. Shaded regions include groups of regularly spaced dots, typically larger than random specks. Remove Dot Shading uses several parameters to define regions where shading might occur. Remove Dot Shading will only work on these large regions; Despeckle should be used when dealing with randomly located specks.
Example of Remove Dot Shading:
Auto Image Detergent
AutoImageDetergent and ImageDetergent colorspace-based filtering methods work only on color images. Image Detergent works by changing pixels of similar color values to a central color value, which has the result of smoothing the image wherever regions of those colors appear. Since it works based on color value rather than location, Image Detergent is very effective at smoothing out text in high contrast regions without blurring or otherwise distorting the characters.
JPEG compression artifacts around characters can be removed with this operation. This operation can be run prior to Binarization for improved file compression, reduced bitonal noise and better OCR results. The example below shows the results of Image Detergent smoothing the white, black and orange colors of the image.
Example of Image Detergent:
Gaussian, Average, & Median Filters
Smooth continuous tone images using Gaussian, average, and median filters. ScanFix® Xpress provides a number of filters that are designed for smoothing and removing noise in color and gray images, each of which has different strengths and weaknesses. The image below has a number of features that will show the strengths and weaknesses of each filtering method.
Example of an Image Before Filters are Applied:
The simplest noise removal filter is the ApplyAverageFilter, which controls an average, or box filter. This filter examines a “window” of a given size around each pixel, and replaces the pixel with the average of the pixels in the region. This filter is very fast and provides a large degree of smoothing, but the use of a rectangular window tends to produce sharp edged artifacts in the output image.
Example of Apply Average Filter:
The ApplyGaussianFilter method works similarly, but uses a Gaussian bell-shaped curve to produce a weighted average, with pixels near the center of the window contributing more to the final average than pixels near the edge of the window. This eliminates the artifacting seen with the average filter, but a Gaussian filter requires a larger window size to produce the same degree of smoothing as the box filter, meaning it runs slower.
Example of Apply Gaussian Filter:
The ApplyMedianFilter method also works using a window, but rather than averaging the pixel values in the window, it sorts the pixels by brightness and takes the middle value. What this means in practice is that while the Average and Gaussian filters blur sharp edges, the Median filter keeps them sharp, while very effectively filling in small specks of darker or lighter color. The disadvantages of the Median filter are speed, since each pixel to be filtered requires sorting a window-sized list of values, and its tendency to remove thin lines and round off corners. A Median filter must be used very carefully with text, because it can easily filter out portions of characters.
Example of Apply Median Filter:
All of these filters work well on photographic images, with the Median filter generally producing the best results if there are no fine details that it will remove. All of these can be used on high resolution images with text, but they all risk blurring or removing text along with the undesirable noise. Image Detergent is generally the best choice for removing noise around text, when it can be applied.