mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 08:55:06 +03:00
libtuning: Add initial AWB module
This AWB module uses the awb function from Raspberry Pi to calculate the needed white balance gains per colour temperature. It stores these gains in the tuning file. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
731cc02e79
commit
b1ec488f1b
3 changed files with 69 additions and 0 deletions
27
utils/tuning/libtuning/modules/awb/rkisp1.py
Normal file
27
utils/tuning/libtuning/modules/awb/rkisp1.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# Copyright (C) 2024, Ideas On Board
|
||||
#
|
||||
# AWB module for tuning rkisp1
|
||||
|
||||
from .awb import AWB
|
||||
|
||||
import libtuning as lt
|
||||
|
||||
|
||||
class AWBRkISP1(AWB):
|
||||
hr_name = 'AWB (RkISP1)'
|
||||
out_name = 'Awb'
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def validate_config(self, config: dict) -> bool:
|
||||
return True
|
||||
|
||||
def process(self, config: dict, images: list, outputs: dict) -> dict:
|
||||
output = {}
|
||||
|
||||
output['colourGains'] = self.do_calculation(images)
|
||||
|
||||
return output
|
Loading…
Add table
Add a link
Reference in a new issue