Step 1:
安裝檔案 OpenCV-2.1.0-win32-vs2008
Step 2:
Codeblocks打開GLUT檔案
檔案又見Build options
Step 3:
設定檔案位置
***注意不要用點的容易出錯,開啟檔案找到位置複製地址貼上。
Step 4:
打上程式碼
#include <opencv/highgui.h>
int main()
{
IplImage * img=cvLoadImage("C:\\Users\\Public\\Pictures\\Sample Pictures\\koala.jpg");
cvNamedWindow("opencv");
cvShowImage("opencv",img);
cvWaitKey(0);
}
///注意 IplImage * img=cvLoadImage(""); 引號內打圖檔位置
///注意 圖檔位置可用內容開啟,複製位置並且把\改成\\語法問題
執行結果








沒有留言:
張貼留言