Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: OpenGL for image processing and computer vision

  1. #1
    Newbie Newbie
    Join Date
    Oct 2012
    Posts
    2

    OpenGL for image processing and computer vision

    Hello,
    I hope I do not make a fatal mistake in my first question.
    I want to write an program for image manipulation.
    Therefore I want to make the processing of the image on the GPU, and because I want to develop the application for Windows and Linux, I wanted to use OpenGL instead of DirectX.
    Because of this I wanted to ask, if there is a simpler way (perhaps with a short note on how to do) than taking the way for 3D (where there are many tutorials) and only rendering 2 polygons full screen and then applying the pixel shader on it?
    Also I wanted to ask if there is a simple way to use OpenGL with C# and Java?
    Thanks for answering my question.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,106
    Rendering in 2D is quite easy in OpenGL; many basic calls have 2d version like glVertex2f vs glVertex3f or just set the z value to 0. Also google orthogonal projections. If you are planning to do image manipulation shaders will make your life a lot simpler in the long run. You might want to buy "The OpenGL 4.0 Shader Language Cookbook" e-book. I know there is a library for Java and there is OpenTK for c#.

  3. #3
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    325
    I wouldn't recommend the immediate mode anymore, setting up rendering to fullscreen quads for image manipulation isn't hard in core and you can port that code to MacOS X or mobile devices with OpenGL ES later on...
    An alternative to rendering the images in a FBO would be compute shaders starting with OpenGL 4.3 or using OpenCL instead of OpenGL which also can run on the GPU and is cross plattform.

  4. #4
    Newbie Newbie
    Join Date
    Oct 2012
    Posts
    2
    Sorry that I did not answer earlier, but I had to do a lot.
    I have only some further questions.
    I want to take a bitmap as input and return a bitmap. Is this possible with FBO? And do I need a swap chain, if I do not want to display the image direct to the screen?
    And last, are there any good tutorials about starting with opengl (rendering a 2D image and applying a pixel shader)?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •