📅  最后修改于: 2022-03-11 14:52:45.848000             🧑  作者: Mango
//but first : check !
if (mat.depth() == CvType.CV_8U) { //bytes !
byte[] buffer = new byte[mat.total() * mat.channels()];
mat.get(0,0,buffer);
} else
if (mat.depth() == CvType.CV_32F) { //float !
float[] buffer = new float[mat.total() * mat.channels()];
... etc