Hey, so I have a setup with my webcam working, except that the conversion from cv::Mat to QImage is pretty slow.

Qt Code:
  1. QImage VideoReader::getFrame() {
  2. Mat frame;
  3. cap >> frame;
  4.  
  5. QImage image = QImage((uchar*)frame.data, frame.cols, frame.rows, frame.step, QImage::Format_RGB888);
  6.  
  7. return image;
  8. }
To copy to clipboard, switch view to plain text mode 

Grabbing the frame from the camera only takes around 5 milliseconds, but the conversion to QImage takes around 15. Is there any way to cut down on this time?