貼圖
1.先到http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/下載
data,win32.glut32.dll 這三個檔案並解壓縮。
2.把解壓縮的data和glut32.dll的檔案移至window的資料夾中開啟Texture的檔案
glTexCoord2f(x,y) 為貼圖對應多邊型的XY座標:
左下角為0,0
右上角為1,0
左下角為0,1
右下角為1,1
2.OpenCV 讀入、秀出圖檔
下載並安裝moodle上課檔案的OpenCV-2.1.0-win32-vs2008.exe
安裝時要勾選加入環境參數PATH
在CodeBlocks中開啟GLUT專案
在專案-->右鍵-->Build options-->Search directories
加入三個位置
1-Compiler對應include資料夾
2-Linker對應lib資料夾
3-Resource compiler對應bin資料夾
在程式中加入#include <opencv/highgui.h>
2.OpenCV 讀入、秀出圖檔
下載並安裝moodle上課檔案的OpenCV-2.1.0-win32-vs2008.exe
安裝時要勾選加入環境參數PATH
在CodeBlocks中開啟GLUT專案
在專案-->右鍵-->Build options-->Search directories
加入三個位置
1-Compiler對應include資料夾
2-Linker對應lib資料夾
3-Resource compiler對應bin資料夾
在程式中加入#include <opencv/highgui.h>




沒有留言:
張貼留言