Skip to content

Instantly share code, notes, and snippets.

@lynaghk
Created December 2, 2012 20:30
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lynaghk/4190923 to your computer and use it in GitHub Desktop.
Save lynaghk/4190923 to your computer and use it in GitHub Desktop.
OpenCV in Clojure?
#Build OpenCV and the new Java JNI interface described here: https://github.com/emchristiansen/opencv/commit/0d323087fadaf931dbaf4120b69f0839b745b888
git clone git://github.com/Itseez/opencv.git
cd opencv
cmake -DBUILD_opencv_java=ON
ant jar
(defproject com.keminglabs/shredbot5000 "0.1.0-SNAPSHOT"
:description "Deshredding experiments"
:dependencies [[org.clojure/clojure "1.4.0"]]
:min-lein-version "2.0.0"
:source-paths ["src/clj" "../../software/opencv/bin/opencv-2.4.9.jar"]
:jvm-opts ["-Djava.library.path=/usr/local/lib"])
(ns scratch.clj
(:import org.opencv.core.Size))
(System/loadLibrary "opencv_java")
(new Size 10 10) ;;=> #<Size 10x10>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment