mac編譯opencv java
阿新 • • 發佈:2019-10-10
- 使用
brew edit opencv@2
編輯編譯配置,將-DBUILD_opencv_java=OFF
改為-DBUILD_opencv_java=ON
- 安裝
brew install --build-from-source opencv@2
重新安裝用reinstall
- 檢視安裝位置
➜ ~ ll /usr/local/Cellar/opencv@2/2.4.13.7_5/share/OpenCV/java total 2264 -rwxr-xr-x 1 aa admin 691K 10 10 09:52 libopencv_java2413.dylib -rw-r--r-- 1 aa admin 440K 10 10 09:52 opencv-2413.jar
- 右鍵專案,選“Open Module Settings”, Libraries增加opencv-2413.jar
- 配置tomcat啟動引數,
-Djava.library.path=/usr/local/Cellar/opencv@2/2.4.13.7_5/share/Open