2024-10-01 22:38:50 发布
网友
这是我的代码:
for ts, blob in izip(ts_list, blobs): ts = simplecvimg.track("camshift", i, fgmask,b.boundingBox()) print(ts)
以下是我得到的错误:
{我不知道在这种情况下我为什么会犯错误。任何帮助都将不胜感激!在
ts或{}是numpy数组。。。因此,它不知道not <numpy.array>是什么意思
ts
not <numpy.array>
你可能想要if len(ts) > 0 and len(img) > 0,或者{}或者类似的东西
if len(ts) > 0 and len(img) > 0
>>> import numpy >>> not numpy.array([1,2,3]) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
ts
或{not <numpy.array>
是什么意思你可能想要}或者类似的东西
if len(ts) > 0 and len(img) > 0
,或者{相关问题 更多 >
编程相关推荐