如何python pil开发图像识别

2024-12-03 07:05:51
推荐回答(1个)
回答1:

from PIL import Image

im = Image.open('XXX.jpg')
pix = im.load()
width = im.size[0]
height = im.size[1]
for x in range(width):
for y in range(height):
r, g, b = pix[x, y]