Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
459 B
19 lines
459 B
package org.opencv; |
|
|
|
import android.graphics.Bitmap; |
|
|
|
public class utils { |
|
|
|
public static Mat BitmapToMat(Bitmap b) { |
|
return new Mat( nBitmapToMat(b) ); |
|
} |
|
|
|
public static boolean MatToBitmap(Mat m, Bitmap b) { |
|
return nMatToBitmap(m.nativeObj, b); |
|
} |
|
|
|
// native stuff |
|
static { System.loadLibrary("opencv_java"); } |
|
private static native long nBitmapToMat(Bitmap b); |
|
private static native boolean nMatToBitmap(long m, Bitmap b); |
|
}
|
|
|