% % gammaPlot.m % % plot the RGB versus surface reflectance at 600nm for control images % % load sonyColors; load olympusColors; graySeries = 19:24; reflectance600 = [0.9531 0.6381 0.4002 0.2171 0.0979 0.0375]; sonyControlGrays = sonyColors(1,:,graySeries); olympusControlGrays = olympusColors(1,:,graySeries); % the intensity is the average of RGB for i=1:6 sonyGrayIntensities(i) = 0; for j=1:3 sonyGrayIntensities(i) = sonyGrayIntensities(i) + sonyControlGrays(1,j,i); end sonyGrayIntensities(i) = sonyGrayIntensities(i)/3; end for i=1:6 olympusGrayIntensities(i) = 0; for j=1:3 olympusGrayIntensities(i) = olympusGrayIntensities(i) + olympusControlGrays(1,j,i); end olympusGrayIntensities(i) = olympusGrayIntensities(i)/3; end figure; plot(reflectance600, sonyGrayIntensities,'bo'); title('The gamma plot for Sony camera'); xlabel('Reflectance at 600nm'); ylabel('Average RGB'); figure; plot(reflectance600, olympusGrayIntensities,'ko'); title('The gamma plot for Olympus camera'); xlabel('Reflectance at 600nm'); ylabel('Average RGB');