openflexure-microscope-server/openflexure_microscope/plugins/camera_calibration
Richard Bowman 416b74cb4a A plugin to allow recalibration via the web API
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).
2019-01-30 09:10:33 +00:00
..
__init__.py A plugin to allow recalibration via the web API 2019-01-30 09:10:33 +00:00
plugin.py A plugin to allow recalibration via the web API 2019-01-30 09:10:33 +00:00
recalibrate_utils.py A plugin to allow recalibration via the web API 2019-01-30 09:10:33 +00:00