Native method not found: org.opencv.imgproc.Imgproc.rectangle_1:(JDDDDDDDDI)V [closed]

asked 2015-12-24 06:40:24 -0500

syafiq gravatar image

Hello there. I'm syafiq and I'm new to OpenCv. I'm currently developing an Face Recognition on Android Studio. I have obtain a source code from github, but the source code using an old version of OpenCV (OpenCV 2.4.10) and I'm using the latest version which is 3.0.0. There's no error on the code and It successful to open the app, and the camera works fine. But when I pointed to someone face it's suddenly stop working.

The error that I've received is:

Process: com.example.syafiq.test, PID: 3249
java.lang.UnsatisfiedLinkError: Native method not found: org.opencv.imgproc.Imgproc.rectangle_1:(JDDDDDDDDI)V
    at org.opencv.imgproc.Imgproc.rectangle_1(Native Method)
    at org.opencv.imgproc.Imgproc.rectangle(
    at com.example.syafiq.test.FdActivity.onCameraFrame(

The ( pointed here:

rectangle_1(img.nativeObj, pt1.x, pt1.y, pt2.x, pt2.y, color.val[0], color.val[1], color.val[2], color.val[3], thickness);

The ( pointed here:

(line430) for (int i = 0; i < facesArray.length; i++)
(line431) Imgproc.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), FACE_RECT_COLOR,3);

Before this, the source code on ( was Core.rectangle and it's an error, so I've changed it to Imgproc based on the Internet that I've found to fix that code line.

On ( pointed here:

(line392) if (mListener != null) {
(line393) modified = mListener.onCameraFrame(frame);

On ( pointed here:

(line345) if (!mFrameChain[1 - mChainIdx].empty())
(line346) deliverAndDrawFrame(mCameraFrame[1 - mChainIdx]);

I'm new to android development and new to OpenCV :/ I really appreciate your time and help to consideration to helping me.

Thanks in advance :)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-07 01:09:59.990730


Any news on this issue?

Dhagz gravatar imageDhagz ( 2016-07-27 05:00:20 -0500 )edit