2019年4月11日 星期四

比利安娜工作室-balaboom_Week08

Week08 2019/04/11
(1)主題:貼圖Texture
(2)範圍:OpenCV
(3)實作:OpenCV
(4)實作:OpenCV+OpenGL貼圖
下載source.zip windows.zip and data.zip and glut32.dll
然後將windows.zip解壓縮,再將glut32.dll複製到解壓完的windows裡
  1. 開啟Texture.exe       🌑glTexCoord2f(tx,ty); glVertex3f(x,y,z)為期中考題
  2. 期中考試考題說明及複習
✦Google:OpenCV 2.1找到第一個
裡面OpenCV-2.1.0-win32-vs-2008.exe安裝
(1)要C:\OpenCV2.1 目錄
(2)要選Add PATH
(3)裝好後才能啟動CodeBlocks
✦下載freeglut window版,裝桌面\freeglut
(1)複製出桌面\freeglut\lib\libglut32.a
(2)CodeBlocks開GLUT專案,設定好
✦先將10行打好
(1)#include <opencv/highgui.h>加在#include<GL/glut.h>後面
(2)IplImage * img=cvLoadImage("earth.jpg");
    cvShowImage("opencv Window",img);
    cvWaitKey(0);
    這三行加在int main函式裡頭
(這樣依然不能執行程式,還要加上以下步驟~)
(1)在CodeBlocks裡選擇build options將OpenCV 2.1\include資料夾加進去(search directories/Compiler)

(2)將OpenCV 2.1\lib也加進去(search directories/Linker)
(3)在Linker Setting裡加上桃園三結義的資料夾
(4)程式碼執行結果(圖檔要放在freeglut-bin裡)

沒有留言:

張貼留言