I am reading the QByteArray
using QTcpSocket
and converting the array into the cvMat image. to display the image using imshow().but i am getting gray image.
code is as follows.
//array ->QBytearray (received from socket)
cv::Mat img,img1;
img.cols=320;
img.rows=240;
img = cv::Mat(240,320, CV_8UC1,array.data());
cv::cvtColor(img, img, CV_GRAY2RGB); //
cv::imshow("image display",img);
cv::waitKey(5000);
after cvtColour() function also its not converting into colour image.
Thanks in advance.