Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Have video output open in full screen

JVond
Beginner
1,290 Views

I'd like the video output for a script to appear full screen with no manipulation upon opening.  How do I modify the command to make this happen.  

 

This is on a raspberry pi running buster.

0 Kudos
8 Replies
SIRIGIRI_V_Intel
Employee
1,290 Views

Hi James,

To display the video output in full screen mode, Use the following commands

For C++:

cv::namedWindow("Detection results", cv::WND_PROP_FULLSCREEN);
cv::setWindowProperty("Detection results", cv::WND_PROP_FULLSCREEN, cv::WINDOW_FULLSCREEN);
cv::imshow("Detection results", frame);

For Python:

cv2.namedWindow("Detection results", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("Detection results", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
cv2.imshow("Detection results", frame)

Hope this helps.

Regards,

Ram prasad

0 Kudos
JVond
Beginner
1,290 Views

Where does that go for the C++ script?  I can't edit it in the text editor...

0 Kudos
Luis_at_Intel
Moderator
1,290 Views

Hi Vondale, James,

May I ask which C++ script are you modifying? 

Where does that go for the C++ script? I can't edit it in the text editor...

It could be that you need Administrator (or sudo access in Linux) to make changes to the script.

Regards,

Luis

0 Kudos
JVond
Beginner
1,290 Views

security_barrier_camera_demo.   

 

It's not an admin issue.   It shows a bunch of gibberish characters in the text editor.

 

I don't usually use c++ so perhaps I'm missing a required step.

0 Kudos
Luis_at_Intel
Moderator
1,290 Views

Please share the path and file extension of the script you are modifying. Since you are using the Raspberry Pi, the actual sample code should be under "<path-to>/open_model_zoo/demos/security_barrier_camera_demo".

Once you edit and add your changes to main.cpp, you may need to re-build the sample (under "<path-to>/open_model_zoo/demos/build" run "make security_barrier_camera_demo").

Regards,

Luis

 

0 Kudos
JVond
Beginner
1,290 Views

I run it from~/open_model_zoo/demos/build/armv7l/Release 

I'll mess with the main.cpp file where you suggeted...

0 Kudos
JVond
Beginner
1,290 Views

Your code didn't work, but I did find where the size is determined and matched it to my screen resolution.  Now comes out well.

 

I did not find the same spot in the crossroad demo, however..

0 Kudos
Luis_at_Intel
Moderator
1,290 Views

Hi Vondale, James,

Edit the main.cpp file under ~/open_model_zoo/demos/crossroad_camera_demo and include these lines code after line #817:

cv::namedWindow("Detection results", cv::WND_PROP_FULLSCREEN);
cv::setWindowProperty("Detection results", cv::WND_PROP_FULLSCREEN, cv::WINDOW_FULLSCREEN);

Don't forget to rebuilt the sample for changes to take effect, as previously mentioned, under "~/open_model_zoo/demos/build" run "make crossroad_camera_demo"). I have tested this and seems to be working fine, please give it a try.

Regards,

Luis

0 Kudos
Reply