Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Maybe this is what you are looking for:

Bitmap theImage = (Bitmap) data.getExtras().get("data");

Mat theImageMat = new Mat();
Utils.bitmapToMat(theImage, theImageMat ); // converts some Bitmap to some Mat

Maybe this is what you are looking for:

Bitmap theImage = (Bitmap) data.getExtras().get("data");

Mat theImageMat = new Mat();
Utils.bitmapToMat(theImage, theImageMat ); // converts some Bitmap to some Mat

imread() is used to read an image file from the file system directly to a Mat object.

bitmapToMat() is to convert an existing Bitmap object to a Mat object.