電腦圖學
- 主題:Texture
- 範例:Texture.exe
- 實作:OpenCV
- 實作:OpenCV+OpenGL貼圖
- 期中考:10行OpenGL程式
TODO:點名:Veyon Config > 服務 >啟動服務-
TODO:到小葉老師的網站3D Graphics download資料
TODO:到小葉老師的網站3D Graphics download資料
download:window.zip 解壓縮 至window
data.zip 解壓縮 data拉至window
glut32.dll 解壓縮 glut32.dll移至window資料夾
- 貼圖的範例程式 ↓
- 期中考題↓
data.zip 解壓縮 data拉至window
glut32.dll 解壓縮 glut32.dll移至window資料夾
- 貼圖的範例程式 ↓
- 期中考題↓

打上程式 ↓
#include<GL/glut.h>
#include<opencv/highgui.h>
void display()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc, char**argv)
{
IplImage * img=cvLoadImage("earth.jpg");
cvShowImage("opencv Windows", img);
cvWaitKey(0);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow("Week08");
glutDisplayFunc(display);
glutMainLoop();
}
- 執行出圖片

沒有留言:
張貼留言