changeset 362:4b229dc028b6

more cleanup.
author Robert McIntyre <rlm@mit.edu>
date Thu, 07 Mar 2013 03:28:26 +0000
parents 09461dce2e2f
children 9fa92af29c3a
files org/gabor.org
diffstat 1 files changed, 1 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/org/gabor.org	Thu Mar 07 03:27:42 2013 +0000
     1.2 +++ b/org/gabor.org	Thu Mar 07 03:28:26 2013 +0000
     1.3 @@ -25,16 +25,6 @@
     1.4    []
     1.5    (clojure.lang.RT/loadLibrary "opencv_java249"))
     1.6  
     1.7 -(defn make-kernel []
     1.8 -  (let [r (org.opencv.core.Mat. 5 5 CvType/CV_32F)]
     1.9 -    (.put r 0 0 (float-array (map (fn [_] (rand)) (range 25))))
    1.10 -    (println (.dump r))
    1.11 -
    1.12 -    r
    1.13 -
    1.14 -
    1.15 -    ))
    1.16 -
    1.17  (defn gabor-kernel [sigma aspect-ratio theta wavelength phase-offset]
    1.18    
    1.19    ;; first, find the size of the kernel which is required
    1.20 @@ -97,20 +87,12 @@
    1.21  
    1.22  (defn show-kernel [kernel]
    1.23    (let [img-path "/home/r/proj/cortex/tmp/kernel.png"]
    1.24 -    (draw-kernel kernel img-path)
    1.25 +    (draw-kernel! kernel img-path)
    1.26      (view (ImagePlus. output))))
    1.27  
    1.28  (defn print-kernel [kernel]
    1.29    (println (.dump kernel)))
    1.30                             
    1.31 -
    1.32 -        
    1.33 -                      
    1.34 -         
    1.35 -        
    1.36 -  
    1.37 -
    1.38 -
    1.39  (defn convolve-practice []
    1.40    (let [input "/home/r/proj/cortex/images/dominos.jpg"
    1.41          
    1.42 @@ -132,19 +114,6 @@
    1.43      (view (ImagePlus. input))
    1.44      (view (ImagePlus. output))))
    1.45  
    1.46 -  
    1.47 -
    1.48 -
    1.49 -
    1.50 -
    1.51 -
    1.52 -(comment
    1.53 -  ;; these work
    1.54 -  (def i (org.opencv.highgui.Highgui/imread
    1.55 -          "/home/r/proj/cortex/images/dominos.jpg"))
    1.56 -  
    1.57 -  (org.opencv.highgui.Highgui/imwrite "/home/r/ppp.png" i)
    1.58 -)
    1.59  #+end_src
    1.60  
    1.61