// 5_3.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 *pSourceImage = cvLoadImage(argv[1]);
assert(pSourceImage != NULL);
IplImage *pDestionImage = cvCloneImage(pSourceImage);
assert(pDestionImage != NULL);
//简单无缩放模糊,不支持 in place
cvSmooth(pSourceImage,pDestionImage,CV_MEDIAN,5);
//显示图像
cvNamedWindow("Show_Source");
cvNamedWindow("Show_Destion");
cvShowImage("Show_Source",pSourceImage);
cvShowImage("Show_Destion",pDestionImage);
cvWaitKey();
//释放资源
cvReleaseImage(&pSourceImage);
cvReleaseImage(&pDestionImage);
cvDestroyWindow("Show_Source");
cvDestroyWindow("Show_Destion");
return 0;
}