开发者

Porting Java code to Android

开发者 https://www.devze.com 2023-03-07 23:33 出处:网络
I have Java code for face recognition which works fine. There is a problem however if I port the code into an Android application.

I have Java code for face recognition which works fine. There is a problem however if I port the code into an Android application.

I have includ开发者_JS百科ed the necessary jama and jmf which is required by the Java code into the Android app. The Android code compiles fine, but when I run the app it's force closed!

What might I be doing wrong here? What are the things that I need to keep in mind when I do the porting?

By the way there is no GUI for the Java code.


Porting your java code to Android will usually not work, you need to foloow the guidelines for creating an Android application.

You should start at the Android documentation for help.

http://developer.android.com/guide/topics/fundamentals.html


I'd recommend you take a look at the Android OpenCV project. In their CVCamera sample, they have a nice setup for doing real-time image processing for feature detection etc. I've previously modified it to support face detection using the OpenCV library.

If you want to use your own code instead, I suggest you strip out all the JNI/NDK interop code and substitute your own. At any rate, it's a nice starting point.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号