Computing the average color for this rainbow image:
Avg(R) = 15357868/255*225*310 = 0.86347
Avg(G) = 14141756/255*225*310 = 0.79509
Avg(B) = 13886570/255*225*310 = 0.78075.
The average color chip is a "light mauve", due to the components (220, 203, 199). This is different than the average color I obtained from my rainbow image, which was grey, with average color components (128, 128, 128). The average color function is blending all of the color components, I think.
(3)c) Here are the images, as generated by Octave-3.0.1:
B=imread('asst6_3c2.jpg')
imshow(B)
size(B)
ans = 107 160 3
sum(sum(B))
ans =
ans(:,:,1) = 1418726
ans(:,:,2) = 2754025
ans(:,:,3) = 2414097
max(B)
ans =
ans(:,:,1) = 255
ans(:,:,2) = 242
ans(:,:,3) = 225
Avg(R) = 1418726/255*107*160 = 0.32498
Avg(G) = 2754025/242*107*160 = 0.66474
Avg(B) = 2414097/255*107*160 = 0.62671
{used bucket fill in GIMP to generate Average Color}
- R = 83
- G = 170
- B = 160
To display the Average Color, Green/Blue:
V2=255*ones(256);
V2(:,:,1)=0.32498*ones(256);
V2(:,:,2)=0.66474*ones(256);
V2(:,:,3)=0.62671*ones(256);
imshow(V2).
A=imread('asst6_3c1.jpg')
imshow(A)
size(A)
ans = 108 160 3
sum(sum(A))
ans =
ans(:,:,1) = 2158047
ans(:,:,2) = 1096316
ans(:,:,3) = 1048465
max(A)
ans =
ans(:,:,1) = 255
ans(:,:,2) = 255
ans(:,:,3) = 255
Avg(R) = 2158047/255*108*160 = 0.48975
Avg(G) = 1096316/255*108*160 = 0.24880
Avg(B) = 1048465/255*108*160 = 0.23794
{used bucket fill in GIMP to generate Average Color}
- R = 125
- G = 64
- B = 61
To display the Average Color, "Maroon":
V1=255*ones(256);
V1(:,:,1)=0.48975*ones(256);
V1(:,:,2)=0.24880*ones(256);
V1(:,:,3)=0.23794*ones(256);
imshow(V1).
Based on the color components of the average colors, the color (as seen by my eye) of the 'average color chips' do not surprise me. As compared to the dominant colors when viewing the images, the average color chips are close to the dominant colors, but look more to be a blend of the colors in the original images.