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):
If you just use this, it will work...
ctr = np.array(cnt).reshape((-1,1,2)).astype(np.int32) cv2.drawContours(mask, [ctr], -1, 255, -1)