- Install Homebrew-Science (once)
$brew tap homebrew/science
- Install OpenCV
$brew install opencv3 --with-java
- Into file
$cd usr/local/Cellar/opencv3/3.1.0_4/share/java
- [Terminal] Copy or rename file
$cp ./libopencv_java310.so libopencv_java310.dylib
-
[Eclipse] eclipse -> preference ->Java -> Build Path -> User Libraries
-
Press "New"
-
Input library name "opencv-(version)"
-
Click library you made
-
Click "Add External JARs..." -> add "opencv-310.jar"
-
Expand "opencv-3.1" -> "Native library location" -> "External Folder..." -> "libopencv_java310.dylib"
-
In your project, Build Path -> Add libraries... -> user library & Next -> check "opencv-3.1"
-
[Intelli J] File -> Project Structure... -> Libraries ->"+" -> Java
-
Select "/usr/local/Cellar/opencv3/3.1.0_4/share/OpenCV/java/opencv-310.jar"
-
"projectName" -> Edit Configurations ->Confuguration -> Input "-Djava.library.path=/usr/local/Cellar/opencv3/3.1.0_4/share/OpenCV/java" in "VM options"