Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you can construct a new Mat with your pixels like this:

Mat img = new Mat(height, width, CvType.CV_8U);
img.put(0, 0, byteArray);

you can construct a new Mat with your pixels like this:

Mat img = new Mat(height, width, CvType.CV_8U);
CvType.CV_8UC1);
img.put(0, 0, byteArray);