c++ - How to Convert Byte Array to IplImage using OpenCv? -
how convert byte array iplimage using opencv ?
is possible conversion here byte array iplimage using opencv ?
short as
uchar mybytes[]={1,255,0,4,1,4,76,43,45}; mat mymat(3,3,cv_8uc1,mybytes);
or analytical
int nl= mymat.rows; int nc= mymat.cols; (int j=0; j<nl; j++) { uchar* data= mymat.ptr<uchar>(j); (int i=0; i<nc; i++) data[i]= mybytes[j*i]; }
Comments
Post a Comment