Function lib3d::cvMat2QImage_shared
Defined in File visualization.hpp
Function Documentation
-
inline QImage lib3d::cvMat2QImage_shared(const cv::Mat &mat, QImage::Format formatHint = QImage::Format_Invalid)
-
Supported QImage formats and cv::Mat types are:
QImage::Format_Indexed8 <==> CV_8UC1
QImage::Format_Alpha8 <==> CV_8UC1
QImage::Format_Grayscale8 <==> CV_8UC1
QImage::Format_RGB888 <==> CV_8UC3 (R G B)
QImage::Format_RGB32 <==> CV_8UC4 (A R G B or B G R A)
QImage::Format_ARGB32 <==> CV_8UC4 (A R G B or B G R A)
QImage::Format_ARGB32_Premultiplied <==> CV_8UC4 (A R G B or B G R A)
QImage::Format_RGBX8888 <==> CV_8UC4 (R G B A)
QImage::Format_RGBA8888 <==> CV_8UC4 (R G B A)
QImage::Format_RGBA8888_Premultiplied <==> CV_8UC4 (R G B A)
For QImage::Format_RGB32 ,QImage::Format_ARGB32 and QImage::Format_ARGB32_Premultiplied, the color channel order of cv::Mat will be (B G R A) in little endian system or (A R G B) in big endian system.
Note
User must make sure that the color channels order is the same as the color channels order requried by QImage.