From d913db92af31366fbf5d69e912fef22c75b79f8e Mon Sep 17 00:00:00 2001 From: jaknapper Date: Tue, 21 Oct 2025 15:14:42 +0100 Subject: [PATCH] CCM for HQ cam also --- picamera_coverage.zip | Bin 54038 -> 54038 bytes .../things/camera/picamera.py | 19 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/picamera_coverage.zip b/picamera_coverage.zip index d9b9bd5002afd08670348f8c190d884bcecc25f7..295d52d79026a670927fda63d2ea78c5e34a12a2 100644 GIT binary patch delta 255 zcmbQXjCtBJW}yIYW)=|!5Lj9n8oj3`@byL^l?I`72L7M?7x_=}=keX zgFyo$-b)q;2b{g+2>_u#O^pBm delta 253 zcmbQXjCtBJW}yIYW)=|!5GcwCjeZq!fAdBml?I_q2L7M?7x_=}=keX;o5okem$}(d zAdqkJ^uAJdK2}yn&L)}3!u_c#EDIR#JYZ}1&vt>A!2o2+0R{#JHUq)8k_`+D3{n flq9nhBO_y_+5m4xCJ|;-FHP>fWPxzN*-M@PRSZv8 diff --git a/src/openflexure_microscope_server/things/camera/picamera.py b/src/openflexure_microscope_server/things/camera/picamera.py index 13088111..e447a440 100644 --- a/src/openflexure_microscope_server/things/camera/picamera.py +++ b/src/openflexure_microscope_server/things/camera/picamera.py @@ -799,7 +799,8 @@ class StreamingPiCamera2(BaseCamera): 45. """ # This is flattened 3x3 matrix. See `colour_correction_matrix` - col_corr_matrix = [ + if self._camera_board == "picamera_v2": + col_corr_matrix = [ 2.222935, -0.759672, -0.463262, @@ -809,7 +810,21 @@ class StreamingPiCamera2(BaseCamera): -0.261375, -0.668016, 1.929391, - ] + ] + else: + # Note the only other option is the HQ + col_corr_matrix = [ + 2.164374, + -0.97259, + -0.191778, + -0.376957, + 2.099377, + -0.722417, + -0.11787, + -0.489362, + 1.607232 + ] + self.colour_correction_matrix = col_corr_matrix @lt.thing_action