I'm having a one Channel image, and want to display it in a QImage
IplImage *img=cvCreateImage(cvSize(640, 480), IPL_DEPTH_8U, 1);
Knowing that When converting from an IplImage* to QImage, I did what is follow:
uchar* img_d=(uchar*) img->imageData;
QImage img_direction((uchar*)img_d, img->width, img->height, QImage::Format_Mono);
I'm not pretty sure about the Mono format that I have set, even the displayed QImage would be scrambled!
What would be the suitable QImage format for the case of a B&W image?