I got this code from a site..... cvSetData(img,(BYTE) pBuffer, img->widthStep); Mat &m = Mat(img); Mat &hsv = Mat(); vector<mat> mv = vector<mat>(3,Mat(cvSize(640,480),CV_8UC1)); cvtColor(m,hsv,CV_BGR2HSV); cvtColor(hsv,m,CV_HSV2BGR);/// IplImage iplimg(m); cvNamedWindow("rgb",1); cvShowImage("rgb",&iplimg);
But here it is not told how to initialize the "img".... Help!!