I need to process Image for my Application. I get the Images for ImageReader
.
reader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {
@Override
public void onImageAvailable(ImageReader reader) {
Image mImage = reader.acquireNextImage();
//mImage to Mat here
mImage.close();
}
},null);
But now, I need to convert those images in Mat
.
I know that I can pass by the Bitmap
class, but i don't know how to convert an Image into Bitmap
too.
I think that i found a possible answer. I give to my ImageReader a simple plane format like JPEG.
Then i do that :