opencv/modules/java/srcjava/utils.java
2011-06-23 15:51:51 +00:00

20 lines
459 B
Java

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);
}