4 ms·
"Optical Illusion" feels strong here -- really the image is just being desaturated. Same effect can be seen by just replacing random pixels with their grayscale
by andrewla 6y ago
"Optical Illusion" feels strong here -- really the image is just being desaturated. Same effect can be seen by just replacing random pixels with their grayscale equivalent.
Something like:
width, height, _ = bw_img.shape
pixels = int(width * height * .5)
xs = np.random.choice(width, pixels)
ys = np.random.choice(height, pixels)
bw_img[xs,ys,:] = img[xs, ys, :]