Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is the correct way to convert a Mat to a Bitmap ?

I am working with OpenCV Android, I need to use a Java OCR library that works on bitmaps. Please, how can I convert my RGBA Mat (which by the way comes from Mat org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame.rgba()) to a Bitmap ? Thanks

What is the correct way to convert a Mat to a Bitmap ?

I am working with OpenCV Android, I need to use a Java OCR library that works on bitmaps. Please, how can I convert my RGBA Mat (which by the way comes from Mat org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame.rgba()) to a Bitmap ? Thanks

EDIT : I think I found the answer in the Utils class. But how to properly initialize my Bitmap objects o that it will be compatible with my Mat ?

What is the correct way to convert a Mat to a Bitmap ?

I am working with OpenCV Android, I need to use a Java OCR library that works on bitmaps. Please, how can I convert my RGBA Mat (which by the way comes from Mat org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame.rgba()) to a Bitmap ? Thanks

EDIT : I think I found the answer in the Utils class. But how to properly initialize my the type of the Bitmap objects o object so that it will be compatible with my Mat ?