All problems
Color Transfer Mean Shift
Problem
Apply the mean-shift color transfer for one channel value.
Map v from the source distribution to the target with (v - src_mean) / src_std * tgt_std + tgt_mean, rounded to 4 decimal places.
Test cases
case 1
in: [100,50,100,50,1]
expected: 50.5
case 2
in: [50,50,2,50,1]
expected: 50
case 3
in: [128,128,64,128,64]
expected: 128
Starter codePython
def color_transfer(v, src_mean, src_std, tgt_mean, tgt_std):
# Your code here
pass3 test cases · run your code against them in the editor