我不喜欢听起来像n00b,但我已经想了几个小时了,真的需要一些帮助。通过使用提供的javacv.jar和javacpp.jar,我已经成功地在我的Android应用程序中使用了FFmpeg和OpenCV
here
。这一直很有效,但对
javacv
和
javacpp
我需要为我的应用程序重新构建这些。我已经将这两个存储库都签出到我的主目录中。我的主目录中也有opencv-2.4.4。通过在javacpp目录中运行“mvn-install”,我能够编译javacpp并获得一个jar文件。当我尝试在javacv目录中执行此操作时,会出现以下错误:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaCV
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:properties {execution: properties}]
[INFO] [dependency:copy-dependencies {execution: copy-dependencies}]
[INFO] javacpp-0.4.jar already exists in destination.
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [exec:exec {execution: javacpp}]
Generating source file: /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/jnicvkernels.cpp
Building library file: /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/linux- x86_64/libjnicvkernels.so
g++ -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux -I/usr/local/include /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/jnicvkernels.cpp -msse3 -ffast-math -Wl,-rpath,$ORIGIN/ -march=x86-64 -m64 -Wall -O3 -fPIC -shared -s -o /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/linux-x86_64/libjnicvkernels.so - L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jamvm -Wl,-rpath,/usr/lib/jvm/java-7-openjdk- amd64/jre/lib/amd64/jamvm -ljvm
In file included from /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/jnicvkernels.cpp:58:0:
/home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/cvkernels.h:22:33: fatal error: opencv2/core/core_c.h: No such file or directory
compilation terminated.
我已经阅读了
docs
用于Android的javacpp和
docs
对于javacv。我正在运行Ubuntu,对Maven还很陌生。如有任何帮助,我们将不胜感激。我觉得我真的错过了一些关键点。