Mt24aai202 CV3
Mt24aai202 CV3
Assianment 3
shankar Mtkekae
Compuler Uistor
color space CONveTslon
as RGB to Xyz
För tiast input pizel
R,G, B) =(52, 75, 6s)
i) Normaize
R'= S2 O. 2039
255
G'75.
O. 2 9 4 )
255
O. 2533
B'= 66
255
i) ineatize
Formwa
c<E o. o404 > i n = I 2 . 9 2 .
cin = 2.4
else
|. OSS
R_in = 24
O.2039 +
|.0SS
Os5oo3 23
2.4
G.in (o294l +0.5s
(9 o.0683
|. 05S
2.4
B_ in = O.25 88 +o-ss7
|. 03S
ii Appy conUerbion
D6s illuminant
[x, y; z] =lo.4124, o.3s76, o. 1805
O.2126, o.71S2, O.0722,
O.09 3, 0, I192, 6.95os
(Rin, Glin, B.in]
MT24 AAI 202
X=(o4124 o. 032.3) +(o.3576 X0: O6 83)
+ Co.1265 x o.0519)
O.o133 + o. 0244 +o. O0g4
O. o471
O. 9 O.08
O.12
O. 45 O.21
O.65
.O.22 O. 19 O.39
O.06 O.05 O.05
O.23 o.l9 O.l5 J.26 o.22 o18
O.07 O. o5
O.12
a.o7
o.06
RGG to HSI
Normali3ed RGB values
R= O. 2039
G= o.294l
B= . 2588
Calcwlate etenstty
I=R+G+B/3
O.2523
iiCaladate sturten
S=1-pei munCR,G, B)
3
=
|-C.756Xo.2039
| -
=,|*C3.964X o. 2039)
= o.1917
iii) CalLaubte tHue
x(CR-G) +CR-R)
S= cos-! [ o.
VCR-G)+(R-aG-B
O.07255
O. O787
= cas(-o.9218
=IS7.2 deyres
J B < ,then Hue= , else Hue= 360 -
Hue= = IS7. 2
MT2l1AAI 202
d. xyz to RGB
(a.y,2) = Co.o471, 0.os34, o.os)
Uang
i) Ge near RGB
R_un = OO824
G n = 0.O S8 2
B.n=0OS13
ii) apply invee gamma to qd sRB
Gen K= o. 60313.then G 12.92 xC- Un
else o.os
-thus
R O . 2043
i o. 2940
O. 25 85
ii De-nor maige
R= R* X 25S = S2
G'X 255 75
R' X 2sS = 66
B=
MT24AAI2O2
e. HSI to RGB
HSI e s t (I57.2 o.1917, o. 2523)
Uoing -the HHue secor
The tormualas depend on
reen-Blue
Oue HCIs7. 29, is
Setoy CI20° <= H<240)
thus si n aboue
R'= o. 2039
G'= o. 2944l
B- o.2589
iu) Normalize
R= R'% 255 S2
G= X25S = 75
B'= B'x255 = 6 6
t YCbG to RGB
esing resutsC67, 127, 17)
R= Y+ 1. 462 x CC l28)
G=Y- o.344 X Ccb -123) N75
XCCb-l23) 66
B= Yt 1.722
MT24AAI 20 2.
length cncading on the R-plane
Conuert the 20 ng data to 1D tream
S2, SS, 66, 70 23, 22
run length onoding
C,52),CI, s5), CI61)CI, 7), CI, 6),
CI,63), C1, 5) CI.6), CI, 3),cl,23)
CI, 22)
i) repreaertaon in a attened ist
LI, S,1, Ss, 1, s , I, 7o, l, 6l
çg, I,35, 1, 29, |,22)
. . . 1 ,s9,
Ime obsevahons
a orgna data was 36 nen bees, the
encodel has double, 72 nunber
So unshead o compresaing the da
RLE has doubed tts Sge. This
s woyst-case Scenaio or RLE
3. Yn
length encodung on G-plane
>cl,75,Ci, sc), cI.7). Ci. 75..0, s).
,c2, 2D, Cl, so
reprebertton
2,22, 1, 60]
LI,75, I, 66, I, 71, 1, 7s...
MT24AAL202
34. on B-blane
Aprly run
even
lorgth
bere no
encodurg ConGeCtive value is
RLE encoded
repeated. Restart
o t p t coill haue do uble alues
result = [L, 66, I, 7o, I,s7, I, 60,
, 71 ... L,6o,), 74, 1,4o]
34 179 131
23 13
74 44 S7. 34 64 s4
28 29 7 39
Frme 1.
ii) Frame 3-
|14
27 50 13 26 49
93 l67 38 223 87 32
42
75 17 76 12.
40
4| 25 18
12 32
(
MT4AAL20 2
Alding too Uidees
Ga and 6b
trame 1 trom Cass
Taking RebultCi)=min
1
+t)
123 |42 I44 157 180 149
79 215 |66
278 SO7 369
I70 137
|136 l29 I69
228
|216 176
G4 83
63 IS7 l69
rane. value we coill
oe coll round
Uaue i.e we
take munimum
it to 255
123 |42 144 149,
I28 131 120 190 255 I99
255 255 255 78 215 l66
136 |29 I69 |46 I70 137
216 176 255 255 255
63 |S7 g3 64 83
MT24AAI202
’ substzaching the videos
Taking trame 1a and 2a
2 2 33 |4 43 28
|232 47 30
g6 37 26 32
|I7 47 31 18
uido rames
Taling rane i gor ene
52 54 6| 64 66 63 70
5 56 S7 69 78 84 82 78
63 S1 59 s7 S5 23
g4 l25 |S6 l34 112 97 77
125 1g9 253 2|| 16 |60. 32 S9 86 78 69
89 122 /S4 13S 82 49 64 73 74 70
S2 S3 55 S8 6| 68
707I 71
74 73 72 72 72 IO] 109 loo
5 92 89 86 |35 1So 164 1l46 128
59 66 72 74 76 81 82 79 77 S
|23 39 5S 62 69 52 35 29 23 21 22
oces
ess coill 2epeat tr
me 22 ant 3.hus
sMosth smage amas in the uder
e vldea rame eate inter polation MT24AAI202
Lnterpalated
64 6| 64
tram 66 71 61
89 75 75 lo2. 88 74
l08 |14 |02 |08 162
64 61 66 71 64
26 26 41
26 26 SS
44 241
G- plane - 43 25 45
49 33 16
B-phne
3x3 mtiz
Taleing |49 39 27
R-plane -
14 49 40
2) 20
31
G-plane 45 44 24
213
43 25 45
|49 33 l6 L
B-plane =
386 238
330
126
Frame
R-plne= i20
V2 I21 105
|184 222 221
27
Subtated seslt = 49 39
49 40
R-pane 14
20
MT24AAI2o2
i) G-plane 45 44 24
43 25 45
33 16
49
in) -plane =
||66 |20 68
madënox3)
ii> 2eutart utezpalatd B-plane
77 l06 997
39 53
193
tme can be inteepolatd
ikesise, whole imege
and tor ualues ot tcr C.c. This
naeased no
ntepolaton
pee second and hus impove
of rames
smoothnes in trnsrhon rom oTigeal trame t
to toame 2.
MT24nA 202
Apely EzW alqo thm the image
) Threshold 1
where n= loor Clog CIma)
toorC log Cca)
T=32
11=32
opplyin g ttreshold
62 -34| 43
47
Code
Pni z P
bit stream
Retnemert pss
else
62 ’|
-34O
49 |
47o
MT24 AAL202
applyng threshold
23
-31 i23 Lo
retinent pas r2
value thresho]d = 8
Cuz2et
62 C42, 6] s2>s6> |
-34 CI2, 48) 34<20
49 L48, 6 49 < S6
47 [32, 4] 47 > 4 o ’ |
Neo ualues
31 S 24
23 < 24
(o)
|3 -12
o
ie 14 -13
I5 14 | [ol -12
-9 ol -14
ooO
47 L40, 48J
[24, s2]
23 Ll6, 24]
heo values Cthreshold>12
|4-1 bit
rfine nent
13->|
12->1