[libcamera-devel] Allowing the user to specify a colour temperature for WB
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Feb 1 12:44:20 CET 2023
Quoting Nick Hollinghurst via libcamera-devel (2023-01-31 15:00:48)
> Hi all,
>
> A user has asked if they can set a fixed illuminant colour
> temperature, for white balance (rather than having to set fixed R and
> B gains, which are sensor-specific). It sounds like a reasonable
> request. I'd like to suggest two possible API changes for it:
This sounds reasonable to me. Do conversions already exist on a
per-sensor basis in the Raspberry Pi IPA? Or would this need any
extension to the tuning files to support this?
> (a) Allow ColourTemperature control to be set in requests, as well as
> read from metadata. Its behaviour is somwhat analogous to LensPosition
> and AF: it can be set only when AWB is disabled (though the AWB
> algorithm might still need to be invoked, to handle the conversion
> from colour temperature to gains).
Yes, I think like the other settings, this would simply be a 'manual'
mode.
>
> (b) Add a new control to set lower and upper bounds on colour
> temperature, to be applied when AWB mode is AwbCustom. The lower and
> upper bounds may be equal. The new control is supported only where
> AwbCustom is supported. When AWB is disabled or the mode is not
> AwbCustom, the settings would be retained.
>
> Does either of those sound useful (or could there be a better approach)?
I'm not sure of any other approach, (but haven't really looked yet,) but
this sounds reasonable.
>From what I know of the AWB algorithms at the moment, they try to look
at the stats from the colours of the image and determine what gains to
apply to make those 'average' out to be correct.
Is there a defined way to map a colour temperature to those gains?
This is where perhaps I expect there might be the tuning data calibrated
for each sensor? - but would that then require tuning to be done on a
larger sample of input colour temperatures? (That's not necesarily a
bad thing...?)
--
Kieran
>
> Regards,
>
> Nick
More information about the libcamera-devel
mailing list