Notifications
Clear all

Rotate Pi image  

  RSS
FoxRun3D
(@foxrun3d)
Famed Member
Rotate Pi image

I finally reinstalled my Pi cams and using RC3, they show up fine. However, the way they are mounted the image is upside down. Would be nice to have an option in the camera settings to flip/rotate the image. I suspect there's a way to do this on the Pi but I have no idea how to, and I shouldn't have to.

I opened a ticket on Github for this suggestion as well but I'm never sure which of the Github repos is the right one for Prusalink and Prusaconnect issues, so I thought, I'd just mention it here as well because I know devs check this subforum.

Formerly known on this forum as @fuchsr -- until all hell broke loose with the forum software...

Opublikowany : 23/04/2023 7:59 pm
Thomas Lynch
(@thomas-lynch)
Estimable Member
RE: Rotate Pi image

Usually rotating an image of  a camera is done by changing the direction of the scan. Many cameras have this built into the camera electronics. Rotating the camera scan outside of the camera would require some electronics that are usually not outside of the camera. I am also sure that a Pi camera may not have that capability.

Tom

Opublikowany : 24/04/2023 12:13 am
Diem
 Diem
(@diem)
Illustrious Member

It's certainly in the camera libraries, I haven't looked at this in connect or link but it's definitely in the libcamera api - search for raspistill.

The example call given is something like this:

raspistill -vf -hf -o image.jpg   - as opposed to  raspistill -o image.jpg

So I suspect it's just a matter of configuration.

https://www.raspberrypi.com/documentation/computers/camera_software.html#basic-usage-of-raspistill

Cheerio,

Opublikowany : 24/04/2023 9:53 am
Tojik
(@tojik)
Member Moderator
RE: Rotate Pi image

Hey, the code is opensource. You can check what other capabilities I can get access to. I am now doing another feature, so the rotation will have to wait, sorry. In the meantime. Do not argue about if it is or is not in libcamera without actually coding it. You can rotate images many ways, the question is if it's going to end up on the CPU or if it's going to be HW accelerated and therefore available on the ZeroW.

I am unsure if the libcamera utils even use libcamera directly, or if they are going through picamera2

Opublikowany : 24/04/2023 10:19 am
FoxRun3D
(@foxrun3d)
Famed Member
Topic starter answered:
RE: Rotate Pi image

Thank you all. It was just a suggestion, and other features are certainly more important — such as the network errors and beeping 🙂 I knew I could rotate it from either Octoprint or Astroprint (can't recall), so I thought maybe this was easy. And my main camera is a Wyze cam anyway. 

Formerly known on this forum as @fuchsr -- until all hell broke loose with the forum software...

Opublikowany : 24/04/2023 10:54 am
Share: