Message ID | 20250123114204.79321-14-stefan.klug@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
On Thu, Jan 23, 2025 at 12:41:03PM +0100, Stefan Klug wrote: > Now that the lux module is available, add it to the rkisp1 tuner. > > While at it, sort the imports correctly. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > > --- > > Changes in v2: > - Added this patch > --- > utils/tuning/rkisp1.py | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py > index 9f40fd8bd63b..207b717a029c 100755 > --- a/utils/tuning/rkisp1.py > +++ b/utils/tuning/rkisp1.py > @@ -6,18 +6,19 @@ > # > # Tuning script for rkisp1 > > -import coloredlogs > import logging > import sys > > +import coloredlogs > import libtuning as lt > -from libtuning.parsers import YamlParser > from libtuning.generators import YamlOutput > -from libtuning.modules.lsc import LSCRkISP1 > from libtuning.modules.agc import AGCRkISP1 > from libtuning.modules.awb import AWBRkISP1 > from libtuning.modules.ccm import CCMRkISP1 > +from libtuning.modules.lsc import LSCRkISP1 > +from libtuning.modules.lux import LuxRkISP1 > from libtuning.modules.static import StaticModule > +from libtuning.parsers import YamlParser > > coloredlogs.install(level=logging.INFO, fmt='%(name)s %(levelname)s %(message)s') > > @@ -45,12 +46,15 @@ lsc = LSCRkISP1(debug=[lt.Debug.Plot], > # This is the function that will be used to smooth the color ratio > # values. This can also be a custom function. > smoothing_function=lt.smoothing.MedianBlur(3),) > +lux = LuxRkISP1(debug=[lt.Debug.Plot]) > > tuner = lt.Tuner('RkISP1') > -tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc]) > +tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc, lux]) > tuner.set_input_parser(YamlParser()) > tuner.set_output_formatter(YamlOutput()) > -tuner.set_output_order([agc, awb, blc, ccm, color_processing, > + > +# Bayesian AWB uses the lux value, so insert the lux algorithm before AWB. > +tuner.set_output_order([agc, lux, awb, blc, ccm, color_processing, > filter, gamma_out, lsc]) > > if __name__ == '__main__': > -- > 2.43.0 >
diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py index 9f40fd8bd63b..207b717a029c 100755 --- a/utils/tuning/rkisp1.py +++ b/utils/tuning/rkisp1.py @@ -6,18 +6,19 @@ # # Tuning script for rkisp1 -import coloredlogs import logging import sys +import coloredlogs import libtuning as lt -from libtuning.parsers import YamlParser from libtuning.generators import YamlOutput -from libtuning.modules.lsc import LSCRkISP1 from libtuning.modules.agc import AGCRkISP1 from libtuning.modules.awb import AWBRkISP1 from libtuning.modules.ccm import CCMRkISP1 +from libtuning.modules.lsc import LSCRkISP1 +from libtuning.modules.lux import LuxRkISP1 from libtuning.modules.static import StaticModule +from libtuning.parsers import YamlParser coloredlogs.install(level=logging.INFO, fmt='%(name)s %(levelname)s %(message)s') @@ -45,12 +46,15 @@ lsc = LSCRkISP1(debug=[lt.Debug.Plot], # This is the function that will be used to smooth the color ratio # values. This can also be a custom function. smoothing_function=lt.smoothing.MedianBlur(3),) +lux = LuxRkISP1(debug=[lt.Debug.Plot]) tuner = lt.Tuner('RkISP1') -tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc]) +tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc, lux]) tuner.set_input_parser(YamlParser()) tuner.set_output_formatter(YamlOutput()) -tuner.set_output_order([agc, awb, blc, ccm, color_processing, + +# Bayesian AWB uses the lux value, so insert the lux algorithm before AWB. +tuner.set_output_order([agc, lux, awb, blc, ccm, color_processing, filter, gamma_out, lsc]) if __name__ == '__main__':
Now that the lux module is available, add it to the rkisp1 tuner. While at it, sort the imports correctly. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes in v2: - Added this patch --- utils/tuning/rkisp1.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)