comparison org/sense.org @ 188:22548d48cc85

added debug for vision
author Robert McIntyre <rlm@mit.edu>
date Sat, 04 Feb 2012 10:00:37 -0700
parents 6142e85f5825
children 16cbce075a0b
comparison
equal deleted inserted replaced
187:6142e85f5825 188:22548d48cc85
227 (if (> (count data) (count @windows)) 227 (if (> (count data) (count @windows))
228 (reset! windows (map (fn [_] (view-image)) 228 (reset! windows (map (fn [_] (view-image))
229 (range (count data))))) 229 (range (count data)))))
230 (dorun 230 (dorun
231 (map 231 (map
232 (fn [display gen data] 232 (fn [display datum]
233 (display (gen data))) 233 (display (sense-display-kernel datum)))
234 @windows sense-display-kernel data))))) 234 @windows data)))))
235 235
236 236 (defn gray
237 237 "Create a gray RGB pixel with R, G, and B set to 'num"
238 [num]
239 (+ num
240 (bit-shift-left num 8)
241 (bit-shift-left num 16)))
238 #+end_src 242 #+end_src
243
244 #+results: sense
245 : #'cortex.sense/gray
239 246
240 247
241 * COMMENT generate source 248 * COMMENT generate source
242 #+begin_src clojure :tangle ../src/cortex/sense.clj 249 #+begin_src clojure :tangle ../src/cortex/sense.clj
243 <<sense>> 250 <<sense>>