OpenCV 3.1 drawContours '(-215) npoints > 0'

后端 未结 5 2246
一个人的身影
一个人的身影 2021-02-08 12:51

I\'m trying to create a mask from a contour, but am getting a C++ error.

Using OS X Yosemite, Python 2.7.10, OpenCV 3.1.0.

def create_mask(img, cnt):
            


        
5条回答
  •  春和景丽
    2021-02-08 13:34

    its hierarchy, contours so:

    contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)

提交回复
热议问题