bjornsen
bjornsen

Reputation: 604

Fullscreen Causes AttributeError in Python OpenCV

This is an odd little thing. I'm using OpenCV 2.4.2 (brew build on OSX 10.7), cv2 bindings, and going by the OpenCV documentation, I've tried both:

cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
cv2.setWindowProperty("Image", cv2.CV_WND_PROP_FULLSCREEN, cv2.CV_WINDOW_FULLSCREEN)

Both return that cv2 doesn't have this attribute. I assume they just haven't been added to the cv2 bindings yet. Is there a way to get around this?

Upvotes: 1

Views: 2009

Answers (1)

Froyo
Froyo

Reputation: 18487

As you can see there's only cv2.CV_WINDOW_AUTOSIZE attribute available. To use FULLSIZE attribute, you need to use cv2.cvmodule.

cv2.setWindowProperty("Image", cv2.WND_PROP_FULLSCREEN, cv2.cv.CV_WINDOW_FULLSCREEN)

Upvotes: 2

Related Questions