1.先下載這三個

2.把這個丟進window

3.就可以打開了

4.下載

5.下載openCV2.1才能開codeblocks

6.中間有點複雜頭昏昏沒截圖
我就直接呈現最後的圖了 哦哈哈

程式碼在這邊
#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 Window",img);
cvWaitKey(0);
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow("week08");
glutDisplayFunc(display);
glutMainLoop();
}
沒有留言:
張貼留言