Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JVond
Beginner
336 Views

Have video output open in full screen

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
336 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

JVond
Beginner
336 Views

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

Luis_at_Intel
Moderator
336 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

JVond
Beginner
336 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.

Luis_at_Intel
Moderator
336 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

 

JVond
Beginner
336 Views

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

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

JVond
Beginner
336 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..

Luis_at_Intel
Moderator
336 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

Reply