int a[][3] = {{1,2,3},{6,5,4},{7,8,9}}; cv::Mat mat(1,9,CV_8UC1,a,1);
结果为:1,0,0,0,2,0,0,0,3
这样改就好了"int a[][3] => uchar a[][3] ",结果就是1,2,3,4,5,6,7,8,9了
int a[][3] = {{1,2,3},{6,5,4},{7,8,9}}; cv::Mat mat(1,9,CV_8UC1,a,1);
结果为:1,0,0,0,2,0,0,0,3
这样改就好了"int a[][3] => uchar a[][3] ",结果就是1,2,3,4,5,6,7,8,9了