Call native function with cv::mat parameter in java android studio's main activity

asked 2019-02-04 01:58:04 -0600

I am using android studio and in my main activity i am calling a function which requires parameter to be matched from native function , this native function has parameters cv::mat in it so how i pass cv::mat in java activity.

extern "C"
JNIEXPORT void JNICALL
Java_com_example_raweeda_applicationc_MainActivity_inpaintCriminisi(JNIEnv *env, jobject instance,
                                                                    const cv::_InputArray & a, const cv::_InputArray &  b, const cv::_InputArray &  c,
                                                                    jint xl) {

    // TODO
    inpaintCriminisi(a,b,c,xl);
}

how to call in main activity of java , i do not understand what parameter should be passed here.

edit retag flag offensive close merge delete

Comments

there are a few examples in the android sdk, e.g. here:

https://github.com/opencv/opencv/blob...

berak gravatar imageberak ( 2019-02-04 03:01:04 -0600 )edit