[imago-cvs] CVS imago/src

mvilleneuve mvilleneuve at common-lisp.net
Thu Jun 14 13:11:06 UTC 2007


Update of /project/imago/cvsroot/imago/src
In directory clnet:/tmp/cvs-serv3701

Modified Files:
	convolve.lisp 
Log Message:
Fix bug in CONVOLVE for grayscale images

--- /project/imago/cvsroot/imago/src/convolve.lisp	2005/01/03 20:56:02	1.2
+++ /project/imago/cvsroot/imago/src/convolve.lisp	2007/06/14 13:11:05	1.3
@@ -61,7 +61,8 @@
                          as x2 = (+ x dx)
                          when (<= 0 x2 (1- width))
                          do (let ((factor (aref matrix (+ dy 2) (+ dx 2))))
-                              (incf sum (* (image-pixel image x2 y2)
+                              (incf sum (* (gray-intensity
+                                            (image-pixel image x2 y2))
                                            factor)))))
           (let ((color (+ (floor sum divisor) offset)))
             (setf pixel2 (make-gray (limit-value color 0 255))))))




More information about the Imago-cvs mailing list