Smooth
Smooths the image in one of several ways.
-
C:
void
cvSmooth
(const CvArr*
src, CvArr*
dst, int
smoothtype=CV_GAUSSIAN, int
param1=3, int
param2=0, double
param3=0, double
param4=0
)
-
Python:
cv.
Smooth
(src, dst, smoothtype=CV_GAUSSIAN, param1=3, param2=0, param3=0, param4=0
) → None
-
Parameters: - src – The source image
- dst – The destination image
- smoothtype –
Type of the smoothing:
- CV_BLUR_NO_SCALE linear convolution with box kernel (all 1’s). If you want to smooth different pixels with different-size box kernels, you can use the integral image that is computed using integral()
- CV_BLUR linear convolution with box kernel (all 1’s) with subsequent scaling by
- CV_GAUSSIAN linear convolution with a Gaussian kernel
- CV_MEDIAN median filter with a square aperture
- CV_BILATERAL bilateral filter with a square aperture, color sigma= param3 and spatial sigma= param4 . If param1=0 , the aperture square side is set tocvRound(param4*1.5)*2+1 . Information about bilateral filtering can be found at http://www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html
- param1 – The first parameter of the smoothing operation, the aperture width. Must be a positive odd number (1, 3, 5, ...)
- param2 – The second parameter of the smoothing operation, the aperture height. Ignored by CV_MEDIAN and CV_BILATERAL methods. In the case of simple scaled/non-scaled and Gaussian blur if param2 is zero, it is set to param1 . Otherwise it must be a positive odd number.
- param3 –
In the case of a Gaussian parameter this parameter may specify Gaussian