0% found this document useful (0 votes)
3 views18 pages

Mt24aai202 CV3

The document outlines various color space conversions including RGB to XYZ, HSI, and YCbCr, detailing the normalization, intensity calculation, and hue adjustments involved in the processes. It also discusses run-length encoding for image data and video processing techniques such as background subtraction and frame interpolation. The document provides mathematical formulas and examples for each conversion and processing method.

Uploaded by

Shankar Mutkekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views18 pages

Mt24aai202 CV3

The document outlines various color space conversions including RGB to XYZ, HSI, and YCbCr, detailing the normalization, intensity calculation, and hue adjustments involved in the processes. It also discusses run-length encoding for image data and video processing techniques such as background subtraction and frame interpolation. The document provides mathematical formulas and examples for each conversion and processing method.

Uploaded by

Shankar Mutkekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

MT24AAo 2

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

Y=(.2126 Xo.0323) +(o.7Is2 X O.G6 39)


+Coo722 Xo.0519)
O. OO69 + o. O483 +o.6O37
O.05g4
Z = Co.o1g3xo. O323) +o.192 X
O.06 33)
+(o.9505 x o.05|9)

Rest or pixel (s2, 7s,66) ~ o-047, o.06, G.06


ikeise 2estd, tor a maye a
X=o. os O.'oS O.OS 0.06

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

Lo.ol o.o2. O.02


MT24AM 02

Z=o.os O.07 O.05 O.05 3. 06 O.07|


O. 12
O.07 O.07 O.65 O. 12

to.o2 0.0| 0.07.

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

C. RGB to ycbGr convesin


The tmwas coork dex ectly co ith mulhply
g-bit RGB vaues CBT.01 std

y= o. 299 R+ o.S7 × G*+ o. Il4xB


Cb= 123- . 1637 XR-O.831XG +O.S B

Y= 67 Cb= 127 G=ll7

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)

i Adst the Hue


H'= Hue-l20 = 37.2

Ly Çalcte RGB n to.] Yange


R= I x C1-s)
Cso-H))
G= Tx i + S xcosH)/cos
B= 3 X I - CR+G)

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]

S.6:Urdeo pocessing operotions on graysale


Applgig backgzound substrachion,
trame dttezonáng algithm.
backgsud reteenoe
substrahon)
Frame 2 -Frame 1C backg
13
23
SI 31 40 24 1 21.

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

||28 |20 266

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

7esutci,j) = marCo, fap-f9))


32 22. 25 27
13 28

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

So1 here take trome I cnd tame 2


Cie

and the geb utat trame oll be dded


tn the beteen to 2ecezence tromes.
Irtexpdated rome Cij)
=(i-a. F,C,) + c . F )
coheze a ib tepolon tactur thot deter
mines how tee the tepolated image is
C= o. S ezactly un the muddle
C= .25 neat to trame L
near 1

a= O.75 cax to trame 2


neat
Lets asme tr Ue Cawe C= O.50

thws Plxel Ghe Ci, )


Untexpolcted Pel CI,)==(-0.s),s2
C-o.).s2 + 0.6 75
=63.5 64

Lnterpalated
64 6| 64
tram 66 71 61
89 75 75 lo2. 88 74
l08 |14 |02 |08 162
64 61 66 71 64

132 112 Is2 |l2

26 26 41
26 26 SS

Similaz procens ls wel to qet more


betueen too trames lna Uatious alpha
values. The rtexpolation ot trame te
gue moTe smoothez transron beth
too orgnd tramas.
MT24AAI2o2

a7Uidee proceasing opezaton on colouz irmaqe.


) Apply backqround subteacion, trame
ditbeenng ayotm
i> Backgrourd aubtrachon Compares the
Cuerert trane cortth stahe bck grud
to hyghlght toregound hagas
For Plzel in both tomes, dubtat
the pi value tbn
value n trame 2 tom re i
Resutt=Frame 1 value - F. 2 value
Taki ng sx3 matices tor eet.
subtacton
Resuttant R-plane backrourd
49 39 27
R- olane 49 40
21 20

44 241
G- plane - 43 25 45
49 33 16

B-phne

Frome diterencim Compaes -too corseccti ve


Fome
dittorenhanges Cau ally mohan)
tames to
-Frme l
Reut=Frame 2 Cbackgeun|
Caureent)
MT24AAL202

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 =

) Adding too videa


Consider 3x3 mtix gor cueoy plane r
the eos o calowations.
)Addrton 2e ut tor R-plane .
F1-R-plane(3x3) F2 R-phne
87 12o |26
+
72. 65 log |2|
153 201 201 222 221
213 133
204 |93 170

337 423 422]


i For G-plane
F1 G-plane F2 G-pane
92 160
112 139 179 137 |84
|I36
l63 60 136 76J
MTO4 AAI202
[275 266 20g
G-plane |315 249 323
239 186

iii) For B-phne


1S4 212.
278 306 226

386 238
330

> subteachng too widess matiz of plare


We wl) be consideng SXB not com mtatve
matex bubxt2a chon
i.e A-B B-A
thu choce F2 -F FF deperdo
the se ase.
>F-F col subt2act the pzed values
tom ame 2, and the
of rame t trae 2.
2etlect hoco much
lesit coll
dittes rom rame
>F F, : Ulce Vetsa.
We coll tollots F-F
)R-plane 87 g37
U1 Frane 1 R-plane 72 65
C3x3) 201 201

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 =

d) Irtezpolti ng vides trames


Consile Frame L RGB planes C3x3)
It R-plane = 7I 27 83 71 73 97 8s 83
72 80 77 74
|S3 201 201J 95 S4 72 69 65
||24 3l 137 135 133
|153 177 201 201 20|
Iter
G-panez I36 12
927
I39=
21
||9 J2 14 |6
l41 l03 60
|186 |24 ||2 126 139
l39 123 l044 |00
|22 82 60

hte [77 |06 77 92 106 |3 997


B-pkne= |39 |S3
|l08 ||9 130 I18 l06
|13 Iss
39 l46 |S3 133 I13

133 134 l34


6| 87 113 l84 LSS
AT24AAI202

e. video trame rate intezpoloction


The gen eral torm ula tor ineat ntezpolat
beth too values, actrom trame 1) and
b trom Ctrame 2) corth intezpol abon
tuctor
I= C1-)d + a.b
ie neo trame coill be
a=0.
Consilering FL

irtezpolated R-plane mateix Gsx)


DResuttant
g6
|02 37 85
212 211
ls9
mateix(s X9)
1) resultart eterpattad G-pane
I33
125

||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

retin ern ert bit s |0011o


MT24AAI202

(o)
|3 -12
o

ie 14 -13
I5 14 | [ol -12
-9 ol -14

ooO

PPD P P n|z nnpi Pni


i I i i i i ii Pii i iiP i iii i
i i i p i i i i i i ii
aetinement pas
old vaues
>56+4 ’I
62 [s6, 64]
[32, 40] <3244
34
49 [48, 64
>40+4’I

47 L40, 48J
[24, s2]
23 Ll6, 24]
heo values Cthreshold>12

|4-1 bit
rfine nent
13->|
12->1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy