diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2025-05-07 16:31:03 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2025-05-08 10:51:10 +0200 |
commit | e0405b171e928651ed7be5d7ae47b426c07125ff (patch) | |
tree | 60e2c1574c8fed33f97fa220c278718ebd0b5e63 /utils | |
parent | 2f62701e9e714785cf7063da7720a56a73cac02a (diff) |
utils: raspberrypi: ctt: Fix integer division error calculating LSC cell size
The cell sizes must be cast to integers as the parameters that
were passed in may be floats.
Bug: https://github.com/raspberrypi/libcamera/issues/260
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Fixes: 36ba0e551507 ("utils: raspberrypi: ctt: Fix NaNs in lens shading tables")
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/raspberrypi/ctt/ctt_alsc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/raspberrypi/ctt/ctt_alsc.py b/utils/raspberrypi/ctt/ctt_alsc.py index f4fd09e3..5d8b2ced 100644 --- a/utils/raspberrypi/ctt/ctt_alsc.py +++ b/utils/raspberrypi/ctt/ctt_alsc.py @@ -131,7 +131,7 @@ def alsc(Cam, Img, do_alsc_colour, plot=False, grid_size=(16, 12), max_gain=8.0) pixels. """ w, h = Img.w/2, Img.h/2 - dx, dy = (w - 1) // (grid_w - 1), (h - 1) // (grid_h - 1) + dx, dy = int((w - 1) // (grid_w - 1)), int((h - 1) // (grid_h - 1)) """ average the green channels into one |