How to invert the camera stream using jetson.utils


**• Hardware Platform - jetson nano
**• DeepStream Version - 5.0
**• TensorRT Version - 7.0
**• jetpack Version - 4.4.1

I am trying to only stream mipi camera using jetson.utils, By referring [jetson-inference/ at master · dusty-nv/jetson-inference · GitHub]

I was able to stream it through the python script (i.e

Now trying to invert/flip the camera stream able to do with “video-viewer csi://0 --input-flip=rotate-180” command.
How can i achieve this through the same python script.


The post you are referring has a solution what you want.

jetson-inference/ at master · dusty-nv/jetson-inference · GitHub

You can make a simple object detection code with only 10 lines!

Yes, i am able to do that
But trying to rotate/flip the camera feed in same script.

You may try something like:

camera = jetson.utils.videoSource("csi://0", argv=['--input-flip=rotate-180'])

Thanks, it works.

Also got this line for accepting the input

camera = jetson.utils.gstCamera(1280, 720, "csi://0")
What's the difference between them.

Also observed frame rate is 29-30 FPS through
1.cmd command (video-viewer csi://0)
2. camera = jetson.utils.gstCamera(1280, 720, “csi://0”)

But using " camera = jetson.utils.videoSource(“csi://0”, argv=[’–input-flip=rotate-180’])"
getting 2 -3 fps.

Why is it happening or doing some wrong.

I can’t tell what’s happening in your case. My jetson-utils version is not up-to-date, it only support the arg parsing format, while older versions were using the (width, height, URI) format.
You may try to specify your video options such as:

camera = jetson.utils.videoSource("csi://0", argv=['--input-flip=rotate-180', '--input-width=1280', '--input-height=720', '--input-frameRate=30'])

Thanks for the reply.

I tried this but didn’t saw any significance difference by adding ‘–input-frameRate=30’
in the arguments.

In my case, 10 lines of detection example shows 15~16 fps at 5W power mode not MAX-N 10W.

I tested it in the docker container.

okay… thanks
Will recheck it.