SafeAggSA:
SafeAggSATarget=MinWeightedAbsDiff(FrameSAAdjRatio,SatPrevSAAdjRatio,DarkPrevSAAdjRatio,BrightenImgSAAdjRatio,FaceSAAdjRatio,TouchSAAdjRatio,DepthSAAdjRatio,AdjRatioTacker,ExtremeColorSAAdjRatio,SaliencySAAdjRatio,IlluminanceSAAdjRatio)
SafeAggSA3HDRSafeExp=SafeAggSATarget*TriggerCtrlShortExp
EV0SafeAdjFactor=SafeAggSATarget/FrameSAAdjRatio
SafeAggSAAdjRatio=SafeAggSATarget
在SafeAggSA模块中,我们旨在通过最小化加权绝对差异来优化调整比例,以达到最佳的图像质量。具体计算如下:
SafeAggSATarget = MinWeightedAbsDiff(
FrameSAAdjRatio,
SatPrevSAAdjRatio,
DarkPrevSAAdjRatio,
BrightenImgSAAdjRatio,
FaceSAAdjRatio,
TouchSAAdjRatio,
DepthSAAdjRatio,
AdjRatioTacker,
ExtremeColorSAAdjRatio,
SaliencySAAdjRatio,
IlluminanceSAAdjRatio
)
计算HDR安全曝光下的调整因子
SafeAggSA3HDRSafeExp = SafeAggSATarget * TriggerCtrlShortExp计算EV0下的安全调整因子
EV0SafeAdjFactor = SafeAggSATarget / FrameSAAdjRatio最终确定SafeAggSA的调整比例
SafeAggSAAdjRatio = SafeAggSATarget
ShortAggSA:
ShortAggSATarget=MinWeightedAbsDiff(SafeAggSAAdjRatio,ShortSatPrevSAAdjRatio)
ShortAggSAAdjRatioShort=SafeAggSAAdjRatio/ShortAggSATarget
ShortAggSAADRCGain=Min([setparam/tr:lux+ShortAggSAAdjRatioShort],TriggerCtrlADRCCap)
TriggerCtrlEVNegativeOverride=[setparam/tr:lux+ShortAggSAAdjRatioShort]
EV0ShortDRCGain=ShortAggSAADRCGain
ShortAggSAAdjRatio=SafeAggSAAdjRatio/ShortAggSAADRCGain
ShortAggSA专注于短期内的调整优化,具体计算流程如下:
计算短期目标调整比例
ShortAggSATarget = MinWeightedAbsDiff(SafeAggSAAdjRatio, ShortSatPrevSAAdjRatio)计算短期调整比例(相对于目标)
ShortAggSAAdjRatioShort = SafeAggSAAdjRatio / ShortAggSATarget计算ADRC增益,并限制在最大值内
ShortAggSAADRCGain = Min([setparam/tr:lux + ShortAggSAAdjRatioShort], TriggerCtrlADRCCap)短期曝光负向调整覆盖
TriggerCtrlEVNegativeOverride = [setparam/tr:lux + ShortAggSAAdjRatioShort]EV0下的DRCGain
EV0ShortDRCGain = ShortAggSAADRCGain计算最终的短期调整比例
ShortAggSAAdjRatio = SafeAggSAAdjRatio / ShortAggSAADRCGain
LongAggSA:
LongAggSATarget=MinWeightedAbsDiff(SafeAggSAAdjRatio,LongDarkPrevSAAdjRatio)
LongAggSADRCGainRemainder=8/ShortAggSAADRCGain
LongAggSAAdjRatioLong=LongAggSATarget/SafeAggAdjRatio
LongAggSADarkBoostGain=[setparam/tr:lux+LongAggSAAdjRatioLong]/[setparam/tr:lux+LongAggSADRCGainRemainder]
EV0LongDarkboostGain=LongAggSADarkBoostGain
CompenDarkBoostGain=Min([setparam/tr:lux+LongAggSAAdjRatioLong],[setparam/tr:lux+LongAggSADRCGainRemainder]
TriggerCtrlEVPositiveOverride=[setparam/tr:lux+LongAggSAAdjRatioLong]
LongAggSAAdjRatio=ShortAggSAAdjRatio*LongAggSADarkBoostGain
LongAggSA处理长期曝光调整,以优化暗部细节:
计算长期目标调整比例
LongAggSATarget = MinWeightedAbsDiff(SafeAggSAAdjRatio, LongDarkPrevSAAdjRatio)计算长期ADRC增益的剩余部分
LongAggSADRCGainRemainder = 8 / ShortAggSAADRCGain计算长期调整比例(相对于SafeAgg)
LongAggSAAdjRatioLong = LongAggSATarget / SafeAggSAAdjRatio # 注意:这里假设SafeAggSAAdjRatio为基准计算暗部增强增益
LongAggSADarkBoostGain = ([setparam/tr:lux + LongAggSAAdjRatioLong] / [setparam/tr:lux + LongAggSADRCGainRemainder])EV0下的暗部增强增益
EV0LongDarkboostGain = LongAggSADarkBoostGain补偿暗部增强增益(此处有遗漏的闭合括号)
CompenDarkBoostGain = Min([setparam/tr:lux + LongAggSAAdjRatioLong], [setparam/tr:lux + LongAggSADRCGainRemainder])长期曝光正向调整覆盖
TriggerCtrlEVPositiveOverride = [setparam/tr:lux + LongAggSAAdjRatioLong]计算最终的长期调整比例
LongAggSAAdjRatio = ShortAggSAAdjRatio * LongAggSADarkBoostGain
LLSSafeAggSA:
SnapshotSafeAdj= TriggerCtrlSafeTgt / TriggerCtrlSafeExp
LLSShortAggSA:
SnapshotADRCGain= Min(TriggerCtrlSafeTgt / TriggerCtrlShortTgt, 16)
SnapshotShortAdj= TriggerCtrlSafeTgt / (SnapshotADRCGain * TriggerCtrlShortExp)
LLSLongAggSA:
SnapshotDarkBoostGain= Min(1.0, TriggerCtrlLongTgt / TriggerCtrlSafeTgt)
SnapshotLongAdj= TriggerCtrlSafeTgt * SnapshotDarkBoostGain / TriggerCtrlShortExp
EVSafeAggSA
EVSafeAggSATarget=[setparam/tr:lux+EV0SafeAdjFactor]*EVFrameSAAdjRatio
EVSafeAggSAAdjRatio=EVSafeAggSATarget
EVShortAggSA
EVShortAggSATarget=RatioValue(EVSafeAggSAAdjRatio,[setparam/tr:lux+EV0ShortDRCGain])
EVShortAggSAAdjRatio=EVShortAggSATarget
EVLongAggSA
EVLongAggSATarget=EVSafeAggSAAdjRatio*[setparam/tr:lux+EV0LongDarkboostGain]
EVLongAggSAAdjRatio=EVLongAggSATarget
HDRSnapshotSafeAggSA
SnapshotSafeAdj=TriggerCtrlSafeTgt/TriggerCtrlSafeExp
HDRSnapshotShortAggSA
SnapshotShortAdj=TriggerCtrlShortTgt/TriggerCtrlShortExp
HDRSnapshotLongAggSA
SnapshotLongAdj=TriggerCtrlLongTgt/TriggerCtrlLongExp