Kinect映射图像(Mat数据类型)在Qt label中显示
坐标映射图像格式:
Mat CV_8UC4
在Qlabel中显示图像部分代码:
QImage img = QImage(colorMat.data, colorMat.cols, colorMat.rows, QImage::Format_ARGB32_Premultiplied);
ui.label_test_Mat->setPixmap(QPixmap::fromImage(img));
映射图像关键代码:
hResult = pCoordinateMapper->MapDepthFrameToColorSpace(depthWidth * depthHeight, reinterpret_cast<UINT16*>(depthBufferMat.data), depthWidth * depthHeight, &colorSpacePoints[0]);