Add functionality to switch OpenCV camera without restarting the server.
This allows switching the camera for the manual configuration from the UI rather than manually changing the settings JSON and restarting.
The name is saved as a setting rather than the camera number. This is so that if we can reliably get the camera name the chosen camera should persist over sessions even if the number changes.
This MR contains the following
- Add
opencv-utilsfor finding cameras and naming them - Add a setting to the camera for the camera name
UI changes:
Manual camera settings used to be blank:

Before merge:
- #672 (closed) should be merged so that the camera can be selected.
- Test on windows
- Ideally - Find a way to name the cameras on Windows
Merge checklist:
- All new/changed functions have up to date typehints and docstrings
- Any UI updates have a before and after screenshot in the MR description
-
Unit testing of new functionality has similar or better coverage than similar existing codethis is crossed out as we have no strategy for OpenCV camera testing yet. Noted that this code only runs on a manual so has a different risk profile to code that runs on a RaspberryPi Microscope. -
This code has been tested on a microscope Note: should be a manual
Webapp has been recompiled, with aesthetic changes checked in light and dark mode (if changed)- With updated settings JSON (if changed)
SmartScan and live stitching work
Edited by Julian Stirling