how to convert Mat to jbyteArray ??
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.