No. I'm actually capturing images real-time through a webcam. But I made it multithreaded. I have a dedicated thread querying the webcam for a new image (which should happen every 30ms for typical webcams). When querying is successful, I place the image in a buffer and I wake up the rendering thread. The rendering thread converts the OpenCV's IplImage format to Qt's QImage format then painting happens.
Based on the clockings I'm currently observing, the conversion process (IplImage to QImage) along with the painting, takes some time and I get to skip some images captured by the webcam. This is acceptable though, as long as the latest image in the buffer gets to be displayed on screen. My image buffer contains only the latest frame captured by the webcam instead of stacking up the images in a queue.





Reply With Quote



Bookmarks