简体   繁体   中英

java.lang.UnsatisfiedLinkError opencv-contrib

I'm trying to make an application with opencv that is able to recognize a person's face in an image, so I'm trying to use the FacemarkKazemi function of opencv. My problem is that as soon as I switch to class initialization, my application crashes instantly.

You can find the code I'm trying to run here :

https://github.com/opencv/opencv_contrib/blob/master/modules/face/samples/Facemark.java

The application crashes at line 29 here :

Facemark fm = Face.createFacemarkKazemi();

And i have this error :

java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.face.Face.createFacemarkKazemi_0() (tried Java_org_opencv_face_Face_createFacemarkKazemi_10 and Java_org_opencv_face_Face_createFacemarkKazemi_10__)

Also, if you know a better way to make FacialMarks, I would be happy to know it.

EDIT : I added this line to my gradle to import opencv contrib, do you think the error could be due to this?

implementation 'com.quickbirdstudios:opencv:3.4.4-contrib'

Before I integrated opencv directly into my project, when I wanted to add opencv-contrib I had to add the gradle to my project (but that never gave me the.so for android) that's why it wasn't able to find the functions, there were no pre-compiled files. So I downloaded an opencv sdk with opencv contrib and added the.so in the jnilibs folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM