《学习opencv》第五章课后习题1

 
// 5-1.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include<opencv/cv.h>
#include<opencv/highgui.h>


int _tmain()
{
	IplImage* img=cvLoadImage("C:\\lena.jpg");
	IplImage* dst1=cvCreateImage(cvGetSize(img),img->depth,img->nChannels);
	IplImage* dst2=cvCreateImage(cvGetSize(img),img->depth,img->nChannels);
	IplImage* dst3=cvCreateImage(cvGetSize(img),img->depth,img->nChannels);
	cvSmooth(img,dst1,CV_GAUSSIAN,5,0,0,0);
	cvSmooth(dst1,dst2,CV_GAUSSIAN,5,0,0,0);
    cvSmooth(img,dst3,CV_GAUSSIAN,11,0,0,0);

	cvNamedWindow("original",1);
	cvNamedWindow("2*5Result",1);
	cvNamedWindow("1*11Result",1);

	cvShowImage("original",img);
	cvShowImage("2*5Result",dst2);
	cvShowImage("1*11Result",dst3);
	cvWaitKey(0);
	cvDestroyAllWindows();
	cvReleaseImage(&img);
	cvReleaseImage(&dst1);
	cvReleaseImage(&dst2);
	cvReleaseImage(&dst3);
	return 0;
}


你可能感兴趣的:(c,DST)