{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw1_sol - & Q j‘ SQ qufldl B = [email protected] 3 ‘t gamer...

Info iconThis preview shows pages 1–17. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 12
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 14
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 16
Background image of page 17
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: & . Q. ? j‘ SQ) qufldl. B = 5300 @Boyd/\ 3 ‘t ' gamer msFovse CELR‘Q‘B)' ; M< R =_ fsmgkmolx ‘ 3 $1M+Vg_ 'CA :— CB —7 1 CE:[ 1}) wmx‘ermrgr . CA:CB 3x CsiCc CA :C&, 'V RA _ 3,0)QRU) RB SBO\)&RO> . , [ 6"] ' 3A0} 61am 0” ,‘ Gm ] = Sewage» 9‘“ ' . Sh C19 (930) . €13:ng '9. We Know Cc: CB OED SVW’UYEL) RC - g CO)Q\10‘) . [Ga 2 j [SMQM pk Ba 300mm) ‘ UM )yel width WOW CAng 2.1 CBLCQ gig CA:0—c W:mr5.wwmwm——mw—xmwMuvwwmwfim"MN-NEHM‘MK .w, m = m; 9 (RA: 9&3ka RB » “QM-GR”) Q3 =- Qwvcw‘afix) A)» : . Gta ; {35036150} .CUx i 315 BA $036130) ‘ ht we (wquiFlék botkgtofles {3% $70 315096190) EBD)Q€\0)]M $303 QED) 561305 GHQ) M 9330‘) Q33) r g E wa> xj B (A) 6130) <11?) $LRA)QA\B’°V§ :— DLCRB,&B, BB). (5—3 o\C(Ar = PLCB CA :st, 00C» ) GHQ : CB+CI> the CW" Pa‘ck '. 1 +wo 6—D +LeMfl. Q) l mu ijg CA 2- CB , Cc; CD TV: men @061 m SMORCD ( ' V‘ J[9:o)&:m]¢\ :f[§:m&am] 6* a“) SK®QBU> 9393mm) 94>) 6w 9w) aw) j [Soc/Q 6130) = [3a (330) ldh Sax) (i350) . $03 a“); ’Hhem , ,. 'Imfisw) R0) (gwwscm <31:th I J (Zomba) gawk (i ‘ [ \BOchO‘) GEM (by SarAHSccx» Q30) s ‘A qfispumifix) LCD ("‘3 CA+CD : beCc , : CB "V Cb we 0m smfi\c—F& 1% as??? +1mge. cavFovxevrt; 1 Orv/O; Ar» Cygnus : (—Ru) e5, BB) . _ i : @ch £540?) <<=~9' L RAW; wag) 5mm :CRRRmQMQDE we»); 3“?“ CAT Cp 1‘ CRA+RD,CWHGD ) BMED‘).CRB+ RP ) 6—way; , 33% B9 ) . _ ‘ V _ . V 2, UZM‘R; few-em , BA. ’tBL )QLRB+R¢,%.3#&¢,.BW)& “”5 > .CMCC ”” C5 JVCD,,..,.% CMCP (NC: . A 15 i t Q; CC: C]; j > CA+Cc3 Cg‘V'Cp 3CD.. 6"? CR¢,1<\_} 6c? : CR», é”); B1>> QA+C¢ CB+CD «=7 mefic. yag+Gx¢JBn~kB¢D= CREW?» 61M»; 3MB») Then,» CA+CDQ = CPM’RD GWVGD 2BATBD) @Cprf Re ,Gxofla‘c BM’BL > 7. CRBJrRD) C'ufiéxp) BBTBD) «LED CRM’RC) QB+QC2 BBJV56) 3 Cmcc (AJ'CQ :- (45‘pr 4:5; CA+Cb2 CE’fQ H.333 = a” w- 5 {3 Of— 3: 1 an” 1—; : ”f FLO‘: 3: h ‘5 ‘ Q 2 - w (\BOR x y , A ' «(41%) Amp; 2 G‘éc") Q1309 on o.+= a It 0 1 \ 1 p-‘y' :4 \4» L‘Zsf’w,‘ 1?. 3L Olaf “IL 9...} 03A o.+‘_ 0‘13} 0 9":0 L* :0 Y; «14¢:le : 6P4 9 { merQ/VE/m/ica/lak_ K -[:]I C7:[/ ~ 5:[’J D m f}; -'-//’o7e’//:/, #754 = A 2?”: /_ \ K’Cz’ 0/2/ ._ x 9. 9 gym/’2‘ 4m(%-; ,.——/ ii”- » / 7"“ 7'3) €3H0 : 00919.17“? D When we want this triangle has unit altitude, because it is equilateral triangle, when we want to make —————2J§ the altitude (755 in the following figure) to be 1, the length of the edges R0 = GB = BR =—3 _ This means in the right figure, 51-?. =1, 6 e 35.2644° , the; X‘- "5/4,; m s Problem 51 ' ; Solution:§ ‘“ \\ a: (0,1/3,2/3) (0,1/3,2/3) (0,2/3,1/3) (0,2/3,1/3) m (1/3,2/3,0) . (1/3 2/3 0) (2/3,1/3,0) (2/3 1/3 0) ! (r,g,b) , (0,1,0) (0,10) (1,0 0) 700 nm 650 nm Locus Gamut The Locos is the red line in above figure, and the shaded area is the gamut ii: The response of the sensor to stimulus could be calculated as following R = JS<1>QR<z)d/=(“3+°) (1/3+1) x0.05><1+( x0.1><0.5=0.0417 (1+2/3) (2/3+0) x0.05><1+( x0.1x0.5 =0.0583 G = [5(3)QG(/1)d/1 = B = [magma/2. =0 RP 0.0417 Sotheresponse GP = 0.0583 B 0 p iii: [PM/21mm [Pu/mam [391%me A= [PMQGWA [PMQGMW JPMQGMW {Baum/mam IPA/DQMME JP3<A>QB<A>d3 Where PR(,1)=6(/1 —O.65) ,PG (/1) =§(,1 — 0.575) ,PB(1)=5(,1 —0.45) QR(0.65) QR(0.575) QR(0.45) 2/3 1/6 0 A: QG(0.65) QG(0.575) QG(O.45)=1/3 5/6 1/3 QB(0.65) QB(O.575) QB(O.45) 0 0 2/3 pR 1.667 -0.333 0.167 0.0417 0.0501 E= p0 =A"‘-Z‘= -0.667 1.333 —0.667 0.0583 = 0.0499 p3 0 0 1.5 0 0 Since there is no negative term, directly maW. b: i: We could get the response as listed in the following table —_-1m3- (0,0,1) (1/6,o,5/6) (1/6,o,5/6) —0-5-8 m —-m--W (1/2,1,1/2) W m (2/3,1,1/3) —0-6+s m (5/6,o,1/6) @- —_-m- 400 nm G R The Locos is the red line in above figure, and the shaded area is the gamut é ii: The response of the sensor to stimulus could be calculated as following R: [5(1)QR(1)d1=91—2—:—[email protected]+((2/3+l)x0.1x0.5=o.o7og G: JS(2.)QG(/l)d/l=1x0.05_x1=0.05 / (1/3+0) B = [5(1)QB(,1)d2='wx0.05x1+ x0.1x0.5=0.0292 2 R 0.0708 P So the response G 0.05 B 0.0292 P p iii: lawman [Foam/(1)611 [PMQRMW A= lemon/W [mood/w Wooded/1 [BAMQA/Dd/i Momma [Pu/091mm Where PR(2)=5(2—0.65) ,P (2)=5(;1—0.575) ,P (2)=§(2—0.45) QR(0.65) QR(0.575) QR(0.45) 5/6 7/12 1/6 A: QG(0.65) QG(0.575) 90(045) = 0 1 0 QB(0.65) QB(0.575) QB(0.45) 1/6 5/12 5/6 pR 1.25 -0.625 -025 0.0708 0.0499 5: p0 =A“-E‘= 0 1 0 0.05 = 0.05 pH —0.25 —0.375 1.25 0.0292 0.0 1 Since there is no negative term, directly match is ssible. C: i: The figure is drawn using matlab as following B B R 700 nm 500 nm G R i G Locus ~ Gamut ! The Locos is the red line in above figure, and the shaded area is the gamut ii: The response of the sensor to stimulus could be calculated using matlab ‘ (The code is attached) ' RP 0.0426 GP = 0.017 B 2 10* QR(0.65) QR(0.575) QR(0.45) 0.1014 0.6250 0.0219 A= QG(0.65) QG(0.575) QG(0.45) = 0.0056 0.2859 0.0249 QB(0.65) 93(0575) QB(0.45) 0 0 0.0237 pk 11.2163 24.5232 15.42 0.0426 0.0573 E= p6 =A“-E= -0.2197 3.9785 -3.982 0.0172 = 0.0589 p3 0.0003 .—0.005 42.2526 2.9x10‘6 0.0 0 Since there is no negative term, directly match is possible. Problem 4. Solution: From Lecture Notes 4, we know the necessary and sufficient condition for us to be able to predict the response of Sensor 2 to any stimulus from the response of Sensor 1 to that same stimulus is that we be able to express the Sensor 2 functions as a linear combination of those for Sensor 1 What we need to prove for this problem is this: We have two sensors, with function as QR (/1), Q6 (/1), Q, (/1) , and Qx (/1), Qy (/1), Q2 (/1) , RS XS We also have CRGB= GS which is the response of sensor 1, nyz= YS which is the BS Zs response of sensor 2, and A is a 3 x 3 matrix. '\ We should prove the necessaryl and sufficient condition to represent nyz=ACRGB is we must Qx (/1) Q1201) . bxx bxc bxa have QYUL) =B QGM) whereB isa3x3 matrix like by“ bye bm 92(4) 93(4) by. b... 123 I‘M/IQM ‘73, gy131f)t.c.)j LLLLLL/L LLLLLSLLLLLHV ' L (Keg/2L LL 82L; L QLL QLL3 L. L. L L_ , LL_ LQLWQLLLALL L Quad L L L L. _L LL .5LIAA LLL$_ amid» -Elézi‘baéilj i’hMMZLLLLLLL ___r . 52.214 _ -L C :L ( S (A 3 . {W13 A >\ .. — «— _ sz' I"? g __ [Lang 3 W _ 5ng > (SQ; QLLAL pa. 2 . _ _-» QiL/LXLL 25. L _ Mi. 3 bLZEL LLLmLLLtL mm @x Q\. (A) > _ __ ‘ A > w v L J Qpihri = b L [225,133- T _ L5 ”* LLEHLH, LL L - £213,133. Q5123, Mfr 324+ Oxalkwfi‘ [7 QéLLLLLL'k 1’ 621301 ____LL . LL... - (3.3;: 12L am 3 *JA: WWLW 1 L r I” - 0 F“ ________________________________________________ _// / // J _1 L n t ._l J__ 1.. L 0.4 0 45 O 5 0 55 0.6 0 65 0 7 0 75 2 I’— r 1 —-_—1 K I ‘l 1 I“ / ...... /flfl/\\‘\_ 4 ,,,./" ’ \\~ 0 I‘ // AAAA ” \‘ \\\\ \ '1 .//’l ‘\\ _1 L _1 l ____L__ 4 .1. I 0.4 O 45 0 5 0.55 0 6 0 65 0 7 0 75 1 ‘5 \\ r | I | I l' \\\ 1 - \“\ — .\\\ 0.5 r \\\\ , O l I \\.l .. J ._- ____ .L ,. _ ........ .__| 0.4 0 45 0.5 0.55 0.6 0.65 0.7 0.75 1,\ . . . . 0.9 - \ — 0.8— — 0.7 - - 0.6- — 0.5- . o.4~ — 0.3L ' 4 0.2r ' — 0.1— fi. 4 00 0'2 fl 0E4 0'6 0'8 1 Speciral locus Matlab code for HW5.a % ECE638 HWI P5.a clear; R=zeros(31,1); G=zeros(31,1); B=zeros(31,1); R(16:31)=(0:1/15:1); G(1:16)=(0:1/15:1); G(16:31)=(1:-1/15:0); B(1:16)=(1:—1/15:0); A=[R('26), (R(18)+R(19))/2, R(6); G(26), (G(18)+G(19))/2, G(6); B(26), (B(18)+B(19))/2, B(6)]; T=inV(A)*[R,G,B]'; x=0.4:0.01:0.7; subplot(3,1,1); % r p10t(x,T(1,I)); subplot(3,1,2); % g p10t(x,T(2,I)); subplot(3,1,3); % b p10t(X,T(3,:)); Sum=T(1,:)+T(2,:)+T(3,:); 1=R./Sum'; g=G./Sum‘; b=B./Sum'; figure; p10t(r, g); 1 ~ / ....................................... — _ 0L ...................................... \ ................................... - _1 ._I I I __I I I 0.4 O 45 0 5 0.55 0 6 0.65 0 7 0.75 1 I I l ( 0.5 ~ - O .................... L .................................... L ................ g—_ 0.4 0 45 0 5 0.55 0 6 0 65 0 7 0.75 2 Y | l I I I 1 I““—--~ ‘RW ‘5“ ~ - \_-.\M_ o- ~~~~~~~~~~~ \/\~----~~~~ o... — _1 l I i I l | 0.4 0.45 0 5 0.55 0 6 0 65 O 7 0.75 Color matching function 1 | I I I 0.9 - - 0.8 - , 0.7 - 1 0.6 - _ 0.5L _ o.4~ ~ 0.3 - - 0.2 - .I 0.1 - ‘ '1 O ................................... | ................ | I ................ J .................................... v. 0 O 2 0 4 0.6 0 8 1 -_ Spectral locus Matlab code for HW5.b % ECE638 HWl P5.b clear; R=zer0s(31,1); G=zeros(31,1); B=zeros(31,1); R(1:31)=(O:1/30:1); G(11:21)=1; B(1:31)=(1:-1/30:0); A=[R(26), (R(18)+R(19))/2, R(6); G(26), (G(18)+G(19))/2, G(6); B(26), (B(18)+B(19))/2, B(6)]; =inV(A)*[R,G,B]'; x=0.4:0.01:0.7; subplot(3,1,1); % r p10t(x,T(1,:)); subplot(3,1,2); ‘V g plot(x,T(2,:)); subplot(3,1,3); % b p10t(X,T(3,t)); Sum=T(1,:)+T(2,:)+T(3,:); r=R./Sum'; g=G./Sum'; b=B./Sum'; figure; p10t(r, g); / """""" \\ O r" ................................. \ ‘‘‘‘‘ // ‘ .................. _ \ ......... ,/ -5 I l i .J | l J 0.4 O 45 0 5 0.55 0 6 0.65 0 7 0.75 2 I l —r_‘ | I I 1 t- / \ _ / 0 ~-— ---------- \ ~~~~~~~ 4 _1l .1‘ I ._I_ I l J 0.4 0 45 O 5 0.55 0 6 0 65 0 7 0.75 2 "I I r l I I 1 - //../- ..... \__\ . 0 P" ~‘-\‘~— .__ ‘ _~‘ _ ....__ _. — — _. ”0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 Color matching function 0.8 I I T I . 0.6 ~ - 0.4 - — 02" ‘i .. / - -0.2 - - -o.4 _ -0.6- ‘ ‘ _0'8 ‘L l l | -1.5 —1 ~0 5 0 0 5 1 1.5 Spectral locus Matlab code for HW5.c % ECE638 HWI P5.c clear; load 'cones.txt’ % load HVS sensor Q R=cones(:,2); G=cones(:,3); B=cones( 1,4); A=[R(26), (R(18)+R(19))/2, R(6); G(26), (G(18)+G(19))/2, G(6); B(26), (B(18)+B(19))/2, B(6)]; T=inV(A)*[R,G,B]’; x=0.4:0.01:0.7; subplot(3,1,1); % r p10t(X,T(1,:)); subplot(3,1,2); % g /. p10t(x,T(2,:)); / subp10t(3,1,3); % b plot(x,T(3,:)); Sum=T(1,:)+T(2,Z)+T(3,1)$ r=R./Sum'; g=G./Sum’; b=B./ Sum’; figure; p10t(r, g); ...
View Full Document

{[ snackBarMessage ]}