Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to allocate a Mat of the appropriate size and type and then use Mat.put() method:

byte buf[] = new byte[100];
//...
Mat m = new Mat(1, 100, CvType.CV_8UC1);
m.put(0, 0, buf);