OpenCV的写作OpenCV的写作之间的差异为Android(移动设备)和桌面应用程序(OpenCV的2.4.3 usingC ++) [英] Difference between writing OpenCV for Android(Mobile devices) and writing openCV for Desktop Application(OpenCV 2.4.3 usingC++)

查看:190
本文介绍了OpenCV的写作OpenCV的写作之间的差异为Android(移动设备)和桌面应用程序(OpenCV的2.4.3 usingC ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做的人脸检测与识别project.I我即将完成它做检测和识别中的应用。我想使这个应用程序移植就像一个移动设备上工作。我在使用机器人的OpenCV是新来的写作codeS。 什么是为Android手机和OpenCV关于使用Visual Studio C ++ 2010一样VS与Open CV 2.4.3桌面应用程序写入的OpenCV codeS之间的区别?(什么是C $ $ CS之间的区别在Android和OpenCV OpenCV进行Desktop.Do之间他们都使用相同的语言?)
我熟悉的Andr​​oid(基本)和真正的Andr​​oid应用程序与Java编写。我看网上的地方,当地的OpenCV codeS可以包含的 Java本地接口。的到Android
我有点困惑在这里可以我使用codeI使用C ++打开CV为我与出Android应用程序已经写modification.If没有什么样的修改做我必须做我的人脸检测与识别方法C ++桌面,使之成为Android手机的工作?

I was doing face detection and recognition project.I am about to finish the application which does detection and recognition. I want to make this application portable like a one that works on Mobile devices. I am new to writing codes using OpenCV on Androids. What is the difference between OpenCV codes for Android phones and OpenCV written for Desktop application using C++ on Visual Studio like VS 2010 with Open CV 2.4.3?(What is the difference between Codes between OpenCV on Android and OpenCV for Desktop.Do they both use the same language?) I am familiar with Android(basics) and true that Android applications are written with Java. And i read somewhere online that OpenCV native codes can be included to Android with Java Native Interface. I am a bit confused here that can i use the code i have written using C++ Open CV for my Android Application with out modification.If not what Kind of modification do i have to make on my face detection and recognition using C++ for Desktop to make it work for Android phones?

推荐答案

首先,存在一个的 OpenCV4Android 版本的Andr​​oid,对如何使用它的教程。

First off, there exists an OpenCV4Android version of Android, with tutorials on how to use it.

然后,正如你指出的那样,你可以code无论是在Java或C ++在Android上。 OpenCV4Android可以在Java中使用[ 1 ]或C ++ [ <一href=\"http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html#native-c\"相对=nofollow> 2 。对你来说,它很可能是更方便地重新使用C ++ code,使用的对于Android原生开发套件。如果你成功地使用NDK,,你将能够从你的Andr​​oid应用程序调用它来重新使用C ++ code。

Then, as you pointed out, you can code both in Java or C++ on Android. OpenCV4Android can be used in Java [1] or in C++ [2]. In your case, it would probably be more convenient to re-use your C++ code, using the Native Development Kit for Android. If you manage to use the NDK, you will be able to re-use your C++ code by calling it from your Android app.

下面是几个步骤我劝你遵循:

Here are the few steps I would advise you to follow:

  • Read about the Native Development Kit
  • Read about the Java Native Interface
  • Try to create a sample Android app using C++ (You might find this quickstart tutorial useful)
  • Try to integrate OpenCV to your sample [2]
  • Include your existing C++ code in your sample

我希望这会有所帮助。

这篇关于OpenCV的写作OpenCV的写作之间的差异为Android(移动设备)和桌面应用程序(OpenCV的2.4.3 usingC ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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