Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.05 KB

File metadata and controls

37 lines (24 loc) · 1.05 KB

Install OpenCV-Java into Mac

In terminal

  1. Install Homebrew-Science (once)

$brew tap homebrew/science

  1. Install OpenCV

$brew install opencv3 --with-java

  1. Into file

$cd usr/local/Cellar/opencv3/3.1.0_4/share/java

Eclipse

  1. [Terminal] Copy or rename file

$cp ./libopencv_java310.so libopencv_java310.dylib

  1. [Eclipse] eclipse -> preference ->Java -> Build Path -> User Libraries

  2. Press "New"

  3. Input library name "opencv-(version)"

  4. Click library you made

  5. Click "Add External JARs..." -> add "opencv-310.jar"

  6. Expand "opencv-3.1" -> "Native library location" -> "External Folder..." -> "libopencv_java310.dylib"

  7. In your project, Build Path -> Add libraries... -> user library & Next -> check "opencv-3.1"

Intelli J

  1. [Intelli J] File -> Project Structure... -> Libraries ->"+" -> Java

  2. Select "/usr/local/Cellar/opencv3/3.1.0_4/share/OpenCV/java/opencv-310.jar"

  3. "projectName" -> Edit Configurations ->Confuguration -> Input "-Djava.library.path=/usr/local/Cellar/opencv3/3.1.0_4/share/OpenCV/java" in "VM options"