1.滤波
GaussianBlur(imgThresholded, imgThresholded, Size(5, 5), 0, 0);//高斯滤波
medianBlur(imgThresholded, imgThresholded, 3);//中值滤波
bilateralFilter(imgThresholded, imgThresholded, 5, 10.0, 2.0);//双边滤波
blur(imgThresholded, imgThresholded, Size(3, 3));//均值滤波
2.计算运行时间
#include "time.h" //添加头文件
{
clock_t start, finish;
start = clock();//待检测程序首部
.... ...//待测程序
finish = clock();
printf("共耗时%.3lf秒", ((double)finish - start) / 1000); //待检测程序尾部
}