Mat -> IplImage*
本來在 VC++ 2012 的寫法:
Mat Mimg = imread("lena.jpg", 1);//用Mat型別讀取圖片
IplImage* img ;//先宣告 IplImage* 型別的img
img = &IplImage(Mimg);//Matimg的位置丟給img
error:
taking address of temporary [-fpermissive]
解決方法:
Mat Mimg = imread("lena.jpg", 1);//用Mat型別讀取圖片
IplImage imgtemp = Mimg ;//先宣告 IplImage* 型別的img
IplImage *img = &imgtemp ;
You save my time. Thank You!
回覆刪除