Photo.createTonemap in opencv4android

asked 2016-05-22 11:37:21 -0500

In android I have the byte[] from the camera. How to I use Photo.createTonemap to process the data?

The Tonemap.process method accepts Mat object.

sourceFrame = new Mat(height + (height / 2), width, CvType.CV_8UC1); sourceFrame.put(0,0, byteData);

final Tonemap tonemap = Photo.createTonemap(gamma); tonemap.process(sourceFrame, sourceFrame);

This does not seem to work. I would like to convert to processed matrix to JPEG byte[]

Can anyone help? I could not find any sample code.

edit retag flag offensive close merge delete