Repository navigation
Add Android Mat constructor with support for native buffer - #10050
Conversation
|
What part of Android API provides access to native buffers? |
|
Apologies in advance, I just realized this won't work as intended. Needs to pass a @alalek The Camera2 API (https://developer.android.com/reference/android/hardware/camera2/package-summary.html) allows you to select an |
|
@alalek side question: I haven't yet managed to build the Android OpenCV package locally. Can I download the results from the buildbot somewhere? |
|
Just for the record, I have a (mostly) finished implementation of a |
|
Could you please add some simple Java test for new functionality? Something like this: |
| JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIO | ||
| (JNIEnv* env, jclass, jint rows, jint cols, jint type, jobject data); | ||
|
|
||
| JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIO |
There was a problem hiding this comment.
Proper signature generated by "javah" is:
/*
* Class: org_opencv_core_Mat
* Method: n_Mat
* Signature: (IIILjava/nio/ByteBuffer;)J
*/
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIILjava_nio_ByteBuffer_2
(JNIEnv *, jclass, jint, jint, jint, jobject);
|
Thanks, updated. I still can't build/test locally, since I have a newer version of the Android SDK installed that doesn't support the |
|
Check "Android pack" builder artifacts (step 14) from here: http://pullrequest.opencv.org/#/summary/ |
|
Seems to work so far, all tests have passed and I can build my |
|
BTW, There is some information why memory pointer from |
Add Android Mat constructor with support for native buffer (opencv#10050)
As a prerequisite for properly supporting the Camera2 API, this PR adds an Android Mat constructor with support for passing native buffers.