#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"///for cvSmooth
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
/** @function main */
int main( int argc, char** argv )
{
IplImage *iplsrc = cvLoadImage(argv[1]);
IplImage *ipldst = cvCreateImage(cvGetSize(iplsrc),IPL_DEPTH_8U,3);
for (int i=1;i<10;i+=2)
{
char windowName[128] = {0};
sprintf(windowName,"meadian smooth %dth !.png",i);
cvSmooth(iplsrc,ipldst,CV_MEDIAN,i);
cvShowImage(windowName,ipldst);
cvSaveImage(windowName,ipldst);
}
printf("OK iplImage show !\n");
waitKey(0);
return 0;
}