This works as expected:

cv2.rectangle(image, pt1, pt2, color, thickness=cv2.cv.CV_FILLED)

But I have not been able to find the equivalent constant in the cv2 interface. I know this is simply some negative value (from the documentation), but I like the readability of the constant in the code and would like to write the equivalent function in pure cv2.

share|improve this question

    There is no equivalent at the moment. Most likely it will be added in next major release (2.5) and will be named cv2.FILLED.

    Any way it is safe to assume that the exact value (cv2.cv.CV_FILLED==-1) will not be changed.

    share|improve this answer
    • Is there a good resource for porting from cv to cv2? (It would be great if there was a complete list of "for X replace it with Y".)– Andy HaydenAug 13 '15 at 7:02

    Your Answer

     
    discard

    By posting your answer, you agree to the privacy policy and terms of service.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.