opencv-java / opencv-java-tutorials

Source for the OpenCV with Java tutorials
135 stars 62 forks source link

openCV install does not work #10

Closed amedvedjev closed 7 years ago

amedvedjev commented 7 years ago
brew tap homebrew/science
brew install opencv3 --with-contrib --with-java 

->

Warning: opencv: this formula has no --with-contrib option so it will be ignored!
Warning: opencv: this formula has no --with-java option so it will be ignored!

Am i doing something wrong?

luigidr commented 7 years ago

No. OpenCV was moved and the --with-java option has been removed: https://github.com/Homebrew/homebrew-core/issues/17106

I will update the documentation as soon as possible, sorry about that.

amedvedjev commented 7 years ago

@luigidr another issue i met that latest java client has:

    private static String getNativeLibraryName() {
        return "opencv_java320";
    }

1) but latest openCV is 330. will it be conflict? 2) also is it possible to install older version 3.2.0?

luigidr commented 7 years ago

Sorry, where is the getNativeLibraryName() method?

About this, instead:

  1. also is it possible to install older version 3.2.0?

Yes, but you need to install OpenCV from source (e.g., by following the installation guide for Linux) or by editing the Homebrew formula to download and install OpenCV 3.2

amedvedjev commented 7 years ago

@luigidr 'getNativeLibraryName' is in package org.opencv.core

luigidr commented 7 years ago

It should return opencv_java320, if you installed OpenCV 3.3.0...

amedvedjev commented 7 years ago

no. i tested with 3.3.0.

System.loadLibrary("opencv_java320"); // not found
System.loadLibrary("opencv_java330"); // found

i can work.

luigidr commented 7 years ago

Perfect.

I am updating the documentation right now, so I close this issue.

amedvedjev commented 7 years ago

@luigidr but "/usr/local/opt/opencv3/share/OpenCV/java/" also not valid when i manually installing openCV 3.3.0 - it just does not create such link. i need change it to "/usr/local/Cellar/opencv/3.3.0/share/OpenCV/java/"

i mean you need update more ....

luigidr commented 7 years ago

Yes, I will completely update the documentation in the next few hours, I am checking OpenCV 3.3.0 on my computer. :)