1

I want to display 3 channel cv::Mat on Qt interface and usually I use this expressions: e QImage qImage = QImage( (uchar*)cvImage.data, cvImage.cols, cvImage.rows, cvImage.cols*3, QImage::Format_RGB888 );

QPixmap pixmap = QPixmap::fromImage(qImage); myLabel.setPixmap(pixmap);

But conversion to QPixmap is slow enough. Do you know guys how to avoid the conversion? May be the function setImage can help, but I don't know how to use it...

  • are you certain that ` QPixmap::fromImage(qImage)` is the expensive part and not `.setPixmap(pixmap);` (e.g. rendering)? Most efficient way to display the image probably is to render it as a OpenGL Texture (e.g. with QGLWidget). – Micka May 07 '15 at 10:07
  • check this... http://stackoverflow.com/a/8866986/4080268 – zedv May 07 '15 at 18:23

0 Answers0