android: use .getRowStride() in JavaCamera2View

This commit is contained in:
Alexander Alekhin
2019-10-27 11:14:17 +00:00
parent d8ab83600b
commit 80c4cedd25
4 changed files with 90 additions and 14 deletions
@@ -41,6 +41,15 @@ public class Mat {
nativeObj = n_Mat(rows, cols, type, data);
}
//
// C++: Mat::Mat(int rows, int cols, int type, void* data, size_t step)
//
// javadoc: Mat::Mat(rows, cols, type, data, step)
public Mat(int rows, int cols, int type, ByteBuffer data, long step) {
nativeObj = n_Mat(rows, cols, type, data, step);
}
//
// C++: Mat::Mat(Size size, int type)
//
@@ -1136,6 +1145,9 @@ public class Mat {
// C++: Mat::Mat(int rows, int cols, int type, void* data)
private static native long n_Mat(int rows, int cols, int type, ByteBuffer data);
// C++: Mat::Mat(int rows, int cols, int type, void* data, size_t step)
private static native long n_Mat(int rows, int cols, int type, ByteBuffer data, long step);
// C++: Mat::Mat(Size size, int type)
private static native long n_Mat(double size_width, double size_height, int type);