I am making a bit of progress on the field dissection microscope. Based on the best way to run the ribbon cable the image on the screen is 180 degree rotated from the object in reality. Which seeing as you are moving it by hand, it is pretty confusing.
Is there a way to adjust this setting in the UI (I really need to upgrade) or if not is there a way I can modify the settings by hand?
ping @r.w.bowman?
I donāt think there is a setting in our software, but Iām pretty sure you can tell the camera to flip the image when you set it up. If you edit the PiCameraStreamer class, thatās where the PiCamera object gets initialised, so that would bodge it in for now. If youāre using raspistill/raspivid and friends, I think thereās a command line flag to flip the image.
I I do the streamer class will that also do the live preview on the microscope itself? Focussing by hand it is important to have the live preview
Iām fairly sure PiCamera.hflip and .vflip apply to both the stream and the live preview - flipping happens quite early in the cameraās ISP. Iām assuming here that youāre using the current release, i.e. picamera v1 (though I suspect picamera2 has similar behaviour).
I fully second that! :- ) So I beg your pardon to revive such an old thread.
In Raspberryās āCoding projects for kids and teensā (sic!) I found in Getting started with the Camera Module that it āonlyā takes one python command to rotate the stream:
camera = PiCamera()
camera.rotation = 180
But looking at the serverās python code in openflexure_microscope/camera/pi.py I couldnāt locate a section where I could patch in this rotation snippet. Obviously it isnāt that simple as I thought.
Unfortunately my python knowledge is by far too limited to be able to do such a task myselfā¦
Line 80 of openflexure_microscope/camera/pi.py
Is where we get the PiCamera object.
You could see what happens if you add
self.picamera.rotation = 180
on line 81. Its pretty hacky, but may get yours working. If it does it should be a possible to add a config option for it at a later date.
That does the trick! - THANKS!
No more confusion :- ))