Cleverly flipping image in a PyCapsule or change gstCamera option


In jetson-inference python examples, the camera is opened with jetson.utils.gstCamera. I can’t find any option to flip the image read from the camera.
It would make sense to add this option in all scripts, as raspberry camera are considered to be upright when the wires are down, which prevent to use a small stand for the camera.

Therefore, searching for solutions, how can i either :

  • modify jetson.utils.gstCamera to add a fourth optionnal option which would be the camera-flip
  • modify the PyCapsule object once the image is read in order to turn it upside down (180° rotation basically).

Thanks in advance for you kind support

Hi nicholas.jallan, yes I should add flip-method parameter to gstCamera.h and Python gstCamera bindings in a future update. For now, you can manually set the flip-method here:

Then re-run make and sudo make install after you change it.

1 Like

Thank you very much for your quick reply ! I just tested this modification and it’s working perfectly. Thanks.