All problems
Dataset Mean Color
Problem
Compute the mean color of a dataset of RGB images.
Average each channel over every pixel of every image and return the three means rounded to 4 decimal places.
Hint
Count pixels across the whole dataset, not per image.
Test cases
case 1
in: [[[[[100,0,50]]],[[[200,100,250]]]]]
expected: [150,50,150]
case 2
in: [[[[[0,0,0],[255,255,255]]]]]
expected: [127.5,127.5,127.5]
case 3
in: [[[[[0,0,0]]],[[[0,0,0]]]]]
expected: [0,0,0]
Starter codePython
def dataset_mean_color(images):
# Your code here
pass3 test cases · run your code against them in the editor