cvConvertImage函数使用实例

#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);

}

 

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