Comments (5)
That's exactly the way JNI declarations work, if you place it into com.my.package
make sure to change the declaration to Java_com_my_package_ImageUtils_convertYUV420ToARGB8888
and recompile the libs to get a working .so file.
Actually I don't think it as of being hacky, that's the (hacky) way the JNI works. :)
from dlib-android.
You should post at least the error it gives, not much I can guess from your quick description.
The only thing I can recall now is that the JNI declaration of the methods is dependent from the package, so if for example if you've changed the package you should change it accordingly into the declaration.
I remeber it gave me some headaches when I modified it.
Also, remember that everything in the project is compiled into the libpeople_det.so, as for the Android.mk file
from dlib-android.
Hey, thanks for your quick reply. Sorry, here is a trace for the error :
10-31 15:03:39.205 23259-23376/com.qualogy.faceverificationapp E/art: No implementation found for void com.qualogy.faceverificationapp.ImageUtils.convertYUV420ToARGB8888(byte[], byte[], byte[], int[], int, int, int, int, int, boolean) (tried Java_com_qualogy_faceverificationapp_ImageUtils_convertYUV420ToARGB8888 and Java_com_qualogy_faceverificationapp_ImageUtils_convertYUV420ToARGB8888___3B_3B_3B_3IIIIIIZ)
10-31 15:03:39.206 23259-23376/com.qualogy.faceverificationapp E/AndroidRuntime: FATAL EXCEPTION: ImageListener
Process: com.qualogy.faceverificationapp, PID: 23259
java.lang.UnsatisfiedLinkError: No implementation found for void com.qualogy.faceverificationapp.ImageUtils.convertYUV420ToARGB8888(byte[], byte[], byte[], int[], int, int, int, int, int, boolean) (tried Java_com_qualogy_faceverificationapp_ImageUtils_convertYUV420ToARGB8888 and Java_com_qualogy_faceverificationapp_ImageUtils_convertYUV420ToARGB8888___3B_3B_3B_3IIIIIIZ)
at com.qualogy.faceverificationapp.ImageUtils.convertYUV420ToARGB8888(Native Method)
at com.qualogy.faceverificationapp.OnGetImageListener.onImageAvailable(OnGetImageListener.java:308)
at android.media.ImageReader$ListenerHandler.handleMessage(ImageReader.java:648)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Your comments were useful. I am guessing that my project should either have the same package name (which I don't really like) or I should include the project directly rather than relying on the Maven repository? Or is there a way to call the methods with an explicit full method name from JNI (rather than relying on the package based prefix?)
BTW, I did an objdump of the so file, and indeed there is a symbol like this :
00000000000ce6b4 g DF .text 00000000000001c8 Base Java_com_tzutalin_dlibtest_ImageUtils_convertYUV420ToARGB8888
from dlib-android.
Oh, it already works if you just place ImageUtils
in a com.tzutalin.dlibtest
package, which is not so bad! Still if any other, less hacky solutions exist, I would love to know. Thanks again.
from dlib-android.
Haha, you are probably right. Thanks for your help @beraldofilippo !
from dlib-android.
Related Issues (20)
- APP_STL gnustl_static is no longer supported HOT 2
- 在实际用途中发现的问题,请求支援 HOT 1
- Is GPU used?
- I got opencv link error
- Build build.py error because ret is not 0
- Build Error
- forbidden error while syncing project
- DLIB building in AOSP. Is it possible?
- bash: ./envsetup: /usr/bin/python: bad interpreter: No such file or directory
- Landmark Alignment
- Detect face slow
- Don't build JNI HOT 1
- Reason for Error while Building HOT 3
- Fatal signal 11 (SIGSEGV), code 2, fault addr 0x18eabc18 in tid 16159 (Thread-6)
- Build error with std namespace functions #32 REOPEN HOT 5
- How can I get the face vector of 128D data
- different feature vector from the same image
- How to run own object detector using dlib library on android? HOT 13
- Own detector working slow HOT 2
- dlib headers for C++ programming in Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlib-android.