Last active
March 6, 2017 08:42
-
-
Save nkint/7646466 to your computer and use it in GitHub Desktop.
cv::Mat to QPixmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cv::Mat n = ... | |
QPixmap p = QPixmap::fromImage(QImage((unsigned char*) n.data, | |
n.cols, | |
n.rows, | |
QImage::Format_RGB888)); | |
p = p.scaledToWidth(500); | |
label->setPixmap( p ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment