Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Synchronization of a projector and a camera

  1. #1
    Newbie Newbie
    Join Date
    Feb 2013

    Synchronization of a projector and a camera


    I am developing an application where images consecutively projected with a video projector are captured with a camera. Freeglut is used for displaying the images. I am not able to synchronize image refreshing and camera triggering properly. No matter what I tried, the cameras always trigger while the glut window is being refreshed, the refresh artifacts are visible in the shot image. I already tried the following:

    - synchronous application: I use the keyboard loop to start the acquisition. Instead of calling glutPostRedisplay, the glutDisplayFunc is called manually before triggering the camera
    - asynchronous application: I use glutPostRedisplay to redraw the contents of the glut window and trigger the camera in the glutIdleFunc

    Since there is only 1 thread involved, the second method is not really asynchronous, but I guess you get what I mean.

    For both methods I tried:
    - The use of double buffering with glutSwapBuffers() at the end of my glutDisplayFunc
    - The use of single buffering with glFinish() at the end of my glutDisplayFunc, which I thought should block until the screen refreshed

    None of the above worked. Any comments or ideas how to solve this?


  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    glFinish() blocks until commands are complete that is not the same think as a screen refresh. You could try waiting an additional 1/60th of a second for a full refresh cycle. Also I would check on photographing screens I remember on old CRT's it was almost impossible because the pixels where not continuously light. I don't know about LED screens.

Posting Permissions

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