思维导图
1.线性滤波
//方框滤波操作
boxFilter( g_srcImage, g_dstImage1, -1,Size( g_nBoxFilterValue+1, g_nBoxFilterValue+1));
//均值滤波操作
blur( g_srcImage, g_dstImage2, Size( g_nMeanBlurValue+1, g_nMeanBlurValue+1), Point(-1,-1));
//高斯滤波操作
GaussianBlur( g_srcImage, g_dstImage3, Size( g_nGaussianBlurValue*2+1, g_nGaussianBlurValue*2+1 ), 0, 0);
2.非线性滤波
//中值滤波操作的回调函数
medianBlur ( g_srcImage, g_dstImage4, g_nMedianBlurValue*2+1 );
//双边滤波操作的回调函数
bilateralFilter ( g_srcImage, g_dstImage5, g_nBilateralFilterValue, g_nBilateralFilterValue*2, g_nBilateralFilterValue/2 );
3.形态学滤波
//开运算/闭运算
morphologyEx(g_srcImage, g_dstImage, MORPH_OPEN, element);
morphologyEx(g_srcImage, g_dstImage, MORPH_CLOSE, element);
//腐蚀/膨胀
erode(g_srcImage, g_dstImage, element);
dilate(g_srcImage, g_dstImage, element);
//顶帽运算/黑帽运算
morphologyEx(g_srcImage, g_dstImage, MORPH_TOPHAT , element);
morphologyEx(g_srcImage, g_dstImage, MORPH_BLACKHAT, element);
4.漫水填充
threshold(g_maskImage, g_maskImage, 1, 128, THRESH_BINARY);
area = floodFill(dst, g_maskImage, seed, newVal, &ccomp, Scalar(LowDifference, LowDifference, LowDifference),
Scalar(UpDifference, UpDifference, UpDifference), flags);
5.尺寸缩放
//向上采样
pyrUp( g_tmpImage, g_dstImage, Size( g_tmpImage.cols*2, g_tmpImage.rows*2 ) );
//向下采样
pyrDown( g_tmpImage, g_dstImage, Size( g_tmpImage.cols/2, g_tmpImage.rows/2 ));
//尺寸调整
resize(g_tmpImage,g_dstImage,Size( g_tmpImage.cols/2, g_tmpImage.rows/2 ));
6.阈值化
//调用阈值函数
threshold(g_grayImage,g_dstImage,g_nThresholdValue,255,g_nThresholdType);
参考书籍《OpenCV3编程入门》