Opencv Smooth Functions
Void cvsmooth (<br/> const cvarr * SRC, <br/> cvarr * DST, <br/> int smooth = cv_gaussian, <br/> int param1 = 3, <br/> int param2 = 0, <br/> int param3 = 0, <br/> int param4 = 0 <br/> );
Note:
(1) You may not have a deep understanding of cvarr. You can think of it as a base class in C ++. Of course, it also includes iplimage.
(2) types supported by smooth:
Cv_blur sums param1, param2, and scales 1/(param1 * param2) to calculate the simple average value.
Cv_blur_no_scale the sum of param1 and param2 of each pixel in a blur without scaling variation. In particular, the input image and the result image must have different numerical precision to ensure that they do not happen.
Overflow. If the source image is 8u, The result image must be 16 s or 32 s.
Cv_median: the value of each pixel in the square field class of the center pixel is replaced by the median value.
When cv_gaussian Gaussian Blur param3 is zero, Gaussian convolution kernel Sigma is calculated using the following formula:
SIGMA (x) = (n (x)/2-1) * 0.30 + 0.80, n (x) = param1
SIGMA (y) = (N (y)/2-1) * 0.30 + 0.80, n (y) = param2
If the fourth parameter is specified, the third and fourth parameters represent the horizontal and vertical values of Sigma respectively.
If the third and fourth parameters have been specified, and the first two parameters are 0, the size of the window is determined by Sigma.
Slow but most effective
Cv_bilateral bidirectional filtering because Gaussian Blur is a slow change of pixels in the image space, but random two points may form a large
Pixel difference. Gaussian filtering reduces noise while retaining signals, but it is ineffective in areas close to the edge. bidirectional filtering can solve this problem, but it requires more time,
It requires two parameters. param1 indicates the width of the Gaussian Kernel used in the airspace, and param2 indicates the height of the Gaussian Kernel in The Color domain.