显示从拜耳格式到rgb格式的图像

时间:2015-08-22 07:30:34

标签: c++ qt rgb qimage

我必须在QtGui中显示从相机捕获的图像。我正在从相机中读取图像并将其存储在unsigned char数组中。使用QImage我正在GUI中构建图像。图像采用bayers格式。如何在qt中将bayer转换为rgb格式?

代码 *加载数据并显示*

QImage image((const unsigned char*)data,imageWidth,imageHeight,QImage::Format_Indexed8); 

this->scene->addPixmap((QPixmap::fromImage(image)).scaled(QSize((int)scene->width(),(int)scene->height()),Qt::IgnoreAspectRatio,Qt::SmoothTransformation));

0 个答案:

没有答案