#include "stdafx.h" #include <opencv/cv.h> #include <opencv/highgui.h> void main() { IplImage *img; IplImage *convert; img = cvLoadImage("C:\\lena.jpg",CV_LOAD_IMAGE_ANYCOLOR); convert=cvCreateImage( cvGetSize( img ), IPL_DEPTH_8U, 1); cvConvertImage(img,convert,CV_CVTIMG_FLIP); cvNamedWindow("Imageshow",1); cvShowImage("Imageshow",img); cvNamedWindow("Converted",1); cvShowImage("Converted",convert); cvWaitKey(0); cvDestroyWindow("Imageshow"); cvReleaseImage(&img); cvDestroyWindow("Converted"); cvReleaseImage(&convert); }
转载于:https://www.cnblogs.com/OceanDeep/archive/2011/08/27/2284591.html