projects need to display in the opencv Mat,
Origin. The create (M, N, CV_8UC1);//in the Origin of the value of 0-256
QImage scaledImg;
Img=QImage ((const unsigned char *) (Origin. Data), Origin, cols, Origin, rows, Origin, step, QImage: : Format_Indexed8);
QVectorColorTable.
For (int k=0; K<256; + + k)
{
ColorTable. Push_back (qRgb (k, k, k));
}
Img. SetColorTable (colorTable);
ScaledImg=img. Scaled (UI - & gt; Tuxiang - & gt; The size (), Qt: : IgnoreAspectRatio);
The UI - & gt; Widgets - & gt; SetPixmap (QPixmap: : fromImage (scaledImg));
The UI - & gt; Widgets - & gt; The resize (UI - & gt; Widgets - & gt; The pixmap () - & gt; The size ());
The UI - & gt; Widgets - & gt; show();
Show pictures for
Display image should have for gray image, become a jagged??
Great god see, genuflect is begged that step appeared problem,,, really appreciate it