Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ushort is CV_16U type, so if your array called H, then

Mat h = Mat(2,2,CV_16U,H);

to check it:

ushort H[4] = {1,2,3,4}; Mat h = Mat(2,2,CV_16U,H);
cout<<"take a look="<<h<<endl;

the output of h would same as H

ushort is CV_16U type, so if your array called H, then

Mat h = Mat(2,2,CV_16U,H);
Mat(220,220,CV_16U,H);

to check it:

ushort H[4] = {1,2,3,4}; Mat h = Mat(2,2,CV_16U,H);
cout<<"take a look="<<h<<endl;

the output of h would same as H H