rlm@1: (ns clojureDemo.MegaDeath) rlm@1: rlm@1: (import '(java.io File)) rlm@1: (import '(org.apache.commons.io FileUtils)) rlm@1: (import '(javax.imageio ImageIO) ) rlm@1: rlm@1: (import '(ij.plugin PlugIn)) rlm@1: (import '(ij ImagePlus IJ)) rlm@1: rlm@1: (import '(ij Macro)) rlm@1: rlm@1: (import '(java.io BufferedReader InputStreamReader)) rlm@1: (import '(java.awt.image BufferedImage)) rlm@1: rlm@1: rlm@1: rlm@1: (use '[clojureDemo.Xuggle :only (video-seq trans-save flash video-data display)]) rlm@1: rlm@1: rlm@1: (use 'clojure.contrib.repl-utils) rlm@1: (use ['clojureDemo.Defines rlm@1: :only '( rlm@1: lian look getto human0 blow base app0 app1 app2 app3 app4 app5 rlm@1: bounce0 bounce1 bounce2 bounce3 bounce4 bounce5 bounce6 rlm@1: collide0 collide1 collide2 collide3 collide4 rlm@1: give0 give1 give2 give3 give4 target default)]) rlm@1: rlm@1: rlm@1: (def hamster (first (video-seq look))) rlm@1: (def ham (.getImage hamster)) rlm@1: rlm@1: (set! *print-length* 10) rlm@1: rlm@1: rlm@1: rlm@1: (defn final-ficker rlm@1: "wtf?" rlm@1: [& vars] rlm@1: (class (last vars))) rlm@1: rlm@1: (defmulti log-polar (fn [& args] (class (last args)))) rlm@1: rlm@1: (defmethod log-polar clojure.lang.LazySeq rlm@1: ([X Y video-seq] rlm@1: (with-meta (map #(log-polar % X Y) video-seq) (meta video-seq))) rlm@1: ([video-seq] rlm@1: (with-meta (map #(log-polar %) video-seq) (meta video-seq)))) rlm@1: rlm@1: rlm@1: (defmethod log-polar ij.ImagePlus rlm@1: [imageP] rlm@1: (let [thread (Thread/currentThread) rlm@1: options ""] rlm@1: (.setName thread "Run$_polar-transform") rlm@1: (Macro/setOptions thread options) rlm@1: (IJ/runPlugIn imageP "clojureDemo.Polar_Transformer" "") rlm@1: (let [return-image (IJ/getImage)] rlm@1: (.hide return-image) rlm@1: return-image))) rlm@1: rlm@1: (defn x-polar2 rlm@1: [imageP] rlm@1: (let [thread (Thread/currentThread) rlm@1: options ""] rlm@1: (.setName thread "Run$_polar-transform") rlm@1: (Macro/setOptions thread options) rlm@1: (IJ/runPlugIn imageP "clojureDemo.Polar_Transformer" ""))) rlm@1: rlm@1: rlm@1: rlm@1: (defn follow-object rlm@1: "takes in a video stream and does the most basic and simple forms of object detection." rlm@1: [video-seq] rlm@1: ) rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: rlm@1: (comment rlm@1: rlm@1: (do (use :reload-all 'clojureDemo.MegaDeath) (in-ns 'clojureDemo.MegaDeath)) rlm@1: (map #(ns-unmap 'user %)(keys (ns-interns 'user))) rlm@1: )