简单模糊处理

来源:互联网 发布:传智2016大数据百度云 编辑:程序博客网 时间:2024/06/16 01:52

// 5_1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <cv.h>
#include <cvcam.h>
#include <cxcore.h>
#include <highgui.h>

 

#pragma comment(lib,"cv.lib")
#pragma comment(lib,"cvcam.lib")
#pragma comment(lib,"cxcore.lib")
#pragma comment(lib,"highgui.lib")

 

int main(int argc, char* argv[])
{
 IplImage *pImage = cvLoadImage(argv[1]);
 assert(pImage != NULL);

 //简单图像变换支持in place操作
 cvSmooth(pImage,pImage,CV_BLUR);

 //显示结果
 cvNamedWindow(argv[1]);
 cvShowImage(argv[1],pImage);
 
 cvWaitKey();

 //释放资源
 cvReleaseImage(&pImage);
 cvDestroyWindow(argv[1]);

 return 0;
}

 

原创粉丝点击