PIL.Image.fromarray() -- cv2

frame = cv2.resize(frame, (224, 224))

img = Image.fromarray(frame)

img = Image.fromarray(frame.astype('uint8'))

img = Image.fromarray(frame.astype('uint8')).convert('RGB')
发布了1636 篇原创文章 · 获赞 341 · 访问量 221万+

猜你喜欢

转载自blog.csdn.net/tony2278/article/details/103897266