How to set a custom size of the output video frame?

Hello, I’m running a jetson-inference objectdetection code on my Jetson Nano and the GL window opened by the script has the dimensions of my camera resolution (1280x700) whereas I want it to be full screen (1920x1080).

How do I pass these parameters using the functions below? I’m trying and it’s not working out.

    output = jetson.utils.videoOutput(opt.output_URI, argv=sys.argv+is_headless)
    output.Render(out_img, argv=['--width=1940','--height=1080'])

Hi @paranyushkin, by default the window will resize to match the size of the video stream. However you can disabling this by commenting out this code (lines 649-653) and recompiling:

Then run:

cd /path/to/your/jetson-inference/build
sudo make install

By default, the window will be close to the full size of the desktop. You can also manually specify the window size with the --output-width and --output-height arguments. You would use these like this (or from the command line):

output = jetson.utils.videoOutput(opt.output_URI, argv=sys.argv+is_headless+['--input-height=1920', '--input-width=1080'])

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.