I want to convert a color image to grayscale using Python. All the tutorials regarding this implement this using OpenCV, whereas I want to do this without the help of any library.
Here's how I implement this using OpenCV:
import numpy as np
import cv2
img = cv2.imread("input.jpg", 0)
cv2.imwrite("output.jpg", img)
Can this be implemented using pure Python?