Hi,
For a computer vision class I'm writing a program to capture images from a webcam using opencv and then displaying it in a Qt GUI. The capture all works, and I copy the 3 channel OpenCV image to the 4 byte aligned format necessary for Qt in my capture thread.
This works fine and displays correctly, but I really don't like the fact that I'm creating a QImage only to then have it converted to a QPixmap for painting which wastes time (about 5-8% CPU time of a Athlon 64 3200 running at 1GHz)
QPixmap has a loadFromData function but it seems to expect an image encoded in PNG/GIF/JPG and won't take my raw 0xffRRGGBB data.
Is there any way to load a QPixmap from raw data like that or paint that data on screen in a more direct manner (OpenGL is not an option)?
Bookmarks