OpenCVのインストール
http://qiita.com/kassy_kz/items/f4dfd2e4c9691b8aa1d5
コード
http://rest-term.com/archives/3010/
Genymotionでは動くが、実機で落ちる。
java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=org.opencv.engine.BIND }
openCVLibrary249/java/org.opencv/android/AsyncServiceHelper.javaを編集する。
Intentを明示するようにinitOpenCV()を変更する。
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); Intent intent = new Intent("org.opencv.engine.BIND"); intent.setPackage("org.opencv.engine"); if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }