Ask Your Question

Revision history [back]

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

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.