I have searched on the internet but I cannot find a method of converting a QImage(or QPixmap) to a OpenCV Mat. How would I do this?.
QImage
QPixmap
Mat
Any help is appreciated.
One year after you issued this question there've been great answers on the internet:
But the way I see it, if you're working with Qt and OpenCV at the same time then type QImage is probably just for displaying, that case you might want to use QPixmap since it's optimized for displaying. So this is what I do:
cv::Mat
Mat2QPixmap()
2.1m questions
2.1m answers
60 comments
57.0k users