首先看下OpenCV 官方文档对于cvSmooth各个参数的解释:
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)
其对于每个参数的解释如下:
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 (standard deviation). If it is zero, it is calculated from the kernel size:
Using standard sigma for small kernels( to ) gives better speed. If param3 is not zero, while param1 and param2 are zeros, the kernel size is calculated from the sigma (to provide accurate enough operation).