Skip to content

Instantly share code, notes, and snippets.

@duncanmak
Created March 10, 2010 17:43
Show Gist options
  • Save duncanmak/328128 to your computer and use it in GitHub Desktop.
Save duncanmak/328128 to your computer and use it in GitHub Desktop.
(defn find-edge [image cx cy]
(let [width (.getWidth image)
height (.getHeight image)
ip (-> image .getProcessor .duplicate)]
(.findEdges ip)
(doall
(for [x (range width)
y (range height)
:let [value (.get ip x y)]
:when (not (zero? value))]
[x y]))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment