Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyway to change camera orientation #44

Open
Bboy486 opened this issue Oct 4, 2020 · 4 comments
Open

Anyway to change camera orientation #44

Bboy486 opened this issue Oct 4, 2020 · 4 comments

Comments

@Bboy486
Copy link

Bboy486 commented Oct 4, 2020

As the title says, I have a case and the camera is sideways. Is there any way to set the camera to -90 degrees?

@wyojustin
Copy link
Member

Indeed you can. You will need to edit the camera code in the "user_interface.py" file. Have a look at the tutorial here: https://top10.digital/raspberry-pi-camera-v2-tutorial/.

@Bboy486
Copy link
Author

Bboy486 commented Oct 17, 2020

This does not work as an external script.

Am i looking for

import picamera as mycamera
from picamera.color import Color

then do I add camera = PiCamera()
self.camera.rotation = 90

(this error due to syntax)

or

#Camera
self.camera = mycamera.PiCamera()
self.camera.annotate_text_size = 160 # Maximum size
self.camera.annotate_foreground = Color('white')
self.camera.annotate_background = Color('black')

@wyojustin
Copy link
Member

Copy paste syntax error.

@Bboy486
Copy link
Author

Bboy486 commented Oct 18, 2020

No error it just doesn't adjust image orientation. I added:

#Camera
self.camera = mycamera.PiCamera()
self.camera.rotation = 90
self.camera.annotate_text_size = 160 # Maximum size
self.camera.annotate_foreground = Color('white')
self.camera.annotate_background = Color('black')

Rebooted but the image did not rotate on TouchSelfie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants