Computer Graphics and Multimedia
COMPUTER GRAPHICS AND MULTIMEDIA SYLLABUS UNIT-I Output Primitives: Points and Lines – Line-Drawing algorithms – Loading frame Buffer – Line function – Circle-Generating algorithms – Ellipse-generating algorithms.
Attributes o Output Primitives: Line Attriutes – Cur!e attriutes – Color and Gra"scale Le!els – Area-fill attriutes – Character Attriutes.
UNIT-II #D Geometr Geometric ic $rans $ransfor format mation ions: s: Basic Basic $rans $ransfor format mation ionss – %atri& %atri& 'eprese 'epresenta ntatio tions ns – Composite Composite $ransforma $ransformations tions – (ther $ransfor $ransformati mations. ons. #D )iewing: )iewing: $he )iewing )iewing Pipeline – )iewing Co-ordinate 'eference *rame – +indow-to-)iewport Co-ordinate $ransformation - #D )iewing )iewing *unctions – Clipping (perations.
UNIT-III $e&t: $e&t: $"pes $"pes of $e&t – ,nicode tandard – *ont – nsertion of $e&t – $e&t $e&t compression – *ile formats. mage: mage $"pes $"pes – eeing Color – Color %odels – Basic teps for mage Processing – canner – Digital Camera – nterface tandards – pecification of Digital mages – C% – De!ice ndependent Color %odels – mage Processing software – *ile *ormats – mage (utput on %onitor and Printer.
UNIT-I! Audio: ntroduction – Acoustics – /ature of ound +a!es – *undamental Characteristics of ound ound – %icr %icroph ophon onee – Ampli Amplifi fier er – Louds Loudspea pea0e 0err – Audi Audio o %i&er %i&er – Digi Digita tall Audio udio – "nthesi1ers – %D – Basics of taff /otation – ound o und Card – Audio $ransmission – Audio *ile formats and C(DECs – Audio 'ecording "stems – Audio and %ultimedia – )oice 'ecognition and 'esponse - Audio Processing Processing oftware.
UNIT-! )ideo: )ideo: Analog Analog )ideo ideo Camera Camera – $rans $ransmis missio sion n of )ideo ideo ignal ignalss – )ideo )ideo ignal ignal *ormat *ormatss – $ele!ision Broadcasting tandards – PC )ideo – )ideo *ile *ormats and C(DECs – )ideo Editi Editing ng – )ideo Editin Editing g oftwa oftware. re. Anima Animatio tion: n: $"pes of Anima Animatio tion n – Comput Computer er Assis Assisted ted Animation – Creating %o!ement – Principles of Animation – ome $echni2ues of Animation – Animation on the +e – pecial Effects – 'endering Algorithms. Compression: %PEG-3 Audio – %PEG-3 )ideo )ideo - %PEG-#Audio – %PEG-# )ideo. )ideo.
TE"T BOO#S 3. C(%P,$E' C(%P,$E' G'AP4C G'AP4C –Donald –Donald 4earn5 %.Pauline %.Pauline Ba0er5 Ba0er5 #ndedition5 #ndedition5 P4 P4 #. P'/CPLE P'/CPLE (* %,L %,L$ $%EDA %EDA –'an6an –'an6an Pare0h5 Pare0h5 #7785 $%4. $%4.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
COMPUTER GRAPHICS AND MULTIMEDIA UNIT-I Output Primitives: Points and Lines – Line-Drawing algorithms – Loading frame Buffer – Line function – Circle-Generating algorithms – Ellipse-generating algorithms.
Attributes o Output Primitives: Line Attriutes – Cur!e attriutes – Color and Gra"scale Le!els – Area-fill attriutes – Character Attriutes.
INTRODUCTION ABOUT COMPUTER GRAPHICS Computer Graphic is the discipline of producing picture or images using a computer which which includ includee modeli modeling5 ng5 creati creation5 on5 manipul manipulati ation5 on5 storag storagee of geometr geometric ic o6ect o6ects5 s5 render rendering ing55 con!e con!ert rtin ing g a scen scenee to an imag image5 e5 the the proc proces esss of tran transf sfor orma mati tion ons5 s5 rast raster eri1 i1at atio ion5 n5 shad shadin ing5 g5 illumination5 animation of the image5 etc. Comput Computer er Graphi Graphics cs has een widel" widel" used used in graphi graphics cs presen presentat tation ion55 paint paint s"stem s"stems5 s5 computer-aided design 9CAD5 image processing5 simulation5 etc. *rom the e arliest te&t character images of a non-graphic mainframe computers to the latest photographic 2ualit" images of a high resolution personal computers5 from !ector displa"s to raster displa"s5 from #D input5 to ;D input and e"ond5 computer graphics has gone through its short5 rapid changing histor". *rom games to !irtual realit"5 to ;D acti!e des0tops5 from unotrusi!e immersi!e home en!ironments5 to scientific and usiness5 computer graphics technolog" has touched almost e!er" concern of our life. Before we get into the details5 we ha!e a short tour through the histor" of computer graphics
OUTPUT PRIMITI!ES I$tro%u&tio$ $he asic elements constituting a graphic are called output primiti!es. Each output primiti!e has an associated set of attriutes5 such as line width and line color for lines. $he programming techni2ue is to set !alues for the output primiti!es and then call a asic function that will draw the desired primiti!e using the current settings for the attriutes. )arious graphics s"stems ha!e different graphics primiti!es. *or e&am e&l plee G< G< defin defines es fi!e fi!e outp output ut prim primit iti! i!es es namel" namel"55 pol" pol"li line ne 9for 9for draw drawin ing g contiguous line segments5 pol"mar0er 9for mar0ing coordinate positions with !arious s"mmetric te&t s"mols5 te&t 9for plotting te&t at !arious angles and si1es5 fill area 9for plotting pol"gonal areas with solid or hatch fill5 fill5 cell arra" 9for plotting portale raster images. images. At the same time G'P43 has the output primiti!es namel" Pol"line5 Pol"mar0er5 $e&t5 $one and ha!e other secondar" primiti!es esides these namel"5 na mel"5 Line Line and Arrow
Poi$ts '$% Li$es n a C'$ monitor5 the electron eam is turned on to illuminate the screen phosphor at the selected location. Depending on the displa" technolog"5 the positioning of the electron eam Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
changes. n a random-scan 9!ector s"stem point plotting instructions are stored in a displa" list and the coordinate coordinate !alues in these instructions instructions are con!erted to deflection deflection !oltages the position position the electron eam at the screen locations. Low-le!el procedure for ploting a point point on the screen at 9&5" with intensit" => can e gi!en g i!en as
setPi&el9&5"5
A line is drawn " calculating the intermediate positions etween the two end points and displa"ing the pi&els at those positions.
LINE DRA(ING DRA(ING ALGORITHM $he Cartesian slope intercept e2uation for a straight line is ?@m.& +here m represents slope of the line and as the " intercept.
)* )+
,*
"+
the two end points in the line segement at specified position9&35"35and 9"#. lope m and " as m @ "#-"35 -&3. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
@ "3 - m.&3 for an" gi!en & inter!al & along a line5 we compute the corresponding " inter!al " as "@m & imiliarl"5we imiliarl"5we can otain the & inter!al & to the corresponding " as &@ "m
R'steri'tio$ Rasterization is the proc proces esss of con! con!er erti ting ng a !ert !erte& e& repr epresen esenttatio ation n to a pi&e pi&ell repres represent entati ation on raster rasteri1a i1atio tion n is also also called called scan conversion. conversion. nclud ncluded ed in this this defini definitio tion n are geometric o6ects such as circles where "ou are gi!en a center and radius. • •
$he digital differential anal"1er 9DDA which introduces the asic concepts for rasteri1ation. Bresenhams algorithm which impro!es on the DDA.
can can con!e con!ers rsio ion n algor algorit ithm hmss use use incr increm emen enta tall meth method odss that that e&pl e&ploi oitt coherence. coherence. An incremental method computes a new !alue 2uic0l" from an old !alue5 rather than computing the new !alue from scratch5 which can often e slow. Coherence in space or time is the term used to denote that near" o6ects 9e.g.5 pi&els ha!e 2ualities similar to the current o6ect.
*. Di/it'0 Di/it'0 Diere$ Diere$ti'0 ti'0 A$'0)er A$'0)er 1DDA2 A0/orit3m A0/orit3m n computer graphics5 graphics5 a hardware or software implementation of a %i/it'0 %iere$ti'0 '$'0)er 1DDA2 is used for linear interpolation interpolation of !ariales !ariales o!er an inter!al etween start and end point. DDAs DDAs are are used used for for rast raster eri1 i1at atio ion n of line lines5 s5 tria triangl ngles es and and pol"g pol"gon ons. s. n its its simp simple lest st implementation the DDA algorithm interpolates !alues in inter!al F9& start5 "start5 9&end5 "end " computing for each &i the e2uations &i @ &iH335 "i @ "iH3 I"I&5 where I& @ &end H &start and I" @ "end H "start.
Di/it'0 Diere$ti'0 A$'0)er 1DDA2 A0/orit3m4, s0ope o t3e 0i$e )5 m6 ,7b )
n this this algor algorit ithm hm55 the the line line is samp sample led d at unit unit inte inter! r!al alss in one one coord coordin inat atee and find find the the correspondi corresponding ng !alues nearest nearest to the path for the other coordinate. coordinate. *or a line with positi!e positi!e slope less than one5 & J " 9where & @ -&3 and " @ "#-"3. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
4ence we sample at unit
&@3 inter!als and compute each successi!e " !alues as
)87*5)8 7 7 m *or lines with positi!e positi!e slope greater greater than one5 " J &. 4ence we sample sample at unit
" inter!als inter!als
and compute each successi!e & !alues as
"87*5"8 7*9m
ince the slope5 m5 can e an" real numer5 the calculated !alue must e rounded to the nearest integer. xi : yi 2 1 xi xi : Rou$%1 yi yi 22 1 xi 22
positi!e slope left to right
positi!e slope right to left
all points are 6oint together
*or a line with negati!e slope5 if the asolute !alue of the slope is less than one5 we ma0e unit increment in the & direction and calculate " !alues as
)87*5)8 - m *or a line with negati!e slope5 if the asolute !alue of the slope is greater than one5 we ma0e unit decrement in the " direction and calculate & !alues as
"87*5"8 7*9m F/ote :- for all the ao!e four cases it is assumed that the first point is on the left and second point is in the right.
DDA Li$e A0/orit3m
!oid m"Line9int &35 int "35 int 5 int "# K int length5i doule &5" doule &increment doule "increment Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
length @ as9 - &3 if 9as9"# - "3 J length length @ as9"# - "3 &increment @ 9doule9 - &39doulelength "increment @ 9doule9"# - "39doulelength & @ &3 7. " @ "3 7. for 9i @ 3 iM@ lengthi K m"Pi&el99int&5 9int" & @ & &increment " @ " "increment N N
+.Brese$3'm;s 0i$e '0/orit3m $he Brese$3'm 0i$e '0/orit3m is an algorithm algorithm which which determines which points in an ndimensional raster raster should should e plotted in order to form a close appro&imation to a straight line etween two gi!en points. t is commonl" used to draw lines on a computer screen5 as it uses onl" integer addition5 sutraction and it and it shifting shifting55 all of which are !er" cheap operations in standard computer architectures. t is one of the earliest algorithms de!eloped in the field of computer graphics. graphics. A minor e&tension to the original algorithm also deals with drawing circles. +hile algorithms such as +us algorithm are algorithm are also fre2uentl" used in modern computer graphics ecause the" can support antialiasing antialiasing55 the speed and simplicit" of Bresenhams line algorithm mean that it is still important. $he algorithm is used in hardware such as plotters as plotters and and in the graphics chips of chips of modern graphics cards. cards. t can also e found in man" software graphics liraries.. Because the algorithm is !er" simple5 it is often implemented in either the firmware liraries firmware or or the hardware of modern graphics cards. $he lael OBresenhamO is used toda" for a whole famil" of algorithms e&tending or modif"ing Bresenhams original algorithm
T3e '0/orit3m $he common con!entions will e used: $hat pi&el coordinates increase in the right and down directions 9e.g. that the pi&el at 9353 is directl" ao!e the pi&el at 935#5 andthat the pi&el centers ha!e integer coordinates. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he endpoints of the line are the pi&els at 9 x75 y7 and 9 x x35 y35 where the first coordinate of the pair is the column and the second is the row. $he algorithm will e initiall" presented onl" for the octant octant in in which the segment goes down and to the right 9 x x7 x3 and y and y7 y35 and its hori1ontal pro6ection x pro6ection x3 H x H x7 is longer than the !ertical pro6ection y pro6ection y3 H y H y7 9the line has a slope slope whose whose asolute !alue is less than 3 and greater than 7. n this octant5 for each column x column x etween etween x x7 and x and x35 there is e&actl" one row y row y 9computed 9computed " the algorithm containing a pi&el of the line5 while each row etween y etween y7 and y and y3 ma" contain contain multiple rasteri1ed pi&els. Bresenhams algorithm chooses the integer y integer y corresponding corresponding to the pi&el center that is closest to the ideal 9fractional y 9fractional y for for the same x same x on successi!e columns " can remain the same or increase " 3. $he general e2uation of the line through the endpoints.
ince we 0now the column5 x column5 x55 the pi&els row5 y row5 y55 is gi!en " rounding this 2uantit" to the nearest integer. $he slope slope 9 y y3 H y H y7 9 x3 H x H x7 depends depends on the endpoi endpoint nt coordi coordinate natess onl" and can e precomputed5 and the ideal y ideal y for succes successi! si!ee intege integerr !alues !alues of x of x can e comput computed ed starti starting ng from y from y7and repeatedl" adding the slope.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
n practice5 the algorithm can trac05 instead of possil" large " !alues5 a small error value etween H7. and 7.: the !ertical distance etween the rounded and the e&act y !alue y !aluess for the current x current x.. Each time x time x is is increased5 the error is increased " the slope if it e&ceeds 7.5 the rasteri1ation y rasteri1ation y is is increased " 3 9the line continues on the ne&t lower row of the raster and the error is decremented " 3.7. n the following pseudocode following pseudocode sample sample plot9&5" plot9&5" plots a point and as returns asolute !alue: !alue:
u$&tio$ line9&75 &35 "75 "3
int delta& delta& :@ &3 - &7 int delta" delta" :@ "3 - "7 real error error :@ 7 real deltaerr deltaerr :@ as 9delta" delta& Assume delta& Q@ 7 9line is not !ertical5 note that this di!ision needs to e done in a wa" that preser!es the fractional part int " " :@ "7 or & rom &7 to &3 plot9&5" error :@ error deltaerr i error error R 7. t3e$ " :@ " 3 error :@ error - 3.7
Ge$er'0i'tio$ $he !ersion ao!e onl" handles lines that descend to the right. +e would of course li0e to e ale to draw all lines. $he first case is allowing us to draw lines that still slope slope downwards ut head in the opposite direction. $his is a simple matter of swapping the initial points if &7 J &3. $ric0ier is determining how to draw lines that go up. $o do this5 we chec0 if y if y7 R y R y3 if so5 we step y " y " -3 instead of 3. Lastl"5 we still need to generali1e the algorithm to drawing lines in all directions. ,p until now we ha!e onl" een ale to draw lines with a slope less than one. $o e ale to draw lines with a steeper slope5 we ta0e ad!antage of the fact that a steep line can e reflected across the line y=x line y=x to to otain a line with a small slope. $he effect is to switch the x and x and y !ariales throughout5 including switching the parameters to plot to plot . $he code loo0s li0e this:
u$&tio$ line9&75 &35 "75 "3 boolean steep boolean steep :@ as9"3 - "7 J as9&3 - &7 i steep steep t3e$ swap9&75 "7 swap9&35 "3 i &7 &7 J &3 t3e$ swap9&75 &3 swap9"75 "3 delta& :@ &3 - &7 int delta& int delta" delta" :@ as9"3 - "7 real error error :@ 7 Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
real deltaerr deltaerr :@ delta" delta& int "step "step int " " :@ "7 i "7 "7 M "3 t3e$ "step :@ 3 e0se "step :@ -3 or & rom &7 to &3 i steep steep t3e$ plot9"5& e0se plot9&5" error :@ error deltaerr i error error R 7. t3e$ " :@ " "step error :@ error - 3.7 $he function now handles all lines and implements the complete Bresenhams algorithm.
Optimi'tio$ $he prolem with this approach is that computers operate relati!el" slowl" on fractional numers numers li0e error and deltaerr deltaerr moreo!er5 moreo!er5 errors errors can accumulate accumulate o!er man" floating-po floating-point int additions. +or0ing with integers will e oth faster and more accurate. $he tric0 we use is to multipl" all the fractional numers 9including the constant 7. in the code ao!e " delta&5 which enales us to e&press them as integers. $his results in a di!ide inside the main loop5 howe!er. $o $o deal with this we modif" how error is initiali1ed and used so that rather than starting at 1ero and counting up towards 7.5 it starts at 7. and counts down to 1ero. $he new program loo0s li0e this: function line9&75 &35 "75 "3 boolean steep boolean steep :@ as9"3 - "7 J as9&3 - &7 i steep steep t3e$ swap9&75 "7 swap9&35 "3 i &7 &7 J &3 t3e$ swap9&75 &3 swap9"75 "3 int delta& delta& :@ &3 - &7 int delta" delta" :@ as9"3 - "7 int error error :@ delta& # "step int "step int " " :@ "7 i "7 "7 M "3 t3e$ "step :@ 3 e0se "step :@ -3 or & rom &7 to &3 i steep steep t3e$ plot9"5& e0se plot9&5" error :@ error - delta" i error error M 7 t3e$ " :@ " "step error :@ error delta& 'ppe'r'$&e 9for e&le to print se!eral 'emar0: 'emar0: f "ou need to control the points i$ or%er o 'ppe'r'$&e consecuti!e dashed lines "ou will ha!e to simplif" this code " s0ipping the #nd swap: !nction !nction line"#$, #%, $, %' Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia boolean steep
i steep steep t3e$
() abs"% * $' + abs"#% * #$'
swap9&75 "7 swap9&35 "3 int delta& delta& :@ as9&3 - &7 int delta" delta" :@ as9"3 - "7 int error error :@ delta& # int "step "step int " " :@ "7 int inc inc 'E% added i &7 &7 M &3 t3e$ inc :@ 3 e0se inc :@ -3 'E% added
i "7 "7 M "3 t3e$ "step :@ 3 e0se "step :@ -3 x rom x0 to x1 with increment inc for x inc 'E% changed i steep steep t3e$ plot9"5& e0se plot9&5" 'E% increment here a !ariale to control the progress of the line drawing error :@ error - delta" i error error M 7 t3e$ " :@ " "step error :@ error delta&
Simp0ii&'tio$ t is further further possile to eliminate eliminate the swaps in the initialisatio initialisation n " considering considering the error calculation for oth directions simultaneousl":
u$&tio$ line9&75 "75 &35 "3 d& :@ as9&3-&7 d" :@ as9"3-"7 i &7 &7 M &3 t3e$ s& :@ 3 e0se s& :@ -3 i "7 "7 M "3 t3e$ s" :@ 3 e0se s" :@ -3 err :@ d&-d"
0oop setPixel 9&75"7 9&75"7 i &7 &7 @ &3 '$% "7 @ "3 e,it 0oop e# :@ #Serr i e# e# J -d" t3e$ err :@ err - d" &7 :@ &7 s&
e$% i i e# M d& t3e$ err :@ err d& "7 :@ "7 s"
e$% i e$% 0oop
n this method5 de!eloped " Tac0 Bresenham5 we loo0 at 6ust the center of the pi&els. +e determine d3 and d# which is the OerrorO5 i.e.5 the difference from the Otrue line.O Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
teps in the Bresenham algorithm: 3. Determine the error terms #. Define a relati!e error term such that the sign of this term tells us which pi&el to choose ;. Deri!e e2uation to compute successi!e error terms from first U. Compute first error term /ow the " coordinate on the mathematical line at pi&el position &i3 is calculated as " @ m9&i3 And the distances are calculated as d3 @ " - "i@ m9&i3 - "i d# @ 9"i3 - " @ "i 3 -m9&i 3 - $hen d3 - d# @ #m9&i3 - #" # -3 /ow define pi @ d&9d3 - d# @ relati!e error of the two pi&els.
Note4 pi < = i )i pi,e0 is &0oser: pi >5 = i )i7* pi,e0 is &0oser. T3ereore ?e o$0) $ee% to 8$o? t3e si/$ o pi . ith m @ d"d& and sustituting in for 9d3 - d# we get pi @ # S d" S &i - # S d& S "i # S d" d& S 9# S - 3 93 Let C @ # S d" d& S 9# S - 3 /ow loo0 at the relation of ps for successi!e & terms. pi3 @ #d" S &i3 - # S d& S "i3 C pi3 - pi @ # S d" S 9&i3 - &i - # S d& S 9 "i3 - "i with &i3 @ &i 3 and "i3@ "i 3 or "i pi3 @ pi # S d" - # S d&9"i3 -"i /ow compute p3 9&35"3 from 93 5 where @ " - d" d& S & p3
@ #d" S &3 - #d& S "3 #d" d&9#"3 - #d" d& S &3 - 3 @ #d" S &3 - #d& S "3 #d" #d& S "3 - #d"&3 - d& @ #d" - d& if pi M 75 plot the pi&el 9&i35 "i and ne&t decision parameter is pi3 @ pi #d" else and plot the pi&el 9&i35 "i3 and ne&t decision parameter is pi3 @ pi #d" - #d& Brese$3'm A0/orit3m or *st o&t'$t: 3. Enter endpoints 9&35 "3 and 9 "#. #. Displa" &35 "3. ;. Compute d& @ - &3 d" @ "# - "3 p3 @ #d" - d&. U. f p3 M 7.75 displa" 9&3 35 "35 else displa" 9&335 "3 3 . if p3 M 7.75 p# @ p3 #d"5 #d "5 else else p# @ p3 #d" - #d& V. 'epeat steps U5 until reach "#.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
/ote: (nl" integer Addition Addition and %ultiplication " #. /otice we alwa"s increment & " 3. *or a generali1ed Bresenham Algorithm must loo0 at eha!ior in different octants.
@.P'r'00e0 0i$e '0/orit3ms $a0e $a0e ad!antage of multiple processors. •
Gi!en n p processors5 sudi!ide the line path into n p Bresenham segments.
•
*or a line with with slope slope 7 < m < 3 and leftpoint 9 x7 y 5 y7 the distance to the right endpoint 9left endpoint for ne&t segment is
•
where
•
•
∆ x @ x @
width of the line
•
∆ x p is
computed using integer di!ision
/umering the segments5 and the processors5 as 75 35 #5 W5 n p-35 starting &coordinate for the 0 th partition is xk @ x @ x7 k ∆ x p i.e.
∆ x @ x @
3 5
n p @ U processors
tarting x tarting x-!alues -!alues at x at x75 x7 U5 x U5 x7 X5 x X5 x7 3# ∆ y p @
m∆ x p
At the k th segment5 the starting "-coordinates is @ y7 round9k round9k ∆ y p yk @ y •
Also5 the initial decision parameter for BresenhamYs algorithm at the start of the 0 th suinter!al is: pk @ @ 90 ∆ x p9#∆ y y – round9k round9k ∆ y p9#∆ x x #∆ y – y – ∆ x
•
Lines Lines gener generat ated ed can can ha!e ha!e 6agg 6agged ed or stai stairr-st step ep appe appear aranc ance5 e5 one one aspec aspectt of phenomenon called aliasing5 caused " fact that pi&els are integer coordinate points.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
•
•
•
,se anti-aliasing routines to smooth out displa" of a line " ad6usting pi&els intensities along the line path.
Each processor then calculates the pi&el positions o!er its assigned suinter!al using the starting decision parameter !alue for that suinter!al and the starting coordinates 9&0 5" 5"0 . . Another wa" to set up parallel algorithms on raster s"stems is to assign each processor to a particular group of screen pi&els. Assign each processor to 3 pi&el within some screen region. $his approach can e adapted to line displa" " assigning 3 processor to each of the pi&els within the limits of the line coordinates e&tends 9ounding rectangle and calculating the pi&el distances from the line path. $he no: of pi&els within the ounding o& of the line is & S ". Perpen Perpendi dicu cula larr dist distan ance ce d from from the the line line to a pi&el pi&el with with coord coordin inat ates es 9&5" 9&5" is calculated as5
% 5 A, A, 7 B) 7 C where5
A 5 -) 9 0i$e 0e$/t3 B 5 , 9 0i$e 0e$/t3 C 5 ,=) )=, 9 0i$e 0e$/t3
+ith
•
0i$e 0e$/t3 5 1,+ 7 )+2
(nce the consta constants nts A5B5C A5B5C are calcul calculate ated5 d5 the proces processor sor needs to perfor perform m # multiplications and # additions to compute the pi&el distance d. A pi&el is plotted if d M a specified line thic0ness parameter. nstead of partitioning the screen
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
intosingle pi&els5 we can assign to each processor either a scanline or a column of pi&els depending on the line slope
LOADING THE RAME BUER • • •
+hen straight line segments and other coordinate e&tends are scan con!erted for displa" with a raster s"stem5 frame uffer positions must e calculated . can con!ersion algorithms generate pi&el positions at successi!e unit inter!als. $his allows using incremental methods to calculate frame uffer addresses uppose the frame frame uffer uffer arra" is addressed addressed in row ma6or order order and that pi&el positions !ar" from 9757 at the lower left screen corner to 9&ma&5"ma& at the top right corner. *or a i-le!el s"stem 93 it per pi&el the frame uffer it address for pi&el position 9&5" is calculated as
'%%r1,:)2 5 '%%r1=:=2 7 )1,m', 7*2 7 ,
•
%o!ing across the scan line calculate the frame uffer address for the pi&el at9&35" as the following offset from the address for position 9&5"
'%%r1, 7*:)2 5 '%%r1,:)2 7 *
•
tepping diagonall" up to the ne&t scanline from 9&5" we get the frame uffer address of 9&35"3 with the calculation
'%%r1, 7*:)7*2 5 '%%r1,:)2 7 ,m', 7 +
•
where the constant &ma& # is pre computed once for all line segments.
LINE UNCTION A procedure for specif"ing straight-line segments can e set up in a numer of different forms. n P4G5 G<5 and some other pac0ages5 the two-dimensionalline function is where parameter n is assigned an integer !alue e2ual to the numer of coordinate positions to e input5 and ?&poi$ts is the arra" of input world coordinate !alues !a lues for line segment endpoints. $his function is used to define a set of n – 3 connected straight line segments. Because series of connected line segments occur more often than isolated line segments in graphics application applications5 s5 po0)0i$e pro!ides a more general line function. $o displa" a single straight-line segment5 we set n -@ # and list the x and " !alues of the two endpoint coordinates.As an e&le po0)0i$e: $e: the following statements generate two connected line segments5 with of the the use of po0)0i endpoints at 975 37;5 9375 #735 and 9#75377:
?&Poi$ts00 ., @ SOF ?&Poi$ts00 .) @ *==F ?&Poi$ts+* ., @ *=F ?&oi$ts+0.) @ +=F ?&oi$ts@0., @ +=F ?&Poi$ts@* .y @ *==F po0)0i$e 1 @ : ?&poi$ts2F Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Coordinate references in the po0)0i$e function are stated as asolute coordinate !alues. $his means that the !alues specified are the actual point positions in the coordinate s"stem in use. ome s"stems emplo" line 9and point functions with relati!e coordinate specifications. n this case5 coordinate !alues are stated as offsets from the last position referenced 9called the current position. *or e&le5 e&le5 if locati location on1@:+2 is the the last last posi positi tion on that that has has een een refe refere rence nced d in an application program5 a relati!e coordinate specification of 9#5 -3 corresponds to an asolute position of 953. An additional function is also a!ailale for setting the current position efore the line routine is summoned. +ith these pac0ages5 a user lists onl" the single pair of offsets in the line command. $his signals the s"stem to displa" a line starting from the current position to a final position determined " the offsets. $he current position is then updated to this final line position. A series of connected lines is produced with such pac0ages " a se2uence of line commands5 one for each line section to e drawn. ome graphics pac0ages pro!ide options allowing the user to specif" Line endpoints using either relati!e or asolute coordinates. mplementation of the po0)0i$e procedure is accomplished " first performing a series of coordinate coordinate transformati transformations5 ons5 then malu malung ng a se2uen se2uence ce of calls calls to a de!ice de!ice-le -le!el !el line-d line-draw rawing ing PHIG IGS: S: the input line endpoints are actuall" specified in modeling coordinates5 rout routin ine. e. n PH which are then con!erted to world c eordinates. /e&t5 world coordinates are con!erted to normali1ed coordinates5 then to de!ice coor coordi dinat nates es.. +e disc discus usss the the deta detail ilss for for carr carr"i "ing ng out thes thesee two two dime dimens nsio ional nal coor coordi dina nate te transformations in Chapter V. (nce in de!ice coordinates5 we displa" the pl"line " in!o0ing a line routine5 such as Bresenhams algorithm5n - 3 times to co nnect the n coordinate points. Each successi!e call passes the c c ~ordinate pair needed to plot the ne&t line section5 where the first endpoint of each coordinate pair is the last endpoint of the pre!ious section. $o a!oid setting setting the intensit" intensit" of some endpoints twice5 we could mo%i) the line algorithm so that the last endpoint of each segment is not plotted. +e discuss methods for a!oiding o!erlap of displa"ed o6ects.
CIRCLE GENERATING ALGORITHM Properties o Cir&0es $he set of points in the circumference of the circle are all at e2ual distance r from the centre 1,&:)&2 and its relation is gi!en e p"thagorean p "thagorean theorem as
1" "C2+ 7 1Y-YC2+5 r+ $he points in the circumference of the circle can e calculated " unit increments in the & direction from &c - r to &c r and the corresponding " !alues can e otained as
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Y5Y&
±
+ - 1,&-,2+ r √ r
$he ma6or prolem here is that the spacing etween the points will not e same.t can e ad6usted " interchanging & and " whene!er the asolute !alue of the slope of the circle is greater than 3. $he une2ual spacing can e eliminated " using polar coordinates and is gi!en "
"5 "C 7r&os
θ
Y5Y& 7 rsi$
θ
$he $he ma6o ma6orr pro prole lem m in the the ao! ao!ee two two meth method odss is the the comp comput utat atio iona nall time time.. $he $he computational time can e reduced " considering the s"mmetr" of circles. $he shape of the circle is similar in each 2uadrant. $hin0ing one step further shows that there are s"mmetr" etween octants too. /
% 0 1
2
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Mi%poi$t &ir&0e '0/orit3m4$o simpli simplif" f" the functi function on e!aluat e!aluation ion that that ta0es ta0es place place on each each iterat iteration ion of our circle circle drawing algorithm5 we can use %idpoint circle algorithm $he e2uation of the circle can e e&pressed as a function as gi!en elow f circle x : y2 5 x 2+ y2 circle 1 x
- r 2
f the point is inside the circle then f9&5"M7 and if it is outside then f9&5"J7 and if the point is in the circumference of the circle then f9&5"@7.$hus the circle function is the decision parameter in the midpoint algorithm.Assume that we ha!e 6ust plotted 1,8:)82: we ha!e to decide whether to point
1,87*: )82 or 1,87*: )8 - *2 nearer to the circle.
/ow we consider the midpoint etween the points and define the decision parameter as + P0 @ f circle circle (x k k+1, 1, yk +
1 2
)-----------1 )----------- 1
imilarl" # + @9 x k k+1 1 9 yk +
1 2
P03@ f circle circle (x k+1 k+1+1, yk+1 +
#- r 2 1 2
and
)------------2 )----------- -2
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
/ow " sutracting the ao!e two e2uations we get 2 2 x k k+1 + P03@ P0 #9 #9 x 3 19 yk+1 - yk -9 yk+1- yk 3
where "03 is either "0 or "03 depending on the sign of p0.
A0/orit3m 3. nit nitia iall !alue !alues: s:-- point point97 9755r x7 @ 7 y7 @ r #. nit nitia iall decis decisio ion n param paramet eter er ;. At each xi position5 starting at i @ 75 perform the following test: if p if pi M 75 the ne&t point is 9 x xi 35 y 35 yi and pi3 @ p @ pi # xi3 3 f p f pi R 75 the ne&t point is 9 xi35 y 35 yi-3 and pi3 @ p @ pi # xi3 3 – # yi3 where # xi3 @ # xi # and # yi3 @ # yi – # U. Determ Determine ine s"mme s"mmetr" tr" points points in in the other other octants octants . %o!e %o!e pi&e pi&ell posi positi tion onss 9 x,y x,y onto onto the the circ circul ular ar path path cente centere red d on 9 x xc , , yc and plot the coordinates: x coordinates: x @ @ x x x xc5 y @ y @ y y y yc V. 'epe 'epeat at ; – unt until il x x R R y y
E,'mp0e r @ 37 is integer round p round p7 @ U – r to to integer nitial point 9 x75 y7 @ 975 37 p7 @ 3 – r @ -Z 9if r is
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Mi%poi$t A0/orit3m
ELLIPSE GENERATION ALGORITHM Properties o e00ipse •
Ellipse – A modified circle whose radius !aries from a ma&imum !alue in one direction 9ma6or a&is to a minimum !alue in the perpendicular direction 9minor a&is.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
•
$he sum of the two distances d 3 and d #5 etween the fi&ed positions F positions F 3 and F and F # 9called the foci of foci of the ellipse to an" point P point P on on the ellipse5 is the same !alue5 i.e. d * 7 d + 5 &o$st'$t
E&pressing distances d 3 and d # in terms of the focal coordinates F coordinates F 3 @ 9 x x35 x# and F and F # @ 9 x#5 y#5weha!e:
Cartesian coordinates:
Polar coordinates:
Mi% Poi$t E00ipse A0/orit3m • • •
"mmetr" etween 2uadrants /ot s"mmetric etween the two octants of a 2uadrant $hus5 we must calculate pi&el positions along the elliptical arc through one 2uadrant and then we otain positions in the remaining ; 2uadrants " s"mmetr"
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
•
Decision parameter:
tar tarti ting ng at 975 r y we ta0e ta0e unit unit steps steps in the the x direction x direction until we reach the oundar" etween region 3 and region #. $hen we ta0e unit steps in the y y direction o!er the remainder of the cur!e in the first 2uadrant.
•
At the oundar"
•
therefore5 we mo!e out of region 3 whene!er
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
• •
•
Assuming that we ha!e 6ust plotted the pi&els p i&els at 9 x xi 5 yi. $he ne&t position is determined ":
f p f p3 3i M 7 the midpoint is inside the ellipse ⇒ yi is is closer f p f p3 3i R 7 the midpoint is outside the ellipse ⇒ yi – – 3 is closer At the ne&t position F xi3 3 @ x @ xi #
OR
•
where y where yi3 @ y @ yi or yi3 @ y @ yi – 3 Decision parameters are incremented ":
•
,se onl" addition and sutraction " otaining
•
At initial position
1=: r y2
A0/orit3m4 Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
3. nput r x5 r y5 and ellipse ellipse center 9 x xc5 yc5 and otain otain the first first point on an ellipse centered centered on the origin as 9 x x75 y7 @ 975 r y #. Calcul Calculate ate the the initia initiall paramet parameter er in regio region n 3 as
;. At each xi position5 starting at i @ 75 if p if p3 3i M 75 the ne&t point along the ellipse centered on 975 7 is 9 xi 35 y 35 yi and
U. otherw otherwise ise55 the the ne&t ne&t point point is is x 9xi 35 y 35 yi – 3 and
and continue until
E,'mp0e 'egion3
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Re/io$ + 9 x x75 y7 @ 985 ;
9Last position in region 3
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Mi%poi$t E00ipse u$&tio$
ATTRIBUTES O OUTPUT PRIMITI!ES LINE ATTRIBUTES Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he graph drawing routines ma" e freel" mi&ed with those descried in this section5 allowing the user to control line color5 width and st"les. $he attriutes set up " these routines appl" modall"5 modall"5 i.e5 all suse2uent o6ects 9lines5 characters characters and s"mols plotted until the ne&t change in attriutes are affected in the same wa". $he onl" e&ception to this rule is that characters and s"mols are not affected " a change in the line st"le5 ut are alwa"s drawn using a continuous line.
*. Li$e t) t)pe • • •
olid Dotted – !er" short dash with spacing e2ual to or greater than dash itself Dashed – displa"ed " generating an interdash spacing Pi&el count for the span and interspan length is specified " the mas0 . E&. 333377733337773333
/ote : *i&ed pi&el with dashes can produce une2ual length dashes. t depend on line orientation. o5 need to ad6ust the numer of plotted pi&els for different slopes.
+. Li$e (i%t3 • •
•
.pecif" in pi&els and proportion of a standard line width. $hic0er line can e produced ". • Adding e&tra pi&el !erticall" when [m[ M 3 • Adding e&tra pi&el hori1ontall" when [m[ J 3 ssues: Line ha!e different thic0ness on the slope • Prolem with • . End of the line • . Toining the two lines 9pol"gon
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$hree possile methods to ad6ust the the shape of the line: 3. Butt Cap • $o ad6ust the end position of the component parallel line. #. 'ound Ca Cap. • $o fill fill the semi circle of the each utt cap. ;. Pro6e Pro6ect ctin ing g 2ua 2uare re Cap. Cap. • $o e&tend the add utt cap at the specific end point.
$hree possile methods to smoothl" 6oining 6oining the line segments: 3. %iter 6oin oin • B" e&tending the outer oundaries of each of the two lines until the" meet. #. 'ound 6o 6oin • $o caaping the connection etween two segments. ;. Be!el 6o 6oin • $o fill fill the triangular gap where the segments seg ments are m
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Pe$ A$% Brus3 Optio$s • • •
$he selected selected =pen> or =rush> =rush> determine determine the wa" a line will will e drawn. Pens and rushes ha!e si1e5 shape5 color and pattern attriute. Pi&el mas0 is applied in oth of them.
CUR!E ATTRIBUTE ATTRIBUTESS
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
A de!ice conte&t 9DC contains attriutes that affect line and cur!e output. $he line and curve attributes attributes include include the current position5 rush st"le5 rush color5 pen st"le5 pen color5 transformation5 and so on. $he default current position for an" DC is located at the point 9757 in logical 9or world space. ?ou can set these coordinates to a new position " calling the MoveToE, function function and passing a new set of coordinates.
Note $here are two two sets of line- and cur!e-dra cur!e-drawing wing functions. functions. $he $he first set set retains retains the current position in a DC5 and the second set alters the position. ?ou can identif" the functions that alter the current position " e&amining the function name. f the function name ends with the preposition O$oO5 the function sets the current position to the ending point of the last line drawn 9Li$eTo5 Ar&To5 Po0)0i$eTo5 or Po0)BeierTo. f the funct functio ion n name name does does not not end end with with this this prepo preposi siti tion5 on5 it lea! lea!es es the the curre current nt posi positi tion on inta intact ct 9Ar&5Po0)0i$e5 or Po0)Beier. $he default rush is a solid white rush. An application can create a new rush " calling the Cre'teBrus3I$%ire&t function. After creating a rush5 the application can select it into its DC " calling the Se0e&tObe&t function. +indows pro!ides a complete set of functions to create5 select5 and alter the rush in an applications DC. *or more information aout these functions and aout rushes in general5 see Brushes Brushes.. $he default pen is a cosmetic5 cosmetic5 solid lac0 pen that is one pi&el wide. An application application can create a pen " using the E,tCre'tePe$ function. After creating a pen5 "our application can select it into its DC " calling theSe0e&tObe&t function. +indows pro!ides a complete set of functions to create5 select5 and alter the pen in an applications DC. *or more information aout these functions and aout pens in general5 see Pens Pens.. $he default transformation is the unit" transformation 9specified " the identit" matri&. An application can specif" a new transformation " calling the Set(or0%Tr'$sorm function. +indows pro!ides a complete set of functions to transform lines and cur!es " altering their width5 width5 locati location5 on5 and general general appear appearance ance.. *or more more inform informati ation on aout aout these these functi functions ons55 see Coordinate paces and $ransfor $ransformations mations..
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
COLOR AND GREY SCALE LE!ELS .
•
•
Colors are represented integers. Color information is tale and use pi&el n raster scan
stored in frame uffer or in separate !alues as inde& to the color tale. s"stems wide range of colors
•
'andom scan
monitors
•
" colors codes which are positi!e
few color choices.
Co0or t'b0es • • • •
Each pi&el can reference an" one of Each entr" in the tale uses #U its to $here are 38 million colors a!ailale . ,ser can also set the color tale with the function
SetCo0ourReprese$t'tio$1?s: &i:
+s is a wor0 station5 ci as color !alues.
the #V tale positions. specif" the 'GB color. entries in aP4G application program
&o0orptr2 inde&5 colorptr points 'GB color
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he color loo0up tale with #U its entr" accessed accessed from a frame uffer with X its per pi&el.A !ale of 3ZV stored at a pi&el position9&5" references the location in this tale containing the !alue of #7X3.
Gr') S&'0e • • • • • •
Appl for monitor that ha3e no color hades of gre" 9white-Jlight gre"-Jdar0 gre"-Jlac0 Color code mapped onto gra"scale codes # its can gi!e U le!el of gra"scale X its per pi&el will allow #V comination co mination Di!iding the actual code with #V will gi!e range of 7 and 3 E&: • Color code in color displa" is 33X • $o map to nearest gra"scale then
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
AREA ILL IL L ATTRIBUTES ATTRIBUTES %an" plotting programs will allow the user to draw filled pol"gons or s"mols. $he fill specification ma" ta0e two forms: •
olid color
•
Pattern fill
ILL4 n the first case we ma" specif" a gray a gray shade shade 97-#5 'GB color 9r 9r g g b all in the 7-# range or in he&adecimal#rrggbb he&adecimal#rrggbb5 5 4) color 9hue 9hue-- saturation saturation-value in value in the 7-;V75 7-35 7-3 range5 C%?< color 9cyan 9cyanmagenta magenta yellow yellowblack 5 each ranging from 7-377\5 or a !alid color name name in that respect it is similar to specif"ing the pen color settings . $here are three fill st"les: • • •
4ollow with color order *illed with solid color *illed with specific pattern or design.
Ho00o? (it3 Co0or Bor%er $he asic fill st"le is selected in the P4G application program as
setI$teriorSt)0e 1s2
where fs is normall" applied to the pol"gon areas it can also implemented to fill region with cur!ed oundaries Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
i00e% ?it3 so0i% &o0or t is used to displa" the single color uptoincluding the orders of the region. *unction:
SetI$teriorCo0orI$%e,1&2 +here the fill color parameter fc is to set the de sired color code.
P'tter$ i00 elect fill pattern with
Set i$terior St)0e I$%e,1pi2
+here the pattern inde& parameter pi specified to the tale position. $he following are the set of statements to fill the area defined in the fill area command.
setI$teriorSt)0e1p'tter$2F
setI$teriorSt)0eI$%e,1+2F
i00're'1$:poi$ts
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he process of filling a rectangular pattern called tiling.the rectangular fill pattern is sometimes called as tiling pattern.
Sot i00 $he modified modified oundar" fill and flood fill procedures procedures that are applied applied to repaint repaint area so that the fill color is comined with the ac0ground color is referred to as soft fill and tint fill algorithm.
E,'mp0e ,sing linear soft fill algorithm algorithm repaints the area that was originall" painted painted " merging merging the foreground color * with the single ac0ground color B 5where *Q@ B. Assuming Assuming that we 0now the !alues !alues of * and B we ha!e to determine determine how these colors colors originall" comined with current color contents of the frame uffer. $he current 'GB color P of each pi&el within a area is defined as
P5t71*-t2B +here $ is the transperanc" factor etween o and 3 for each pi&el.the !alue of the $ is less than 7.5the ac0ground color co lor contriutes more to interior color.
CHARACTER ATTRIBUTES $he appearance of displa"ed characters is controlled " attriutes such as font5si1e5 color5 and orientation. Attriutes can e set (oth for entire character strings9te&t and for indi!idual characters defined as mar0er s"mols .
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$her $heree are are a grea greatt man" an" te&t e&t opt options ons that hat can can e made made a!ai a!aillale ale to grap graphi hics cs programmers .*irst of '00: there is the choice of font 9or t"peface5 which is a set of characters with a particular design st"le such as /ew ?or05 Courier5 4el!etica5 London5 $imes 'oman5 and !arious special s"mol groups. $he characters in a selected font can also e displa"ed with assorted underlining st"les 9so%&:o5t.t 5e. . .d. . 5 d-oule5 in oldface5 in italics and in outline or shadow st"les. A particular font and associated st!le is selected in a P4lC program " setting an integer code for the te&t font parameter t f in the function.
setTe,to$t setTe,to$t JtK Control of te&t color 9or intensit" is managed from an app lication program with
SetYe,tCo0orI$%e, SetYe,tCo0orI$%e, Jt&K where te&t color piramcter tc specifies an allowale co lor code. $e&t $e&t si1e can e ad6usted without changing the width-to-height ratio of characters with
setC3'r'&terHei/3t J&3K $he width onl" of te&t can e set wlth the function
setC3'r'&terE,p'$sio$'&tor 1&?2 pacing etween characters is controlled separatel" with
setC3'r'&terSp'&i$/ 1&s2 $he orientation for a displa"ed character string is set according to the direction of the character up !ector:
setC3'r'&terUp!e&tor setC3'r'&terUp!e&tor 1upve&t2 1upve&t 2
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
UNIT-I
UESTIONS SECTION A 3. #. ;. U. .
$he slope slope intercept intercept line e2uation e2uation is gi!en " ]]]]]]]]. ]]]]]]]]. E&pa &pand DDA. DA. ]]]]]is ]]]]]is used for for photo photo realistic realistic images images and and for compute computerr drawings. drawings. ]]]]] is is a faster faster method method for for calculati calculating ng pi&el pi&el position. position. $he effici efficient ent raster raster line algori algorithm thm was was de!eloped de!eloped " ]]]]]]]]]. ]]]]]]]]].
V. $he circle circle is is a fre2uent fre2uentl" l" used used component component in in ]]]]]]^]]]]] ]]]]]]^]]]]]]]]. ]]]. 8. $he mid-poi mid-point nt method5 method5 the the circle circle function function is gi!en gi!en " ]]]]]]]] ]]]]]]]].. X. $he general general e2uation e2uation of ellipse ellipse is is stated stated as as ]]]]]]]]. ]]]]]]]]. Z. $he eccentr eccentric ic circle circle of ellips ellipsee is called as ]]]]]]]]]] ]]]]]]]]]].. 37. *or an" circle point the distance distance relationship is e&pressed " ]]]]]]]].
SECTION B *. E&plain aout different t"pes of line attriutes. #. Descri Descrie e the !ario !arious us area area fill fill attri attriute utes. s.
@. +rite +rite a note on color c olor and gra" scale le!el. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
. E&plain aout points and lines. . +rite +rite short notes on DDA algorithm. . E&plain aout line e2uations. . E&plain aout properties of circles. . E&plain aout properties of ellipse. Q. +rite +rite short notes on line width. *=. +rite +rite a short note on st"les of fill attriutes. SECTION C *. +ith procedure e&plain the BresenhamYs line drawing algorithm. +. E&plain riefl" aout circle generating algorithm. @. Briefl" discuss the midpoint ellipse algorithm. . Descrie aout area fill attriutes. . E&plain E&plain riefl" riefl" aout DDA line drawing drawing algorithm. algorithm.
. Discuss riefl" the character attriutes. . E&plain the ellipse generating algorithm. . Discuss the midpoint circle algorithm in detail. Q. E&plain riefl" aout properties of circle and ellipse generating a lgorithm. *=. E&plain riefl" aout line attriutes.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
UNIT-II #D Geometr Geometric ic $rans $ransfor format mation ions: s: Basic Basic $rans $ransfor format mation ionss – %atri& %atri& 'eprese 'epresenta ntatio tions ns – Composite Composite $ransforma $ransformations tions – (ther $ransfor $ransformati mations. ons. #D )iewing: )iewing: $he )iewing )iewing Pipeline – )iewing Co-ordinate 'eference *rame – +indow-to-)iewport Co-ordinate $ransformation - #D )iewing )iewing *unctions – Clipping (perations. 9%,L$%EDA 9%,L$%EDA – ,/$ 5 ) ^)
T(O DIMENSIONAL TRANSORMATIONS INTRODUCTION $ransformations are a fundamental part of computer graphics. $ransformations are used to position o6ects5 to shape o6ects5 to change !iewing positions5 and e!en to change how something is !iewed. $here are U main t"pes of transformations that one can perform in # dimensions. • • • •
$ranslations caling 'otation hearing
BASIC TRANSORMATION • •
translation. rotation. scaling.
*.Tr'$s0'tio$ Y P*
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$
P
t is applied to an o6ect " repositioning it along a straight line from one coordinate location to another. +e transla translate te a #-D point point " adding adding transla translati tion on distances distances55 t& ^ t" coordinate position 9&5 " to mo!e the point to a new position 9&Y5 "Y.
to the origin original al
, 5 , 7t, ) 5 ) 7 t). $he translation distance pair 9t& 5 t" is called a
Tr'$s0'tio$ Tr'$s0'tio$ ve&tor ve &tor or S3it ve&tor.
$rans $ranslat lation ion e2uati e2uations ons as a single single matri& matri& e2uati e2uations ons " column column !ector !ectorss repres represent ent the coordinates:
P 5 P 7T. ----------------------------------- ---------- 1*2
+here P5
: P 5
:T5
n terms of coordinate row !ectors : P@
^$@
$ranslation is a Ri/i%-bo%) tr'$sorm'tio$ that mo!es o6ect without deformation. •
•
•
A straight-line straight-line segment is translated translated " appl"ing appl"ing the transforma transformation tion e2uation 93 to each of the line endpoints and redraws the line etween the new endpoint positions. Pol"gons are translated " adding the translating !ector to the coordinate position of each !erte& and regenerating the pol"gons using the new set of !erte& coordinates. $o change the position of a circle or ellipse we translate the center coordinates and redraw the figure in the new location.
f t&5 t" !alue is higher than the width !alue then there will e an error F(r'p'rou$%.
+. Rot'tio$ A #-D rotation is applied to an o6ect " repositioning it along a circular path in the _? plane.
P*
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
= Y*
p
_3 A #-D rotation is applied to an o6ect " repositioning it along a circular path in the _? plane. $o generate a rotation specif" a rot'tio$ poi$t 1or2 pivot poi$t aout which the o6ect is to e rotated. Positi!e !alues for rotation angle define countercloc0wise rotation aout the pi!ot point. /egati!e !alues rotate o6ect in the cloc0wise direction. $his transformation can also e descried as a rotation aout a rotation a&is that is perpendicular to the _? plane and passes through the pi!ot point.
T3e tr'$sorm'tio$ eu'tio$ or rot'tio$ o ' poi$t positio$ P ?3e$ t3e pivot poi$t is 't t3e &oor%i$'te ori/i$4
9&Y5"Y r
r `
9&5"
*igure shows the angular and coordinate relationships of the original and transformed point positions: • • •
n the figure r is the constant distance of the point from the origin. Angle ` is the original angular position of the point from the hori1ontal. b is the rotation angle.
B" using the trigonometric identities
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
cos b @
sin b
@
tan b @ _ @ r cos `------------------9 `------------------93 3 ? @ r sin ` -------------------9# -------------------9# _Y @ r cos 9` b----------9; ?Y @ r sin 9` b ----------9U
Rot'tio$ o ' poi$t 'bout '$ 'rbitr'r) pivot positio$
9&Y5"Y r
r `
9&5"
(6ects (6ects can e rotated aout an aritrar" aritrar" point " modif"ing modif"ing the e2uation e2uation 98 to include the coordinates 9 &r 5 "r for the selected rotation point. $he $he tran transf sfor orma mati tion on e2ua e2uati tion onss for for the the rota rotate ted d coor coordi dina nate tess are are ota otain ined ed " the the trigonometric relationship. _Y @ &r 9& - &r cosb – 9"-"r sinb ?Y @ "r 9& – &r sinb 9 " – "r cosb E!er" point on an o6ect is rotated through the same angle.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
@. S&'0i$/ • •
caling is used to alter the si1e of an o6ect imple #D scaling is performed " multipl"ing o6ect positions 9&5 " " scaling factors s& and s" &Y @ & s& "Y @ " s&
or P 5 SP •
An" positi!e !alue can e used as scaling factor • )alues )alues less than 3 reduce the si1e of the o6ect • )alues )alues greater than 3 enlarge the o6ect • f scaling factor is 3 then the o6ect sta"s unchanged • f s& @ s" 5 we call it uniform scaling • f scaling factor M35 then the o6ect mo!es closer to the origin and f scaling factor J35 then the o6ect mo!es farther from the origin &Y
•
&
#D caling • +e can control the location of the scaled o6ect " choosing a position called the
i,e% poi$t 1, :) :) 2
•
&Y – &f @ @ 9& – &f s& "Y – "f @ @ 9" – "f s" &Y@& s& &f 93 – s& "Y@" s" "f 93 – s" Pol"gons are scaled " appl"ing the ao!e formula to each !erte&5 then regenerating the pol"gon using the transformed !ertices
MATRI" MATRI" REPRESENTA RE PRESENTATION TION O HOMOGENEOUS COORDINATES +e ha!e seen that asic transformations can e e&pressed in matri& form. But man" graphic application in!ol!e se2uences of geometric transformations. 4ence we need a general form of matri& to to represent such transformations. $his $his can e e&pressed as:
P*5M*.P7M+ Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
+here
P and P! and P! - represent represent the row !ectors. " - is a # " # arra" containing multiplicati!e factors. " $ - is a # element row matri& containing translation terms.
+e can comine multiplicati!e and translational terms for #D geometric transformations into a single matri& representation " e&panding the # " # matri& representations to ; " ; matric matrices. es. $his $his allows allows us to e&press e&press all transf transform ormati ation on e2uati e2uations ons as matri& matri& multip multiplic licati ations ons55 pro!iding that we also e&pand the matri& representations for coordinate positions. $o $o e&press an" #D transformations as a matri& multiplication5 we represent each Cartesian coordinate position %x,y& with the 3omo/e$eous&oor%i$'te triple%x triple%xh ,y ,yh ,h&, ,h&, such that
$hus5 a general homogeneous homogeneous coordinate coordinate representati representation on can also e written written as %hx, hy, h& *or h& *or #D geometric transformations5 we can choose the homogeneous parameter h to an" non1ero !alue. $hus5 there is an infinite numer of e2ui!alent homogeneous representations for each coor coordi dinat natee poin pointt %x,y&. %x,y&. A con!e con!eni nien entt choi choice ce is simp simpl" l" to h=. h=. Each Each #D posi positi tion on is then then represented with homogeneous coordinates %x,y,&. %x,y,&. (ther !alues for parameter h are needed5 for eg5 in matri& formulations of ;D !iewing transformations. E&pressing positions in homogeneous coordinates allows us to represent all geometric transformat transformation ion e2uations e2uations as matri& matri& multiplicat multiplications. ions. Coordinates are represented represented with three element row !ectors and transformation operations are written as ; " ; matrices.
*or Tr'$s0'tio$: we ha!e
(r
P @ T9t&5t"P
imilarl" for Rot'tio$ transformation5 we ha!e
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
or
P @ R 9 9 P *inall" for S&'0i$/ transformation5 we ha!e
or
P @ S9s&5s"P
MATRI"9!ECTOR MATRI"9!ECTOR REPRESENTATION REPRESENTATION O TRANSLATIONS •
•
+e can setup a se2uence of transformations as a composite transformation matri& " calculating the product of the indi!idual transformations PY@%#%3P
PY@%P
Tr'$s0'tio$s App0) t?o su&&essive tr'$s0'tio$s: T* '$% T+
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
+here P and P3are are repr repres esen ente ted d as homogeneous coordinates column !ectors .so the composite matri& form of two dimensional transformation is
Or
Rot'tio$s •
$wo $wo successi!e rotations5 ' 3 and ' # into a point P
•
%ultipl" two rotation matrices to get composite transformation matri&
Compo Composi site te twotwo-dim dimens ensio ional nal scal scalin ing g
Ge$er'0 t?o-%ime$sio$'0 Pivot-poi$t rot'tio$ Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia • •
Graphics pac0age pro!ide onl" origin rotation Perform a translate-rotate-translate se2uence • $ranslate the o6ect to mo!e pi!ot-point position to origin • 'otate the o6ect • $ranslate the o6ect ac0 to the original position
E,'mp0e o pivot-poi$t rot'tio$
$he 'otation matri& for this euation euation is e&pressed as
•
Composite matri& in coordinates form
i,e%-poi$t s&'0i$/ Perform a translate-scaling-translate se2uence • $ranslate the o6ect to mo!e fi&ed-point position to origin • cale the o6ect with respect to the coordinate origin • ,se in!erse of translation in step 3 to return the o 6ect ac0 to the original position • Composite matri& in coordinates form.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Ge$er'0 s&'0i$/ %ire&tio$s • •
Perform a rotate-scaling-rotate se2uence Composite matri& in coordinates form
OTHER TRANSORMATION *. Re0e 0e&tio tio$ A reflection is a transformation that produces a mirror image of an o6ect. $he mirror image for #-D reflection is generated relati!e to an a&is of reflection " rotating the o6ect 3X7S aout the reflection a&is. 'eflection aout the line "@7 the &-a&is is accomplished with the transformation matri&
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$his transformation 0eeps &-!alues the same ut flips the " !alues of coordinate position. 'eflection aout the line &@7 the "-a&is is accomplished with the transformation matri&.
n this &-coordinates are flipped and " coordinates are same.
f we flip oth & and " coordinates of a point " reflecting relati!e to an a&is that is perpendicular to the &" plane and that through the coordinate origin. %atri& representation4
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
'eflection a&is as the diagonal line "@& the reflection matri& is
Steps *irst perform a cloc0wise rotation through a US angle which rotates the line "@& onto the &-a&is. /e&t perform a reflection with respect to the &-a&is. *inall" rotate the line "@& ac0 to its original position with a counter cloc0 wise rotation through US.
A$ot3er euiv'0e$t steps • •
*irst reflect the o6ect aout the &-a&is. $hen to rotate counter cloc0wise Z7S.
Tr'$sorm'tio$ Tr'$sorm'tio$ m'tri, or re0e&tio$ 'bout t3e %i'/o$'0 )5 -,.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Steps • • • • • •
Cloc0wise rotation " US 'eflection aout "-a&is. Counter cloc0wise rotation " US Another *ormat 'eflect aout "-a&is. 'otate Counter Cloc0wise Z7S.
+. S3e'r A transformation that distorts the shape of an o6ect such that the transformed shape appears as if the o6ect were composed of internal la"ers that had een caused to slide o!er each other is called a SHEAER.
A ,-%ire&tio$ s3e'r re0'tive to t3e ,-',is4
_ !alue is changed ^ " !alue remains same.
A )-%ire&tio$ )-%ire&tio$ s3e'r re0'tive to t3e t 3e 0i$e )-',is4 Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
? !alue is changed ^ & !alue remains constant.
THE !IE(ING PIPELINE •
+indow • •
•
A world-coordinate area selected for displa". defines what is is to e !iewed
)iewport An area on a displa" de!ice to which a window is mapped. • defines where it where it is to e displa"ed )iewing )iewing transformation • $he mapping of a part of a world-coordinate scene to de!ice coordinates. • A window could e a rectangle to ha!e an" orientation. A window could e a rectangle to ha!e an" orientation. •
•
T?o-Dime$sio$'0 !ie?i$/
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
!ie?i$/ Ee&ts Voomi$/ ee&ts
uccessi!el" uccessi!el" mapping mapping differ different-si ent-si1ed 1ed windows windows on on a fi&ed-si1e fi&ed-si1ed d !iewport !iewports. s.
%o!ing %o!ing a fi&edfi&ed-si1 si1ed ed windo window w across across the the !ariou !ariouss o6ect o6ectss in a scene scene..
)iewport )iewportss are are t"picall" t"picall" defined defined within within the unit unit s2uare s2uare 9normali1ed 9normali1ed coordinates coordinates
P'$$i$/ ee&ts
Devi&e i$%epe$%e$t
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
!IE(ING COORDINATE REERENCE RAME
$he refer reference ence fram framee for speci specif"i f"ing ng the world world-co -coord ordina inate te window window..
)iewin ewingg-co coor ordi dina nate te ori origi gin: n: P7 @ 9&75 "7
)iew )iew up up !ect !ector or ): ): Defi Define ne the the !ie !iewi wing ng "! direction
(INDO(-TO-!IE(PORT COORDINATE TRANSORMAT TRANSO RMATION ION f a coordinate position is at the center of the !iewing window5 it will e displa"ed at the center of the !iewport.
(i$%o?-To-! (i$%o?-To-!ie?port ie?port M'ppi$/
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
xv - xvmin
=
xvmax - xvmin
xw - xwmin xwmax -
xwmin
yv – yvmin
=
yvmax – yvmin
yw - ywmin ywmax -
ywmin
From these two equations we derived xv = xvmin + (xw – xwmin)sx yv = yvmin + (yw – ywmin)sy where the scaling factors are sx = xvmax – xvmin yvmax - yvmin
sy =
xwmax – xwmin ywmax - ywmin
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he se2uence of transformations are: 3. Perform Perform a scaling transforma transformation tion using using a fi&ed-point position position of 9&wmin5"wmin that scales the window area to the si1e of the !iewport. #. $ranslate the scaled window area to the position of the !iewport. •
'elati!e proportions of o6ects are maintained if the scaling factors are the same 9s& @ s". (therwise5 world o6ects will e stretched or contracted in either & or " direction when displa"ed on output de!ice.
•
4ow aout character strings when map to !iewport •
maintains a constant character si1e 9appl" when standard character fonts cannot e changed.
•
f character si1e can e changed5 then windowed will e applied li0e other primiti!es.
•
*or characters formed with line segments5 the mapping to !iewport is carried through se2uence of line transformations .
•
*rom normali1ed coordinates5 o6ect descriptions can e mapped to the !arious displa" de!ices
•
+hen mapping window-to-!iewport transformation is done to different de!ices from one normali1ed space5 it is called workstation transformation
T(O-DIMENSIONAL !IE(ING UNCTIONS • •
+e define a !iewing reference s"stem in a P4G application program with the following function: ev'0u'te!ie?Orie$ttio$M'tri, 1,O: y o , ,!: "i.error: vie?M'tri,0
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia •
where parameters &( and "o are the coordinates of the !iewing origm5 and parameters ,! and )! are the world-coordinate positions for the !iew up !ector. An integer error code is generated if the input parameters are in error otherwise5 the viem'tri, for the world-to-!iewing transformation is calculated. An" numer of !iewing transformation matrices can e defined in an application.$o set up the elements of a window-to-!iewport mapping matri&5 we in!o0e the function
ev'0u'te!ie?M'ppi$/M'tri,1,?mi$:,?m',:)?mi$:)?m',:,vmi$:,vm',:)v mi$:)vm',2 •
•
/e&t5 we can store cominations of !iewing and window-!iewport mappings for !arious wor0stations in a viruing tablr with
set!0e?Represe$t'tio$ 1?s: vie?I$%e,: vie?M'tr0,:vie?M'ppi$/M'tri,: ,&0ipmi$: ,&0ipm',: )&0ipmi$:)&0ipm',: &0ip,)2 where parameter ?s designates the output de!ice 9wor0station5 and parameter vie?I$%e, sets an integer identifier for this particular window-!iewport pair.
CLIPPING OPERATIONS • • •
Procedure that identifies the portions of a picture that are either inside or outside of a specified region of space is referred to as a clipping algorithm or clipping. $he region against which an o6ect is to clipped is called a clip window. Applications of clipping include e&tracting part of a defined scene for !iewing5 identif"ing !isile surfaces in ;-D !iews.
!ie?port &0ippi$/ •
t can can reduc reducee calcu calcula lati tion onss " allo allowi wing ng conca concate tena nati tion on of !iew !iewin ing g and and geometric transformation matrices.
T)pes T)pes o &0ippi$/ Poi$t &0ippi$/ Li$e &0ippi$/ Are' 1Po0)/o$2 &0ippi$/ Curve &0ippi$/ Te,t &0ippi$/ Poi$t &0ippi$/ 1Re&t'$/u0'r &0ip ?i$%o?2 Li$e C0ippi$/ •
Possile relationships etween line positions and a standard rectangular clipping region.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
•
Possile relationships •
•
•
Completel" inside the clipping window • Completel" outside the window • Partiall" inside the window Parametric representation of a line • & @ &3 u9 - &3 • " @ "3 u9"# - "3 $he !alue of u for an intersection with a rectangle oundar" edge • (utside the range 7 to 3 • +ithin the range from 7 to 3
Co3e$-Sut3er0'$% Li$e C0ippi$/ •
'egion code • •
•
/umering the it positions in the region code as 3 through U from right to left. .
Cur!e clipping •
•
A four-digit four-digit inar" code assigned to e!er" line endpoint in a picture.
,se ounding rectangle to test for o!erlap o! erlap with a rectangular clip window.
$e&t $e&t clipping
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia •
All-or-none string-clipping
•
All-or-none character-clipping
UNIT-II
UESTIONS SECTION A *. $he translation distance pair 9 t& 5 t" is called as ]]]]]]]]]]. #.
]]]]]]]]]] ]]]]]]]]]] transfor transformatio mation n that mo!es mo!es o6ects o6ects without without deform deformation. ation.
@. . . . .
'otation point is also called as ]]]]]]]]]]. ,ne2ual !alues of s& and s" results ]]]]]]]]]]]. ]]]]]]]]]]coordinate is used in mathematics to refer the effect of Cartesian e2uation. ]]]]]]]]]]coordinate is used in mathematics to refer the effect of Cartesian e2uation. A two dimensional scene is selected for displa" is called a ]]]]]]]]]. X. +indowin +indowing g transfor transformati mation on is also called called as ]]]]]]]]]. ]]]]]]]]].
Z. )iewi )iewing ng window window is also also called called as]]]] as]]]]]]]] ]]]]]]. ]].
*=. ]]]]]]]]is the inar" region code window ased on clipping rectangle.
SECTION B
3. Descri Descrie e the refle reflecti ction on transf transform ormati ation. on. +. List the t"pes of clipping and e&plain point clipping. @. E&plain the matri& representation of #D !iewing. . E&plain the !iewing coordinate reference frame. . Define linear transformation and define their properties. . Gi!e the matri& representation of rotation and scaling. 8. E&plai E&plain n the concept concept of of other other trans transfor format mation ion..
. +rite +rite short notes on windowing transformation. Q. E&plain te&t clipping riefl" riefl".. *=. E&plain aout !iewing transformation.
SECTION C *. E&plain riefl" aout composite co mposite transformation. +. Discuss in detail aout window to !iewport transformation. @. E&plain in detail aout !arious transformations. . Define clipping and descrie the clipping operation in detail . E&plain when utherland line clipping algorithm a lgorithm in detail. . E&plain the #D transformation in detail. . E&plain riefl" aout two-dimensional rotation. . Discuss riefl" aout pi!ot point rotation and fi&ed point scaling. Q. Discuss riefl" aout shear transformation. *=. E&plain aout two dimensional !iewing pipelines.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
UNIT-III $e&t: $e&t: $"pes $"pes of $e&t – ,nicode tandard – *ont – nsertion of $e&t – $e&t $e&t compression – *ile formats. mage: mage $"pes $"pes – eeing Color – Color %odels – Basic teps for mage Processing – canner – Digital Camera – nterface tandards – pecification of Digital mages – C% – De!ice ndependent Color %odels – mage Processing software – *ile *ormats – mage (utput on %onitor and Printer.
INTRODUCTION TO MULTIMEDIA Aims '$% Obe&tives n this lesson we will learn the preliminar" concepts of %ultimedia. +e will discuss the !arious enefits and applications of multimedia. After going through this chapter the reader will e ale to : • • • •
define multimedia list the elements of multimedia enumerate the different applications of multimedia descrie the different stages of multimedia software de!elopment
I$tro%u&tio$ %ultimedia has ecome an ine!itale part of an" presentation. t has found a !ariet" of applications right from entertainment to education. $he e!olution of internet has also increased the demand for multimedia content.
Dei$itio$ Mu0time%i' is the media that uses multiple forms of information content and information processing 9e.g. te&t5 audio5 graphics5 animation5 !ideo5 interacti!it" to inform or entertain the user. 'ultimedia user. 'ultimedia also refers to the use of electronic media to store and e&perience multimedia content. %ultimedia is similar to traditional mi&ed media in fine art5 ut with a roader scope. $he term Orich mediaO is s"non"mous for interacti!e multimedia.
E0eme$ts o Mu0time%i' S)stem Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
%ultimedia means that computer information can e represented through audio5graphics5 image5 !ideo and animation in addition to traditional media9te&t and graphics.4"permedia can e considered as one t"pe of particular multimedia application.
Mu0time%i' is ' &ombi$'tio$ o &o$te$t orms Audio5 )ideo
App0i&'tio$s o Mu0time%i' %ult %ultim imedi ediaa find findss its its appl applic icat atio ion n in !ario !arious us area areass incl includ udin ing5 g5 ut ut not not limi limite ted d to5 to5 ad!ertisem ad!ertisements5 ents5 art5 education5 education5 entertainme entertainment5 nt5 engineering5 engineering5 medicine5 medicine5 mathematic mathematics5 s5 usiness5 usiness5 scientific research and spatial5 temporal applications. A few application areas of multimedia are listed elow:
Cre'tive i$%ustries Commer&i'0 E$tert'i$me$t '$% i$e Arts %ultimedia applications that allow users to acti!el" participate instead of 6ust sitting " as passi!e recipients of information are called (nteractive called (nteractive 'ultimedia. 'ultimedia.
E%u&'tio$ E$/i$eeri$/ I$%ustr) M't3em'ti&'0 '$% S&ie$tii& Rese'r&3 Me%i&i$e Mu0time%i' i$ Pub0i& P0'&es
TE"T E!er since the inception inception of human ci!ili1ation ci!ili1ation ideas ha!e een largel" articulated articulated using the written mode. $he fle&iilit" and ease of use of the te&tual medium ma0es it ideal for learni learning. ng. +ord proces processin sing g program programss emerge emerged d as one the earlie earliest st applica applicatio tion n program programs. s. n multimedia presentations5 te&t can e comined with other media in a powerful wa" to present information and e&press moods.$e&t can e of !arious t"pes.
P0'i$ Te,t t consisting of fi&ed si1e characters ha!ing essentiall" the same t"pe of appearance.
orm'tte% Te,t +here appearance can e changed using font parameters.
H)per0i$8 +hich can ser!e to lin0 different electronic documents and enale the user to 6ump from one to the other in a non-linear wa". nternall" te&t is represented !ia inar" codes as per the ASCII t'b0e. $he AC tale is howe!er 2uite limited in its scope and a new standard has een Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
de!el de!elope oped d to e!en e!entu tual all" l" repl replac acee the the AC C stand standar ard. d. $his $his stan standar dard d is call called ed the the U$i&o%e st'$ st'$%' %'r% r% and is capale capale of repres represent enting ing intern internati ational onal charact characters ers from from !arious !arious languag languages es throughout the world. $e&t can e inserted into an application using !arious means. $he simplest wa" is directl" t"ping te&t into the application " using the 0e"oard alternati!el" te&t can e copied from another pre-e&isting file or application and pasted into the application. /owada"s we also generate te&t automaticall" from a scanned !ersion of a paper document or image using (ptical Character 'ecognition 9(C' software. +hen te&t is sa!ed onto the hard dis05 it can e compressed using !arious algorithms so as to reduce the file si1e. All algorithms howe!er wor0 in a lossless mode 9ie all information in the original file is maintained intact without loss of data in an"wa". Depending on how !arious !isual properties of te&t are stored and the compression scheme followed5 te&t can e stored into the numer of file formats each re2uiring its own specific application to open and modif" the contents.
TYPES O TE"T Essentiall" there are three t"pes of te&t that can e used to produce pages of a document. • • •
,nformatted te&t *ormatted te&t 4"perte&t
U$orm'tte% Te,t Te,t Also 0nown as plain te&t5 this comprise of fi&ed si1ed characters from a limited character ASCIII t'b0e t'b0e which is short for American tandard Code for set. set. $he charact character er set is called called ASCI nformation nterchange and is one of the most widel" used character sets. t asicall" consists of a tale where each character is represented " a uni2ue 8-it inar" code. $his means there are #8 or 3#X code words which can e used to identif" the characters. $he characters include a to 15 A to 5 7 to Z5 and other punctuation characters li0e parenthesis5 ampersand5 single and doule 2uotes5 mathematical operators etc. All the characters are of the same height. n addition to normal alphaetic5 numeric and punctuation characters collecti!el" called pri$t'b0e characters5 the AC characters set also includes a numer of &o$tro0 characters. $hes $hesee incl include ude B9B B9Bac ac0s 0spa pace ce5 5 L*9L L*9Lin inee feed feed55 C'9C C'9Car arri riage age retu return rn5 5 /,L9 /,L9/u /ull ll5 5 (49t (49tart art of headin heading5 g5 $_9t $_9tart art of te&t5 te&t5 E$_9En E$_9End d of te&t5 te&t5 E($9En E($9End d of transm transmis issio sion5 n5 E/9En E/9En2ui 2uir" r"55 AC<9A AC<9Ac0no c0nowle wledge dge55 BEL9Be BEL9Bell ll55 $AB9hori B9hori1ont 1ontal al ta5 ta5 )$9) )$9)ertical rtical ta5 ta5 **9*orm **9*orm feed5 feed5 (9hift (9hift out5 9shift 9shift in5 DLE9Data DLE9Data lin0 escape5 DC39de!ice control 35 DC#9De!ice control #5 /A<9/egati!e ac0nowledge5 ?/9"nchronous idle5 E$B9End of trans trans loc0 loc055 CA/9Ca CA/9Cancel ncel5 5 E%9End E%9End of medium medium5 5 ,B9u ,B9ust stitu itute te55 EC9Es EC9Escap cape5 e5 *9*il *9*ilee separator5 G9Group separator5 '9'ecord separator5 ,9unit separator
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
+hene!er characters included in the tale are re2uired to e stored or processed " a computer5 the corresponding numeric code is retrie!ed from the AC tale in inar" form and sustituted for the actual te&t for internal processing. $his includes oth the printale and control characters e&le: each line of te&t in a document is terminated " a linefeed character. Later as re2uirements increased an e&tended !ersion of AC tale was introduced e,te$%e% ASCII ASCII character set5 while the original tale came to e 0nown as 0now 0nown n as the e,te$%e% st'$%'r% ASCII set. $he e&tended set used an X- it representation and therefore had a pro!ision of #V characters. $he first 3#X characters were the same as the original character set5 now 0nown as the standard standard AC tale while the remaining codes were used to represent small simple graphical s"mols.
orm'tte% Te,t *ormatted te&ts are those where apart from the actual alphanumeric characters5 other control characters are used to change the appearance of the characters e&le: old5 underline5 italics5 !ar"ing shapes5 si1es and colors. %ost te&t processing software uses such formatting options to change te&t appearance. t is also e&tensi!el" used in the pulishing sector for the preparation of oo0s5 papers5 maga1ines5 6ournals and soon. n addition a !ariet" of document formatting options are supported to enale an author to structure a documents into chapters5 sections and paragraphs and with tales and graphics inserted at appropriate points. $he control characters used to format the te&t is application dependent and ma" !ar" from one pac0age to another e&le old appearance. •
H)perte,t
Documents pro!ide a method of transmitting information. 'eading a document is an act of reco recons nstr truc ucti ting ng 0nowl 0nowled edge. ge. A oo0 oo0 or an arti articl clee on paper paper has has a gi!e gi!en n stru struct cture ure and is Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
represented represented in a se2uential se2uential form. Although Although it is possile possile to read indi!idual paragraphs5 paragraphs5 without reading reading pre!io pre!ious us paragr paragraphs aphs55 author authorss mostl" mostl" assume assume se2uent se2uential ial readin reading. g. /o!els /o!els as well well as mo!ies alwa"s assume a pure se2uential reception. $echnical documentation 9e&le: manuals consists often of a collection of relati!el" independent information units. $here also e&ists man" cross- references in such documentation which leads to multiple multiple searches at different places for for the reader. A h"perte&t document can e used to handle such situations. $he term h"per is usuall" used to mean something e&cessi!e 9e"ond super e&le: h"per acti!e5 h"per tension etc. 4ere the term is used to mean certain e&tra capailities imparted to normal or standard te&t li0e normal te&t5 a h"perte&t document can e used to reconstruct 0nowledge through se2uential reading ut additionall" it can e used to lin0 multiple documents in such a wa" that the user can na!igate non-7 se2uentiall" from one document to the other for cross-references. $hese lin0s are called 3)per0i$8s. 4"perlin0s from one of the core structures in multimedia presentations5 ecause multimedia emphasi1es a non-linear mode of presentation. E&le: A multimedia tourist rochure can ha!e te&t information aout !arious places of interest5 with photographic images can ha!e !oice annotations aout how to get to those places and the modes of tra!el a!ailale5 !ideo clips of how tourists are tra!eling and the facilities pro!ided to them. All these information can e h"perlin0ed li0e a list of hotels at each place along with their changes. A tourist can ma0e use of a search facilit" to na!igate to the information regarding a specific place of interest and then use the h"perlin0s pro!ided to !iew each categor" of information. 4"perte&t is mostl" used on the +orld +orld +ide +e +e for lin0ing different we pages together and allowing the user to na!igate from one page to another. $o crate such documents the user uses commands of a h"perte&t language li0e 4$%L or G%L to specif" the lin0s. $"picall" h"perlin0s ta0e the form of an underlined te&t string and the user initiates the access and displa" of a particular document " pointing and clic0ing the mouse on the appropriate lin0. $he underlined te&t string on which the user clic0s the mouse is called an '$&3or and the document which opens as a result of clic0ing is called t'r/et %o&ume$t on the we target documents are specified " a specific nomenclature called we sites address technicall" 0nown as ,niform 'esource Locator or ,'L. E&le of h"perte&t:
No%e Or A$&3or $he anchor is the actual !isual element 9te&t which not onl" is associated with some meaning " itself ut also pro!ides an entr" point to another document. An important factor in designing an user interface is the concept of how the anchor can e represented properl". n most cases the appearance of the te&t is changed from the surrounding te&t to designate a h"perte&t5 e&le: " default it is colored lue with an underline. %oreo!er the mouse pointer changes to a finger icon when placed o!er a h"perte&t. $he user actuall" clic0s o!er the h"perte&t in order to acti!ate it and open a new document in the document !iewer. n some cases instead of te&t an anchor can e an image5 a !ideo or some other non-te&tual element. n such cases the term 3)perme%i' is more appropriate.
Poi$ter Or Li$8
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$hese pro!ide connection to other information information units 0nown as target target documents. documents. A lin0 has to e defined at the time of creating the h"perlin05 so that when the user clic0s on an anchor the appropriate appropriate target target document document can e fetched fetched and displa"ed. ,suall" some information information aout the target document should e a!ailale to the user efore clic0ing on the anchor. f the destination is a te&t document5 a short description of the content can e represented. in the case of an imag image5 e5 the the imag imagee cont conten entt can can appe appear ar in thum thumn nai aill form form on the the scre screen en.A .A !isu !isual al representation of the !ideo content can follow in the form of a mo!ing icon. f the content of the destination node consists of audio information a !isual representation of the audio content must follow. E&le n the case of a music passage a picture of the composer could e displa"ed.
UNICODE STANDARD $he ,nicode standard is a new uni!ersal character coding scheme for written characters and te&t .t defines a consistent wa" of encoding multilingual te&t which enales te&tual data to e e&changed uni!ersall". $he ,nicode standard goes far e"ond ACY limited more than 3 million characters.
%ultilingual support is pro!ided for European5 %iddle Eastern and Asian languages. $he ,nicode consortium was incorporated in 3ZZ3 to promote the ,nicode standard. $he ,nicode $echnical Committee 9,$C is the wor0ing group within the consortium responsile for the creation5 creation5 maintenance5 maintenance5 and 2ualit" 2ualit" of the ,nicode standard standard $he ,nicode ,nicode standard draws draws a distin distincti ction on etween etween charact characters ers55 which which are the smalle smallest st compone component nt of writt written en languag languagee and Gl"phs5 which represents the shapes5 the characters can ha!e when displa"ed. $he ,nicode standard deals onl" with character codes5 representation of the gl"phs are not part of the standard. $hese are to e dealt with " the font !endors and hardware !endors. A font and its rendering rendering process define define a mapping from the ,nicode ,nicode !alues to gl"phs. E&le: E&le: the 4indi character PaY is represented " the ,nicode se2uence 77773773773737379, 7Z#A5 how it will e rendered on the screen will e d ecided " the font !endor. $he first "te represents the language area while the ne&t "te represents the actual character. ome of the languages and their correspondi corresponding ng codes are: Latin 977 5 Gree097; 5 Araic97V5 Araic97V5 De!anagiri De!anagiri Bengali Bengali 97Z 5 (ri"a $amiZl 97 etc. $he ,nicode consortium ased in California o!erloo0s the de!elopment of the standard. %emers include ma6or software and hardware !endors li0e Apple5 Adoe5 B%5 %icrosoft 4P5 etc. $he consortium first pulished pulished in the ,nicode standard 3.7 in 3ZZ3. the latest !ersion !ersion is U.3 released in #77. $he ,nicode !ersion ;.7 is identical to the ( standard 37VUV. e!eral methods ha!e een suggested to implement ,nicode ased on !ariations in storage space and compatiili compatiilit" t".. $he mapping methods are called ,nicode $ransfor $ransformati mation on *ormats 9,$* and ,ni!ersal Character et 9,C
ONT o$t Appe'r'$&e $he appearance of each character in case of formatted te&t is determined " specif"ing what a font name. *ont name refers to font files which contain the actual description of the Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
character appears on the windows platform font files are stored in specific folder called fonts e&tor orm't me'$i$/ t3't character under under the windows windows folder folder.. $hese files are usuall usuall" " in !e&tor descriptions are stored mathematicall". $his is useful ecause characters ma" need to e scaled to !arious heights and mathematical descriptions can easil" handle such !ariations without degrading the appearance of characters. +indows call these fonts as true t)pes fonts ecause their appearance sta"s the same on different de!ices li0e monitors5 printers and plotters5 and the" ha!e a file e&tension of $$*.An altern alternati ati!e !e form of font font files files is the bitm'p orm't where each character is descried as a collection of pi&els.
E,'mp0es O De'u0t 1Upper Ro?2 A$% Do?$0o'%e% 1Lo?er Ro?2 o$ts $imes $imes 'oman Arial5 Arial5 Centur" Gothic5 Gothic5 )erdana5 Courier Courier /ew5 /ew5 ABADD(/ ABADD(/ AE'( AE'( A),E$5 Cassandra5 *A<$(. ome of the standard font t"pes included with the windows ( pac0age shown in upper row. (ther than theses there are thousands of font t"pes made " !arious organi1ations and man" of them are freel" downloada downloadale le o!er the nternet. nternet. Each application application has a default font font name associated with it. +hen a specific font re2uested " the user is not a!ailale in the s"stem5 then the default font is used which is assumed to e alwa"s a!ailale.
ome software application pac0ages allow font files to e emedded within them so that when a presentation file crated using that pac0age is shown on a target s"stem which does not ha!e the re2uisite font files5 and then the emedded fonts are used instead. ome e&les of downloadale fonts are shown in lower row.
ONT STYLE AND SIVE *ont characters ha!e a numer of si1es. i1e is usuall" specified in a unit called point 9pt where 3 point e2ual 38# of an inch. ometimes the si1e ma" also e specified in pi&els. tandard characters in te&tual documents usuall" range from 37 to 3# pts in si1e5 while the upper limit ma" go well e"ond 377. pecified font t"pes can e displa"ed in a !ariet" of st"les. ome of the common st"les used used are: bo0%: italics 5 underli underline5 ne5 super super script and su su script . ome application pac0ages allow changing the hori1ontal gap etween the characters called 8er$i$/ and the !ertical gap etween two lines of te&t called 0e'%i$/. ome pac0ages allow a numer of special effects on te&t to ma0e it more dramatic5 interesting and fun. $his includes changing the appearance in a !ariet" of wa"s li0e ending5 slanting5 warping5 rotating5 adding shadows and ;D effects etc5 other wa"s of manipulating te&t include animations li0e scrolling 5 fading5 changing colors 5 adding sound effects etc.
INSERTION O TE"T $e&t can e inserted in a document using !ariet" of methods. $hese are
USING A #EY BOARD Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he most common process of inserting te&t in to a digital document is " t"ping the te&t using an input de!ice li0e the 0e"oard. 0e"oard. ,suall" ,suall" a te&t editing editing software5 software5 li0e %icrosoft %icrosoft word5 is used to control the appearance of te&t which allows the user to manipulate !ariales li0e the font5 font5 si1e5 si1e5 st"le5 st"le5 color color etc. etc. ome ome image image proces processin sing g and multim multimedi ediaa authori authoring ng softwa software re pro!ide a separate te&t editing window where the user can t"pe te&t and integrate it with the rest of the media li0e ac0ground images.
COPYING AND PASTING Another wa" of inserting te&t in to a document is " cop"ing te&t from a pre- e&isting digital document. $he e&isting document is opened using the corresponding te&t processing program and portions of the te&t ma" e selected " using the 0e" oard or mouse. ,sing the &op) command the selected te&t is copied to the clipoard. $his te&t can then e inserted in to another e&isting document or a new document or e!en in another place of the same document " choosing the p'ste command5 where upon the te&t is copied from the clipoard in to the target document. $his te&t can then e edited as per the userYs re2uirements.
USING AN OCR SOT(ARE A third wa" of inserting te&t in to digital documents is " scanning it from a paper documents. $he te&t in a paper document including oo0s5 newspaper5 maga1ines5 letter heads etc can e con!erted in to the electronics form using a de!ice de! ice called the scanner.
$he electronic representation of the paper document can then e sa!ed as a file on the hard dis0 of the computer. $he scanned file will howe!er e an image file in which the te&t will e present as part of an image and will not e editale in a te&t processors. $o e ale to edit the te&t5 it needs to e con!erted from the image format in to the editale te&t format using software called (ptical Character 'ecognition 9(C' software. $he (C' software traditionall" wor0s " a method called pattern matching. 4ere the software tries to match each and e!er" scanned character to a alread" stored definitions of characters within the software. *or e!er" match found5 the software represents the character as an editale te&t o6ects instead of an image o6ect. $his process is howe!er largel" dependant on the appearance of the characters for finding an ade2uate match and thus on the specific fonts. ome of the standard fonts ma" e con!erted with appreciale accurac" while other fonts ma" not e recogni1ed. $he $he con!e con!ers rsio ion n proce process ss is also also depe dependa ndant nt upon upon the the 2ual 2ualit it" " of the the scan scanne ned d paper paper document and on the 2ualit" of the (C' software. f the letters on the scanned page are clearl" !isile and in a standard font5 then using a good 2ualit" (C' software. (ne ma" e&pects to con!ert most of the characters although no software can guarantee 377\ accurac" in con!ersion5 research on (C' is ased on another technolog" called e'ture e,tr'&tio$.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
,sing this method the software attempts to e&tract the core features of the characters and compare them to a tale stored within itself for recognition. t is elie!ed that if it can e done accuratel" enough5 it will ma0e the recognition process independent of the appearance or font of characters ecause the core set of features will remain same in an" font representation. e&le: if the software algorithm can e&tract the line5 the circle5 and the arc in the positions shown elow5 it will recogni1e the character to e aY whate!er the actual shape.
TE"T COMPRESSION Large te&t documents co!ering a numer of pages ma" ta0e a lot of dis0 space. +e can appl" compression algorithms to reduce the si1e of then te&t file during storage. A re!erse algorithms must e applied to decompress the file efore it contents can e displa"ed on screen. 4owe!er to e meaningful5 the compression – decompression process must not change the te&tual content in an"wa"5 not e!en a single character. $here are two t"pes of compression methods that are applied to te&t as e&plained.
Hum'$&o%i$/ $his t"pe of coding is intended for applications in which the te&t to e compressed has 0nown characteristics in terms of the occurrences. ,sing the information5 instead of using fi&ed length code words5 an optimum set of !ariale – lengths code words is deri!ed such that the shortest codeword is used to represent the most fre2uentl" occurring characters. $his approach is called Hum'$ &o%i$/.
Lempe0 Viv 1L2 Co%i$/ n the second approach followed " the Lempel – 1i! 9L method5 instead of using a single character as a asis of the coding operation a string of characters is used. E&le: a tale containing all the possile words that occur in a te&t document is held " oth the encoder and decoder. As As each word occurs in the te&t5 instead of representing the te&t as AC characters5 the encoders stores onl" the inde& of where the word in the tale. $he decoder con!erts the inde& in to the appropriate words from the tale. $hus the tale is used as a dictionar"5 and the L algorithm is also 0nown as dictionar" ased algorithm.
Lempe0 Viv (e0s3 (e0s3 1L?2 Co%i$/ Co %i$/ %ost word processing pac0ages ha!e a dictionar" associated with them which is used for oth spell chec0ing and compression of te&t. $"picall" the" contain in the region of #777 words and hence5 3 its 9#3 @ ;#8VX are re2uired to encoding the inde&. $o encode the word compression with such as scheme would re2uire onl" 3 its instead of 888 its with 8 it AC code words. $he ao!e method ma" not howe!er howe!er produce produce efficient efficient result result for documents documents with a small su6ect of words in the dictionar". 4ence the !ariations of the ao!e algorithm called Lempel-1i! welsh 9L+ method allows the dictionar" to e uilt up d"namicall" " the encoder and decoder for the document under processing. $he dictionar" ecomes a etter match for a specific document than a standard dictionar".
ILE ORMATS Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he following te&t formats are usuall" used for te&tual documents.
T,t 1Te,t2 ,nform ,nformatt atted ed te&t te&t documen documentt create created d " an editor editor 0i0e note note pad on those those platfo platform. rm. ,nform ,nformatt atted ed te&t te&t documen documentt can e used used to transf transfer er te&tua te&tuall inform informati ation on etwee etween n diffe differen rentt platform li0e windows D( and ,/_. $he data is encoded using AC codes ut sometimes ,nicode encodings li0e ,$* – X or ,$* – 3V ma" e used.
Do& 1Do&ume$t2 De!eloped " %icrosoft as a nati!e format for storing documents created " the ms word pac0age. Contains a rich set of formatting capailities . ince it re2uire propert" software software it is not considered a document e&change format.
Rt1Ri&3 Te,t orm't2 De!eloped " %icrosoft in 3ZX8 for cross platform document e&changes . it is the default format for %ac ( _Ys default editor test edit. $he word pad editor earlier created '$* '$* files " the default although now it has switched to the D(C format '$* control codes are human readale 5 similar to 4$%L code. E&le this is 9 old te&t par a new paragraph egins.
P% 1Port'b0e Do&ume$t orm't2 De!eloped " adoe s"stems for cross platform e&change of documents. n addition to te&t the format also support images in graphics PD* is an open standard and an" one ma0e write programs that can read and write PD* s without an" an " associated ro"alt" charges.PD* readers can e downloaded for free from adoe site and there are se!eral free open source readers a!ailale. E&le _ PD* 9http+++.foolas 9http+++.foolas .com & PD*5 PD* 9http: www. Purl.orgnetGpdf5 Purl.orgnetGpdf5 )iew )iew PD* 9httpmac.wms-networ0.degnustepimage apps !iew PD* !iew pdf.html
Ps1Post S&ript2 Post script is a page description language used mainl" for des0top pulishing. A page description language is a high le!el language that can descrie the contents of a page such that it can e accuratel" displa"ed on output de!ices usuall" a printer. Post script was de!eloped in 3ZX and soon ecame the ideal choice for graphical output for printing applications. n the same "ear apple laser writer was the first printer to ship with post script prior to post script5 then printing graphics on a Dot matri& printer5 the graphics had to e interpreted " the computer co mputer and then sent as a series of instructions to the printer to reproduce it . $hese printer control languages !aried from printer to printer. Post script offered a uni!ersal language that could use for an" rand of printer .Post script represent all graphics and e!ents te&t as !ectors5 9ie as comination of lines and cur!es.A post script compatile program con!erted a input document in to the P format5 which is sent to e printer.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
A post script interpret a inside the printer con!erted the !ectors ac0 in to the raster dots to e printed. $hese allow aritrar" sealing5 rotating and other transformations.
IMAGE After te&t the ne&t element that comes under the pre!iew of multimedia are pictures. A picture eing worth a thousand wordsY can e made to import large amount of information in a compact wa". t is a fact that most people disli0e going through pages of te&t especiall" on a computer screen5 and so it has een the endea!or of most multimedia de!elopers to supplement words with picture in presentation. $he pictures that we see in our e!er"da" life can e roadl" classified into two groups those that depict some real world situation t"picall" captured " a camera and those that ha!e een drawn or painted and can depict an" fictitious scenario. $he first of pictures are called images and the second t"pes are called graphics. mages can either e pure lac0 and white or gre" scale ha!ing a numer of gre" shades or color containing a numer of color shades. Color is a sensation that light of different fre2uencies generates generates on our e"es5 the higher fre2uencies fre2uencies producing producing the lue end and the lower fre2uencies fre2uencies producing red end of the !isile spectrum. An o6ect appears to ha!e a certain color ecause it oser!es the other color components from white light and reflects onl" light of fre2uencies specific to that c olor to our e"es. $o recogni1e and communicate color information we need to ha!e color models. Color models help us e&press color information in terms of numerical !alue. Generall" color models definite a set of primar" color and other colors are e&pressed as !arious cominations of the primaries. $o most well 0nown color models are the 'BG models used for colored lights li0e images on a monitor monitor screen and the C%?< model used for colored colored in0s li0e images printed printed on paper.
$he first one defines the color red5 green and lue as primar" colors while the second one defines the colors c"an5 magenta and "ellow as the primaries. $he colors used in these models are are howe howe!er !er depen dependen dentt on the the ph"si ph"sical cal prop propert ertie iess of de!ic de!ices es whic which h gene genera rate te them them.. Eg: Eg: Ph"sicalchemical properties of C'$ 9Cathode 'a" $ue and are therefore referred to as de!ice dependent color models. De!ice independent color models also e&ist and are ased on the human perception of color rather than the de!ice properties. (ne of the most well 0nown independent color model is 4B model where the primaries are hue5 saturation and rightness. $he total range of color model model is 0nown 0nown as as gamu gamut. t. Differ Different ent color color models models ma" ha!e diffe differen rentt gamutYs gamutYs indi indicati cating ng that it ma" not alwa"s e possile to accuratel" con!ert colors from one model to another. mage processing in!ol!es three stages5 input5 editing and output. $he input stage deals with the issues of con!erting hardcop" paper images into electronic !ersions. $his is usuall" done !ia a de!ice called the scanner. A numer of electronic sensors within the scanner within the scanner each con!ert a small portion of the original image into Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
pi&els and store them as inar" numers within the storage de!ice of a computer. +hile scanner is used to digitali1e documents5 another de!ice called the digital camera can con!ert real world scene into a digital image. image. Digital Digital cameras also also contain a numer of these electronic electronic sensors sensors which are 0nown as Charged Coupled De!ice 9CCD and essentiall" operate on the same principle as scanner. (nce a digital !ersion !ersion of a image is generated5 an editing software is used to manipulate the image in !arious wa".
IMAGE TYPE mage that we see in our e!er"da" li!es can e categori1ed into !arious t"pes.
H'r%&op) !s Sot Cop) $he t"pical image that we usuall" come across are the pictures that ha!e een printed on paper or some other 0inds of surfaces li0e plastic5 cloth5 wood etc5 these are also called hardcop" hardcop " images ecause the" ha!e een printed on solid surfaces. ometimes images are also seen in electronic forms on the $) screen or computer monitor. uch images ha!e een transformed from hard cop" images or real o6ects into the electronic form using speciali1ed procedures and are referred to as softcop" images. •
Co$ti$ious To$e: H'0-To$e H'0-To$e A$% Bito$e
Photographs are also 0nown as continuous tone image ecause the" are usuall" composed of a large numer of !ar"ing tones or shades of colors. ometimes due to limitations of the displa" displa" or printing de!ices5 all the colors of a photograph photograph cannot e represented represented ade2uatel" ade2uatel".. n those cases a suset of the total numer of colors are displa"ed. uch images are called partial tone or half tone images. Photographic representation in a news paper is e&les where the" appeared to e made up of colored dots. 4ere ecause the printing press is unale to print a large numer of colors5 the photographs are ro0en down into discrete dots containing some of the mostl" used original colors of the original photograph. A third categor" of image is called itonal images5 which uses onl" two colors5 t"picall" lac0 and white. And do not no t use an" shades of o f gre". $hese t"pes of images are mostl" used for special effect.
SEEING COLOR Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he phenomenon of the seeing color is dependent on a triad of factors: the nature of light5 the interaction of light and matter and the ph"siolog" of human !ision. Each factor pla"s a !ital part and the asence of an" one would ma0e seeing color impossile. Light is a form of energ" 0nown as electromagnetic radiation. Electromagnetic radiation consists of a large numer of wa!es with !ar"ing fre2uencies and wa!elengths. At one e&treme are the radio wa!es ha!ing the longest wa!elength 9se!eral 0ilometers and at the other e&treme are the gamma ra"s with the shortest wa!elength 97.3 nanometers out of the total electromagnetic spectrum a small range of wa!eYs causeYs sensations of light in our e"es. $his is called !isile spectrum of wa!es $he second part of the color triad is the human !ision. $he retina is the light sensiti!e part of the e"e and its surface is composed of photoreceptors or ner!e endings. $hese recei!e the light and pass it along through the optic ner!e as a stimulus to the rain. $he different fre2uencies gi!es raise to the different color sensations in our e"es. +ithin the !isile range shorter wa!elength gi!e rise to color li0e !iolet5 lue and green. +hile longer wa!elength produce "ellow5 orange and red. All the colors comine to produce white light. +hite light can e split into component color " passing it through a prism. $he third factor is the interaction of light with matter. +hene!er light wa!es stri0e an o6ect5 part of the light energ" get asored andor transmitted5 while the remaining parts gets reflected dec0 to our e"es. $he wa!elength presented in the reflected lights imparts a specific color to the o6ect from which the light is reflected. *or e&le a red all loo0s red ecause it asors all the other wa!elengths in white light and reflects ac0 onl" those wa!elengths which produce a red color sensation in our e"es. $ransmission ta0es place when light passes through an o6ect without eing essentiall" changed the o6ect in this case is said to e transparent. ome alterations do not ta0e place5 howe!er according to refracti!e inde& of the material through the light is transmitted. 'efracti!e nde& 9' is the ratio of speed of light in a !acuum 9i.e:5 space to the speed of light in a gi!en g i!en transparent material9eg5 air5 water5 gas. *or e.g.: $he ' of water is 3.777;. if light tra!els through space at 3XV777 miles per secon second5 d5 it tra!e tra!els ls thro throug ugh h air air at 3XZU 3XZUU U mile miless per per secon second d – a !er" !er" slig slight ht diff differ eren ence. ce. B" compa compari riso son5 n5 the the ' of water water is 3.;; 3.;;; ; and and the ' of glas glasss will will !ar" from 3. to 3.ZV3.ZV- a consideral consideralee slowing of light speed. $he point where two sustance sustance of differing differing ' meet is called the oundar" surface. At this point a eam of transmitted light 9the incident eam changes direction according to difference in refracti!e inde& and also the angle at which it stri0es the transparent o6ect: this is called refraction. f light is onl" partl" transmitted " the o6ect 9the rest eing asored the o6ect is translucent. +hen light stri0es an opa2ue o6ect 9i.e an o6ect that does not transmit light5 the o6ectYs surface pla"s an important role n determining whether the light is full" reflected5 full" diffused5 or same of oth. A smooth or gloss" surface is one made up of particles of e2ual or nearl" e2ual refracti!e inde&. $hese surfaces reflect light at an intensit" and angle to the incident eam. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
catter cattering ing or diffus diffusion ion is another another aspect aspect of reflec reflectio tion. n. +hen +hen a susta sustance nce contai contains ns particles of a different refracti!e inde&5 a light eam stri0ing the sustance will e scattered. $he amount of light scattered depends on the difference in the two refracti!e indices and also on the si1e of the particles. %ost commonl"5 light stri0ing an opa2ue o6ect will e oth reflected and scattered. $his happens when an o6ect is neither wholl" gloss" nor wholl" rough.
COLOR MODELS Color models help us in recogni1ing and e&pressing information related to color. n our e!er"da" life we see a large !ariet" of colors which we cannot e&press " names. 'esearchers ha!e found (ut of the most of the colors that we see around us can e deri!ed from mi&ing a few elementar" colors. $hese elementar" colors are 0nown as primar" colors. Primar" colors mi&ed in !ar"ing proportions produce other color called composite colors. $his pro!ides us with a wa" to refer to an" aritrar" color: " " specif"ing the name and proportions of the primar" colors from which it can e produced. $wo primar" colors mi&ed in e2ual proportions produce a secondar" color. $he primar" colors along with the total range of composite colors the" can produce constitute a color model. $here can e multiple color models each e ach with its own set of primar" and composite co mposite colors.
RGB Mo%e0 $he 'GB color model is used to descrie eha!ior of colored lights li0e those emitted from a $) screen or a computer monitor. $his model has three primar" colors: red5 green5 lue in short 'GB. nside a C'$5 electron eams falling an red5 green and lue phosphor dots produce corresponding colored lights which mi& together in different proportions to produce lights of composite colors. Proportions of colors are determined " the eam strength. An electron eam ha!ing the ma&imum ma&imum intensit" falling falling on a phosphor phosphor dot creates creates 377\ of the corresponding corresponding color. color. 7\ of the color results from a eam ha!ing half the pea0 strength. Proportions are measured in percentage !alues. An aritrar" aritrar" color5 color5 sa" orange5 can e specified specified as ZV\ red5 U7\ green and 3U\ lue. $his means that to produce orange colored light on the screen5 the three electron eams stri0ing the red5 green and lue phosphors need to ha!e ZV\5 U7\ and 3U\ of their ma&imum insanities respecti!el". All three primar" colors at full intensities comine together to produce white5 i.e their rightness !alues are added up. Because of this5 the 'GB model is called an additi!e model. Lower intensit" !alues produce shades of gre". A color present at 377\ of its intensit" is called saturated5 otherwise the color is said to e unsaturated. $he three secondar" colors of the 'GB model are: magenta9formed " mi&ing e2ual 2uantities of red and lue5 c"an9formed " mi&ing e2ual 2uantities of lue and green and "ellow 9formed " e2ual 2uantities of green and red $he three primar" colors in !ar"ing percentages from composite colors.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
CMY# Mo%e0 $he 'GB model is onl" !alid for descriing eha!ior of colored lights. +hen specif"ing colors of in0 on paper we re2uire a different model. Consider a lue spot of in0 on paper. $he in0 loo0s lue ecause it onl" reflects lue light to our e"es while asoring the other color components from white light. f we now mi& a spot of red in0 with lue in0 what resultant do we e&pect f the 'GB model was followed5 the resultant would ha!e een magenta. But tr" to anal"1e the situation here the red in0 would tr" to asor the lue light reflected from the lue in0 and similarl" the lue in0 would tr" to asor the red light from the red in0.
$he result is that no light comes from the in0 mi&ture to our e"es and it loo0s lac0. $hus5 clearl" the 'GB model is not eing followed here and we need a new model to e&plain its eha!ior. $his new model is named C%?< model and is used to specif" printed colors. $he primar" colors of this model are c"an5 magenta and "ellow. $hese $hese colors when mi&ed together in e2ual proportions produce lac05 due to which the model is 0nown as a sutracti!e model. Due to impurities in the in0 the actual color otained is dar0 rown instead of lac0. o an e&tra lac0 in0 is added to produce pure lac0 which is wh" the color model is 0nown as C%?<5 the 0 standing for the lac0 component. $he colors of pure c"an5 magenta and lac0 in0s are indicated as 377\ when the in0s are mi&ed with other in0s. $he proportion and saturation of the colors decrease. %i&ing c"an and
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
magenta in e2ual proportions produce lue5 magenta and "ellow produce red and "ellow and c"an produce green. $hus the secondar" colors of the C%?< model are the same as the primar" colors of the 'GB model and !ice !ersa. $hese two methods are thus 0nown as complimentar" models.
Devi&e Depe$%e$&) A$% G'mut t is to e noted that oth the 'GB and the C%?< models do not ha!e uni!ersal or asolute color !alues. +e 0now e&actl" how much is 3 0ilogram or 3 meter ecause these measures are standardi1ed and ha!e the same !alue e!er"where. But when we tal0 aout 377\ red5 the color that is indicated will actuall" e dependent on the ph"sical characteristics of the phosphor dots or the in0. ince these characteristics will slightl" differ in different de!ices there is no concept of an asolute color5 ut different de!ices there is no concept of an asolute color ut different de!ices will gi!e rise to slightl" different set of colors. *or this reason oth the 'GB and the C%?< models are 0nown as de!ice dependent color models. Another issue of concern here is the total range of colors supported " each color model. $his is 0nown as the gamut of the model. t has een found that the 'GB model has a larger gamut than the C%?< model. $his is essentiall" means that all colors in the 'GB model cannot e e&pressed in terms of the C%?< model. *or this reason an image displa"ed on a monitor screen ma" ha!e its colors slightl" changed when printed on paper. +hen the printing s"stem finds no C%?< representat representation ion of a specific 'GB !alue5 it will attempt attempt to sustitute sustitute it with the nearest or most similar C?%< !alue leading to a change in the color shade. mage processing software displa"s a gamut warning to the user under these conditions. $he la color model is a de!ice independent model and is considered to ha!e the largest gamut.
BASIC STEPS OR IMAGE PROCESSING mage processing is the name gi!en to the entire process in!ol!ed with the input5 editing and output of images from a s"stem. +hen studied in connection to multimedia it implies digital manipulation of images. $here are three asic steps.
I$put mage input is the first stage of image processing. t is concerned with getting natural images into a computer s"stem for suse2uent wor0. Essentiall" it deals with the con!ersion of analog images into digital forms. $his is mainl" done using two de!ices. $he first is the scanner which can con!ert a printed image or document into the digital form. $he second is the digital camera which digiti1es real world images5 similar to how a con!entional camera wor0s. ometimes we can start with read"-made digital images5 e.g.: copied from a clipart galler" or a photo- cd5 or downloaded from the internet. internet. n such cases we s0ip the image input stage and go straight to the image editing stage.
E%iti$/ After the images ha!e een digiti1ed and stored as files on the hard dis0 of a computer5 the" are changed or manipulated to ma0e them more suitale for specific re2uirement. $his step is called editing and usuall" in!ol!es one or more image editing software which pro!ides !arious tools and functionalities for editing the the images. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Before the actual editing process can egin5 an important step called color caliration needs to e performed to ensure that the image loo0s consistent when !iewed on multiple monitors. After editing5 the images are usuall" compressed using mathematical algorithms and then shared into specific file formats.
Output mage output is the last stage in image processing processing concerned with displa"ing displa"ing the edited image to the user. $he image can either e displa"ed in a stand-alone manner or all as part of some application li0e a presentation or we page. n the most cases the image need to e displa"ed on-screen !ia a monitor. 4owe!er for some application li0e printing a catalog or rochure5 the images need to e printed on paper using a printer.
SCANNER *or images digiti1ation in!ol!es ph"sical de!ices li0e scanner or digital camera.$he scanner is a de!ice used to con!ert analog images into the digital d igital form.$he most common t"pe of scanner for the office en!ironment is called the flated scanner.t loo0s li0e a photocop"ing machine with a glass panel and a mo!ing scan head elow it. $he paper document to e scanned is placed down on the glass panel and the scanner is acti!ated using software from a computer to which the scanner remains attached. $he traditional wa" of attaching a scanner to the computer is through an interface cale connected to the parallel port 9centronics of the pc5 ut nowada"s other forms of interfaces li0e scsi or !s are gaining prominence.
Co$stu&tio$ A$% (or8i$/ Pri$&ip0e $o start a scanning operation the paper document to e scanned is placed ta0e down on then glass panel of the scanner is placed and the scanner is acti!ated a cti!ated using software from the host computer. $he scan head contains a source of white light. As the head mo!es across the paper5 the light illuminates the paper progressi!el".$he light on getting related " the paper image is made to fall on a grid of electronic sensors5 " an arrangement of a mirror and lenses. $he electronic sensors are called charge coupled de!ices 9CCD. And are asicall" con!erts of the light energ" energ" in to !oltage pulses. $he strength strength of the !oltage pFproduced pFproduced is proportional proportional to the intensit" of the light falling on the CCD elements.Brighter regions of the image reflect more light on to the CCD there" producing stronger !oltage signal. Dar0er image portions produce wea0er signals. After a complete scan the image is con!erted from a continuous entit" in to a discrete con!erted from a continuous !oltage pulses.. $his process is called sampling5 deri!ed from the fact that each point of the image is sampled or e&amine e&amined d to otain otain a !alue !alue regard regarding ing its its right rightnes nesss at the point. point. $he !oltag !oltagee signal signalss are temporaril" stored in a uffer inside the scanner. $he ne&t set up called 2uanti1ation in!ol!es the representing the !oltage pulses as inar" numers and carr" out an ADC inside the scanner in con6unction with software undled with the scanner ca lled the scanning software. $he software has to first decide on the numer of its to e presenting the inar" representation. $his information either supplied " the user is decided accordingl" to some default setting. *or an n it representation there will e #n !oltage pulse that can e represented " inar" numers practical it !alues range from X its its to #U its.$his its.$his id 0nown as it – depth dep th of then image Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he collection of inar" numers is stored ion the hard dis0 of the PC as a digital image file file.. inc incee each each num numer er has has een een deri deri!e !ed d from from the the inte intens nsit it" " of the the inci incide denc ncee light light55 this this eUssentiall" represents rightness !alue at different points of the image 5 and are 0nown as pi&els. Larger the it depth5 more are the numer of rightness !alue that can e stored. $hus a #U it digital image will e more accurate representation of the original analog image then an X it image5 and so would e a !ector 2ualit". 4owe!er it will also occup" a larger dis0 space and need more processing power to manipulate. $his increases the cost of storing and manipulating a higher 2ualit" image. $he actual !alue of the it depth will e decided largel" as a matter of compromise etween the cost and 2ualit" re2uirements.
SCANNER TYPES canners can e of !arious !a rious t"pes each designed for specific purposes.
0'tbe% S&'$$ers $he flated scanner is the most common t"pe in office en!ironments. t loo0s li0e a photocop"ing machine with a glass panel on which the document to e scanned is placed face down. Below the glass panel is a mo!ing head a source of white usuall" &enon lamps. $he mo!ing mo!ing head mo!es slowl" slowl" from the one end of the document document to the other and the light emitted from it is caused to fall on the document get reflected from it and fall on a CCD arra" !ia a s"stem of mirrors. Depending on right and dar0 regions of the document5 CCD generates !ar"ing !oltage signals which are stored in a uffer and later fed to an ADC. $he light is made to fall on small strips 9rows of the document at a time. As the head mo!es on5 the ne&t row is scanned.$he process continues until all the rows of the document ha!e een scanned.$e&t or image on the document is therefore !isile ! isile to the CCD onl" ecause of the light it reflects.
Drum S&'$$ers Drum Drum scanne scanners rs is used used to otain otain good 2ualit" 2ualit" scans scans for professio professional nal purpos purposes es and generall" pro!ides a etter performance than flated scanners. t consists of a c"lindrical drum made out of a highl" translucent plastic li0e material. $he image to e scanned5 usuall" a film5 is Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
wet – mounted on the drum5 meaning that it is soa0ed in a fluid. $he fluid helps to camouflage the scratches and dust grains o!er the film and pro!ides impro!ed clarit" of the film. $he fluid can either e oil-ased or a alcohol- ased. *or the sensing element5 drum scanners use a photo – multiplier tue 9P%$ instead of a CCD. A P%$5 also referred to as an electron multiplier5 is much more sensiti!e to light than the CCD and more e&pensi!e as well. t wor0s on the principle of photoelectric effect in which asorption of a result in an electron emission. $he photon is detected " amplif"ing the electron5 referred to as photo – electron5 " passing it through a cascade of acceleration electrodes5 called d"nodes. $he multiplier consists of a sealed glass tue containing an anode and a numer of d"no d"node dess. Each ach d"no d"node de is char charg ged to a high higher er !ol !oltage age than han the pre! pre!iious ous one. one. (n hit hitting ing each d"node5 the photo-electrons will in!o0e emission of additional electrons5 which accelerate towa toward rdss the the ne&t ne&t d"nod d"node. e. $his $his proc proces esss conti continue nuess until until the the anode anode is reac reached hed wher wheree the the accumulation of charge results in a sharp increase in !oltage pulse indicating the detection of the photon. An amplification gain of the order of 37X can e achie!ed in multipliers containing aout 3U d"nodes5 which can pro!ide measurale pulses from e!en single photons.
B'r Co%e S&'$$ers A ar code scanner is designed specificall" to read arcodes printed on !arious surfaces. A arcode is a machine – readale representation of information in a !isual format. $raditionall" arcodes use a set of parallel !ertical lines whose widths and spacing etween them is used to encode encode inform informati ation. on. /owada" /owada"ss the" the" come come in other other forms forms li0e li0e dots dots and concent concentric ric circle circles. s. Barcodes relie!e the operator of t"ping strings in a computer5 the encoded information is directl" read " the scanner. $he" are e&tensi!el" used to indicate details of products at retail outlets and other automated en!ironments li0e aggage routing in airports. $he data contained in a arcode !aries with the application. n the simplest case an identification numer is used as an inde& in a dataase where the details aout the product is stored $he EA/ 9European Article /umering and the ,PC 9,ni!ersal Product Code elong elong to this class. $he other t"pe is where the arcode arcode holds the complete complete informatio information n and does not need e&ternal dataases. $his led to arcode s"mologies that can represent more than digits5 t"picall" the entire entire AC AC character character set. tac0ed and #D arcodes arcodes elong to this class where a #D matri& of lines ma" e used. $he PD* U38 the most common #D arcode. A arcode scanner is usuall" smaller than the flated or the drum scanner and contains a light source which can either e an LED or a LAE'. $he light on falling on the arcode gets reflected ac0 and is sent to a photoconductor for translating them in to electrical impulses. Additionall" the scanner contains a circuit for anal"1ing the arcode data and sending the decoded data to the output port of the scanner. A LAE' arcode scanner is more e&pensi!e than a LED one ut is capale of scanning arcodes at a distance of aout #cm. $he arcode scanner can either e hand-held or stationar" t"pe. 4and-held t"pes are small de!ices that can e held " hand and usuall" contains a switch for triggering and light emission. t can e either wedge – shaped or pen- shaped5 oth of which are slided o!er the arcode for scanning.$he stationar" t"pe remains on the tale and the arcode is passed under its light port for scanning5 generall" found in retail counters and mar0ets. %ost arcode scanners use the Ps# port for getting connected to the computer5 howe!er the" can also use the '-#;# and ,B ports.
COLOR SCANNING Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
ince the CCD elements are sensiti!e to the rightness of the light5 the pi&els essentiall" store onl" the rightness information of the original image.$his is also 0nown as luminance 9or luma information $o include the color of chrominance 9or chroma information there are three CCD elements for each pi&el of the image format. $hese three elements are sensiti!e to the red5 lue and green components of light. +hite light reflected off the paper document is split in to the primar" color components " a glass prism and made to fall on the corresponding CCD su – components. $he signal output from each su – component can e comined to produce a color scanned image. $he pi&els in this case contain oth the luma and chroma information.9elow figure
DIGITAL CAMERA CONSTRUCTION AND (OR#ING PRINCIPLE Apart from the scanner used to digiti1e paper documents and film5 another de!ice used to digiti1e real world images is the digital camera. ust li0e a con!entional camera5 a digital camera also has a lens through which light from real world o6ects enter the camera. ut instead of falling on film to initiate a chemical reaction the light instead falls on a CCD arra"5 arra "5 similar similar to that inside the scanner.Tust li0e a scanner the !oltage pulses from the CCD arra" tra!el to an ADC where the" are con!erted to inar" representations and stored as a digital image file. ,nli0e a scanner a digital camera is usuall" not attached to a computer !ia a cale. $he camera has its own storage facilit" inside it usuall" in the form of a flopp" dri!e5 which can sa!e the images created in to a flopp" disc. mages howe!er cannot e stored in flopp" discs in their raw forms as the" would tend to ta0e too much space. o instead the" are &ompresse% to reduce their file si1es and stored usuall" in the TPEG format. $his is a loss" compression techni2ue and results in slight loss in image 2ualit". Each flopp" inserted into the camera can hold aout 3 to # images5 depending on the amount of compression. $he flopp" can then simpl" e ta0en out of the camera5 inserted into a PC and the files copied. ,sers are usuall" not permitted to set parameters li0e it-depth and resolution and the digital camera uses its default set of !alues. Earlier digital cameras had CCD arra"s of aout VU7SUX7 elements ut modern high – end cameras ha!e as man" as #7UXUS3;V elements in its CCD arra"s. %odern digital cameras contain memor" chips within them for storing images5 which can range from 7 m to 77 m or e"ond. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$hese cameras can e directl" interfaced with a PC !ia the ,B port for cop"ing the stored images to the hard dis0.
INTERACE STANDARDS nterface standards determine how data from ac2uisition de!ices li0e scanners and digital cameras flow to the computer in an efficient wa".$wo main interface standards e&ist: $+A/ and
T(AIN $+A/ is a !er" important standard in image ac2uisition 5 de!eloped " 4ewlett – Pac0ard 5
Computer Graphics and Multimedia
from leading hardware and software de!elopers 5 pro!ide e&tensiilit" and ailit" to grow with industr" needs 5 eas" to implement with clear documentation 5 support different t"pes of data li0e itmap images 5 !ector images 5 te&t etc.
IMAGE AND SCANNER INTERACE INTERACE SPECIICATION 1ISIS2 $he second important standard for document scanner is the mage and canner nterface pecification 9.t was de!eloped " Pi&el $ranslations and the" retain control o!er its de!elopment and licensing. has a wider set of features than $+A/ and t"picall" uses the C – # interface while $+A/ mostl" uses the ,B interface . $he architecture is ased on software modules li0e image ac2uisitions5 file con!ersion5 data e&traction and file '+ commands. $his has the ad!antage of scalailit"5 new modules are added without ma0ing s"stem wide changes. modules interact with each other through a s"stem of tags and choices.
SPECIICAT SPECIIC ATIONS IONS O DIGITAL DI GITAL IMAGES Pi,e0 Dime$sio$s $he numer of pi&els along the height and width of a itmap image is 0nown as the pi&el dimensions of the image.$he displa" si1e of an image on – screen is determined " the pi&el dimensions of the image plus the si1e and setting of the monitor.
Im'/e Reso0utio$ $he $he num numer er of pi&el pi&elss disp displa" la"ed ed per per unit unit leng length th of the the image image is 0nown 0nown as image image resolution5 usuall" measured in pi&els per inch 9ppi .An image with a high resolution contains more and therefore smaller pi&els than an image with a low resolution.
i0e Sie $he $he digi digita tall si1e si1e of an image image meas measur ured ed in 0ilo 0ilo" "te tes5 s5 mega mega"t "tes es55 or giga giga" "te tess is proportional to the pi&el dimensions of the image.mages with more pi&els ma" produce more detail ut the" re2uire more storage space and ma" e slower to edit and an d print.
Co0or Dept3 $his defines the numer of its re2uired to store the information of each pi&el in the image5 and in turn determines the total numer of possile colors that can e displa"ed in the image. Photographic images usuall" need a depth of #U – its for true representations. ncreasing the it depth increases the capailit" of displa"ing a larger numer of colors ut it also increases the file si1e of the image.
CONTENT MANAGEMENT SYSTEM 1CMS2 A Cont Conten entt %ana %anage geme ment nt "st "stem em 9C% 9C% is a soft softwa ware re s"st s"stem em used used for for cont conten entt management. management. $his includes includes computer computer files5 files5 image media5 audio files5 files5 electronic electronic documents and we content. $he idea ehind a C% is to ma0e these files a!ailale inter-office5 as well as o!er the we. A content management s"stem would most often e used as archi!al as well. %an" Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
companies use a C% to store files in a non-proprietar" form. Companies use a C% file share with ease5 as most s"stems use ser!er ased software5 e!en further roadening file a!ailailit". O+or0flowO is the idea of mo!ing an electronic document along for either appro!al5 or for adding content. ome content management s"stems will easil" facilitate this process with email notification5 and automated routing. $his is ideall" a collaorati!e creation of documents. A C% facilitates the organi1ation5 control5 and pulication of a large od" of documents and other content5 such as images and multimedia resources. A we content management s"stem is a content management s"stem with additional features to ease the tas0s re2uired to pulish we content to we sites. +e content management s"stems are often used for storing5 controlling and pulishing industr"-specific documentation such as news articles5 operators manuals5 technical manuals5 sales guides5 and mar0eting rochures.
A &o$te$t m'$'/eme$t s)stem m') support t3e o00o?i$/ e'tures4 •
mport and creation of documents and multimedia material
•
dentification of all 0e" users and their content manage ment roles
•
$he ailit" to assign roles and responsiilities to different content categories or t"pes.
•
Definition of the content wor0flow tas0s5 often coupled with e!ent messaging so that content managers are alerted to changes in content.
•
$he ailit" ailit" to trac0 trac0 and manage multiple multiple !ersions !ersions of a single single instance instance of content.
•
$he ailit" to pulish the content to a repositor" to support access to the conten content. t. ncrea ncreasin singl" gl"55 the reposi repositor tor" " is an inhere inherent nt part part of the s"stem s"stem55 and incorporates enterprise search and retrie!al.
•
ome content management s"stems allow the te&tual aspect of content to e separ separat ated ed to some some e&te e&tent nt from from form format atti ting. ng. *or *or e& e&le le the the C% C% ma" automaticall" set default color5 fonts5 or la"out.
IMAGE PROCESSING SOT(ARE n electrical engineering and computer science5 science5 image processing is an" form of signal processing for which the input is an image5 such as a photograph a photograph or !ideo frame frame the output of image processing ma" e either an image or5 a set of characteristics or parameters or parameters related related to the image. %ost image-processing techni2ues in!ol!e treating the image as a two-dimensional signal and appl"ing standard signal-processing techni2ues to it.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
mage processing usuall" refers to digital image processing5 processing5 ut optical optical and and analog image processing also are possile. $his article is aout general techni2ues that appl" to all of them. $he ac)uisition of ac)uisition of images 9producing the input image in the first place is referred to as imaging imaging..
ILE ORMATS %ultimedia data and information must e stored in a dis0 file using formats similar to image file formats. %ultimedia formats5 howe!er5 are much more comple& than most other file formats ecause of the wide !ariet" of data the" must store. uch data includes te&t5 image data5 audio and !ideo data5 computer animations5 and other forms of inar" data5 such as %usical nstru nstrumen ment t control control inform informati ation5 on5 and graphi graphical cal fonts fonts sectio section n later later in this this chapte chapter. r. $"pica $"picall multimedia formats do not define new methods for storing these t"pes of data. nstead5 the" offer the ailit" to store data in one or o r more e&isting data formats that are alread" in ge neral use. *or e&le5 a multimedia format ma" allow te&t to e stored as Postcript or 'ich $e&t *ormat 9'$* data rather than in con!entional AC plain-te&t format. till-image itmap data ma" e stored as B%P or $** files rather than as raw itmaps. imilarl"5 audio5 !ideo5 and animation data can e stored using industr"-recogni1ed formats specified as eing supported %ultimedia formats are also optimi1ed for the t"pes of data the" store and the format of the medium on which the" are stored. %ultimedia information is commonl" stored on CD-'(%. ,nli0e con!entional dis0 files5 CD-'(%s are limited in the amount of information the" can store. A multimedia format must therefore ma0e the est use of a!ailale data storage techni2ues to efficientl" store data on the CD-'(% medium. $here are man" t"pes of CD-'(% de!ices and standards that ma" e used " multimedia applications. f "ou are interested in multimedia5 "ou should ecome familiar with them. $he original Compact Disc first introduced in earl" 3ZX7s was used for storing onl" audio information using the CD-DA 9Compact Disc-Digital Audio standard produced " Phillips and on". CD-DA 9also called the 'ed Boo0 is an optical data storage format that allows the storage of up to 8U minutes of audio 98VU mega"tes of data on a con!entional CD-'(%. $he CD-DA standard e!ol!ed into the CD-_A 9Compact Disc-E&tended Architecture standard5 or what we call the CD-'(% 9Compact Disc-'ead (nl" %emor". CD-_A 9also called the ?ellow Boo0 allows the storage of oth digital audio and data on a CD-'(%. Audio ma" e comined with data5 such as te&t5 graphics5 and !ideo5 so that it ma" all e read at the same time. An ( ZVV7 file s"stem ma" also e encoded on a CD-'(%5 allowing its files to e read " a wide !ariet" of different computer s"stem platforms.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he CD- CD- 9Compa 9Compact ct Disc- Disc-nte nterac racti! ti!e e standa standard rd define definess the stora storage ge of intera interacti cti!e !e multimedia data. CD- 9also called the Green Boo0 descries a computer s"stem with audio and !ideo pla"ac0 capailities designed specificall" for the consumer mar0et. CD- units allow the integration of full" interacti!e multimedia applications into home computer s"stems. A still-e!ol!ing standard is CD-' 9Compact Disc-'ecordale or Compact Disc-+rite (nce5 which specifies a CD-'(% that ma" e written to " a personal des0top computer and read " an" an " CD-'(% pla"er.
UNIT-III
UESTIONS SECTION A 3. $** $** stands stands for ]]]]]]] ]]]]]]]]]]] ]]]]]]]] ]]]]].. ].. +. ]]]]]]]]]]]]format is used to e&change files etween application computer platforms. @. Ad6usting the space etween the lines is called ]]]]]]]]]]]]]. . Define te&t. . Antialiasing is also 0nown as]]]]]]]]]]]]]]. . Define image. . Little decoration at the end of the letter is called a ]]]]]]]]]. . $he numer of pi&els displa"ed per unit length is called as]]]]]]]]]]]]]]]. Q. C% stands for]]]]]]]]]]]. *=. $he 2ualit" of scanned image is determined its ]]]]]]]]]]]]].
SECTION B *. Gi!e a rief account on de!ice independent color model. +. Descrie the use of digital camera in multimedia. @. E&plain riefl" the asic image t"pes. . +rite +rite a short note on image processing software. . E&plain the file format for te&t. . +rite +rite short notes on canner. . +rite +rite short notes on Digital camera. . List and e&plain the specification of digital images. Q. Discuss aout !arious te&t insertion methods. *=. E&plain the t"pes of te&t. te&t. SECTION B *. Discuss in detail aout the !arious image t"pe and image file formats. +. E&plain the 'GB color model in detail. @. Descrie in detail de!ice independent color models. . E&plain riefl" aout: a $e&t $e&t compression canner. can ner. . +hat are the color models E&plain. . E&plain the asic steps for image processing in detail with neat diagram.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
. Discuss in rief aout the ma6or te&t file formats. . List and e&plain the specification of digital images. Q. Discuss aout !arious te&t insertion methods. *=. E&plain the asic steps of image processing.
UNIT-I! Audio: ntroduction – Acoustics – /ature of ound +a!es – *undamental Characteristics of ound ound – %icr %icroph ophon onee – Ampli Amplifi fier er – Louds Loudspea pea0e 0err – Audi Audio o %i&er %i&er – Digi Digita tall Audio udio – "nthesi1ers – %D – Basics of taff /otation – ound o und Card – Audio $ransmission – Audio *ile formats and C(DECs – Audio 'ecording "stems – Audio and %ultimedia – )oice 'ecognition and 'esponse - Audio Processing Processing oftware.
AUDIO After te&t5 images and graphics the ne&t element to e used e&tensi!el" in multimedia is sound. ound is a form of energ" capale of flowing from one place to another through a material medium.
ACOUSTICS A&ousti&s is the interdisciplinar" science that deals with the stud" of all mechanical wa!es in gases5 li2uids5 and solids including !iration !iration55 sound sound55 ultrasound and infrasound infrasound.. A scientist scientist who wor0s in the field of acoustics acoustics is an acoustician acoustician while while someone wor0ing in the the fiel field d of acous acousti tics cs techn technol olog" og" ma" e call called ed an acoustical or audio enginee engineer r . $he application of acoustics can e seen in almost all aspects of modern societ" with the most o!ious eing the audio and noise control industries
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
NATURE O SOUND (A!ES ound is one 0ind of longitudinal wa!e5 in which the particles oscillate to and fro in the same direction of wa!e propagation. ound wa!es cannot e transmitted through !acuum. $he transmission of sound re2uires at least a medium5 which can e solid5 li2uid5 or gas. Acoustics is the ranch of science dealing with the stud" of sound and is concerned with the generation5 transmission and reception of sound wa!es. $he application of acoustics in technolog" is called acoustical engineering.
CHARACTERISTICS O SOUND Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
ound wa!es tra!el at great distances in a !er" short time5 ut as the distance increases the wa!es tend to spread out. o ut. As the sound wa!es spread out5 their energ" simultaneousl" spreads through an increasingl" larger area. $hus5 the wa!e energ" ecomes wea0er as the distance from the source is increased. ounds ma" e roadl" classified into two general groups. (ne group is /(E5 which includes sounds such as the pounding of a hammer or the slamming of a door. $he other group is musical sounds5 or $(/E. $he distinction etween noise and tone is ased on the regularit" of the !irations5 the degree degree of damping damping55 and the ailit" ailit" of the ear to recogn recogni1e i1e component componentss ha!ing ha!ing a musica musicall se2uence.
Amp0itu%e Amplitude of wa!e is the ma&imum displacement of a particle in the path of a wa!e and is measure of the pea0- to – pea0 height of the wa!e.$he ph"sical manifestation of amplitude is the intensit" of energ" of the wa!e.
reue$&) $his measures the numer of !irations of a particle in the path of a wa!e. $he ph"sical manifestation of fre2uenc" of a sound wa!e is the pitch of sound. A high pitched sound5 li0e that of a whistle5 has higher fre2uenc" than a dull flat sound5 li0e the sound of a drum. *re2uenc" is measured in a unit called 4ert1 and denoted " 41.
Musi&'0 Note A$% Pit&3 ound pleasant to hear is called musical and those unpleasant to our ears are called noise. %usical sounds most commonl" originate from !irating strings5 li0e in guitars and !iolins5 !irating plates5 li0e drums and tala5 and !irating air columns5 li0e in pipes and horns . %usicolog" is the scientific stud" of music which attempts to appl" methods of s"stematic in!estigation and research in understanding the principles of musical art.
MICROPHONE
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
A mi&rop3o$e 9collo2uiall" called a mi& or mi8e oth pronounced is an acoustic-toelec electr tric ic transducer or sensor that that con!e con!ert rtss sound sound into into an an electrical signal. signal. n 3X8V 3X8V55 Emile Berliner in!ented Berliner in!ented the first microphone used as a telephon e !oice transmitter. %icrophones are used in man" applications such as telephones telephones55 tape recorders5 recorders5 0arao0e s"stems5 hearing aids5 aids5 motion picture product production ion55 li!e li!e and recorded recorded audio engineering5 engineering5 *' radios55 megaphones radios megaphones55 in radio and tele!ision tele!ision roadcasting roadcasting and in computers for recording !oice5 speech recognition5 recognition5 and for non-acoustic purposes purposes such as ultrasonic ultrasonic chec0ing or 0noc0 sensors. sensors. %ost %ost micr microph ophone oness toda" toda" use use electromagnetic induction 9d"namic 9d"namic microphone5 microphone5 capacitance capacitance change 9condenser 9condenser microphone microphone55 pie1oelectric pie1oelectric generation5 generation5 or light modulation to produce an electrical !oltage signal from mechanical !iration.
AMPLIIER Generall"5 an 'mp0iier or simpl" 'mp is an" de!ice de!ice that that changes5 usuall" increases5 the amplitude of a signal signal.. $he relationship of the input to the output of an amplifierjusuall" e&pressed as a function of the input fre2uenc"jis called the transfer function of function of the amplifier5 and the magnitude of the transfer function is termed the gain gain.. n popular popular use5 use5 the term usuall" usuall" descri descries es an electronic amplifier 5 in which the input OsignalO is usuall" a !oltage or a current. n audio audio applications5 applications5 amplifiers dri!e the loudspea0ers used in PA s"stems to s"stems to ma0e the human !oice louder louder or pla" recorded music. Amplifiers ma" e classified according to the input 9source the" are designed to amplif" 9such as a guitar amplifier 5 to perform with an electric guitar 5 5 the de!ice the" are intended to dri!e 9such as a headphone amplifier 5 5 the fre2uenc" range of the signals 9Audio 9Audio55 * *55 '* '*55 and )4* )4* amplifiers5 amplifiers5 for e&le5 whether the" in!ert the signal 9in!erting 9in!erting amplifiers and amplifiers and non-in!erting amplifiers5 amplifiers5 or the t"pe of de!ice used in the amplification 9!al!e 9!al!e or tue amplifiers5 tue amplifiers5 *E$ *E$ amplifiers5 amplifiers5 etc.. A related de!ice that emphasi1es con!ersion of signals of one t"pe to another 9for e&le5 e&le5 a light light signal signal in photons in photons to to a DC DC signal signal in amperes amperes is a transducer 5 a transformer 5 or a sensor . 4owe!er5 none of these amplif" power amplif" power .
LOUDSPEA#ER A 0ou%spe'8er 9or Ospea0erO is an electro acoustic transducer transducer that that con!erts an electrical signal into sound signal sound.. $he spea0er mo!es in accordance with the !ariations of an electrical signal and causes sound wa!es to propagate through a medium such as air or water. After the acoustics of the listening space5 loudspea0ers 9and other electro acoustic transducers are the most !ariale elements elements in a modern audio s"stem and are usuall" responsile responsile for most distortion distortion and audile audile differences when comparing sound s"stems
AUDIO MI"ER n professional studios multiple microphones ma" e used to record multiple trac0s of sound at a time. E&le recording performance of an orchestra. A de!ice called an audio mi&er is used to record these indi!idual trac0s and edit them separatel" Each of these trac0s a numer of controls for ad6usting the !olume5 tempo5 mute etc. 5
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
DIGITAL AUDIO Digital audio is created when a sound wa!e is con!erted into numers – a process referred referred to as digiti1ing. digiti1ing. t is possile possile to digiti1e digiti1e sound from a microphone5 microphone5 a s"nthesi1er5 s"nthesi1er5 e&isting tape recordings5 li!e li!e radio and tele!ision roadcasts5 roadcasts5 and popular CDs. Digiti1ed sound is sampled sound. E!er nth fraction of a second5 a sample of sound is ta0en and stored as digital digital information in its and "tes. $he 2ualit" of this digital digital recording depends upon how often the samples are ta0en.
SYNTHESIVER Po0)p3o$) $he pol"phon" of a sound generator refers to its ailit" to pla" more than one note at a time. Pol"phon" is generall" measured or specified as a numer of notes or !oices. %ost of the earl" music s"nthesi1ers were monophonic5 meaning that the" could onl" pla" one note at a time. f "ou pressed fi!e 0e"s simultaneousl" on the 0e"oard of a monophonic s"nthesi1er5 "ou would onl" hear one note. Pressing fi!e 0e"s on the 0e"oard of a s"nthesi1er which was pol"phonic with four !oices of pol"phon" would5 in general5 produce four notes. f the 0e"oard 0e "oard had more !oices 9man" modern sound modules ha!e 3V5 #U5 or ;# note pol"phon"5 then "ou would hear all fi!e of the notes. n otes. •
Sou$%s
$he different sounds that a s"nthesi1er or sound generator can produce are sometimes called OpatchesO5 OprogramsO5 OalgorithmsO5 or OtimresO. Programmale s"nthesi1ers commonl" assign Oprogram numersO 9or patch numers to each sound. *or instance5 a sound module might use patch numer 3 for its acoustic piano sound5 and patch numer ;V for its fretless ass sound. $he association of all patch numers to all sounds is often referred to as a patch map. )ia %D5 a Program Change message is used to tell a de!ice recei!ing on a gi!en Channel to change the instrument sound eing used. *or e&le5 a se2uencer could set up de!ices on Channel U to pla" fretless fretless ass sounds " sending sending a Program Change message for Channel four with a data "te !alue of ;V 9this is the General %D program numer for the fretless ass patch. %ultitimral %ode A s"nthesi1er s"nthesi1er or sound generator generator is said to e multitimral multitimral if it is capale of producing two or more different instrument sounds simultaneousl". f a s"nthesi1er can pla" fi!e notes simultaneousl"5 and it can produce a piano sound and an acoustic ass sound at the same time5 then it is multitimral. +ith enough notes of pol"phon" and OpartsO 9multitimral a single s"nthesi1er could produce the entire sound of a and or orchestra. %ultitim %ultitimral ral operation will generall" generall" re2uire re2uire the use of a se2uencer se2uencer to send the !arious !arious %D messages re2uired. *or e&le5 a se2uencer could send %D messages for a piano part Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
on Channel 35 ass on Channel #5 sa&ophone on Channel ;5 drums on Channel 375 etc. A 3V part multitimral s"nthesi1er could recei!e a different part on each of %Ds 3V logical channels. $he pol"phon" of a multitimral s"nthesi1er is usuall" allocated d"namicall" among the different parts 9timres eing used. At an" gi!en instant fi!e !oices might e needed for the piano part5 two !oices for the ass5 one for the sa&ophone5 plus V !oices for the drums. /ote that some sounds on some s"nthesi1ers actuall" utili1e more than one O!oiceO5 so the numer of notes which ma" e produced simultaneousl" ma" e less than the stated pol"phon" of the s"nthesi1er5 depending on which sounds are eing utili1ed.
MIDI MIDI 1Musi&'0 I$strume$t Di/it'0 I$ter'&e2 is a communication standard de!eloped for for elect electro roni nicc musi musical cal inst instru rume ment ntss and comp comput uter ers. s. %D %D file filess allo allow w musi musicc and and soun sound d s"nthesi1ers from different manufacturers to communicate with each other " sending messages along cales connected to the de!ices. Creating Creating "our own original score can e one of the most creati!e and rewarding aspects aspects of uildi uilding ng a multim multimedi ediaa pro6ec pro6ect5 t5 and %D %D 9%usi 9%usical cal nstru nstrumen mentt Digit Digital al nterf nterface ace is the 2uic0est5 easiest and most fle&ile tool for this tas0.$he process of creating %D music is 2uite different from digiti1ing e&isting audio. $o ma0e %D scores5 howe!er "ou will need se2uencer software and a sound s"nthesi1er.
T3e MIDI 8e)bo'r% is '0so useu0 to simp0) t3e &re'tio$ o musi&'0 s&ores. An ad!antage of structured data such as %D is the ease with which the music director can edit the data. A %D file format is used in the following circumstances : Digital audio will not wor0 due to memor" constraints and more processing power re2uirements +hen there is high 2ualit" of %D source +hen there is no re2uirement for dialogue. A digital audio file format is preferred in the following circumstances. • • •
+hen there is no control o!er the pla"ac0 hardware +hen the computing computing resources and the andwidth re2uirements re2uirements are high. +hen dialogue is re2uired.
AUDIO ILE ORMATS A file format determines the application that is to e used for opening a file. *ollowing is the list of different file formats and the software that can e used for opening a specific file.
T3e MIDI orm't $he $he %D %D 9%us 9%usic ical al nst nstru rume ment nt Digi Digita tall nte nterf rface ace is a form format at for for sendi sending ng musi musicc information etween electronic music de!ices li0e s"nthesi1ers and PC sound cards. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia • • • • • •
• • •
$he %D format was de!eloped in 3ZX# " the music industr". $he %D format is !er" fle&ile and can e used for e!er"thing from !er" simple to real professional music ma0ing. %D files do not contain sampled sound5 ut a set of digital musical instructions 9musical notes that can e interpreted " " "our PCs sound card. $he downside of %D is that it cannot record sounds 9onl" notes. (r5 to put it another wa": t cannot store songs5 onl" onl " tunes. $he upside of the %D format is that since it contains onl" instructions 9notes5 %D files can e e&tremel" small. $he e&le ao!e is onl" #;< in si1e ut it pla"s for nearl" minutes. $he %D format is supported " man" different software s"stems o!er a large range of platforms. %D files are supported " all the most popular nternet rowsers. ounds stored in the %D format
SOUND CARD A sou$% &'r% 9also 0nown as an 'u%io &'r% is an internal computer computer e&pansion e&pansion card that card that faci facili lita tate tess the the input input and and outp output ut of audio signa signals ls to and from a computer under control of computer programs. $he $he term term sound card is also applied to e&ternal audio interfaces that use software to generate sound5 as opposed to using hardware inside the PC. $"pical uses of sound cards include pro!iding the audio component for multimedia applications such as music composition5 editing !ideo or audio5 presentation5 education and entertainment 9games and !ideo pro6ection. %an" computers ha!e sound capailities uilt in5 while others re2uire additional e&pansion cards to pro!ide for audio capailit". oun ound d card cardss usua usuall ll" " feat featur uree a digit digital-to al-to-analo -analog g con!ert con!erter er 9DAC5 9DAC5 which which con!er con!erts ts recorded recorded or generated digital digital data data into an analog analog format. format. $he output signal is connected to an amplifier5 headphones5 or e&ternal de!ice using standard interconnects5 such as a $' connector or an 'CA connector . f the numer and si1e of connectors is too large for the space on the ac0plate the connectors will e off-oard5 t"picall" using a rea0out o&5 or an au&iliar" ac0plate. %ore ad!anced cards usuall" include more than one sound chip to pro!ide for higher data rates and multiple multiple simultaneous simultaneous functionalit" functionalit"55 for e&le e&le digital digital production of s"nthesi1ed sounds 9usuall" for real-time generation of music and sound effects using minimal data and CP, time. Digital Digital sound reproductio reproduction n is usuall" done with multichannel multichannel DACs5 which are capale of simultaneous digital samples at different pitches and !olumes and application of real-time effects5 li0e filtering or distortion. %ultichannel digital sound pla"ac0 can also e used for clarificati fication on neede needed d musi usic s"nt s"nthe hesi sis5 s5 when hen used used wit with a complianceFclari 5 and e!en e!en multip multiplele-chan channel nel emulation. $his approach has ecome common as manufacturers see0 simpler and lower-cost sound cards. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
%ost sound cards ha!e a line in connector in connector for an input signal signal from from a cassette tape or other sound source that has higher !oltage le!els than a microphone. $he sound card digiti1es this signal and stores it 9under control of appropriate matching computer software on the computers hard dis0 for for storage5 editing5 or further processing. Another common e&ternal connector is the microphone connect connector or55 for signal signalss from a microphone microphone or other low-le!el input de!ice. nput through a microphone 6ac0 can e used5 for e&le5 " speech recognition or !oice o!er P applications.
AUDIO TRANSMISSION
Au%io i0e orm't An 'u%io i0e orm't is a file format for format for storing digital audio data audio data on a computer computer s"stem. s"stem.
$his data can e stored uncompresse uncompressed5 d5 or compressed compressed to to reduce the file si1e. t can e a raw itstream55 ut it is usuall" a container format or an audio data format with defined storage la"er. itstream
T)pes T)pes o orm'ts t is important to distinguish etween a file format and format and an audio codec. codec. A codec performs the encoding and decoding of the raw audio data while the data itself is stored in a file with a specific audio file format. Although most audio file formats support onl" one t"pe of audio data 9created with an audio coder 5 5 a multimedia container format 9as %atros0a or A) ma" support multiple t"pes of audio and !ideo data. $here are three ma6or groups of audio file formats: • •
•
,ncompressed audio formats5 such as +A)5 A** A**55 A, A, or or raw raw header-less header-less PC% PC% *ormats *ormats with with lossless lossless compression5 such as *LAC *LAC55 %on0e" %on0e"s s Aud Audio io 9filename e&tension APE e&tension APE5 5 +a!Pac0 9filen filename ame e&tens e&tension ion +)5 )5 $$A $$A55 A$'AC A$'AC Ad!anced Lossless5 Apple Lossless 9 Lossless 9filename filename e&tension mUa5 e&tension mUa5 %PEG-U L5 L5 %PEG-U AL5 AL5 %PEG-U D$5 D$5 +indows %edia Audio Lossless 9+%A Lossless5 Lossless5 and and horten 94/. *ormats with loss" compression5 such as %P; %P;55 )oris )oris55 %usepac0 5 AAC AAC55 A$'AC and +indows %edia Audio Loss" 9+%A loss". loss".
U$&ompresse% 'u%io orm'ts $here is one ma6or uncompressed audio format5 PC% PC%55 which is usuall" stored in a .wa! file on +indows +indows or or in a .aiff file on %ac (. (. $he A** format is ased on the nterchange *ile *ormat 9**. *ormat 9**. $he +A) format is ased on the 'esource nterchange *ile *ormat 9'**5 *ormat 9'**5 which is similar to **. +A) and A** are fle&ile file formats designed to store more or less an" comination of sampling rates or itrates. $his ma0es them suitale file formats for storing and archi!ing an original recording. B+* 9Broadc 9Broadcast ast +a!e +a!e *ormat *ormat is a standa standard rd audio format format created created " the European Broadcasting ,nion as ,nion as a successor to +A). B+* allows metadata metadata to to e stored in the file. ee *uropean +roadcasti +roadcasting ng nion- .pecification of the +roadcast /a /ave ve Format 9EB, $echnical document ;#X5 Tul" 3ZZ8. $his is the primar" recording format used in man" professional audio audio wor0st wor0stati ations ons in the tele!i tele!isio sion n and film film indust industr" r".. B+* files files includ includee a standar standardi1 di1ed ed Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
timestamp reference which allows for eas" s"nchroni1ation with a separate picture element. timestamp tand-alone5 file ased5 multi-trac0 recorders from ound De!ices5 a&com5 44B ,A5 *oste& *oste&55 and Aaton all use B+* as their preferred format. $he .cda .cda 9Compact 9Compact Dis0 Audio $rac0 is a small file that ser!es as a shortcut shortcut to to the audio data for a trac0 on a music CD. t does not contain audio data and is therefore not considered to e a proper audio file format.
Loss0ess &ompresse% 'u%io orm'ts A lossless compressed format stores data in less space " eliminating unnecessar" data. ,ncompressed audio formats encode oth sound and silence with the same numer of its per unit of time. Encoding an uncompressed un compressed minute of asolute silence produces a file of the same si1e as encoding an uncompressed minute of music. n a lossless compressed format5 howe!er5 the music would occup" a smaller portion of the file and the silence would ta0e up almost no space at all. Lossless compression formats enale the original uncompressed data to e recreated e&actl" e&actl".. $he" includ includee the common commonF *LAC *LAC55 +a!Pac0 5 %on0e" %on0e"s s Audi Audio o5 ALAC ALAC 9Apple Lossless. $he" pro!ide a compression ratio of aout #:3 9i.e. their files ta0e up half the space of the originals. De!elopment in lossless compression formats aims to reduce processing time while maintaining a good compression ratio.
Loss) &ompresse% 'u%io orm'ts Loss" compression enales e!en greater reductions in file si1e " remo!ing some of the data. data. Loss" Loss" compre compressi ssion on t"pica t"picall" ll" achie!es achie!es far greate greaterr compres compressio sion n ut somewha somewhatt reduce reduced d FV 2ualit" than lossless compression " simplif"ing the comple&ities of the data. A !ariet" of tech techni ni2u 2ues es are are used used55 main mainl" l" " e&pl e&ploi oiti ting ng ps"choacoustics ps"choacoustics55 to remo remo!e !e data data with with minim minimal al reduction in the 2ualit" of reproduction. *or man" e!er"da" listening situations5 the loss in data 9and 9and thus thus 2ualit" 2ualit" is imperce impercepti ptile le.. $he popula popularr %P; format format is proal proal" " the estest-0now 0nown n e&le5 ut the AAC format found on the i$unes %usic tore is also common. %ost formats offer offer a range of degrees degrees of compression5 compression5 generall" measured measured in it in it rate rate.. $he lower the rate5 the smaller the file and the more significant the 2ualit" loss.
CODEC
A &o%e& is a de!ice or computer program capale program capale of encoding encoding or or decoding a digital data stream or signal signal.. $he $he word word codec codec i s a portmanteau of O&ompressor-%e&ompressorO or5 more commonl"5 O&oder-%e&oderO. A codec codec 9the 9the program program should not e confused with a coding or compression format compression format or or standard standard – – a format is a document document 9the standard5 standard5 a wa" of storing data5 while a codec is a program 9an implementation implementation which can read or write such files. n practice OcodecO is sometimes used loosel" to refer to formats5 howe!er. A codec encodes encodes a data data stream stream or signal signal for transm transmiss ission ion55 storag storagee or encr"ption encr"ption55 or decodes it for pla"ac0 or editing. Codecs are used in !ideoconferencing !ideoconferencing55 streaming media and Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
!ideo editi editing ng applic applicati ations ons.. A !ideo !ideo camera camerass analog-to-digital con!erter 9ADC 9ADC con!erts con!erts its analog signals into digital signals5 which are then passed through a !ideo compressor for for digital transmiss transmission ion or storage. storage. A recei!ing recei!ing de!ice then runs the signal signal through through a !ideo decompressor5 decompressor5 then a digital-to-analog con!erter 9DAC 9DAC for analog displa". $he term codec is codec is also used as a generic name for a !ideo conferencing unit.
Me%i' &o%e&s Codecs are often designed to emphasi1e certain aspects of the media5 or their use5 to e encoded. *or e&le5 e&le5 a digital !ideo 9using 9using a D) D) codec of a sports e!ent needs to encode motion well ut not necessaril" e&act colors5 while a !ideo of an art e&hiit needs to perform well encoding color and surface te&ture. Audio codecs for cell phones need to ha!e !er" low latenc" latenc" etween etween source encoding and pla"ac0 while audio codecs co decs for recording or roadcast can use high-latenc" h igh-latenc" audio compression techni2ues to achie!e higher fidelit" at a lower it-rate. $here are thousands of audio and !ideo codecs ranging in cost from free to hundreds of dollars or more. $his !ariet" of codecs can create compatiilit" and osolescence issues. $he impact is lessened for older formats5 for which free or nearl"-free codecs ha!e e&isted for a long time. $he older formats are often ill-suited to modern applications5 howe!er5 such as pla"ac0 in small portale de!ices. *or e&le5 raw uncompressed PC% audio 9UU.3 audio 9UU.3 0415 3V it stereo5 as represented on an audio CD or in a .wa! or .aiff file has long een a standard across multiple platforms5 ut its transmission transmission o!er networ0s is slow and e&pensi!e compared with more modern compressed formats5 such as %P; %P;.. %an" multimedia multimedia data data streams contain oth audio and !ideo !ideo55 and often some metadata that permit s"nchroni1at s"nchroni1ation ion of audio and !ideo. Each of these three streams ma" e handled handled " different programs5 processes5 or hardware ut for the multimedia data streams to e useful in stored or transmitted form5 the" must e encapsulated together in a container format. format. Lower itrate Lower itrate codecs allow more users5 ut the" also ha!e more distortion. Be"ond the initial increase in distortion5 lower it rate codecs also achie!e their lower it rates " using more comple& algorithms that ma0e certain assumptions5 such as those aout the media and the pac0et loss rate. (ther codecs ma" not ma0e those same assumptions. +hen a user with a low itrate codec tal0s to a user with another ano ther codec5 additional distortion is introduced " each transcoding.
AUDIO RECORDING SYSTEMS A Odig Odigit ital al audi audio o reco recordi rding ng de!ic de!iceO eO is an" mach machin inee or de!i de!ice ce of a t"pe t"pe commo commonl" nl" distriuted to indi!iduals for use " indi!iduals5 whether or not included with or as part of some other machine or de!ice5 the digital recording function of which is designed or mar0eted for the Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
primar" purpose of5 and that is capale of5 ma0ing a digital audio copied recording for pri!ate use. he definition of Odigital audio recording mediumO is similar: A Odigi Odigita tall audi audio o reco record rdin ing g medi medium umOO is an" mate materi rial al o6e o6ect ct in a form form comm commonl onl" " distri distriut uted ed for use " indi!id indi!idual uals5 s5 that that is primar primaril" il" mar0eted mar0eted or most most common commonl" l" used used " consumers for the purpose of ma0ing digital audio copied recordings " use of a digital audio recording de!ice
AUDIO AND MULTIMEDIA %ultimedia content on the +e5 " its definition - including or in!ol!ing the use of se!eral media - would seem to e inherentl" accessile or easil" made accessile. 4owe!er5 if the information is audio5 such as a 'ealAudio feed from a news conference or the proceedings in a courtroom5 a person who is deaf or hard of hearing cannot access that content unless pro!ision is made for a !isual presentation of audio content. imilarl"5 if the content is pure !ideo5 a lind person or a person with se!ere !ision loss will miss the message without the important information in the !ideo eing descried. 'ememer from ection # that to e compliant with ection 7X5 "ou must include te&t e2ui!alents for all non-te&t content. Besides including alternati!e te&t for images and image map areas5 "ou need to pro!ide te&tual e2ui!alents for audio and more generall" for multimedia content.
Some Dei$itio$s A transcript of audio content is a word-for-word te&tual representation of the audio5 including including descriptio descriptions ns of non-te&t non-te&t sounds li0e OlaughterO OlaughterO or Othunder. Othunder.OO $ranscri $ranscripts pts of audio content are !aluale not onl" for persons with disailities ut in addition5 the" permit searching and inde&ing of that content which is not possile with 6ust the audio. O/ot possileO is5 of course too strong. earch engines could5 if the" wanted5 emplo" !oice recognition to audio files5 and inde& that information - ut the" dont. +hen a transcript of the audio part of an audio-!isual 9multimedia presentation is displa"ed s"nchronousl" with the audio-!isual presentation5 it is called captioning .
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
0escriptive video or described described video interspers intersperses es e&planations e&planations of important !ideo with the normal audio of a multimedia presentation. $hese descriptions are also called audio descriptions. descriptions.
!OICE RECOGNITION AND RESPONSE )oice recognition and !oice response promise to e the easiest method of pro!iding a user interface for data entr" and con!ersational computing5 since speech is the easiest5 most natural means of human communication. )oice input and output of data ha!e now ecome technologicall" and economicall" feasile for a !ariet" of applications. )oice recognition s"stems anal"1e and classif" speech or !ocal tract patterns and con!ert them into digital codes for entr" into a computer s"stem. %ost !oice recognition s"stems re2uire OtrainingO the computer to recogni1e a limited !ocaular" of standard words for each user. (perators train the s"stem to recogni1e their !oices " repeating each word in the !ocaular" aout 37 times. $rained s"stems regularl" achie!e a ZZ percent plus word recognition rate. pea0er-independent !oice recognition s"stems5 which allow a computer to understand a !oice it has ne!er heard efore5 are used in a limited numer of applications. )oice recognition de!ices are used in wor0 situations where operators need to perform data entr" without using their hands to 0e" in data or instructions5 or where it would Cartier 'eplica pro!ide faster and more accurate input. *or e&le5 !oice recognition s"stems are eing used " manufacturers for the inspection5 in!entor"5 and 2ualit" control of a !ariet" of products5 and " airlines and parcel deli!er" companies for !oice-directed sorting of aggage Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
and parcels. )oice recognition is also a!ailale for some microcomputer software pac0ages for !oice input of data and commands. 4owe!er5 !oice input is e&pected to ecome !er" popular for most word processing applications in the ne&t few "ears. )oice response de!ices range from mainframe audio-response units to !oice-messaging minicomputers to speech s"nthesi1er microprocessors. peech microprocessors can e found in to"s5 calculators5 appliances5 automoiles5 and a !ariet" of other consumer5 commercial5 and industrial industrial products. products. )oice-messagi ice-messaging ng minicompute minicomputerr and mainframe mainframe audio response response units use !oice-response software to !erall" guide an operator through the steps of a tas0 in man" 0inds of acti!ities. $he" ma" also allow computers to respond to !eral and touch-tone input o!er the tele telepho phone ne.. E&am E&l ples es of appl applic icat atio ions ns incl include ude comp comput uter eri1 i1ed ed tele teleph phone one call call swit switch chin ing5 g5 telema telemar0e r0etin ting g sur!e" sur!e"s5 s5 an0 an0 pa"-"pa"-"-pho phone ne illill-pa"i pa"ing ng ser!ice ser!ices5 s5 stoc0 stoc0 2uotati 2uotations ons ser!ic ser!ices5 es5 uni!ersit" registration s"stems5 and customer credit and account alance in2uiries.
AUDIO PROCESSING SOT(ARE $here are a !ariet" of reasons to use 'u%io e%iti$/ sot?'re while some people use it to create and record files5 others use it to edit and restore old recordings5 and some use it onl" to con!e con!ert rt and and change change file file t"pes t"pes.. $han0 $han0ss to audio audio editi editing ng soft softwa ware re55 more more peop people le ha!e ha!e the the opportunit" to get their creati!e 6uices flowing " using the affordale and capale applications a!ailale on the mar0et toda". f "ou are curious aout what "ou can do with audio editing software and tr"ing to decide if itYs the right purchase for "ou5 here are some asic features each application allows "ou to perform: •
Cre'te – +ith an eas"-to-use asic program5 e!en an amateur can create uni2ue !oice and music mi&es for an internet radio station5 wesite5 PowerPoint presentation or for personal use.
•
Restore – Ad!anced filters and other tools within the audio editing software applications can restore the sound of aged LPs or damaged audio recordings. ?ou can also use these filters to filter out ac0ground noises5 static or other unwanted noise.
•
E%it – Audio editing software applications include se!eral editing tools5 including cut and paste options and the ailit" to edit tag or media information.
•
Re&or% – $hrough a compatile program5 "ou can record "our fa!orite podcasts5 internet radio stations and other t"pes of streaming audio. ?ou can also pull audio from a !ideo or audio file5 CDs5 D)Ds or e!en "our sound card5 so that "ou can edit and listen to it on "our computer or a portale de!ice.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia •
Co$vert – %ost programs can con!ert file formats. *or e&le5 from a %D to an %P;5 +%A5 +A) or (GG file. •
+e are continuall" researching5 re!iewing and ran0ing the top audio editing software choices a!ailale so "ou ha!e the latest and the greatest features5 tools and additio additions ns at "our "our finger fingertip tips. s. +e ha!e includ included ed art articl icles es on aud audio io edi editin ting g software55 along with re!iews of each top product5 including: %agi& %usic %a0er 5 software +a!ePad and +a!ePad and De&ster Audio Editor . (ur side-"-side comparison of audio editing software will help "ou 2uic0l" determine which application is the est suited to meet "our indi!idual audio editing needs.
Au%io E%iti$/ Sot?'re Be$eits $he top eight programs in our re!iew ran0ed 2uite close to each other and are within a similar price range howe!er5 the" all support different formats5 editing tools and recording urning ailities. $here are se!eral factors to consider when loo0ing for suitale applications. Before choosing a program5 determine what "ou want to do with the software. Are "ou interested in wor0ing with streaming audio5 ma0ing arrangements for "our iPod or %P; pla"er5 restoring sound files5 forensics5 creating audio for "our wesite or urning a CD of "our ands music $here are also a !ariet" of editing tools5 effects and filters a!ailale. f "ou are a eginner5 "ou ma" want to loo0 for a product that includes a large numer of preset effects and filters. Alternatel"5 if "ou alread" 0now how to use this 0ind of software and 0now how to ma0e ad6ustments on "our own5 "ou ma" want a program that supports a high le!el of manipulation through a 37-and e2uali1er5 a mi&er or !arious processors. Below are the criteria $op$e $op$en'E)E+ n'E)E+ used to e!aluate e!a luate each application:
Au%i Au%ioo E%it E%iti$ i$// All good programs programs contain contain pla"5 pla"5 record5 record5 cut5 cop"5 cop"5 paste and so on this criterion criterion loo0s e"ond the essential editing ed iting tools to include tools such as e2uali1ers5 e2u ali1ers5 processors5 mi&ers5 preset effects5 filters and anal"1ing tools li0e the wa!eform or spectrogram.
Re&o Re&or% r%i$ i$/9 /9E% E%it iti$ i$// Abi0 Abi0it it)) $he est programs will capture audio from files5 the sound card or from downloaded CDs as well as from outside sources such as a line-in from a stereo5 %D de!ice or microphone. As a onus5 it is also helpful h elpful if the product includes urning software so that "ou can use "our CD or D)D urner to sa!e edited files. $o e the most compatile5 the product must e ale to wor0 with and con!ert man" file formats5 li0e the !arious +A) file t"pes5 +indows %edia Audio 9+%A5 A** A** 9used " " Apple and %P; files.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
UNIT-I!
UESTIONS SECTION A *. So!n4 is 5555555555 in nat!re. +. 6he n!mber of 3ibrations per secon4 secon4 is calle4 555555555555. 555555555555. @. Define sound. . ound pressure le!els are measured in ]]]]]]]]]]. . %D stands for ]]]]]]]]. . ound is usuall" represented as ]]]]]]]]]]. . ]]]]]]]]] is a Dol"s sound-generation professional s"stem. . ]]]]]]]]]]] handle low fre2uencies. Q. ]]]]]]]]] is the smallest distinguishale sound in a language. *=. Define use of Audio Processing oftware. SECTION B *. E&plain the fundamental characteristic of sound. +. List and e&plain asic internal components of the sound cards. @. Discuss the t"pes and characteristic of s"nthesi1ers. . Discuss aout an" three audio file formats . E&plain riefl" aout Audio recording s"stems. . Define acoustics and e&plain the nature of sound wa!es. . E&plain aout sound card. . +rite +rite a note n ote on audio s"nthesi1ers. Q. Briefl" e&plain aout C(DEC. *=. +rite +rite a note aout %icrophone and Amplifier. SECTION B *. Discuss in detail aout audio transmission and audio processing software. +. List the characteristics of sound. @. E&plain riefl" aout audio recording s"stem s "stem and its fie formats. . Discuss in detail aout !oice recognition and response. . tate the features of o f %D and differentiate %D from Digital Audio. . Discuss the important parameters of digital audio. . Discuss in detail aout %D. . Discuss in detail aout an" four audio file format. Q. E&plain !arious interfaces for audio transmission. *=. Briefl" e&plain aout audio file formats and C(DEC Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
UNIT-! )ideo: )ideo: Analog Analog )ideo ideo Camera Camera – $rans $ransmis missio sion n of )ideo ideo ignal ignalss – )ideo )ideo ignal ignal *ormat *ormatss – $ele!ision Broadcasting tandards – PC )ideo – )ideo *ile *ormats and C(DECs – )ideo Editi Editing ng – )ideo Editin Editing g oftwa oftware. re. Anima Animatio tion: n: $"pes of Anima Animatio tion n – Comput Computer er Assis Assisted ted Animation – Creating %o!ement – Principles of Animation – ome $echni2ues of Animation – Animation on the +e – pecial Effects – 'endering Algorithms. Compression: %PEG-3 Audio – %PEG-3 )ideo )ideo - %PEG-#Audio – %PEG-# )ideo. )ideo.
!IDEO %otion !ideo is a comination of image and audio. t consists of a set of still images called called frames displa"ed displa"ed to the user one after after another at a specific specific speed 5 0nown as the frame rate rate meas measur ured ed in nume numerr of fram frames es per per secon second. d. !i%eo is the technol technolog" og" of electr electroni onical call" l" capturing5 recording5 processing5 storing5 transmitting5 and reconstructing a se2uence of still images representi representing ng scenes in motion. )ideo )ideo technolog" technolog" was first de!eloped de!eloped for cathode ra" tue tele!ision s"stems5 ut se!eral new technologies for !ideo displa" de!ices ha!e since een in!en in!ente ted. d. tand tandar ards ds for for tele tele!is !isio ion n sets sets and and comput computer er monit monitor orss ha!e ha!e tende tended d to e!ol e!ol!e !e independentl"5 ut ad!ances in computer performance and digital tele!ision roadcasting and recording are resulting in a con!ergence of standards and use of content. Computers can now displa" tele!ision and film-st"le !ideo clips and streaming media5 encouraged " increased processor speed5 storage capacit"5 and roadand access to the nternet. General purpose computing hardware can now e used to capture5 store5 edit5 and transmit tele!ision and mo!ie content5 as opposed to older dedicated analog technologies.
ANALOG !IDEO CAMERA CAMCORDER A &'m&or%er 9video video camera recorder is an electronic de!ice that comines a !ideo camera and a !ideo recorder into one unit. E2uipment manufacturer manufacturerss do not seem to ha!e strict guidelines for the term usage. %ar0eting materials ma" present a !ideo recording de!ice as a camcorder 5 ut the deli!er" pac0age would identif" content as video camera recorder . n order to differentiate a camcorder from other de!ices that are capale of recording !ideo5 li0e cell
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
phones and compact digital cameras5 a camcorder is generall" identified as a portale de!ice ha!ing !ideo capture and recording as its primar" function. $he earliest camcorders emplo"ed analog recording onto !ideotape. ince the 3ZZ7s digital recording has ecome the norm5 ut tape remained the primar" recording media. tarting from earl" #777s tape is eing graduall" replaced with other storage media including optical dis0s5 hard dis0 dri!es and flash memor".All tape-ased camcorders use remo!ale media in form of !ideo cassettes. Camcorders that do not use magnetic tape are often called tape less camcorders and ma" use u se optical discs 9remo!ale5 solid-state flash memor" 9remo!ale or uiltin or a hard dis0 dri!e 9remo!ale or o r uilt-in. Camcorders that permit using more than one t"pe of media5 li0e uilt-in hard dis0 dri!e and memor" card5 are often called hybrid camcorders. camcorders. Camcorders contain ; ma6or components: 0e$s5 im'/er5 an and re&or%er. $he lens gathers and focuses light on the imager. $he imager 9usuall" a CCD or C%( sensor on modern camcorders earlier e&les often used !idicon tues con!erts incident light into an electrical signal. *inall"5 the recorder con!erts the electric signal into digital !ideo and encodes it into a storale form. %ore commonl"5 the optics and imager are referred to as the camera section. camera section.
TRANSMISSION O !IDEO SIGNALS4 Analog transmission is a transmission method of con!e"ing !oice5 data5 image5 signal or !ideo information using a continuous signal which !aries in amplitude5 phase5 or some other propert" in proportion to that of a !ariale. t could e the transfer of an analog source signal using an analog modulation method such as *% or A%5 or no modulation at all.
MODES O TRANSMISSION4 Analog transmission can e con!e"ed in man" different fashions: twisted-pair or coa& cale twisted-pair or fier-optic cale )ia air )ia water $here are two asic 0inds of analog transmission5 oth ased on how the" modulate data to comine an input signal with a carrier signal. ,suall"5 this carrier signal is a specific fre2uenc"5 and data is transmitted through its !ariations. $he two techni2ues are amplitude modulation 9A%5 which !aries the amplitude of the carrier signal5 and fre2uenc" modulation 9*%5 which modulates the fre2uenc" of the carrier
!IDEO SIGNAL ORMAT COMPONENT !IDEO
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$his refers to a !ideo signal which is stored or transmitted as three separate component signals. $he simplest form is the collection of ' 5 G and B signals which usuall" form the output of analog !ideo cameras.
COMPOSITE !IDEO *or ease is signal transmissio transmission n 5 speciall" speciall" $) roadcasting roadcasting 5 also reduce cael channel re2uirements 5 components signals are often comined in to a single signal which is transmitted along a single wire or channel.
!IDEO RECORDING ORMATS4 ORMATS4 BETACAM SP De!el De!elope oped d " on" on"55 perh perhap apss the the most most popul popular ar compo componen nentt form format at for for oth oth fiel field d ac2uisition and post production toda". toda". Betacam uses cassettes and transports similar similar to the old Betama& home !ideo format5 ut the similarities similarities end there. $ape $ape speed is si& times higher5 and luminance and chrominance are recorded on two separate trac0s. $he two color difference signals are compressed in time " two and recorded se2uentiall" on a single trac0.
M-II '1(( 9r 9read ead em1two em1two was de!elop de!eloped ed " %atsus %atsushit hitaa for Tapan Tapanss nation national al roadc roadcast asting ing compan" /4<. $oda" %- is one of the most popular roadcast 2ualit" component formats with 2ualit" similar to Betacam P. Large users of %- include /4<5 of course5 and /BC. 'ecording techni2ue is similar to Betacam P ut uses some enhancements which compensate for the lower tape speed.
EBU C orm't $hese machines use 3O tape in open reels. $he main ad!antages are !er" fast transports transports and low recording densit"5 which ma0es the format rather immune to drop-outs. $ape costs are high. $he units can record single frames5 which ma0es them popular in computer animation. ome units with !acuum capstans can operate from stop to nominal speed within one !ideo field. $he tape ma0es almost a full circle circle around the picture picture drum5 and a single head is ale to record and pla"ac0 the entire !ideo signal.
EBU B orm't imilar to C format5 ut uses segmented helical scan. $he diameter of the picture drum is small5 and a single !ideo field is recorded in V separate trac0s.
D SERIES DIGITAL ORMATS 01 01 was the first practical digital format5 introduced " on" in 3ZXV. Although still considered a 2ualit" reference5 D-3 is e&pensi!e to u" and use and has een mostl" superseded " the more cost effecti!e later formats. formats. 01$ was 01$ was de!eloped " Ampe& around the same time as D-3 was introduced and is meant to e a full" transparent storage for composite !ideo5 useful for composing Ospot tapesO for programmes such as news. 012 and 012 and 013 013 ha!e ha!e oth een de!eloped " %atsushita. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
D- units can use two different different sample rate resolution resolution cominations cominations and are generall" capale of pla"ing ac0 D-; tapes. +hile D- is still a studio format5 D-; camcorders are a!ailale from Panasonic. 014 is is a digital 4D$) recording format " $oshiaB$. tores V77 GB worth of data on a ph"sicall" huge VU minute cassette. c assette.
PC !IDEO4
Beside animation there is one more media element5 which is 0nown as !ideo. +ith latest technolog" it is possile to include !ideo impact on clips of an" t"pe into an" multimedia creation5 e it corporate presentation5 fashion design5 entertainment games5 etc. $he !ideo clips ma" contain some dialogues or sound effects and mo!ing pictures. $hese !ideo clips can e comined with the audio5 te&t and graphics for multimedia presentation. ncorporation of !ideo in a multimedia pac0age is more important and complicated than other media elements. (ne can procure !ideo clips from !arious sources such as e&isting !ideo films or e!en can go for an outdoor !ideo shooting. All the !ideo a!ailale are in analog format. $o ma0e it usale " computer5 the !ideo clips are needed to e con!erted into computer understandale format5 i.e.5 digital format. Both cominations of software and hardware ma0e it possile to con!ert the analog !ideo clips into digital format. $his alone does not help5 as the digitised !ideo clips ta0e lots of hard dis0 space to store5 depending on the frame rate used for digitisation. $he computer reads a particular !ideo clip as a series series of still still pictures called called frames. frames. $hus !ideo clip is made of a series of separate frames where each frame is slightl" different from the pre!ious one. $he computer reads each frame as a itmap image. Generall" there are 3 to # frames per second so that the mo!ement is smooth. f we ta0e less frames than this5 the mo!ement of the images will not e smooth. $o cut down the space there are se!eral modern technologies in windows en!ironment. Essentiall" these technologies compress the !ideo image so that lesser space is re2uired. 4owe!er5 latest !ideo compression software ma0es it possile to compress the digitised !ideo clips to its ma&imum. n the process5 it ta0es lesser storage space. (ne more ad!antage of using digital !ideo is5 the 2ualit" of !ideo will not deteriorate from cop" to cop" as the digital !ideo signal is made up of digital code and not electrical electrical signal. Caution should should e ta0en while digiti1ing the !ideo from analog source to a!oid frame droppings and distortion. A good 2ualit" !ideo source should e used for digiti1ation.
Curre$t0): vi%eo is /oo% or4 Promoting Promoting tele!ision tele!ision shows5 shows5 films5 films5 or other non-computer non-computer media that traditional traditionall" l" ha!e used trailers in their ad!ertising.Gi!ing users an impression of a spea0erYs personalit". showing Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
things that mo!e. *or e&le a clip from a motion picture. Product demos of ph"sical products are also well suited for !ideo.
!IDEO ILE ORMATS4 ORMATS4 MULTIMEDIA CONTAINER ORMATS4 $he container file is used to identif" and interlea!e different data t"pes. impler container formats can contain different t"pes of audio codecs5 while more ad!anced container formats can support multiple audio and !ideo streams5 sutitles5 chapter-information5 and meta-data 9tags j along with the s"nchroni1ation information needed to pla" ac0 the !arious streams together.n most cases5 the file header5 most of the metadata and the s"nchro chun0s are specified " the container format. *or e&le5 container formats e&ist for optimi1ed5 low-2ualit"5 internet !ideo streaming which differs from high-2ualit" D)D streaming re2uirements. Container format parts ha!e !arious names: Ochun0sO as in '** and P/G5 Opac0etsO in %PEG-$ 9from the communications term5 and OsegmentsO in TPEG. $he main content of a chun0 is called the OdataO or Opa"loadO. %ost container formats ha!e chun0s in se2uence5 each with a header5 while $** instead stores offsets. %odular chun0s ma0e it eas" to reco!er other chun0s in case of file corruption or dropped frames or it slip5 while offsets result in framing errors in cases of it slip.
CODECs4 A &o%e& is a de!ice or computer program capale of encoding andor decoding a digital digital data stream or signal. $he word codec is codec is a portmanteau of &ompressor-%e&ompressor or5 more commonl"5 &oder-%e&oder oder. . A codec codec 9the 9the program program should not e confused with a coding or compression format compression format or or standard standard – – a format is a document document 9the standard5 standard5 a wa" of storing data5 while a codec is a program 9an implementation implementation which can read or write such files.n practice OcodecO is sometimes used loosel" to refer to formats5 howe!er.A codec encodes a data stream or signal for transmission5 storage or encr"ption5 or decodes it for pla"ac0 or editing. Codecs are used in !ideoconferencing5 streaming media and !ideo editing applications. A !ideo cameras analog-to-digital con!erter 9ADC con!erts its analog signals into digital signals5 which are then passed through a !ideo compressor for digital transmission or storage. A recei!ing de!ice then runs the signal through a !ideo decompresses5 then a digital-toanalog con!erter 9DAC for analog displa". $he term codec is codec is also used as a generic name for a !ideo conferencing unit.
!i%eo E%iti$/ 5ideo 5ideo editing is is the process of manipulating and rearranging !ideo shots to create a new wor0. Editing is usuall" considered to e one part of the post the post production process production process j other post production tas0s include titling5 colour correction5 sound mi&ing5 etc. %an" people use the term editing to to descrie all their post-production wor05 especiall" in non-professional situations. +hether or not "ou choose to e pic0" aout terminolog" is up to Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
"ou. n this tutorial we are reasonal" lieral with our terminolog" and we use the word editing to mean an" of the following: 'earranging5 adding andor remo!ing sections of !ideo clips andor audio clips. Appl"ing colour correction5 filters and other enhancements. Creating transitions etween clips. 6oals of *diting $here are man" reasons to edit a !ideo and "our editing approach will depend on the desired outcome. Before "ou egin "ou must clearl" define "our editing goals5 which could include an" of the following:
Remove u$?'$te% oot'/e $his is the simplest and most common tas0 in editing. %an" !ideos can e dramaticall" impro!ed " simpl" getting rid of the flawed or unwanted its.
C3oose t3e best oot'/e t is common to shoot far more footage than "ou actuall" need and choose onl" the est material for the final edit. (ften "ou will shoot se!eral !ersions 9ta0es of a shot and choose the est one when editing.
ANIMATION Animation is a !isual techni2ue that pro!ides the illusion of motion " displa"ing a collection of images in rapid se2uence. Each image contains a small change5 for e&le a leg mo!es slightl"5 or the wheel of a car turns. +hen the images are !iewed rapidl"5 "our e"e fills in the details and the illusion of mo!ement is complete. +hen used appropriatel" in "our applicationYs user interface5 animation can enhance the user e&perience while pro!iding a more d"namic loo0 and feel. %o!ing user interface elements smoothl" around the screen5 graduall" fading them in and out5 and creating new custom controls with special !isual effects can comine to create a cinematic computing e&perience for "our users. n $ime ime %ach %achin inee perc percei ei!ed !ed dist distanc ancee pro! pro!id ides es an intu intuit iti! i!ee meta metaph phor or for for a linea linear r progression in time. (lder file s"stem snapshots are shown further awa"5 allowing "ou to mo!e through them to find the !ersion "ou want to restore.
i/ure *-* $ime %achine user interface
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
$he i$unes 8.7 Co!er*low interface shows alum and mo!ie co!ers in an engaging manner. As "ou rowse through the content the images animate to face the user directl". $his is a great e&le of the cinematic computing e&perience. And the Co!er*low user interface allows more content to e displa"ed in a smaller area than if the images were placed side " side.
i/ure *-+ i$unes 8.7 Co!er*low user interface
E!en small uses of animation can communicate well. $he i"nc menu e&tra animates to show the s"ncing is in progress 9*igure *igure 3-;. n all these cases the applications pro!ide additional information and conte&t to the user through the use of animation.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
i/ure *-@ i"nc menu status item
Usi$/ A$im'tio$ i$ Your App0i&'tio$s 4ow "ou incorporate animation into "our own application largel" depends on the t"pe of interface "our application pro!ides. Applications that use the A2ua user interface can est integrate animation " creating custom controls or !iews. Applications that create their own user interface5 interface5 such as educational educational software5 software5 casual games5 or full-scre full-screen en applications applications such as *ront 'ow5 ha!e much greater leewa" in determining how much animation is appropriate for their users. +ith 6udicious use of animation and !isual effects5 the most mundane s"stem utilit" can ecome a rich !isual e&perience for users5 thus pro!iding a compelling competiti!e ad!antage for "our application.
TYPES O ANIMATION4
$here are man" different t"pes of animation that are used nowada"s. $he three main t"pes are cla" animation5 computer animation5 and regular animation.
C0') A$im'tio$ Cla" Cla" anim animat atio ion n is not real reall" l" a new techn techni2 i2ue ue as man" man" peopl peoplee might might thin thin0. 0. Cla" Cla" animation egan shortl" after plasticine 9a cla"-li0e sustance was in!ented in 3XZ85 and one of the first first films to use it was made in 3Z7#. $his t"pe t"pe of animation was not !er" popular popular until until Gum" was in!ented. $he in!ention of Gum" was a ig step in the histor" of cla" animation. /ow5 cla" animation has ecome more popular and easier ea sier to do. Later on5 more cla" animation films were made5 such as the +allace and Gromit series of mo!ies5 the ad!ertisements that were made for the California 'aisin Ad!isor" Board and the Celerit" Deathmatch series.
Computer A$im'tio$ Computer Computer animation animation has also ecome common. common. Computer animation animation egan aout U7 "ears ago when the first computer drawing s"stem was created " General %otors and B%. t allowed allowed the user to !iew a ;D model of a car and change the angles and rotation. rotation. ?ears ears later5 later5 more people helped ma0e computer animation etter. %o!ies that used computer animation are: $he A"ss5 A"ss5 Turass Turassic ic Par05 Par05 *orres *orrestt Gump5 Gump5 and more. more. Also5 Also5 computer computer animati animation on was used used differentl"5 differentl"5 as in the show outh Par05 which used stop motion cutout animation recentl" it uses Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
computer animation. A well-0nown computer animation compan" is Pi&ar. $he" are responsile responsile for ma0ing $o" $o" tor"5 A Bugs Life5 %onsters nc.5 *inding /emo5 and more. Also5 !ideo games ha!e used computer animation as well.
Ce0-S3'%e% A$im'tio$ Cel-shaded Cel-shaded animat animation ion is ma0es computer graphics graphics appear to e hand-drawn. hand-drawn. $his t"pe t"pe of animat animation ion is most most common commonl" l" turning turning up in console !ideo games. games. %ost %ost of the time time the celcelshading process starts with a t"pical ;D model. model. $he difference occurs when a cel-shaded o6ect is drawn on-screen. $he rendering engine onl" selects a few shades of each color for the o6ect5 ma0ing it loo0 flat. n order to draw lac0 in0 lines outlining outlining an o6ects o6ects contours5 contours5 the ac0-face the ac0-face culling is in!erted to draw ac0-faced triangles with lac0-colored !ertices. $he !ertices must e drawn man" times with a slight change in translation to ma0e the lines thic0. $his produces a lac0shaded silhouette. $he ac0-face culling is then set ac0 to normal to draw the shading and optional te&tures of the o6ect. $he result is that the o6ect is drawn with a lac0 outline. $he first ;D !ideo game to feature true real-time cel shading was Tet et 'adio for the ega Dreamcast. After Tet et 'adio5 man" other cel-shaded games were introduced during a minor fad fad in!ol!ing in!ol!ing cel-shaded graphics. $he ne&t games with cel-shading to capture attention in some form were #77#s Tet et 'adio *uture and *uture and l" Cooper and the $hie!ius 'accoonus. (!er time5 more cel-shaded titles such as Dar0 Cloud #5 Cel Damage5
Re/u0'r A$im'tio$ Animation egan with +insor +insor %cCa". %cCa". 4e did his animations animations all " himself5 and it too0 him a long time 9aout a "ear for a fi!e minute cartoon. cartoon. But for some5 it was ridiculous ridiculous that the" would ha!e to wait so much for so little. $hen the modern animation animation studio came to e. ?ears later5 more more people would in!ent more cartoon characters. (tto %essmer in!ented in!ented the character *eli& the Cat. Later on5 the +alt +alt Disne" tudio created teamoat +illie5 +illie5 which introduced the character %ic0e" %ouse. (ther companies started to to ma0e their own cartoons some of which we can still watch toda".
Computer Assiste% A$im'tio$ Computer-assisted animation is common in modern animated films. 'ecent films such as OBeowulfO OBeowulfO were created created using computer-assi computer-assisted sted animation. animation. $hese techni2ues techni2ues enhance modern animated films in wa"s not n ot seen in film histor". h istor".
Dei$itio$ Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Computer-assisted animation is animation that could not e completed without using a computer. *unctions li0e in-etweening and motion capture are e&les of computer-assisted animation.
Oteamoat Oteamoat Animation
+illie +illieOO
9'egular 9'egular OGum"O Animation
9Cla"
O*inding /emoO /emoO 9Computer Animation
Oou Oouth th Par0 Par0OO Animation
O*amil" Gu"O 9CelOCele eri rit" t" haded Animation OCel 9Com 9Compu pute ter r Animation
Deat Deathm hmat atch chOO
9Cla 9Cla" "
I$-bet?ee$i$/ $weening is a techni2ue used in two-dimensional animation that lends two animation cels together. Each is indi!iduall" drawn. $hese are pla"ed rapidl"5 which gi!es the impression Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
of mo!ement. Between each cel or 0e" frame in the se2uence5 there is a !isual gap in which a transition drawing is placed. /ow computers are used to draw the transition or Oin-etweenO drawing so that the film loo0s smooth 9see 'esources for !isual demonstrations.
Motio$ C'pture %otion capture uses reflecti!e dots that are placed at an actors 6oints. +hen he mo!es5 a computer pic0s up the dots and creates a model of the performance5 which is stored in the computer. Animators later use the sensor points as a Os0eletonO to create a three-dimensional character 9see 'esources for !isual demonstrations.
CREATING MO!EMENT4 f "ou were were wonderi wondering ng how the" create create mo!ies mo!ies such as /allace and 6romit or those groo!" Lego Lego shorts shorts on ?ou$ue ?ou$ue55 "our search is o!erQ Although creating stop motion animation is not difficult5 it is time-consuming5 repetiti!e and re2uires patience re2uires patience.. As long as "oure forewarned and 0een5 this ma0es a fantastic ho" ho" and and sometimes e!en grows into a career .
P0'&e )our &'mer' in front of the OsetO that "ou are going to ta0e photos of. Chec0 that it can !iew the entire frame. t is !er" important to support the camera camera or or place it so that it is sitting steadil" and cannot sha0e as "ou ta0e the photos. (therwise5 the end result will appear chaotic and lac0 continuit".
Set up ' /oo% sour&e o 0i/3ti$/. t might e a lamp or a flashlight. f "our light is flic0ering5 "ou need to shut off other sources of light. Close the lind5 or curtains curtains etc. etc.
T'8e ' si$/0e p3oto of the figure in the selected position. $his photo shows the Lego set eing readied for photographing.
Be/i$ t3e moveme$t seue$&e. %o!e the figure it " it - ver) small mo!ements each time. t ma" e the entire od" if the figure is wal0ing5 or it ma" 6ust e an arm5 head or leg. f "ou are mo!ing onl" one od" part and "ou find that the figure is tilting or threatening to fall o!er5 ma0e use of poster tac0 under the feet o r other area touching part of the set.
Repe't t3e moveme$t seue$&e until "our action step is completed5 or "our cameras memor" is full. a!e the pictures onto "our computer in an eas" to rememer place.
Use )our movie-m'8i$ movie-m'8i$// sot?'re sot?'re 's i$stru&te% i$stru&te% 9or see two popular software methods elow. $he asics in!ol!e: mport the pictures into the desired program. %a0e sure the pictures are at a !er" small duration so the" flow !er" fast. f "ou are disappointed " the speed at which "our program can animate5 tr" e&porting the pro6ect as a !ideo file 9beore '%%i$/ 'u%io5 then importing it again5 and using a speed effect on it5 such as
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
doule speed 9these effects onl" wor0 on !ideo clips. $hen5 if the resulting speed is sufficient5 "ou ma" add "our audio. Add titles and credits if "ou would li0e. %a0e sure "ou li0e the end result of "our stop motion animation.
A%% ee&ts or tr'$sitio$s5 or whate!er else "ou feel ma0es it loo0 good. S3're )our movie " urning it into a CD CD or or place it into an iPod iPod.. Continue ma0ing other onesQ
PRINCIPLES O ANIMATION $he principles are: 3. $iming #. Ease n and (ut 9or low n and (ut ;. Arcs U. Anticipation . E&aggeration V. 2uash and tretch 8. econdar" Action X. *ollow $hrough and (!erlapping Action Z. traight Ahead Action and Pose-$o-Pose Action 37. taging 33. Appeal 3#. low-out and low-in impl" memori1ing these principles isnYt the point. /o one will care whether or not "ou 0now this list. tYs whether or not "ou trul" understand and can utili1e these ideas that matter. f "ou do5 it will show automaticall" in "our wor0.
*. Timi$/ $iming is the essence of animation. $he speed at which something mo!es gi!es a sense ofwhat the o6ect is5 the weight of an o6ect5 and wh" it is mo!ing. omething li0e an e"elin0 can e fast or slow. f itYs fast5 a character will seem alert and awa0e. f itYs slow thecharacter ma" seem tired and lethargic.T. LesseterYs e&le. 4ead that turns left and right. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
4ead turns ac0 and forth reall" slow: it ma" seem as if the character is stretching hisnec0 9lots of in etween frames. • •
kA it faster it can e seen as sa"ing OnoO 9a few in etween frames
k'eall" 'eall" fast5 and the character is reacting to getting hit " a aseall at 9almost none in etween frames.
+. E'se I$ '$% Out 1or S0o? I$ '$% Out2 Ease in and out has to do with graduall" causing an o6ect to accelerate5 or come to rest5from a pose. An o6ect or lim ma" slow down as it approaches a pose 9Ease n or graduall" start to mo!e from rest 9Ease (ut.*or e&le5 a ouncing all tends to ha!e a lot of ease in and out when at the top of its ounce. As it goes up5 gra!it" affects it and slows down 9Ease n5 then it starts its downward motion more and more rapidl" 9Ease (ut5 until it hits the ground. /ote that this doesnYt mean slow mo!ement. $his reall" means 0eep the in etween frames close to each e&treme.
@. Ar&s n the real world almost all action mo!es in an arc. +hen creating animation one should tr" to ha!e motion follow cur!ed paths rather than linear ones. t is !er" seldom that a character or part of a character mo!es in a straight line. E!en gross od" mo!ements when "ou wal0 somewhere tend not e perfectl" straight. +hen a handarm reaches out to reach something5 it tends to mo!e in an arc. imple e&le –
. A$ti&ip'tio$ Action in animation usuall" occurs in three sections. $he setup for the motion5 the actual action and then follow-through of the action. $he first part is 0nown as anticipation. n some cases anticipation is needed ph"sicall". *or e&le5 efore "ou can throw a all "ou must first swing "our arm ac0wards. $he ac0wards motion is the anticipation5 the throw itself is the motion. Anticipation is used to lead the !iewers e"e to prepare them for the action that follows. Longer period of anticipati anticipation on is needed for faster actions. E&le5 E&le5 a character character 1ips off screen lea!ing a puff of smo0e. ,suall" 6ust efore the 1ip5 there is a pose where the characters raises a Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
leg and ends oth arms as if heYs aout to run. $hatYs the anticipation pose for the off screen run. run. Genera Generall" ll"55 for good clear clear animati animation5 on5 the !iewer !iewer should should 0now 0now what what is aout aout happen happen 9anticipation5 what is happening 9the actual action itself and what happened 9related to follow through.
. E,'//er'tio$ E&aggeration is used to accent an action. t should e used in a careful and alanced manner5 not aritraril". *igure out what the desired goal of an action or se2uence is and what sections need to e e&aggerated. $he result will e that the animation will seem more realistic and entertaining. (ne can e&aggerate motions5 for e&le an arm ma" mo!e 6ust a it too far riefl" in an e&treme swing. Generall" when animating an imating to dialogue5 one listens to the trac0 and pic0s out areas that sound li0e the" ha!e more stress or importance5 and then tends to e&aggerate e& aggerate poses and motions that fall at those times. $he 0e" is to ta0e something something and ma0e it more e&treme e&treme in order to gi!e it more life5 ut not so much that it destro"s elie!ailit". E&le: e&aggerating the lamp proportions to gi!e a sense of dad and son.
.SUASH AND STRETCH
$his action gi!es the illusion of weight and !olume to a character as it mo!es. Also s2uash and stretch is useful in animating dialogue and doing facial e&pressions. 4ow e&treme the use of s2uash and stretch is5 depends on what is re2uired in animating the scene. ,suall" its roader in a short st"le of picture and sutler in a feature. t is used in all forms of character animation from a ouncing all to the od" weight of a person wal0ing. $his is the most important element "ou will e re2uired to master and will e used often.
.SECONDARY ACTION
$his action adds to and enriches the main action and adds more dimension to the character animation5 supplementing andor re-enforcing the main action. E&le: A character is Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
angril" wal0ing toward another character. $he wal0 is forceful5 aggressi!e5 and forward leaning. $he leg action is 6ust short of a stomping wal0. $he secondar" action is a few strong gestures of the arms wor0ing with the wal0. Also5 the possiilit" of dialogue eing deli!ered at the same time with tilts and turns of the head to accentuate the wal0 and dialogue5 ut not so much as to distract from the wal0 action. All of these actions should wor0 together in support of one another. $hin0 of the wal0 as the primar" action and arm swings5 head ounce and all other actions of the od" as secondar" or supporting action.
. OLLO( THROUGH AND O!ERLAPPING O !ERLAPPING ACTION
+hen the main od" of the character stops all other parts continue to ca tch up to the main mass of the character5 such as arms5 long hair5 clothing5 coat tails or a dress5 flopp" ears or a long tail tail 9thes 9thesee foll follow ow the the path path of acti action on. . /oth /othin ing g stop stopss all all at once. once. $his $his is foll follow ow thro through ugh.. (!erlapping action is when the character changes direction while his clothes or hair continues forward. $he character is going in a new direction5 to e followed5 a numer of frames later5 " his clothes in the new direction. OD'AG5O in animation5 for e&le5 would e when Goof" starts to run5 ut his head5 ears5 upper od"5 and clothes do not 0eep up with his legs. n features5 this t"pe of action is done more sutl". E&le: +hen now +hite starts to dance5 her dress does not egin to mo!e with her immediatel" ut catches up a few frames later. Long hair and animal tail will also e handled in the same manner. $iming ecomes critical to the effecti!eness of drag and the o!erlapping action.
Q. STARIGHT AHEAD AND POSE TO POSE ANIMATION
traight ahead animation starts at the first drawing and wor0s drawing to drawing to the end of a scene. ?ou can lose si1e5 !olume5 and proportions with this method5 ut it does ha!e spontaneit" and freshness. *ast5 wild action scenes are done this wa". Pose to Pose is more planned out and charted with 0e" drawings done at inter!als throughout the scene. i1e5 !olumes5 and proportions are controlled etter this wa"5 as is the action. $he lead animator will turn charting and 0e"s o!er to his assistant. An assistant can e etter used with this method so that the animator doesnt ha!e to draw e!er" drawing in a scene. An animator can do more scenes this wa" and concentrate on the planning of the animation. %an" scenes use a it of oth methods of animation.
*=.STAGING
A pose or action should clearl" communicate to the audience the attitude5 mood5 reaction or idea of the character as it relates to the stor" and continuit" of the stor" line. $he effecti!e use of long5 medium5 or close up shots5 as well as camera angles also helps in telling the stor". $here is a limited amount of time in a film5 so each se2uence5 scene and frame of film must relate to the o!erall stor". Do not confuse the audience with too man" actions at once. ,se one action clearl" Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
stated to get the idea across5 unless "ou are animating a scene that is to depict clutter and confusion. taging directs the audiences attention to the stor" or idea eing told. Care must e ta0en in ac0ground design so it isnt oscuring the animation or competing with it due to e&cess detail ehind the animation. Bac0ground and animation should wor0 together as a pictorial unit in a scene
**.APPEAL
A li!e performer performer has charisma. charisma. An animated animated character character has appeal. Appealing Appealing animation does not mean 6ust eing cute and cuddl". All characters ha!e to ha!e appeal whether the" are heroic5 !illainous5 comic or cute. Appeal5 as "ou will use it5 includes an eas" to read design5 clear drawing5 and personalit" de!elopment that will capture and in!ol!e the audiences interest. Earl" cartoons were asicall" a series of gags strung together on a main theme. (!er the "ears5 the artists ha!e learned that to produce a feature there was a need for stor" continuit"5 character de!elopment and a higher 2ualit" of artwor0 throughout the entire production. Li0e all forms of stor" telling5 the feature has to appeal to the mind as well as to the e"e.
*+.SLO(-OUT AND SLO(-IN
As action starts5 we ha!e more drawings near the starting pose5 one or two in the middle5 and more drawin drawings gs near the ne&t ne&t pose. pose. *ewer *ewer drawin drawings gs ma0e ma0e the action action faster faster and more more drawings ma0e the action slower. low-ins and slow-outs soften the action5 ma0ing it more lifeli0e. *or a gag action5 we ma" omit some slow-out or slow-ins for shoc0 appeal or the surprise surprise element. $his will gi!e more snap to the scene.
A$im'tio$ te&3$iues Dr'?$ o$ i0m '$im'tio$: a techni2ue where footage is produced " creating the images directl" on film stoc0 .
P'i$t-o$-/0'ss '$im'tio$: a techni2ue for ma0ing animated films " manipulating slow dr"ing oil paints on paints on sheets of glass glass..
Er'sure '$im'tio$: a techni2ue using tradition #D medium5 photographed o!er time as the artist manipulates the image. *or e&le5 +il +illiam liam
Pi$s&ree$ '$im'tio$: ma0es use of a screen filled with mo!ale pins5 which can e mo!ed in or out " pressing an o6ect onto the screen. $he screen is lit from the side so that the pins cast shadows. $he techni2ue has een used to create animated films with a range of te&tural effects difficult to achie!e with traditional animation.
S'$% '$im'tio$: sand is mo!ed around on a ac0- or front-lighted piece of glass to create each frame for an animated film. $his creates an interesting effect when animated ecause of the light contrast.. contrast
0ip boo8 : A flip oo0 9sometimes5 especiall" in British English5 called a flic0 oo0 is a oo0 with a series of pictures that !ar" graduall" from one page to the ne&t5 so that when the pages are turned rapidl"5 the pictures appear to animate " simulating motion or some other change. *lip Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
oo0s are often illustrated oo0s for children5 ch ildren5 ut ma" also e geared towards adults and emplo" emplo " a series of photographs rather than drawings. *lip oo0s are not alwa"s separate oo0s5 ut ma" appear as an added feature in ordinar" oo0s or maga1ines5 maga1ines5 often in the page corners. corners. oftware pac0ages and wesites are also a!ailale that con!ert digital !ideo files into custom-made flip oo0s.
A$im'tio$ o$ t3e ?eb4 Animation on a we page is an" form of mo!ement of o6ects or images. Animations are usuall" done in Adoe *lash5 although Ta!a and G* animations are also used in man" wesites. treaming !ideo in *lash is coming increasingl" popular. 'easons to ha!e motion on a we page are to draw attention to something5 to pro!ide a demonstration or to entertain. $he need for mo!ement on a page depends on the purpose and content of the page. A financial institute would not reall" need animations on their pages5 while an entertainment site o!iousl" would ha!e such mo!ement.
Computer A$im'tio$ Spe&i'0 Ee&ts $he words Ospecial effects animationO con6ure up images of starships lowing awa" asteroids in some distant gala&" light "ears awa". Although lowing up ma0e-elie!e spaceships is part of special effects animation5 its actuall" onl" a !er" small part. $his 0ind of technolog" can e used to create an"thing that can e imagined. t is additionall" a multifaceted art form re2uiring animators who ha!e een trained in a numer of disciplines. $he use of special effects animation calls for a great deal of planning and offers the potential to re!olutioni1e a numer of industries not related to the production of film and
i/4vi%eo /'mes. RENDERING ALGORITHMS Re$%eri$/ is the process process of generati generating ng an image image from a model model 9or models in what collecti!el" could e called a scene a scene file5 file5 " means of computer programs. A scene file contains o6ects in a strictl" defined language or data structure it would contain geometr"5 !iewpoint5 te&ture55 lighting te&ture lighting55 an a nd shading inform informati ation on as a descri descripti ption on of the !irtual !irtual scene. scene. $he data contained in the scene file is then passed to a rendering program to e processed and output to a Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
digital image or raster graphics image file. $he term OrenderingO ma" e " analog" with an Oartists renderingO of a scene. $hough the technical details of rendering methods !ar"5 the general challenges to o!ercome in producing a #D image from a ;D representation stored in a scene file are outlined as the graphics pipeline along pipeline along a rendering rendering de!ice5 such as a GP, GP,.. A GP, is a purpose-uilt de!ice ale to assist a CP, CP, in in performing comple& rendering calculations. f a scene is to loo0 relati!el" realistic and predictale under !irtual lighting5 the rendering software should should sol!e sol!e the render rendering ing e2uati e2uation on.. $he rendering e2uation doesnt account for all lighting phenomena5 ut is a general lighting model for computer-generated imager". 'endering is also used to descrie the process of calculating effects in a !ideo editing file to produce final !ideo output. 'endering is one of the ma6or su-topics of ;D computer graphics5 graphics5 and in practice alwa"s conne connect cted ed to the the other others. s. n the graphics pipeline5 pipeline5 it is the last ma6or step5 gi!ing the final appearance to the models and animation. +ith the increasing sophistication of computer graphics since the 3Z87s5 it has ecome a more distinct su6ect. 'endering 'endering has uses in architecture architecture55 !ideo games5 games5 simulators simulators55 mo!ie or $) !isual effects5 effects5 and design !isuali1ation5 each emplo"ing a different alance of features and techni2ues. As a product5 a wide !ariet" of renderers are a!ailale. a!a ilale. ome are integrated into larger modeling and an d animation pac0ages5 some are stand-alone5 some are free open-source pro6ects. (n the inside5 a renderer is a carefull" engineered program5 ased on a selecti!e mi&ture of disciplines related to: light ph"sics5 ph"sics5 !isual perception5 perception5 mathematics mathematics and and software de!elopment. de!elopment. n the case of ;D graphics5 rendering ma" e done slowl"5 as in pre-rendering in pre-rendering55 or in real time. Pre-rendering is a computationall" intensi!e process that is t"picall" used for mo!ie creation5 while real-time rendering is often done for ;D !ideo games which rel" on the use of graphics cards with ;D hardware accelerators.
Mu0time%i' Compressio$ Mu0time%i' &ompressio$ is emplo"ing tools and techni2ues in order to reduce the file si1e of !arious media formats. +ith the de!elopment of +orld +ide +e the importance of compress algorithm was highlighted ecause it performs faster in networ0s due to its highl" reduced file si1e. *urthermore with the popularit" of !oice and !ideo conferencing o!er the internet internet 5compressio 5compression n method for multimedi multimediaa has reached it ne&t generation to pro!ide pro!ide smooth smooth ser!ice ser!ice e!en in unreliale unreliale networ0 networ0 infrastruc infrastructure. ture. Although Although man" methods methods are used for this purpose5 in general these methods can e di!ided into two road categories named Lossless and Loss" methods.
MPEG-* Au%io %PEG-3 La"er or Audio is a generic suand coder operating at it rates in the range of ;# to UUX 0s and supporting sampling fre2uencies of ;#5 UU.3 and UX 041. $"pical it rates for La"er are in the range of 3#X-#V 0its5 and ;XU 0s for professional applications.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
%PEG-3 La"ers and 9%P3 or %P# are perceptual audio coders for 3- or #-channel audio content. La"er has een designed for applications that re2uire oth low comple&it" decoding and encoding. La"er pro!ides for a higher compression efficienc" for a slightl" higher comple&it". ,sing %PEG-3 La"er one can compress high 2ualit" audio CD data at a t"pical itrate of ;XU 0s while maintaining a high audio 2ualit" after decoding. La"er re2uires it rates in the range of 3Z# to #V 0s for near CD 2ualit". A La"er decoder can also decode La"er itstreams. %PEG-3 La"er ; 9or %P; is a 3- or #-channel perceptual audio coder that pro!ides e&cellent compression of music signals. Compared to La"er 3 and La"er # it pro!ides a higher compressio compression n efficienc" efficienc".. t can t"picall" compress compress high 2ualit" 2ualit" audio CD data " a factor of 3# while maintaining a high audio 2ualit". n general %P; is appropriate for applications in!ol!ing storage or transmission of mono or stereo music or other audio signals. ince it is implemented on !irtuall" all digital audio de!ices pla"ac0 is alwa"s ensured $han0s to its low comple&it" decoding comined with high roustness against cascaded encodingdecoding and transmission errors5 %PEG-3 La"er is used in digital audio and !ideo roadcast applications 9D)B and DAB. t is also used in )ideo )ideo CD5 as well as in a !ariet" of studio applications. La"er ;5 or as it is mostl" called nowada"s >mp;>5 is the most per!asi!e audio coding format for storage of music on PC platforms5 and transmission of music o!er the nternet. %p; has created a new class of consumer consumer electronics electronics de!ices named after it5 the mp; pla"er. t is found on almost all CD and D)D pla"ers and in an increasing numer of car stereo s"stems and new inno!ati!e home stereo de!ices li0e networ0ed home music ser!ers. Additionall"5 La"er ; finds wide application in satellite digital audio roadcast and on cellular phones. %PEG-3 La"er ; was standardi1ed for the higher sampling rates of ;#5 UU.3 and UX 041 in %PEG-3 in 3ZZ#.. *igure 3 shows a high le!el o!er!iew of the %PEG-3 La"ers and coders. $he input signal is transformed into ;# suand signals that are uniforml" distriuted o!er fre2uenc" " means of a criticall" sampled %* filteran0. $he criticall" down sampled suand signals are grouped in a so called allocation frame 9;XU and 33# suand samples for La"er and respecti!el" respecti!el". . B" means of Adapti!e Adapti!e PC%5 these allocation allocation frames frames are suse2uentl" suse2uentl" 2uanti1ed 2uanti1ed and coded into an %PEG-3 itstream. At the decoder side5 the itstream is decoded into the suand samples which are suse2uentl" fed into the in!erse %* filteran0.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
i/ure * Hi/3 0eve0 overvie? o MPEG-* L')ers I '$% II &o%er
UNIT-!
UESTIONS SECTION A *. C(DEC stands for ]]]]]]]. +. %PEG stands for ]]]]]]]]]. @. ]]]]]]]]] is the process of generating an image from a model " means of computer program. . Define Animation. . +hat is $weening. . +hat is Aliasing. . A set of still images is called ]]]]]]]]]]. . ECA% is a ]]]]]]]. Q. ]]]]]]]]]] animation is also 0nown as sprite animation. *=. ]]]]]]] coding techni2ue is 0nown as predicti!e coding techni2ue.
SECTION B *. Descrie the !arious audio and !ideo standards. +. E&plain the cell animation. @. 4ow to edit !ideo E&plain. . E&plain the 'endering algorithm. . E&plain the method to generate ?C signals from 'GB.. . E&plain !arious !ideo signal formats. . Discuss the roles of 5P and B frames of %PEG-3 !ideo standard. . E&plain aout tele!ision roadcasting standards. Q. E&plain the Principles of Animation. *=. Discuss aout pecial Effects.
SECTION C *. Descrie how rendering algorithms helps to create special effects. +. E&plain riefl" aout: aou t: i )ideo Editing ii Analog )ideo Camera. @. E&plain the concepts of !ideo editing. . Discuss an" four rendering algorithms. . Discuss the !arious principles of animation. . Discuss aout %PEG-3 audio standard. Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
. E&plain the following: i )ideo signal format ii PC !ideo iii )ideo file format. . Descrie in detail aout ao ut the following: i %PEG-3 Audio ii %PEG-3 )ideo. Q. tate the principle of animation and e&plain e& plain how animation is carried on the we. *=. Descrie in detail aout ao ut the following: i %PEG-# Audio ii %PEG-# )ideo.
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia
Rajeshkanna Rajeshkan na Assistant Professor, Dept.BCA, Dr.N.G.P Dr.N.G.P.. Arts & Science College, Coimbatore.