Merge pull request #10050 from floe/android-studio-3.3.1
Add Android Mat constructor with support for native buffer (#10050)
This commit is contained in:
committed by
Alexander Alekhin
parent
c6fb99357c
commit
2e772510ea
@@ -1,5 +1,7 @@
|
||||
package org.opencv.core;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
// C++: class Mat
|
||||
//javadoc: Mat
|
||||
public class Mat {
|
||||
@@ -39,6 +41,19 @@ public class Mat {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// C++: Mat::Mat(int rows, int cols, int type, void* data)
|
||||
//
|
||||
|
||||
// javadoc: Mat::Mat(rows, cols, type, data)
|
||||
public Mat(int rows, int cols, int type, ByteBuffer data)
|
||||
{
|
||||
|
||||
nativeObj = n_Mat(rows, cols, type, data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// C++: Mat::Mat(Size size, int type)
|
||||
//
|
||||
@@ -1101,6 +1116,9 @@ public class Mat {
|
||||
// C++: Mat::Mat(int rows, int cols, int type)
|
||||
private static native long n_Mat(int rows, int cols, int type);
|
||||
|
||||
// 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(Size size, int type)
|
||||
private static native long n_Mat(double size_width, double size_height, int type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user