Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. Video on OpenGL window, from image frames

Video on OpenGL window, from image frames

Scheduled Pinned Locked Moved Graphics
linuxquestionc++graphicsgame-dev
4 Posts 2 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DoctorDoctor
    wrote on last edited by
    #1

    Hi to all of you, I am a new programmer on OpenGL. I am currently working on an application where I have a Debian Linux PC with two usb industrial cameras,acquiring images at a rate of 25fps. Each image data is sent by sockets to a windows PC. The format of the received buffer at the windows PC side is buffer[0]='top left image pixel', buffer[640*480]='bottom right image pixel'. I want know to proccess these buffers an display a video on an OpenGL window at a similar frame rate, or even lower,i.e. even 5-10 frames per second will do for me. I am using Dev-C++ on the windows PC. Can anynone advised me with an appropriate approach?,i.e. what is I mean the most appropriate method to follow. Cheers, DoctorDoctor

    E 1 Reply Last reply
    0
    • D DoctorDoctor

      Hi to all of you, I am a new programmer on OpenGL. I am currently working on an application where I have a Debian Linux PC with two usb industrial cameras,acquiring images at a rate of 25fps. Each image data is sent by sockets to a windows PC. The format of the received buffer at the windows PC side is buffer[0]='top left image pixel', buffer[640*480]='bottom right image pixel'. I want know to proccess these buffers an display a video on an OpenGL window at a similar frame rate, or even lower,i.e. even 5-10 frames per second will do for me. I am using Dev-C++ on the windows PC. Can anynone advised me with an appropriate approach?,i.e. what is I mean the most appropriate method to follow. Cheers, DoctorDoctor

      E Offline
      E Offline
      El Corazon
      wrote on last edited by
      #2

      DoctorDoctor wrote:

      Can anynone advised me with an appropriate approach?,i.e. what is I mean the most appropriate method to follow.

      The easiest, and one line solution, for you is glDrawPixels()[^], you have the right format, direction is easily manipulated with glPixelZoom()[^] and it is compatible with all levels of OpenGL. but... it does not make it available as a texture. Do you need it as a texture within OpenGL? what graphics card do you have? There are several solutions here, the best are avail on recent generation cards.

      _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

      D 1 Reply Last reply
      0
      • E El Corazon

        DoctorDoctor wrote:

        Can anynone advised me with an appropriate approach?,i.e. what is I mean the most appropriate method to follow.

        The easiest, and one line solution, for you is glDrawPixels()[^], you have the right format, direction is easily manipulated with glPixelZoom()[^] and it is compatible with all levels of OpenGL. but... it does not make it available as a texture. Do you need it as a texture within OpenGL? what graphics card do you have? There are several solutions here, the best are avail on recent generation cards.

        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

        D Offline
        D Offline
        DoctorDoctor
        wrote on last edited by
        #3

        Yes, I need it as texture since its a 2D object. I managed to display a single frame. How can I redraw on the same window? I am using myInit();//reads in the pixels glutDisplayFunc(myDisplay);// display callback function glutMainLoop();// shows the window and loops to accepts and processes input events Myproblem is that now I need to continue displaying frames on the same opened OpenGL window, in order for it to look like video.

        E 1 Reply Last reply
        0
        • D DoctorDoctor

          Yes, I need it as texture since its a 2D object. I managed to display a single frame. How can I redraw on the same window? I am using myInit();//reads in the pixels glutDisplayFunc(myDisplay);// display callback function glutMainLoop();// shows the window and loops to accepts and processes input events Myproblem is that now I need to continue displaying frames on the same opened OpenGL window, in order for it to look like video.

          E Offline
          E Offline
          El Corazon
          wrote on last edited by
          #4

          DoctorDoctor wrote:

          that now I need to continue displaying frames on the same opened OpenGL window

          what you probably want is a PBO (Pixel Buffer Object). This allows rapid transfer of texture objects to and from the card. http://http.download.nvidia.com/developer/Papers/2005/Fast_Texture_Transfers/Fast_Texture_Transfers.pdf[^] you can find more information in the OpenGL SDK from nVidia, Version 9 had the demo of the PBO transfers, not sure about 10. http://download.developer.nvidia.com/developer/SDK/Individual_Samples/3dgraphics_samples.html[^] http://developer.nvidia.com/object/sdk-9.html[^] http://developer.nvidia.com/object/sdk_home.html[^]

          _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups