Joseph Drackey

Generation

generate functionTue, 28 Mar 2023

Converts an image to grayscale using the crude average of the r, g, and b

def to_grayscale(image): return np.dot(image[...,:3], [0.299, 0.587, 0.114]) to_grayscale()

Questions about programming?Chat with your personal AI assistant