CLAHE in android
I used JNI for clahe by the column, http://answers.opencv.org/question/27....
But there is error in clahe->apply(Mat m1, Mat m2) .
I couldn't find the reason because of none of the error message. (Just turn down the application.)
So Plz help me...T.T
The Code in JNI
JNIEXPORT int JNICALL Java_com_example_i3bolometerapp_MainActivity_InitCLAHE( JNIEnv *env, jobject thiz, jintArray disp, jint _width, jint _height, jlong addrClahe, jlong addrClaheDst ) {
Mat &mGr = *(Mat*)addrClahe;
Mat &mGr2 = *(Mat*)addrClaheDst;
Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(5);
clahe->apply(mGr, mGr2);
return mGr.cols;
}
Actually, the column of mGr is returned well. So i dont think mat data is wrong.
could you add your java code, too ? did you pass in a
new Mat()
for dst ?At Start,
CallBack Function,
Use CLAHE,
CLAHE is used in handler,
Dst is initailized in callback function. So i think this is not problem,
And i checked the address of dst.