Wednesday, May 21, 2008

Assignment #3



Question 1. "Why does color space look like a shark fin?"


The Chromaticity diagram represents the visible color spectrum. We can think about taking the

visible spectrum wich makes a long rectangle and bending it to bring the two ends together. We will get something that looks like the shark fin.



Above is the graph for wavelength versus x/y. It represents the wavelength for red to green ratio, which is also the tristimulus ratio X/Y.






Above is the graph for wavelength versus y. It represents the wavelengths for different saturations of green.

Above is the graph for wavelength versus z/y. It represents the wavelengths for blue to green ration or tristimulus ration Y/Z.



Question 2.


If c1 has coordinates (x1, y1), c2 has coordinates (x2, y2) and c3 is the color on the line then the general expression for computing the relative percentages of colors c1 and c2 composing a given color that is known to lie on the straight line joining the two colors is



P1c1 + P2c2 = (x3,y3)





P1 = (x3-x2)/(x1-x2) , where P2 = 1 - P1




if x1-x2 =0 then use P1 = (y3-y2)/(y1-y2)



Question 3.




Given color c1(x1,y1), c2(x2,y2) and c3(x3,y3) the expression for computing the relative percentages of c1, c2 and c3 composing a given color that is known to liehe within the triangle whose vertices are at the coordinates of c1, c2, c3 is





P1c1+ P2c2+P3c3 = (x4, y4)



P1(x1-x3) = x4 -x3 -P2(x2-x3) <= if x1 = x3 solve directly for P2




otherwise P1 = (x4-x3 -P2(x2-x3))/(x1-x3)





P2 = ((y4-y3)(x1-x3)-(x4-x3)(y1-y3))/((y2-y3)(x1-x3)-(x2-x3)(y1-y3))




P3 = 1- P1-P2




Question 4.





Yellow component of the image in problem 6.6 as it would appear on monochrome monitor.
Magenta component of the image in problem 6.6 as it would appear on monochrome monitor.







Cyan component of the image in problem 6.6 as it would appear on monochrome monitor.






b) The image would have the colors inverted.






Question 5. Transformation from RGB to CMY= [1 1 1] -[R G B] that is fed into RGB inverts the colors of the image. The effect on HSI would be to add 180 degrees to H mod 360.


new I = 1-I

new S = 1 - (3/(1-3I+2(2-I(1-S)-I(1+Scos(H)/cos(60-H))))*min(1-I(1-S),1-I(1+ScosH/cos(60-H)),1-3I+2-I(1-S)-I(1+Scos(H)/cos(60-H))))


Question 6.

If a transformation switches the red and blue components.

S and I values of HSI coordinates do not change. To get the new H = -oldH+240 mod 360



b) If blue and red channels of the image 6.5 are exchanged thed we get

No comments: