//2-4载入一幅图片进行高斯平滑处理
#include "stdafx.h"
//#include<windows.h>
#include "cv.h"
#include "highgui.h"
int main( int argc, char** argv )
{
IplImage* image=cvLoadImage("98.jpg",-1);
IplImage* out=cvCreateImage(cvGetSize(image),IPL_DEPTH_8U,3);
cvNamedWindow("exp2-4-in",CV_WINDOW_AUTOSIZE);
cvNamedWindow("exp2-4-out",CV_WINDOW_AUTOSIZE);
cvSmooth(image,out,CV_GAUSSIAN,3,3);//高斯平滑
cvShowImage("exp2-4-in",image);
cvShowImage("exp2-4-out",out);
cvReleaseImage(&image);
cvReleaseImage(&out);
cvWaitKey(0);
cvDestroyWindow("exp2-4-in");
cvDestroyWindow("exp2-4-out");
#include "stdafx.h"
//#include<windows.h>
#include "cv.h"
#include "highgui.h"
int main( int argc, char** argv )
{
IplImage* image=cvLoadImage("98.jpg",-1);
IplImage* out=cvCreateImage(cvGetSize(image),IPL_DEPTH_8U,3);
cvNamedWindow("exp2-4-in",CV_WINDOW_AUTOSIZE);
cvNamedWindow("exp2-4-out",CV_WINDOW_AUTOSIZE);
cvSmooth(image,out,CV_GAUSSIAN,3,3);//高斯平滑
cvShowImage("exp2-4-in",image);
cvShowImage("exp2-4-out",out);
cvReleaseImage(&image);
cvReleaseImage(&out);
cvWaitKey(0);
cvDestroyWindow("exp2-4-in");
cvDestroyWindow("exp2-4-out");
}