#include "opencv\cv.h"
#include "opencv\highgui.h"
#define fname "image/baboon.jpg"
int main(int argc, char** argv())
{
char * file = fname;
IplImage * img2 = cvLoadImage(file, CV_LOAD_IMAGE_GRAYSCALE);
cvSaveImage("output/grey.jpg", img2);
cvNamedWindow( "Grey", CV_WINDOW_AUTOSIZE );
cvShowImage("Grey", img2);
cvWaitKey(0);
cvDestroyWindow("Grey");
cvReleaseImage(&img2);
return 0;
}
#include "opencv\highgui.h"
#define fname "image/baboon.jpg"
int main(int argc, char** argv())
{
char * file = fname;
IplImage * img2 = cvLoadImage(file, CV_LOAD_IMAGE_GRAYSCALE);
cvSaveImage("output/grey.jpg", img2);
cvNamedWindow( "Grey", CV_WINDOW_AUTOSIZE );
cvShowImage("Grey", img2);
cvWaitKey(0);
cvDestroyWindow("Grey");
cvReleaseImage(&img2);
return 0;
}
No comments:
Post a Comment