Photo.createTonemap in opencv4android
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.