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: 36ba0e5515
("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>
This commit is contained in:
parent
2f62701e9e
commit
e0405b171e
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ def alsc(Cam, Img, do_alsc_colour, plot=False, grid_size=(16, 12), max_gain=8.0)
|
||||||
pixels.
|
pixels.
|
||||||
"""
|
"""
|
||||||
w, h = Img.w/2, Img.h/2
|
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
|
average the green channels into one
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue