Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are different kinds of filters for different kinds of noise - you should select the proper filter for your noise. Keep in mind that all filters come with a reduction in image resolution - they are mainly an average operator, so even that you have the same destination resolution, some information is gone. More exactly, your image will become fuzzy.

Some kinds of filters

  • Gaussian. Good to remove additive noise (some pixels that are a bit higher or lower than the rest). The

  • There are different additive noise models: white, gaussian, etc. While for the gaussian one, the gaussian filter is the method of choice, for white noise you best use a "flat" filter, that is, one that merely averages the pixels in a neighbourhood, with equal weights. The technical name for it is box filter, and it has a nice nickname in OpenCV: blur(). It is quite simplistic, because in most cases the noise found in a picture is not white, but its main advantage is speed - it is the fastest filter in the list.

  • The two filters have a significant problem: they blur the image more than one would like. Especially for large kernels, the image may become unusable. They smooth both the noise and the edges. To solve this issue, the bilateral filter has been developed -it has a gaussian kernel that is adapted locally to preserve edges. While it is one of the best methods out there for noise removal, it is also a performance killer - it's not well-fitted for real-time applications.

  • Median filter. Excellent to remove "salt and pepper noise" - pixels that are 0 or 255, instead of the expected value. Images that require median filtering have small white or black dots in them. Look here for a good example. It takes all the pixels in a neighborhood, sorts them, and takes the median value (the one in the middle of the sorted vector). Look here for a nice example. It is usually employed in cheap camera hardware to remove "burned" pixels.

To have a complete list of ways to remove noise, I should also add a different but very useful technique. Image subsampling (resizing to a smaller size) is often performed as a pre-processing step in image analysis, not least for performance reasons ( Object detection is slow? ). A good shrinking algorithm will also remove noise: bilinear, bicubic and area-based resize will give you a smaller, noise-free image. The best out there is the cv::INTER_AREA flag.

There are different kinds of filters for different kinds of noise - you should select the proper filter for your noise. Keep in mind that all filters come with a reduction in image resolution - they are mainly an average operator, so even that you have the same destination resolution, some information is gone. More exactly, your image will become fuzzy.

The bigger your kernel, the more visible are the results: noise is reduced by a factor of width*height of your filter kernel, but fuzziness also increases when the kernel size increases.

Some kinds of filters

  • Gaussian. Good to remove additive noise (some pixels that are a bit higher or lower than the rest). The

  • There are different additive noise models: white, gaussian, etc. While for the gaussian one, the gaussian filter is the method of choice, for white noise you best use a "flat" filter, that is, one that merely averages the pixels in a neighbourhood, with equal weights. The technical name for it is box filter, and it has a nice nickname in OpenCV: blur(). It is quite simplistic, because in most cases the noise found in a picture is not white, but its main advantage is speed - it is the fastest filter in the list.

  • The two filters have a significant problem: they blur the image more than one would like. Especially for large kernels, the image may become unusable. They smooth both the noise and the edges. To solve this issue, the bilateral filter has been developed -it has a gaussian kernel that is adapted locally to preserve edges. While it is one of the best methods out there for noise removal, it is also a performance killer - it's not well-fitted for real-time applications.

  • Median filter. Excellent to remove "salt and pepper noise" - pixels that are 0 or 255, instead of the expected value. Images that require median filtering have small white or black dots in them. Look here for a good example. It takes all the pixels in a neighborhood, sorts them, and takes the median value (the one in the middle of the sorted vector). Look here for a nice example. It is usually employed in cheap camera hardware to remove "burned" pixels.

To have a complete list of ways to remove noise, I should also add a different but very useful technique. Image subsampling (resizing to a smaller size) is often performed as a pre-processing step in image analysis, not least for performance reasons ( Object detection is slow? ). A good shrinking algorithm will also remove noise: bilinear, bicubic and area-based resize will give you a smaller, noise-free image. The best out there is the cv::INTER_AREA flag.

There are different kinds of filters for different kinds of noise - you should select the proper filter for your noise. Keep in mind that all filters come with a reduction in image resolution - they are mainly an average operator, so even that you have the same destination resolution, some information is gone. More exactly, your image will become fuzzy.

The bigger your kernel, the more visible are the results: noise is reduced by a factor of width*height of your filter kernel, but fuzziness also increases when the kernel size increases.

Some kinds of filters

  • Gaussian. Good to remove additive noise (some pixels that are a bit higher or lower than the rest). The

  • There are different additive noise models: white, gaussian, etc. While for the gaussian one, the gaussian filter is the method of choice, for white noise you best use a "flat" filter, that is, one that merely averages the pixels in a neighbourhood, with equal weights. The technical name for it is box filter, and it has a nice nickname in OpenCV: blur(). It is quite simplistic, because in most cases the noise found in a picture is not white, but its main advantage is speed - it is the fastest filter in the list.

  • The two filters have a significant problem: they blur the image more than one would like. Especially for large kernels, the image may become unusable. They smooth both the noise and the edges. To solve this issue, the bilateral filter has been developed -it has a gaussian kernel that is adapted locally to preserve edges. While it is one of the best methods out there for noise removal, it is also a performance killer - it's not well-fitted for real-time applications.

  • Median filter. Excellent to remove "salt and pepper noise" - pixels that are 0 or 255, instead of the expected value. Images that require median filtering have small white or black dots in them. Look here for a good example. It takes all the pixels in a neighborhood, sorts them, and takes the median value (the one in the middle of the sorted vector). Look here for a nice example. It is usually employed in cheap camera hardware to remove "burned" pixels.

To have a complete list of ways to remove noise, I should also add a different but very useful technique. Image subsampling (resizing to a smaller size) is often performed as a pre-processing step in image analysis, not least for performance reasons ( Object detection is slow? ). A good shrinking algorithm will also remove noise: bilinear, bicubic and area-based resize will give you a smaller, noise-free image. The best out there is the cv::INTER_AREA flag.

Final note: this is just a short introduction in filtering theory. If you are interested to know more, look for some online university courses on image processing: stanford, mit, cmu, etc. Or maybe someone else will recommend you a good bibliography.

There are different kinds of filters for different kinds of noise - you should select the proper filter for your noise. Keep in mind that all filters come with a reduction in image resolution - they are mainly an average operator, so even that you have the same destination resolution, some information is gone. More exactly, your image will become fuzzy.

The bigger your kernel, the more visible are the results: noise is reduced by a factor of width*height of your filter kernel, but fuzziness also increases when the kernel size increases.

Some kinds of filters

  • Gaussian. Good to remove additive noise (some pixels that are a bit higher or lower than the rest). The rest).

  • There are different additive noise models: white, gaussian, etc. While for the gaussian one, the gaussian filter is the method of choice, for white noise you best use a "flat" filter, that is, one that merely averages the pixels in a neighbourhood, with equal weights. The technical name for it is box filter, and it has a nice nickname in OpenCV: blur(). It is quite simplistic, because in most cases the noise found in a picture is not white, but its main advantage is speed - it is the fastest filter in the list.

  • The two filters above have a significant problem: they blur the image more than one would like. Especially for large kernels, the image may become unusable. becomes foggy. They smooth both the noise and the edges. To solve this issue, the bilateral filter has been developed -it has a gaussian kernel that is adapted locally to preserve edges. While it is one of the best methods out there for noise removal, it is also a performance killer - it's not well-fitted for real-time applications.

  • Median filter. Excellent to remove "salt and pepper noise" - pixels that are 0 or 255, instead of the expected value. Images that require median filtering have small white or black dots in them. Look here for a good example. It takes all the pixels in a neighborhood, sorts them, and takes the median value (the one in the middle of the sorted vector). Look here for a nice example. It is usually employed in cheap camera hardware to remove "burned" pixels.

To have a complete list of ways to remove noise, I should also add a different but very useful technique. Image subsampling (resizing to a smaller size) is often performed as a pre-processing step in image analysis, not least for performance reasons ( Object detection is slow? ). A good shrinking algorithm will also remove noise: bilinear, bicubic and area-based resize will give you a smaller, noise-free image. The best out there is the cv::INTER_AREA flag.

Final note: this is just a short introduction in filtering theory. If you are interested to know more, look for some online university courses on image processing: stanford, mit, cmu, etc. Or maybe someone else will recommend you a good bibliography.

There are different kinds of filters for different kinds of noise - you should select the proper filter for your noise. Keep in mind that all filters come with a reduction in image resolution - they are mainly an average operator, so even that you have the same destination resolution, some information is gone. More exactly, your image will become fuzzy.

The bigger your kernel, the more visible are the results: noise is reduced by a factor of width*height of your filter kernel, but fuzziness also increases when the kernel size increases.

Some kinds of filters

  • Gaussian. Good to remove additive noise (some pixels that are a bit higher or lower than the rest).

  • There are different additive noise models: white, gaussian, etc. While for the gaussian one, the gaussian filter is the method of choice, for white noise you best use a "flat" filter, that is, one that merely averages the pixels in a neighbourhood, with equal weights. The technical name for it is box filter, and it has a nice nickname in OpenCV: blur(). It is quite simplistic, because in most cases the noise found in a picture is not white, but its main advantage is speed - it is the fastest filter in the list.

  • The two filters above have a significant problem: they blur the image more than one would like. Especially for large kernels, the image becomes foggy. They smooth both the noise and the edges. To solve this issue, the bilateral filter has been developed -it has a gaussian kernel that is adapted locally to preserve edges. While it is one of the best methods out there for noise removal, it is also a performance killer - it's not well-fitted for real-time applications.

  • Median filter. Excellent to remove "salt and pepper noise" - pixels that are 0 or 255, instead of the expected value. Images that require median filtering have small white or black dots in them. Look here for a good example. It takes all the pixels in a neighborhood, sorts them, and takes the median value (the one in the middle of the sorted vector). Look here for a nice example. It is usually employed in cheap camera hardware to remove "burned" pixels.

To have a complete list of ways to remove noise, I should also add a different but very useful technique. Image subsampling (resizing to a smaller size) is often performed as a pre-processing step in image analysis, not least for performance reasons ( Object detection is slow? ). A good shrinking algorithm will also remove noise: bilinear, bicubic and area-based resize will give you a smaller, noise-free image. The best out there is the cv::INTER_AREA flag.

Final note: this is just a short introduction in filtering theory. If you are interested to know more, look for some online university courses on image processing: stanford, mit, cmu, etc. Or maybe someone else will recommend you a good bibliography.