luxonis / depthai-experiments

Experimental projects we've done with DepthAI.
MIT License
842 stars 370 forks source link

Oak-D Lite upside down #296

Open jens-bongartz opened 2 years ago

jens-bongartz commented 2 years ago

Hello Luxionis Team,

I have installed my Oak-D Lite due to mechanical reasons upside down in the windshield of my car and want to run "road-segmentation". For a correct processing the camera image must be rotated by 180 degree. Therefore I added the orientation parameter to the createColorCam() function of the script "main.py".

pm.createColorCam(previewSize=nn_shape, orientation=dai.CameraImageOrientation.ROTATE_180_DEG)

But this does not have the expected effect. The image is still upside down and the sky is segmented. Which is the right way to rotate the input image?

Thanks and best regards Jens

Erol444 commented 2 years ago

Hello @jens-bongartz , sorry for the inconvenience here, from my testing it looks like the camera sensor on the OAK-D-Lite doesn't support changing orientation, cc @alex-luxonis on that. In the meantime, you can rotate frames using ImageManip, see example here. Thanks, Erik

jens-bongartz commented 2 years ago

Wow, a reply in 12 minutes is very impressive. Thank you Erik! I will have a look into ImageManip. Thanks, Jens