Android jpeg byte array to mat
Hi everyone,
i'm new on opencv android development. I'm receiving a jpeg byte array on android client by sockets. On server side, a c++ program encodes a mat frame to jpeg before send. I'm receiving at 18fps on android phone with encoding. it's good, but i only have a byte array. I don't know how to decode jpeg to Mat object. I'm looking for a function like c++ Highgui.imdecode(inbuf, IMREAD_UNCHANGED). Can i use this using jni? If yes, how can i use byte[] frame from java in jni function? and, how can i return the mat objet?
Thanks!