comparison 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
comparison
equal deleted inserted replaced
356:446300cb5ae7 357:90b34cb842de
9 9
10 10
11 11
12 #+name: gabor 12 #+name: gabor
13 #+begin_src clojure 13 #+begin_src clojure
14 (ns cortex.gabor) 14 (ns cortex.gabor
15 (:import org.opencv.core.CvType)
16 (:import java.awt.image.BufferedImage)
17 (:import ij.ImagePlus)
18 (:use cortex.sense)
19 (:use cortex.util)
20 )
15 21
16 (defn load-opencv 22 (defn load-opencv
17 "Load the opencv native library. Must be called before any OpenCV 23 "Load the opencv native library. Must be called before any OpenCV
18 stuff is used." 24 stuff is used."
19 [] 25 []
20 (clojure.lang.RT/loadLibrary "opencv_java249")) 26 (clojure.lang.RT/loadLibrary "opencv_java249"))
21 27
22 28
29 (defn convolve-practice []
30 (let [input "/home/r/proj/cortex/images/dominos.jpg"
31
32
33 output "/home/r/ppp.png"
34
35 i (org.opencv.highgui.Highgui/imread input)
36
37 ]
23 38
24 39
40
41
42 (view (ImagePlus. input))
43 (view (ImagePlus. output))
44
45 ))
46
47
48
49
50
51
52
53 (comment
54 ;; these work
55 (def i (org.opencv.highgui.Highgui/imread
56 "/home/r/proj/cortex/images/dominos.jpg"))
57
58 (org.opencv.highgui.Highgui/imwrite "/home/r/ppp.png" i)
59 )
25 #+end_src 60 #+end_src
26 61
27 62
28 63
29 * COMMENT Generate Source 64 * COMMENT Generate Source