1. 程式人生 > >#DIP##OpenCV#Some Kinds Of Image Smoothing Methodologies

#DIP##OpenCV#Some Kinds Of Image Smoothing Methodologies

this eve .com logs pos http dst inpu resp

In digital image processing(DIP), many methods are used in smoothing images in order to suppress noise, to improve the quality of the image and so on. Learning them from our textbook is far from enough, which means, we are supposed to put the the theories, the algorithms, into practicing, programming to implement the functions and vertify its result.


From here, some methods are listed followed by their algorithms and corresponding codes written with some functions in OpenCV.

1.Mean Filters

Mean filters, a kind of linear filter, can be classified into low-pass filters. The output is the a average of the including pixels‘ values in its domain template so MF can be applied to image blurring and noise reduction. Consequently, the sharp sections are inhibit which reduce the noise signals in the image while the edge is also blurred.

Basically, mean filters are classified into four categories:

  • Arithmetic Mean Filter
  • Geometric Mean Filter
  • Harmonic Mean Filter
  • Contra-Harmonic Mean Filter

1.1 Arithmetic Mean Filter

The simplies mean filter. It can be used for reducing mean noise or Gauss noise but may cause blur to some extent.

技術分享

Using 3*3 template, the algorithm is as following:

技術分享

  • OpenCV Function
void blur( InputArray src, OutputArray dst,Size ksize, Point anchor = Point(-1,-1), int borderType = BORDER_DEFAULT );

src is the input image and dst comes as the output. ksize is the size of the template. The forth parameter reveals the position of the specific pixel that need to be dealt with in the template. Such a position has a default value set as the center of the template. What about the last one? We don‘t have to consider the last parameter here.

Using 7*7 template with this function as a example:

blur(srcImge,dstImage,size(7,7));

1.2 Geometric Mean Filter

1.3 Harmonic Mean Filter

技術分享

1.4 Contra-Harmonic Mean Filter


unfinished...2017-10-28 15:24:47

#DIP##OpenCV#Some Kinds Of Image Smoothing Methodologies