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
2 | No.2 Revision |
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.