【OpenCV图像处理】IplImage转换灰度图像及Cvmat与IplImage格式之间的相互转换
#defineImgPath"D:\\...\\*.JPG"//读取图像IplImage*Img=cvLoadImage(ImgPath);if(!Img){fprintf(stderr,"Cannotloadimage%s\n",ImgPath);}//转换为灰度图像IplImage*ImgGray=cvCreateImage(cvGetSize(Img),IPL_DEPTH_8U,1);cvC