;;; Runs an edge-detector (derivative filter)
;;; on a stream.  Adjusts the scale of the 
;;; image to since derivative filters tend to
;;; result in intensities between -1 and 1, not
;;; 0 and 1.
(define (stream-edges s1)
  (stream-scale
    (stream-add
      ones
      (stream-scale (stream-delay s1 -1)  1)
      (stream-scale (stream-delay s1  1) -1))
    0.5))