From ec30416f3eb9b0099908c65fd23c91da35a6d739 Mon Sep 17 00:00:00 2001 From: Wenderson Oliveira Date: Tue, 6 Oct 2020 23:54:18 -0300 Subject: [PATCH] Fixed grayscale function. --- image-processing-with-numpy.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image-processing-with-numpy.ipynb b/image-processing-with-numpy.ipynb index 1da3908..a31eaff 100644 --- a/image-processing-with-numpy.ipynb +++ b/image-processing-with-numpy.ipynb @@ -293,7 +293,7 @@ }, "outputs": [], "source": [ - "def to_grayscale(im, weights = np.c_[0.2989, 0.5870, 0.1140]):\n", + "def to_grayscale(im, weights = np.c_[-0.2989, -0.5870, -0.1140]):\n", " \"\"\"\n", " Transforms a colour image to a greyscale image by\n", " taking the mean of the RGB values, weighted\n",