From abb2698687fd38bda0da8f419f5f095f19bc5537 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Sun, 9 Nov 2025 22:14:23 +0000 Subject: [PATCH 1/2] Add config json for manual microscope --- ofm_config_manual.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ofm_config_manual.json diff --git a/ofm_config_manual.json b/ofm_config_manual.json new file mode 100644 index 00000000..03cae49e --- /dev/null +++ b/ofm_config_manual.json @@ -0,0 +1,11 @@ +{ + "things": { + "/camera/": { + "class": "openflexure_microscope_server.things.camera.opencv:OpenCVCamera", + "kwargs": {"camera_index": 0} + }, + "/system/": "openflexure_microscope_server.things.system:OpenFlexureSystem" + }, + "settings_folder": "./openflexure/settings/", + "log_folder": "./openflexure/logs/" +} \ No newline at end of file From f3c79b746fb3f09b700ec522e91baad763e779f4 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Sun, 9 Nov 2025 22:25:24 +0000 Subject: [PATCH 2/2] Fix RGB vs BGR issue for opencv camera --- src/openflexure_microscope_server/things/camera/opencv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/things/camera/opencv.py b/src/openflexure_microscope_server/things/camera/opencv.py index a4e5f81a..a19645d8 100644 --- a/src/openflexure_microscope_server/things/camera/opencv.py +++ b/src/openflexure_microscope_server/things/camera/opencv.py @@ -106,7 +106,7 @@ class OpenCVCamera(BaseCamera): raise RuntimeError( f"Failed to capture frame from camera {self.camera_index}" ) - return frame + return cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) def capture_image( self,