function rgb = gammaCorrect(RGB)
% RGB is 3xnsamples, so is rgb

R = RGB(1,:);
G = RGB(2,:);
B = RGB(3,:);

% make RGB values linear in response to intensity by undoing the
% gamma correction

% know that gamma = 1.873, k = 1;
% normalize RBG to be between 0 and 1 
gamma = 1;
k = 1;

R = R /255;
G = G /255;
B = B /255;

r = k*(R.^gamma);
g = k*(G.^gamma);
b = k*(B.^gamma);

rgb = [r;g;b];


