How to flip camera in docker container?

Hi, everyone!
when i use the camera-capture tools or video-viewer tools in docker container i face a problem, that is the images are flipped shown.
i try to solve this problem follow this:
git clone GitHub - NVIDIA-AI-IOT/jetcam: Easy to use Python camera interface for NVIDIA Jetson
cd jetcam
apt-get update
apt-get install nano
nano jetcam/csi_camera.py
(i write ! nvvidconv flip-method=2 ! and install, but it still not work.)
python3 setup.py install
So how could i successfully solve this problem?

Hi @MaxMarth, can you try running camera-capture or video-viewer with --input-flip=rotate-180 option?

You can use this with any of the jetson-inference programs: https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-streaming.md#input-options

The jetcam library isn’t used by jetson-inference/jetson-utils, so changing jetcam won’t have an impact.

i test the option but it dosen’t work.
when the command is executed, the camera window will come out without images and immediately flashback.


After that the video-viewer tool cannot be opened anymore.

Hmm, can you try restarting the system to bring the camera back? Another thing you can try, is building the project from source (outside of container) with -DENABLE_NVMM=off flag:

$ sudo apt-get update
$ sudo apt-get install git cmake libpython3-dev python3-numpy
$ cd jetson-inference
$ mkdir build
$ cd build
$ cmake -DENABLE_NVMM=off ../
$ make -j$(nproc)
$ sudo make install
$ sudo ldconfig

Then try running video-viewer --input-flip=rotate-180 again (outside of container)

Thanks a lot! It works.
But there’s an error after second option: $ sudo apt-get install git cmake libpython3-dev python3-numpy
The error is: dpkg: error processing package nvidia-l4t-bootloader-configure.
After i skiped this option the problem is already be solved.

OK yes, you can skip that part, I believe this error is unrelated to jetson-inference and if you need to resolve it you can try searching the forums for the same bootloader error and/or reflash your SD card.

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