NVIDIA-AI-IOT / jetracer

An autonomous AI racecar using NVIDIA Jetson Nano
MIT License
1.06k stars 319 forks source link

How to reverse camera outupt? #115

Closed haroonhublikar12 closed 2 years ago

haroonhublikar12 commented 2 years ago

I am using imx219 160° camera on my jetracer. I have attached it upside down like everyone else. How can i reverse the camera output? I am getting reversed output in interactive regression.

krissdap commented 2 years ago

I think the simplest way you can do it is to modify the Jetcam's CSI_Camera https://github.com/NVIDIA-AI-IOT/jetcam/blob/master/jetcam/csi_camera.py (do it in your local code)

After each line of re, image = self.cap.read()

you add a line of image = cv2.rotate(image, cv2.ROTATE_180)

which would replace each captured frame with a rotated one.