📜  OpenCV mat 浮动字节缓冲区 java 代码示例

📅  最后修改于: 2022-03-11 14:52:45.848000             🧑  作者: Mango

代码示例1
//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