【发布时间】:2021-12-31 08:32:09
【问题描述】:
我想问一下如何将矩阵转换为字符串然后再转换为文本?
例如,我有来自图像的矩阵,范围为 0 - 255:
[[224 65 90]
[62 125 33]
[75 40 94]]
我希望输出将所有矩阵值转换为字符串类型的 ASCII 文本,如下所示:
'àAZ>}!K(^'
代码:
slices = Image.Image.split(image)
channel_red = np.array(slices[0])
# Matrix to string code below
???
【问题讨论】:
-
请检查How to Ask。
标签: python numpy image-processing python-imaging-library