运行在Android中使用OpenCV的C / C ++ code [英] Running C/C++ code using OpenCV in android

查看:172
本文介绍了运行在Android中使用OpenCV的C / C ++ code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道我是否有意义与否。但只是想现在我可以运行 C / C ++ code在无需编写Android的 JNI包装或使用本地活动办法吗?

I don't know whether i make sense or not. But just wanted to now that can i run the c/c++ code in android without the need of writing JNI wrapper or using Native Activity way?

我的意思是,我有一个简单的 C ++模板匹配code ,其中包含的主要功能我用用来运行它的g ++ 终端。

I mean, I am having a simple C++ Template Matching code which contains main function and I use to run it using g++ in terminal.

现在我想这个模板匹配code在Android的USNG运行 NDK 。有什么办法?我用Google搜索了很多,但他们所是要么使用JNI包装或使用痛饮这使得JNI的包装,但实际上并不能进入其中任何一个。我需要更多简单的解决方案。

Now I want this Template Matching code to be run in android usng NDK. Is there any way? I have googled a lot but all they is to either use JNI wrapper or use SWIG which makes JNI wrapper, but can't actually get into any of them. I need more simpler solution.

推荐答案

如果你有一个根深蒂固的手机,就可以编译和运行程序的任何Linux机器上,从亚行外壳

If you have a rooted phone, you can compile and run programs as on any linux machine, from the adb shell.

然而,这需要一些关于Linux的知识。

However, that requires a bit of knowledge about Linux.

因此​​,要启动:


  • 根您的手机(迫使它给你管理员权限)。这很容易让开发商电话/板,和普通电话击杀在商店买downstreet

  • Root your phone (force it to give you admin privileges). That is easy for developer phones/boards, and a kill for regular phones bought at a shop downstreet.

编译您的应用程序的Andr​​oid和亚行运行它,你会从Linux外壳做的。

compile your app for android and run it from adb as you would do from a linux shell.

下面是关于此事的更详细的解答。

Here is a more detailed answer on the matter

<一个href=\"http://stackoverflow.com/questions/9868309/how-can-i-run-c-binary-executable-file-in-android-from-android-shell\">How我可以从Android电子壳牌运行Android的碳二元(可执行文件)

How can i run C binary (executable file) in Android from Android Shell

这篇关于运行在Android中使用OpenCV的C / C ++ code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆