Python How to convert an image to grayscale with Numpy and PIL

preview_player
Показать описание
Simple how to in Python on turning BGR (RGB) into grayscale using basic formula of grayscaling. You can just sum pixel values and divide by 3 to achieve same effect. PIL is used to read and save images, Numpy arrays for manipulation
=====================================
=====================================
Рекомендации по теме
Комментарии
Автор

Sir I got a invalid syntax error in line 6

saurabhbarle