Qt OpenGL window, viewing pixel values and threading.

asked 2015-04-21 10:33:01 -0500

dtmoodie gravatar image

I've compiled OpenCV 3.0 from source with QT and OpenGL.

I really like the ability to zoom in in a QT based window to view a pixel's value. I also really like the ability to view GpuMat's without downloading them with a cv::WINDOW_OPENGL window.

Is there any way to access both of these functions at the same time? I have it compiled with QT's OpenGL module, so I thought it was using that backend.

I've also noticed that if I call cv::imshow on a cv::WINDOW_NORMAL in a background thread, that it works correctly, but with a cv::WINDOW_OPENGL it throws an exception in opengl.cpp (358) due to gl::GenBuffers returning a null bufId. Is there any way to fix this? I don't have a whole lot of experience with threading opengl applications so I'm not sure if that's just a general limitation or something to due with how my opengl contexts are being accessed.

edit retag flag offensive close merge delete