File tree 5 files changed +46
-0
lines changed
samples/java/clojure/simple-sample 5 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ /target
2
+ /classes
3
+ /checkouts
4
+ pom.xml
5
+ pom.xml.asc
6
+ * .jar
7
+ * .class
8
+ /.lein- *
9
+ /.nrepl-port
Original file line number Diff line number Diff line change
1
+ (defproject simple-sample " 0.1.0-SNAPSHOT"
2
+ :pom-addition [:developers [:developer {:id " magomimmo" }
3
+ [:name " Mimmo Cosenza" ]
4
+ [:url " https://github.com/magomimmoo" ]]]
5
+
6
+ :description " A simple project to start REPLing with OpenCV"
7
+ :url " http://example.com/FIXME"
8
+ :license {:name " BSD 3-Clause License"
9
+ :url " http://opensource.org/licenses/BSD-3-Clause" }
10
+ :dependencies [[org.clojure/clojure " 1.5.1" ]
11
+ [opencv/opencv " 2.4.7" ]
12
+ [opencv/opencv-native " 2.4.7" ]]
13
+ :main simple-sample.core
14
+ :injections [(clojure.lang.RT/loadLibrary org.opencv.core.Core/NATIVE_LIBRARY_NAME)])
Original file line number Diff line number Diff line change
1
+ ; ;; to run this code from the terminal: "$ lein run". It will save a
2
+ ; ;; blurred image version of resources/images/lena.png as
3
+ ; ;; resources/images/blurred.png
4
+
5
+ (ns simple-sample.core
6
+ (:import [org.opencv.core Point Rect Mat CvType Size Scalar]
7
+ org.opencv.highgui.Highgui
8
+ org.opencv.imgproc.Imgproc))
9
+
10
+ (defn -main [& args]
11
+ (let [lena (Highgui/imread " resources/images/lena.png" )
12
+ blurred (Mat. 512 512 CvType/CV_8UC3)]
13
+ (print " Blurring..." )
14
+ (Imgproc/GaussianBlur lena blurred (Size. 5 5 ) 3 3 )
15
+ (Highgui/imwrite " resources/images/blurred.png" blurred)
16
+ (println " done!" )))
Original file line number Diff line number Diff line change
1
+ (ns simple-sample.core-test
2
+ (:require [clojure.test :refer :all ]
3
+ [simple-sample.core :refer :all ]))
4
+
5
+ (deftest a-test
6
+ (testing " FIXME, I fail."
7
+ (is (= 0 1 ))))
You can’t perform that action at this time.
0 commit comments