# HG changeset patch # User Robert McIntyre # Date 1362626906 0 # Node ID 4b229dc028b67badc3fa0afc52a99c2048912a8b # Parent 09461dce2e2fbbe244380903e6512fe773582af8 more cleanup. diff -r 09461dce2e2f -r 4b229dc028b6 org/gabor.org --- a/org/gabor.org Thu Mar 07 03:27:42 2013 +0000 +++ b/org/gabor.org Thu Mar 07 03:28:26 2013 +0000 @@ -25,16 +25,6 @@ [] (clojure.lang.RT/loadLibrary "opencv_java249")) -(defn make-kernel [] - (let [r (org.opencv.core.Mat. 5 5 CvType/CV_32F)] - (.put r 0 0 (float-array (map (fn [_] (rand)) (range 25)))) - (println (.dump r)) - - r - - - )) - (defn gabor-kernel [sigma aspect-ratio theta wavelength phase-offset] ;; first, find the size of the kernel which is required @@ -97,20 +87,12 @@ (defn show-kernel [kernel] (let [img-path "/home/r/proj/cortex/tmp/kernel.png"] - (draw-kernel kernel img-path) + (draw-kernel! kernel img-path) (view (ImagePlus. output)))) (defn print-kernel [kernel] (println (.dump kernel))) - - - - - - - - (defn convolve-practice [] (let [input "/home/r/proj/cortex/images/dominos.jpg" @@ -132,19 +114,6 @@ (view (ImagePlus. input)) (view (ImagePlus. output)))) - - - - - - -(comment - ;; these work - (def i (org.opencv.highgui.Highgui/imread - "/home/r/proj/cortex/images/dominos.jpg")) - - (org.opencv.highgui.Highgui/imwrite "/home/r/ppp.png" i) -) #+end_src