Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i found a solution by myself, i dont know if is the best but is working

MatOfByte raw=new MatOfByte(imageStream); Mat A = Highgui.imdecode(raw, 2); // mat to bitmap: //Imgproc.cvtColor(A, B, Imgproc.COLOR_BGR2RGB); Utils.matToBitmap(B, bm);

where bm is an android Bitmap object.

I still have a problem, color of image is bgr and i need rgb. I dont know how can i convert to rgb. I tried Imgproc.cvtColor(A, B, Imgproc.COLOR_BGR2RGB); but fails.

Thanks.