Travis Pettry
Travis Pettry

Reputation: 1352

OpenCV 2.4.9 Full Screen

I am attempting to create an OpenCV application (in C++) that is full screen on the Raspberry Pi. I not been able to get my app be full screen yet. I have tried the following:

namedWindow("Image");
setWindowProperty("Image", CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN);
// Create black empty images
Mat image = Mat::zeros(400, 400, CV_8UC3);

// Draw a circle 
circle(image, Point(200, 200), 32.0, Scalar(0, 0, 255), 1, 8);
imshow("Image", image);

waitKey(0);
return(0);

However, this has only given me a window 400 by 400. I have referenced this post Why does a full screen window resolution in OpenCV (@ Banana Pi, Raspbian) slow down the camera footage and let it lag? but it doesn't help. If anyone has any ideas I would love to hear them. Thanks, Travis

Upvotes: 3

Views: 3058

Answers (1)

berak
berak

Reputation: 39806

try :

namedWindow("Image", WINDOW_NORMAL);

since the default WINDOW_AUTOSIZE flag won't let you resize the window

also, just for clarity, use either:

namedWindow("Image", WINDOW_NORMAL);
setWindowProperty("Image", CV_WND_PROP_FULLSCREEN, 1); //( on or off)

or:

namedWindow("Image", WINDOW_NORMAL | WINDOW_FULLSCREEN );

Upvotes: 4

Related Questions