0

I hate to sound like a n00b but I have been trying to figure this out for several hours now and could really use some help. I have successfully been able to use FFmpeg and OpenCV in my Android app by using javacv.jar and javacpp.jar provided here. This has been working great, but there has been some changes to javacv and javacpp and I need to rebuild these for my app. I have checked out both of these repositories to my home directory. I also have opencv-2.4.4 in my home directory. I was able to compile javacpp and get a jar file by running "mvn install" in the javacpp directory. When I try to do this in my javacv directory, I get this error:

[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.

I have read the docs for javacpp for Android and the docs for javacv. I am running Ubuntu and am pretty new to Maven. Any help would be greatly appreciated. I feel like I am really missing some key points.

Mark
  • 955
  • 2
  • 14
  • 30

1 Answers1

0

Yeah, missed a pretty key point. I didn't have OpenCV installed on my computer. I was able to build the file after following this guide to install OpenCV.

Mark
  • 955
  • 2
  • 14
  • 30