'努比·恩达雷'对象没有属性'delete'

2024-09-19 23:44:43 发布

您现在位置:Python中文网/ 问答频道 /正文

_, contours0, hierarchy = cv.findContours( img1, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
_, contours1, hierarchy = cv.findContours( thresh1, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
for i in contours0[0]:
     if i in contours1[0]:
        contours0[0].delete(i)
print(contours0)

这将产生AttributeError:numpy.ndarray对象没有属性delete 可能是什么错误?我想从轮廓删除匹配元素。在


Tags: intreechainforhierarchydeletesimplecv