2014-04-29 04:14:22 -0600 | asked a question | OpenCV Android JNI Blur detection Hi There, I am looking for some help and guidance on the subject mentioned in the title. I am not familiar to much with JNI and C/C++. I am trying to use openCV to determinate if my image is blurred or not. I've found the following solution short GetSharpness(char* data, unsigned int width, unsigned int height) { // assumes that your image is already in planner yuv or 8 bit greyscale IplImage* in = cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1); IplImage* out = cvCreateImage(cvSize(width,height),IPL_DEPTH_16S,1); memcpy(in->imageData,data,width*height); } I've tried to convert it to JNI how ever I am not to confident if my converstion is right jshort Java_com_me_test_view_CropActivity_GetSharpness(jchar* data, jint width, jint height) { // assumes that your image is already in planner yuv or 8 bit greyscale IplImage* in = cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1); IplImage* out = cvCreateImage(cvSize(width,height),IPL_DEPTH_16S,1); } May somebody able to help me to see if my conversion is right and could somebody explain to me in Java terms what is actuality happening in the method? Your help would be much appreciated I have spent days on this issue. Thanks a lot Karen |