diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2025-04-28 11:36:04 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2025-04-29 16:14:48 +0100 |
commit | 17e41b2a3a144a80e60f28e15a4c2aaa42c87105 (patch) | |
tree | 00efc1cd4c20333f74798d542a1ed47a48818ee9 /utils/raspberrypi/ctt/ctt.py | |
parent | 36ba0e5515075f87490048aa1d5f57b6c3864bae (diff) |
utils: raspberrypi: ctt: Fix NaNs in chromatic aberration tables
NaNs can appear if no black dots can be found and analysed in a
particular region of the calibration image. There needs to be at least
one such dot in every 8x8 cell covering the image.
This is now detected, and an error message issued. No CAC tables are
generated, so CAC is disabled.
Bug: https://github.com/raspberrypi/libcamera/issues/254
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/raspberrypi/ctt/ctt.py')
-rwxr-xr-x | utils/raspberrypi/ctt/ctt.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py index 96f1b5e6..186afda5 100755 --- a/utils/raspberrypi/ctt/ctt.py +++ b/utils/raspberrypi/ctt/ctt.py @@ -198,9 +198,12 @@ class Camera: """ Write output to json """ - self.json['rpi.cac']['cac'] = cacs - self.log += '\nCAC calibration written to json file' - print('Finished CAC calibration') + if cacs: + self.json['rpi.cac']['cac'] = cacs + self.log += '\nCAC calibration written to json file' + print('Finished CAC calibration') + else: + self.log += "\nCAC calibration failed" """ |