1.下載jsyeh.org/3dcg10
2.windows.zip,下載windows\Light和Material.exe
3.data.zip,下載\windows\data\,data資料夾放進windows,會出現Texture.exe

4.開codeblocks輸入程式碼
```c++
#include <opencv/highgui.h>
int main()
{
///Ipl是 Intel performance library 的縮寫
IplImage * img = cvLoadImage("檔名.png");
cvShowImage("week09",img);
cvWaitKey(0);
}
4-1
(1)File-New-EmptyFile,另存week09_opencv.cpp
(2)Setting-Compiler
5.茶壺程式碼

圖片要加到Desktop\freeglut-MinGW-3.0.0-1.mp\freeglut\bin裡面,因為執行的第15行cvShowImage("img", img);
雙引號中是視窗名字

沒有留言:
張貼留言