Averaging RGB Colors the Right Way
Created on 2021-11-24T19:35:33-06:00
Only one color channel is covered in this card but it generalizes to each color channel.
Averaging of the colors
Naive way of averaging colors:
r2 = (r0 + r1)/2
Averaging colors with euclidean distances:
r2 = sqrt((r0^2 + r1^2)/2)
Averaging over a space
Collect the color samples from each pixel of interest before dividing.
For example:
for each pixel: rsum += red * red average = sqrt(rsum/number pixels)