The Python Oracle

How can I convert an RGB image into grayscale in Python?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Industries in Orbit Looping

--

Chapters
00:00 Question
01:24 Accepted answer (Score 443)
02:12 Answer 2 (Score 99)
02:49 Answer 3 (Score 87)
05:28 Answer 4 (Score 41)
05:55 Thank you

--

Full question
https://stackoverflow.com/questions/1220...

Question links:
[matplotlib tutorial]: http://matplotlib.sourceforge.net/users/...

Accepted answer links:
[Pillow]: https://pillow.readthedocs.io/en/latest/
[the formula]: https://pillow.readthedocs.io/en/stable/...

Answer 2 links:
[scikit-image]: http://scikit-image.org/docs/stable/api/...

Answer 3 links:
[CUB-200 dataset.]: http://www.vision.caltech.edu/visipedia/...
[image]: https://i.stack.imgur.com/ZLd5vm.png
[image]: https://i.stack.imgur.com/eQ4KIm.png
[image]: https://i.stack.imgur.com/DTjVSm.png
[image]: https://i.stack.imgur.com/43cy1m.png
[image]: https://i.stack.imgur.com/f5fy9m.png

Answer 4 links:
[imread]: http://docs.opencv.org/3.0-beta/doc/py_t...
[cvtcolor]: http://docs.opencv.org/2.4/modules/imgpr...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #matplotlib

#avk47