Vision - OpenCV wrapper for Clojure
Vision is a OpenCV wrapper for Clojure.
There are no pre build packages available. For now you have to build it your self. Only dependency is the OpenCV library.
in the resources/lib directory to create your platform specific build file then build the shared library, for Linux/OS X run,
Windows build instructions (without using cygwin) courtesy of Dusan Miloradovic,
- Make sure OPENCV_DIR points to the installation on fhe OPENCV. If cmake-gui was used for building the OpenCV, it stores the information in the registry, so that needs not to be set.
- Edit the CMakeLists.txt:
- Set the link directories to point to the location of OPENCV dlls: for example:LINK_DIRECTORIES( c:/opencv_out/bin/ )
- Replace the library names with the full dll names: replace opencv_core with opencv_core231.dll , etc..
- Run cmake-gui, and choose the vision_install_dir/resources/lib as "Where is the source code", and pick arbitrary build folder.
- Choose mingw32 from the list of the compiler options
- Run Configure, and Generate
- go to the build folder , and type mingw32-make
On the Clojure side you need to start the JVM with the jna.library.path pointing to the location of the shared library, for a leiningen project it can be done by the following,
(defproject awesome-project "1.0.0-SNAPSHOT" :dependencies [[vision "1.0.0-SNAPSHOT"]] :jvm-opts ["-Djna.library.path=/path/to/vision/resources/lib"])
Project is hosted at github, grab it here.
Beerware Revision 42