开发者

API development for openGL texture from live cameras

How to create API develop开发者_运维百科ment for openGL texture from live cameras?


I think I understood what you tried to say. First, let's identify a few tasks:

  • You need to find a way to retrieve the video frames from the camera:

This can be done very easily with OpenCV. It is possible to find several examples of this on StackOverflow.

  • Store the pixels from the frames as 2D textures of OpenGL:

This is a very well known technique called texture mapping. You'll probably use a similar sequence of calls to do it: glGenTextures(), glBindTexture(), and finally glTexImage2D() to attach the pixels to the texture.

  • What to do with it?

You forgot to mention what you would like to do with it, but my guess is that you want to display the images on the screen. This means you'll have to create a window using GLUT. You will certainly find dozens of thousands of examples on Google showing how to achieve this.

Please note that the libraries I suggested are all cross-platform, and they will work on Windows/Linux/Mac OS X.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜