error in matching parameters type in c and java function
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);
}
this is the function on loading this library in android studio Main activity.
public native void inpaintCriminisi( double a, double b, double c,int xl);
As you can see i am passing double data type as parameters which are not matched by the library function which is asking for const cv::_InputArray & a, instead of double data type . So confusion is what i should i pass in java function parameters which could be read by the native function.
jdouble a
, etc. would probably a better way to pass double values to your jni funcinpaintCriminisi()
works, what it does ? does it need an (object) "instance" ? how can it do without an image ?