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
ビギナー
2,370件の閲覧回数

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 件の賞賛
8 返答(返信)
SIRIGIRI_V_Intel
従業員
2,370件の閲覧回数

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
ビギナー
2,370件の閲覧回数

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

Luis_at_Intel
モデレーター
2,370件の閲覧回数

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
ビギナー
2,370件の閲覧回数

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
モデレーター
2,370件の閲覧回数

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
ビギナー
2,370件の閲覧回数

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

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

JVond
ビギナー
2,370件の閲覧回数

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
モデレーター
2,370件の閲覧回数

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

返信