Was feeling pumped up this morning. Created an image for that
MNIST reader to test. Had to convert it to a one-channel 96 bit-depth
28x28. All fine and good. Ran it through the program: worked fine.
Told me it was a 5...
Actually, I kinda thought it was a 1.
'L' sands for Luminance...
from PIL import Image
# Open the original image file
img = Image.open('img_5.jpg')
# Convert the image to grayscale
gray_img = img.convert('L')
# Save the grayscale image
gray_img.save('img_6.jpg')
No comments:
Post a Comment