Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Hailo • Re: How to Flip or Rotate Camera Feed on Raspberry Pi with Hailo-8

$
0
0
Hi, thanks for the question. I was wondering whether you specifically wanted to use the Gstreamer application interface that Hailo provided, or whether that's simply what you found first.

In the latter case, I would strongly recommend going the simple Python (non-Gstreamer) route as that's what we mostly use, and so we're more likely to be able to help you. Generally, we regard it as more powerful, more flexible and easier to use. You can check out the examples here.

I might direct you in the first instance to the detect.py example. In particular, if you find the line where it sets up the camera configuration, it's easy to add a rotation there. Simply change the code as follows:

Code:

from libcamera import Transform  # put this near the top of the file# and then replace that line by:config = picam2.create_preview_configuration(main, lores=lores, controls=controls, transform=Transform(hflip=1, vflip=1)
Does that help?
I need to use this with Hailo, but I am running the RPi5 examples. Where do I find these parts of the code?


If I was to call

Code:

rpicam-hello
then the camera orientation is correct and not flipped. It seems it's being flipped in Hailo

Statistics: Posted by DJOSHI — Sat Aug 09, 2025 3:36 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles