Lines Matching full:gains
323 def get_gains_in_canonical_order(props, gains):
324 """Reorders the gains tuple to the canonical R,Gr,Gb,B order.
328 gains: List of 4 values, in R,G_even,G_odd,B order.
331 List of gains values, in R,Gr,Gb,B order.
336 return gains
339 return [gains[0], gains[2], gains[1], gains[3]]
364 gains = cap_res['android.colorCorrection.gains']
367 # Reorder black levels and gains to R,Gr,Gb,B, to match the order
371 gains = get_gains_in_canonical_order(props, gains)
384 # Three-channel gains.
385 gains = numpy.array([gains[i] for i in [0,1,3]])
389 img = (((img.reshape(h,w,3) - black_levels) * scale) * gains).clip(0.0,1.0)