首页 > 解决方案 > 如何使用 Python 从图像中读取文本和文本颜色?

问题描述

我必须阅读文本,但我需要文本的RGB值。我怎么才能得到它?我正在使用下面的代码段阅读文本。谁能帮我吗?

from PIL import Image
from pytesseract import image_to_string
print(image_to_string(Image.open('images.png')))

标签: python-3.xpython-imaging-library

解决方案


推荐阅读