This works as expected:

cv2.rectangle(image, pt1, pt2, color,

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.

    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 ( will not be changed.

    • 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


    By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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