Mercurial > cortex
diff org/gabor.org @ 357:90b34cb842de
playing around.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 06 Mar 2013 18:13:34 +0000 |
parents | 446300cb5ae7 |
children | b72fea69b2e1 |
line wrap: on
line diff
1.1 --- a/org/gabor.org Wed Mar 06 17:21:00 2013 +0000 1.2 +++ b/org/gabor.org Wed Mar 06 18:13:34 2013 +0000 1.3 @@ -11,7 +11,13 @@ 1.4 1.5 #+name: gabor 1.6 #+begin_src clojure 1.7 -(ns cortex.gabor) 1.8 +(ns cortex.gabor 1.9 + (:import org.opencv.core.CvType) 1.10 + (:import java.awt.image.BufferedImage) 1.11 + (:import ij.ImagePlus) 1.12 + (:use cortex.sense) 1.13 + (:use cortex.util) 1.14 + ) 1.15 1.16 (defn load-opencv 1.17 "Load the opencv native library. Must be called before any OpenCV 1.18 @@ -20,8 +26,37 @@ 1.19 (clojure.lang.RT/loadLibrary "opencv_java249")) 1.20 1.21 1.22 +(defn convolve-practice [] 1.23 + (let [input "/home/r/proj/cortex/images/dominos.jpg" 1.24 + 1.25 + 1.26 + output "/home/r/ppp.png" 1.27 1.28 + i (org.opencv.highgui.Highgui/imread input) 1.29 + 1.30 + ] 1.31 1.32 + 1.33 + 1.34 + 1.35 + (view (ImagePlus. input)) 1.36 + (view (ImagePlus. output)) 1.37 + 1.38 + )) 1.39 + 1.40 + 1.41 + 1.42 + 1.43 + 1.44 + 1.45 + 1.46 +(comment 1.47 + ;; these work 1.48 + (def i (org.opencv.highgui.Highgui/imread 1.49 + "/home/r/proj/cortex/images/dominos.jpg")) 1.50 + 1.51 + (org.opencv.highgui.Highgui/imwrite "/home/r/ppp.png" i) 1.52 +) 1.53 #+end_src 1.54 1.55