#include "stdafx.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
//全局变量
int DELAY_CAPTION = 1500;
int DELAY_BLUR = 100;
int MAX_KERNEL_LENGTH = 31;
Mat src, dst;
char window_name[] = "Filter Demo 1";
int display_caption( char* caption )
{
dst = Mat::zeros( src.size(), src.type() );
putText( dst,
caption,
Point( src.cols/6, src.rows/2 ),
CV_FONT_HERSHEY_COMPLEX,
1,
Scalar( 255, 255, 255 ) );
imshow( window_name, dst );
int c = waitKey( DELAY_CAPTION );
if ( c >= 0 )
{
return -1;
}
return 0;
}
int display_dst( int delay )
{
imshow( window_name, dst );
int c = waitKey( delay );
if ( c >= 0 )
{
return -1;
}
return 0;
}
//Main 函数
int main( int argc, char** argv )
{
namedWindow( window_name, CV_WINDOW_AUTOSIZE );
//读取图像
src = imread( "D:\\image\\aa.jpg
OpenCV自带例子(七)图像平滑处理
最新推荐文章于 2022-06-27 19:35:06 发布