Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV4Android Unsatisfied Linker Error Moments

I am getting the following error when I try to run my android application:

java.lang.UnsatisfiedLinkError: No implementation found for double[] org.opencv.imgproc.Imgproc.moments_1(long) (tried Java_org_opencv_imgproc_Imgproc_moments_11 and Java_org_opencv_imgproc_Imgproc_moments_11__J)

Here is the code where the problem is occurring:

Imgproc.findContours(temp, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);

if(contours.size() > 0) {
    int numObjects = contours.size();

    if (numObjects < MAX_OBJECTS) {

        for (int i = 0; i < contours.size(); i++) {
            //moments causing unsatisfied linker error
            Moments moment = Imgproc.moments((Mat)contours.get(i));
            double area = moment.m00;
        }
    }
}

Can anyone help me with this problem? Thanks in advance!