【发布时间】:2017-04-16 05:16:15
【问题描述】:
我正在尝试将图像转换为矩阵。
values = []
normal = []
for x in (arr):
for y in (arr):
if arr[x,y] > 1:
normal.append(1)
else:
normal.append(0)
错误提示:
"ValueError: 具有多个元素的数组的真值是 模糊的。使用 a.any() 或 a.all()"
提前致谢。
【问题讨论】:
标签: opencv numpy image-processing scipy python-imaging-library