hi, I am new to this project, I have tried to use the hardware of the high resolution openflexure microscope exactly as instructed, but I want to try to make my own software that is more user friendly for my area, but I have a problem when setting up the software configuration for the camera, I have used the opencv library and picamera2 but the results of my camera are purple, not like the results of the software ofm, how do you solve this? is there any adjustment with the color configuration, for the lamp I use a 5mm white led. the result is below, do you have suggestion to resolve this, thank for your answering
Hi @ediedi. That colour comes from the way that the Pi Camera is desugned to work with its lens. In the OpenFlexure software it is corrected during the Camera Calibration step to give the nice flat white background. It is one of the most useful parts of the software to get the best out of the hardware.
The routine is available in our repository, but relies on picamerax, which is not compatible with the latest Raspberry Pi operating system. @r.w.bowman is currently developing the microscope software v3, which includes making the camera calibration work with picamera2 and moving to the more recent Pi OS. There are some notes in threads on this forum that might help you with picsmera2, but not a code solution.
All the picamera2-related stuff is in:
This is somewhat tied to the rather-experimental labthings-fastapi
package that forms the core of v3 of the microscope software - but it’s not yet particularly well documented for independent re-use. It is, however, under active development.
If you want to make your own software that’s more user-friendly, that makes a lot of sense - though if it is just the interface you want to improve, you can do that by writing a new web application. That means you could re-use all the existing Python code, but you’d probably write the web application in something like Vue.js or another HTML+javascript toolkit.
If you want to write a Python interface, you could also do that by using an HTTP client and the existing server code - that would have the advantage that your Python interface could run on a different computer (which I find is often the easiest way to get a smooth user experience on the microscope).
Of course, the joy of open source is often doing something yourself to learn things, and don’t let me stop you there! Please do borrow as much as you can from the existing code: that is, after all, why we share it.
thanks I will learn it, this project is very good, because of my limitation of having a manufacturing microscope I can’t learn about automatic microscopy, but ofm provides a very good platform to learn about automatic microscopy. any way, do we tune the shade lens on our camera so that the color on the camera/background can be white