Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not finding opencv jar after installing with homebrew

After installing opencv 2.4.8.2 with homebrew, I can't seem to find the jar file in /usr/local/Cellar/opencv/2.4.8.2/share/OpenCV

I'm using Mavericks, any ideas?

like image 838
Mahdi Chamseddine Avatar asked Nov 28 '25 16:11

Mahdi Chamseddine


2 Answers

Probably you forgot to specify --with-java parameter

brew tap homebrew/science
brew install opencv --with-java

After compiling a jar file is in the path

/usr/local/Cellar/opencv/2.4.9/share/OpenCV/java/opencv-249.jar
like image 169
Alexander Avatar answered Dec 01 '25 04:12

Alexander


I solved the question by installing ant (and the other dependencies of opencv) using homebrew and then using cmake to install opencv instead of homebrew. I downloaded opencv from the website then used the following commands:

cd opencv-2.4.8/
mkdir build
cd build/
cmake -DBUILD_SHARED_LIBS=OFF ..
cmake -G "Unix Makefiles" ..
make -j8

The jar will pop out in the following directory:

opencv-2.4.8/build/bin/opencv-248.jar
like image 44
Mahdi Chamseddine Avatar answered Dec 01 '25 05:12

Mahdi Chamseddine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!