我讨厌听起来像一个n00b,但我一直试图想出这几个小时,现在可以真正使用一些帮助。通过使用javacv.jar和javacpp.jar提供here,我已经成功地在我的Android应用程序中使用了FFmpeg和OpenCV。这一直很有效,但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.
我已阅读适用于Android的javacpp的docs和适用于javacv的docs。我正在运行Ubuntu,我对Maven很新。任何帮助将不胜感激。我觉得我真的错过了一些关键点。