anchor.diff:  	(format t "Edge thinning~%")
   	(edge-thin img)
   
  +   (write-image img "output/edges.png")
  +
   	(format t "overlaying image~%")
  -	;(overlay img org)
  +	(overlay img org)
   
   	(format t "Bluring image~%")
  -	;(setf org (blur-image org))
  +	(setf org (blur-image org))
   
   	(format t "K-means clustering~%")
  -	;(k-means org 5)
  +	(k-means org 5)
   
   
   	(format t "Writing to file~%")
  -	(write-image img output)) ; output the image for now
  +	(write-image org "output/blobs.png")) ; output the image for now
   
   ;; Shorthand function to run the noise estimation
   (defun noise (input output)
  
positive.code: (defun scale (max min l)
     (float (+ (/ l max) (/ l min))))
  
  (defun stroke (source reference stroke)
     ;(with-image-bounds (height width) reference
     ;   (setf stroke (floor (* stroke (scale width height stroke)))))
     ;(format t "painting ~S sized strokes~%" stroke)
     (setf canvas (copy-image reference))
     ;(threashold-image-colour canvas stroke)
     (setf canvas (erode (discrete-convolve canvas *edge-kernel*)
  		(make-8-bit-rgb-image 3 3 :initial-element 3)))
     ;(setf canvas (blur-image canvas))
     ;(overlay-stroke reference canvas) reference)
     canvas)
  
  (defun paint (source r)
     (setf r (remove-duplicates r))
     (format t "~S layers to paint~%" (length r))
     (setf source (load-painting source))
     (setf reference (copy-image source))
     (loop for i in r do
        (setf source (stroke source reference i))) source)
        ;(setf source (blur-image source))) source)
  
  (defun filter (filter input output)
     (format t "Labelling components~%")
     ;(setf blobs (label filter))
     (setf blobs '(255))
     (format t "Painting photo~%")
     (setf painting (paint input blobs))
     (write-image painting output))
  
  (defun e ()
  	(load 'fa.lisp)
  	(blob "images/starry_night.png" "output/starry_night_edge.png")
  	;(edge "images/odetojoy.png" "output/odetojoy_edge.png")
  	;(edge "images/the_scream.png" "output/scream_edge.png")
  	;(edge "images/odetojoy.png" "output/odetojoy_edge.png")
  
negative.code: (defun write-image (img name)
  	(write-png-file name img))
  
  
  (defun write-to-file (name content)
    (with-open-file (stream  name :external-format charset:iso-8859-1
           :direction :output
           :if-exists :overwrite
           :if-does-not-exist :create )
        (format stream content)) name)
  
  (defun 4-neighbors (img i j)
     (declare (type fixnum i j))
        (with-image-bounds (height width)
  