2018年1月4日 星期四

Arthus week8

week8

Texture 貼圖
OPen CV的安裝,讀圖
open GL的貼圖設定
EX:轉動地球

http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/下載data、windows、glut32、source把date和glut32.dll放入windows資料夾裡
到moodle中下載OpenCV-2.1.0-win32-vs2008.exe
安裝過程中選第3個選項
打開codeblocks開專案檔console application複製貼上
#include <opencv/highgui.h>
int main()
{
IplImage * img=cvLoadImage("earth.jpg");
cvNamedWindow("hello");
cvShowImage("hello", img);
cvWaitKey(0);
return 0;
}
codeblocks設定中改成->Build options->Search directories
Search directories->Compiler->Add directory : c:\opencv2.1\include
Search directories->Linker->Add directory : c:\opencv2.1\lib
Linker setting->Add library : cv210 
Linker setting->Add library : cxcore210 
Linker setting->Add library : highgui210
下載圖檔並放到專案檔中

沒有留言:

張貼留言