0

Is it possible to use mediapipe hand landmark detection directly on the NDK side?

The hand landmark solution is in Kotlin, but my project will use GameActivity and I have already a buffer on the C++ side taken from camera2ndk API (yuvN12 format, but easy to convert into RGB(A) if needed). I can see that tasks-vision-0.10.14.aar contains the libmediapipe_tasks_vision_jni.so shared library (and I could take the hand_landmarker.task from the asset folder of the example in https://github.com/google-ai-edge/mediapipe-samples), but I'm puzzled which h files I should use for that shared library and how to code the rest. Which example in C/C++ from mediapipe would be best to start with?

1 Answer 1

0

I was able to achieve my goal cross-compiling libhand_landmarker.so for Android. This is found on mediapipe tasks, C api. I identified a small subset (~10) of header files needed and I based the processing function on mediapipe/tasks/c/vision/hand_landmarker/hand_landmarker_test.cc file.

Sign up to request clarification or add additional context in comments.

2 Comments

How you make it? I want to get a similar lib so for face_mesh(or face landmark) used in JNI code. Could you show me your BUILD and command?
Yes but you should vote my question and answer first?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.