This adds a plugin with a single endpoint, "recalibrate". The recalibrate methods are deliberately simple and not aware of the StreamingCamera because I want to share the maximum amount of code with non-microscope projects that also want to flatten the lens shading. The plugin is microscope-specific, and therefore handles shutting down the stream and managing the resolution of the camera, to allow the calibration to run without restarting the microscope server. Currently it **DOES NOT SAVE SETTINGS**. TODO: save the settings after recalibration. Arguably this isn't a job for this plugin, what we would need is: * A method to sync the StreamingCamera's settings with the underlying PiCamera object * A method to save the StreamingCamera's settings to disk. I think it would be neatest to provide the first of these as a method of the StreamingCamera class, and call it from the plugin. Saving the settings to disk (e.g. to the microscope rc file, or to somewhere else) should be a separate endpoint (although most interfaces will probably call it immediately after recalibration).
1 line
27 B
Python
1 line
27 B
Python
from .plugin import Plugin
|