how to convert Mat to jbyteArray ??

asked 2016-12-26 23:21:04 -0500

Pulkit gravatar image

updated 2016-12-27 01:52:03 -0500

berak gravatar image

I have to return a jbyteArray (I'm using JNI and want a byte[] to return to the Java part). I have a native function in java with return type byte[].

I have an image in Mat and i have to convert it into jbyteArray so as to return it to my java code, and I don't know what it's the best approach.

edit retag flag offensive close merge delete