Simples assim: Mat mat = Imgcodecs.imdecode( new MatOfByte(bytes), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED ); Como converter um Bitmap em um objeto Mat: import org.opencv.android.Utils; Mat mat = new Mat(); Bitmap bmp32 = bmp.copy(Bitmap.Config.ARGB_8888, true); Utils.bitmapToMat(bmp32, mat);
Android – Detecção facial utilizando o OpenCV (OpenCV in Android with face detect)
Native OpenCV in Android with face detect GitHub project: https://github.com/gbzarelli/AndroidFaceDetectOpenCV This application is a sample of the OpenCV in Android. In the sample we use the OpenCV SDK to detect faces. The application has been tested with: Android Compile SDK ’28’ Android Build Tools ‘28.0.3’ Gradle ‘3.4.2’ OpenCV SDK ‘3.4.3’ Configuration / Usage: Here is how to use […]