You are on page 1of 113

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 of Output Primitives: Line Attributes – Curve attributes – Color and Grayscale
Levels – Area-fill attributes – Character Attributes.

UNIT-II
2D Geometric Transformations: Basic Transformations – Matrix Representations –
Composite Transformations – Other Transformations. 2D Viewing: The Viewing Pipeline –
Viewing Co-ordinate Reference Frame – Window-to-Viewport Co-ordinate Transformation - 2D
Viewing Functions – Clipping Operations.

UNIT-III
Text: Types of Text – Unicode Standard – Font – Insertion of Text – Text compression – File
formats. Image: Image Types – Seeing Color – Color Models – Basic Steps for Image Processing
– Scanner – Digital Camera – Interface Standards – Specification of Digital Images – CMS –
Device Independent Color Models – Image Processing software – File Formats – Image Output
on Monitor and Printer.

UNIT-IV
Audio: Introduction – Acoustics – Nature of Sound Waves – Fundamental Characteristics
of Sound – Microphone – Amplifier – Loudspeaker – Audio Mixer – Digital Audio –
Synthesizers – MIDI – Basics of Staff Notation – Sound Card – Audio Transmission – Audio
File formats and CODECs – Audio Recording Systems – Audio and Multimedia – Voice
Recognition and Response - Audio Processing Software.

UNIT-V
Video: Analog Video Camera – Transmission of Video Signals – Video Signal Formats –
Television Broadcasting Standards – PC Video – Video File Formats and CODECs – Video
Editing – Video Editing Software. Animation: Types of Animation – Computer Assisted
Animation – Creating Movement – Principles of Animation – Some Techniques of Animation –
Animation on the Web – Special Effects – Rendering Algorithms. Compression: MPEG-1 Audio
– MPEG-1 Video - MPEG-2Audio – MPEG-2 Video.

TEXT BOOKS
1. COMPUTER GRAPHICS –Donald Hearn, M.Pauline Baker, 2ndedition, PHI
2. PRINCIPLES OF MULTIMEDIA –Ranjan Parekh, 2007, TMH.

Rajeshkanna Assistant Professor, Dept.BCA, 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 of Output Primitives: Line Attributes – Curve attributes – Color and Grayscale
Levels – Area-fill attributes – Character Attributes.

INTRODUCTION ABOUT COMPUTER GRAPHICS


Computer Graphic is the discipline of producing picture or images using a computer
which include modeling, creation, manipulation, storage of geometric objects, rendering,
converting a scene to an image, the process of transformations, rasterization, shading,
illumination, animation of the image, etc.
Computer Graphics has been widely used in graphics presentation, paint systems,
computer-aided design (CAD), image processing, simulation, etc. From the earliest text character
images of a non-graphic mainframe computers to the latest photographic quality images of a high
resolution personal computers, from vector displays to raster displays, from 2D input, to 3D
input and beyond, computer graphics has gone through its short, rapid changing history. From
games to virtual reality, to 3D active desktops, from unobtrusive immersive home environments,
to scientific and business, computer graphics technology has touched almost every concern of
our life. Before we get into the details, we have a short tour through the history of computer
graphics

OUTPUT PRIMITIVES
Introduction
The basic elements constituting a graphic are called output primitives. Each output
primitive has an associated set of attributes, such as line width and line color for lines. The
programming technique is to set values for the output primitives and then call a basic function
that will draw the desired primitive using the current settings for the attributes. Various graphics
systems have different graphics primitives.
For example GKS defines five output primitives namely, polyline (for drawing
contiguous line segments), polymarker (for marking coordinate positions with various symmetric
text symbols), text (for plotting text at various angles and sizes), fill area (for plotting polygonal
areas with solid or hatch fill), cell array (for plotting portable raster images). At the same time
GRPH1 has the output primitives namely Polyline, Polymarker, Text, Tone and have other
secondary primitives besides these namely, Line and Arrow

Points and Lines


In a CRT monitor, the electron beam is turned on to illuminate the screen phosphor at the
selected location. Depending on the display technology, the positioning of the electron beam
changes. In a random-scan (vector) system point plotting instructions are stored in a display list
and the coordinate values in these instructions are converted to deflection voltages the position

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

the electron beam at the screen locations. Low-level procedure for ploting a point on the screen
at (x,y) with intensity “I” can be given as
setPixel(x,y,I)

A line is drawn by calculating the intermediate positions between the two end points and
displaying the pixels at those positions.

LINE DRAWING ALGORITHM


The Cartesian slope intercept equation for a straight line is
Y=m.x + b
Where m represents slope of the line and b as the y intercept.

y1
y2

x1 X2

the two end points in the line segement at specified position(x1,y1),and (x2,y2).
Slope m and y as
m = y2-y1,
x2-x1.
b = y1 - m.x1
for any given x interval ∆x along a line, we compute the corresponding y interval ∆y as

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

∆y=m ∆x
Similiarly,we can obtain the x interval ∆x to the corresponding ∆y as
∆x= ∆y/m

Rasterization
Rasterization is the process of converting a vertex representation to a pixel
representation; rasterization is also called scan conversion. Included in this definition are
geometric objects such as circles where you are given a center and radius.

 The digital differential analyzer (DDA) which introduces the basic concepts for
rasterization.
 Bresenham's algorithm which improves on the DDA.
Scan conversion algorithms use incremental methods that exploit coherence. An
incremental method computes a new value quickly from an old value, rather than computing the
new value from scratch, which can often be slow. Coherence in space or time is the term used to
denote that nearby objects (e.g., pixels) have qualities similar to the current object.

1. Digital Differential Analyzer (DDA) Algorithm

In computer graphics, a hardware or software implementation of a digital differential


analyzer (DDA) is used for linear interpolation of variables over an interval between start and
end point.

DDAs are used for rasterization of lines, triangles and polygons. In its simplest
implementation the DDA algorithm interpolates values in interval [(xstart, ystart), (xend, yend)] by
computing for each xi the equations xi = xi−1+1, yi = yi−1 + Δy/Δx, where Δx = xend − xstart and Δy
= yend − ystart.

Digital Differential Analyzer (DDA) Algorithm:-


x

slope of the line y= m* x+b


y

In this algorithm, the line is sampled at unit intervals in one coordinate and find the
corresponding values nearest to the path for the other coordinate. For a line with positive slope
less than one, x > y (where x = x2-x1 and y = y2-y1).
Hence we sample at unit x=1 intervals and compute each successive y values as
yk+1=yk + m

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

For lines with positive slope greater than one, y > x. Hence we sample at unit y intervals and
compute each successive x values as
Xk+1=Xk +1/m
Since the slope, m, can be any real number, the calculated value must be rounded to the nearest
integer.
(xi , yi)
(xi , Round(yi))

positive slope left to right positive slope right to left all points are joint together

For a line with negative slope, if the absolute value of the slope is less than one, we make unit
increment in the x direction and calculate y values as

yk+1=yk - m
For a line with negative slope, if the absolute value of the slope is greater than one, we make unit
decrement in the y direction and calculate x values as

Xk+1=Xk +1/m
[Note :- for all the above four cases it is assumed that the first point is on the left and second
point is in the right.]
DDA Line Algorithm
void myLine(int x1, int y1, int x2, int y2)
{
int length,i;
double x,y;
double xincrement;
double yincrement;
length = abs(x2 - x1);
if (abs(y2 - y1) > length) length = abs(y2 - y1);
xincrement = (double)(x2 - x1)/(double)length;
yincrement = (double)(y2 - y1)/(double)length;
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

x = x1 + 0.5;
y = y1 + 0.5;
for (i = 1; i<= length;++i)
{
myPixel((int)x, (int)y);
x = x + xincrement;
y = y + yincrement;
}
}

2.Bresenham's line algorithm

The Bresenham line algorithm is an algorithm which determines which points in an n-


dimensional raster should be plotted in order to form a close approximation to a straight line
between two given points. It is commonly used to draw lines on a computer screen, as it uses
only integer addition, subtraction and bit shifting, all of which are very cheap operations in
standard computer architectures. It is one of the earliest algorithms developed in the field of
computer graphics. A minor extension to the original algorithm also deals with drawing circles.

While algorithms such as Wu's algorithm are also frequently used in modern computer
graphics because they can support antialiasing, the speed and simplicity of Bresenham's line
algorithm mean that it is still important. The algorithm is used in hardware such as plotters and in
the graphics chips of modern graphics cards. It can also be found in many software graphics
libraries. Because the algorithm is very simple, it is often implemented in either the firmware or
the hardware of modern graphics cards.

The label "Bresenham" is used today for a whole family of algorithms extending or
modifying Bresenham's original algorithm

The algorithm

The common conventions will be used: That pixel coordinates increase in the right and down
directions (e.g. that the pixel at (1,1) is directly above the pixel at (1,2)), andthat the pixel centers
have integer coordinates.

The endpoints of the line are the pixels at (x0, y0) and (x1, y1), where the first coordinate
of the pair is the column and the second is the row.

The algorithm will be initially presented only for the octant in which the segment goes
down and to the right (x0≤x1 and y0≤y1), and its horizontal projection x1 − x0 is longer than the
vertical projection y1 − y0 (the line has a slope whose absolute value is less than 1 and greater
than 0.) In this octant, for each column x between x0 and x1, there is exactly one row y (computed
by the algorithm) containing a pixel of the line, while each row between y0 and y1 may contain
multiple rasterized pixels.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Bresenham's algorithm chooses the integer y corresponding to the pixel center that is
closest to the ideal (fractional) y for the same x; on successive columns y can remain the same or
increase by 1. The general equation of the line through the endpoints.

Since we know the column, x, the pixel's row, y, is given by rounding this quantity to the
nearest integer.

The slope (y1 − y0) / (x1 − x0) depends on the endpoint coordinates only and can be
precomputed, and the ideal y for successive integer values of x can be computed starting
from y0and repeatedly adding the slope.

In practice, the algorithm can track, instead of possibly large y values, a small error value
between −0.5 and 0.5: the vertical distance between the rounded and the exact y values for the
current x. Each time x is increased, the error is increased by the slope; if it exceeds 0.5, the
rasterization y is increased by 1 (the line continues on the next lower row of the raster) and the
error is decremented by 1.0.

In the following pseudocode sample plot(x,y) plots a point and abs returns absolute value:

function line(x0, x1, y0, y1)


int deltax := x1 - x0
int deltay := y1 - y0
real error := 0
real deltaerr := abs (deltay / deltax) // Assume deltax != 0 (line is not vertical),
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

// note that this division needs to be done in a way that preserves the fractional part
int y := y0
for x from x0 to x1
plot(x,y)
error := error + deltaerr
if error ≥ 0.5 then
y := y + 1
error := error - 1.0

Generalization

The version above only handles lines that descend to the right. We would of course like
to be able to draw all lines. The first case is allowing us to draw lines that still slope downwards
but head in the opposite direction. This is a simple matter of swapping the initial points if x0 >
x1. Trickier is determining how to draw lines that go up. To do this, we check if y0 ≥ y1; if so, we
step y by -1 instead of 1.

Lastly, we still need to generalize the algorithm to drawing lines in all directions. Up
until now we have only been able to draw lines with a slope less than one. To be able to draw
lines with a steeper slope, we take advantage of the fact that a steep line can be reflected across
the line y=x to obtain a line with a small slope. The effect is to switch the x and y variables
throughout, including switching the parameters to plot. The code looks like this:

function line(x0, x1, y0, y1)


boolean steep := abs(y1 - y0) > abs(x1 - x0)
if steep then
swap(x0, y0)
swap(x1, y1)
if x0 > x1 then
swap(x0, x1)
swap(y0, y1)
int deltax := x1 - x0
int deltay := abs(y1 - y0)
real error := 0
real deltaerr := deltay / deltax
int ystep
int y := y0
if y0 < y1 then ystep := 1 else ystep := -1
for x from x0 to x1
if steep then plot(y,x) else plot(x,y)
error := error + deltaerr
if error ≥ 0.5 then
y := y + ystep
error := error - 1.0

The function now handles all lines and implements the complete Bresenham's algorithm.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Optimization

The problem with this approach is that computers operate relatively slowly on fractional
numbers like error and deltaerr; moreover, errors can accumulate over many floating-point
additions. Working with integers will be both faster and more accurate. The trick we use is to
multiply all the fractional numbers (including the constant 0.5) in the code above by deltax,
which enables us to express them as integers. This results in a divide inside the main loop,
however. To deal with this we modify how error is initialized and used so that rather than
starting at zero and counting up towards 0.5, it starts at 0.5 and counts down to zero. The new
program looks like this:

function line(x0, x1, y0, y1)


boolean steep := abs(y1 - y0) > abs(x1 - x0)
if steep then
swap(x0, y0)
swap(x1, y1)
if x0 > x1 then
swap(x0, x1)
swap(y0, y1)
int deltax := x1 - x0
int deltay := abs(y1 - y0)
int error := deltax / 2
int ystep
int y := y0
if y0 < y1 then ystep := 1 else ystep := -1
for x from x0 to x1
if steep then plot(y,x) else plot(x,y)
error := error - deltay
if error < 0 then
y := y + ystep
error := error + deltax

Remark: If you need to control the points in order of appearance (for example to print several
consecutive dashed lines) you will have to simplify this code by skipping the 2nd swap:

Function line(x0, x1, y0, y1)

boolean steep := abs(y1 - y0) > abs(x1 - x0)


if steep then
swap(x0, y0)
swap(x1, y1)
int deltax := abs(x1 - x0)
int deltay := abs(y1 - y0)
int error := deltax / 2
int ystep
int y := y0

int inc REM added


if x0 < x1 then inc := 1 else inc := -1 REM added

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

if y0 < y1 then ystep := 1 else ystep := -1


for x from x0 to x1 with increment inc REM changed
if steep then plot(y,x) else plot(x,y)
REM increment here a variable to control the progress of the line drawing
error := error - deltay
if error < 0 then
y := y + ystep
error := error + deltax

Simplification

It is further possible to eliminate the swaps in the initialisation by considering the error
calculation for both directions simultaneously:

function line(x0, y0, x1, y1)


dx := abs(x1-x0)
dy := abs(y1-y0)
if x0 < x1 then sx := 1 else sx := -1
if y0 < y1 then sy := 1 else sy := -1
err := dx-dy

loop
setPixel(x0,y0)
if x0 = x1 and y0 = y1 exit loop
e2 := 2*err
if e2 > -dy then
err := err - dy
x0 := x0 + sx
end if
if e2 < dx then
err := err + dx
y0 := y0 + sy
end if
end loop

In this method, developed by Jack Bresenham, we look at just the center of the pixels.
We determine d1 and d2 which is the "error", i.e., the difference from the "true line."

Steps in the Bresenham algorithm:


1. Determine the error terms
2. Define a relative error term such that the sign of this term tells us which pixel to
choose
3. Derive equation to compute successive error terms from first
4. Compute first error term

Now the y coordinate on the mathematical line at pixel position xi+1 is calculated as
y = m(xi+1) + b
And the distances are calculated as

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

d1 = y - yi= m(xi+1) + b - yi
d2 = (yi+1) - y = yi +1 -m(xi +1) - b
Then
d1 - d2 = 2m(xi+1) - 2y + 2b -1
Now define pi = dx(d1 - d2) = relative error of the two pixels.

Note: pi < 0 if yi pixel is closer, pi >= 0 if yi+1 pixel is closer. Therefore we only need to
know the sign of pi .
ith m = dy/dx and substituting in for (d1 - d2) we get

pi = 2 * dy * xi - 2 * dx * yi + 2 * dy + dx * (2 * b - 1) (1)

Let C = 2 * dy + dx * (2 * b - 1)

Now look at the relation of p's for successive x terms.

pi+1 = 2dy * xi+1 - 2 * dx * yi+1 + C


pi+1 - pi = 2 * dy * (xi+1 - xi) - 2 * dx * ( yi+1 - yi)

with xi+1 = xi + 1 and yi+1= yi + 1 or yi

pi+1 = pi + 2 * dy - 2 * dx(yi+1 -yi)


Now compute p1 (x1,y1) from (1) , where b = y - dy / dx * x

p1 = 2dy * x1 - 2dx * y1 + 2dy + dx(2y1 - 2dy / dx * x1 - 1)


= 2dy * x1 - 2dx * y1 + 2dy + 2dx * y1 - 2dyx1 - dx
= 2dy - dx
if pi < 0, plot the pixel (xi+1, yi) and next decision parameter is pi+1 = pi + 2dy
else and plot the pixel (xi+1, yi+1) and next decision parameter is pi+1 = pi + 2dy - 2dx
Bresenham Algorithm for 1st octant:
1. Enter endpoints (x1, y1) and (x2, y2).
2. Display x1, y1.
3. Compute dx = x2 - x1 ; dy = y2 - y1 ; p1 = 2dy - dx.
4. If p1 < 0.0, display (x1 + 1, y1), else display (x1+1, y1 + 1)
5. if p1 < 0.0, p2 = p1 + 2dy, else p2 = p1 + 2dy - 2dx
6. Repeat steps 4, 5 until reach x2, y2.

Note: Only integer Addition and Multiplication by 2.


Notice we always increment x by 1.

For a generalized Bresenham Algorithm must look at behavior in different octants.

3.Parallel line algorithms


Take advantage of multiple processors.

 Given np processors, subdivide the line path into np Bresenham segments.

 For a line with slope 0  m  1 and leftpoint (x0,y0) the distance to the right
endpoint (left endpoint for next segment) is

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 where

 x = width of the line

 xp is computed using integer division

 Numbering the segments, and the processors, as 0, 1, 2, …, np-1, starting x-


coordinate for the kth partition is

xk = x0 + kxp

i.e. x = 15 , np = 4 processors

Starting x-values at x0, x0 + 4, x0 + 8, x0 + 12

yp = mxp
At the kth segment, the starting y-coordinates is

yk = y0 + round(kyp)

 Also, the initial decision parameter for Bresenham’s algorithm at the start of the
kth subinterval is:

pk = (kxp)(2y) – round(kyp)(2x) + 2y – x

 Lines generated can have jagged or stair-step appearance, one aspect of


phenomenon called aliasing, caused by fact that pixels are integer coordinate
points.

 Use anti-aliasing routines to smooth out display of a line by adjusting pixels


intensities along the line path.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Each processor then calculates the pixel positions over its assigned subinterval
using the starting decision parameter value for that subinterval and the starting
coordinates (xk,yk).
 Another way to set up parallel algorithms on raster systems is to assign each
processor to a particular group of screen pixels. Assign each processor to 1 pixel
within some screen region. This approach can be adapted to line display by
assigning 1 processor to each of the pixels within the limits of the line coordinates
extends (bounding rectangle) and calculating the pixel distances from the line
path. The no: of pixels within the bounding box of the line is ∆x * ∆y.
Perpendicular distance d from the line to a pixel with coordinates (x,y) is
calculated as,

d = Ax + By + C
where, A = -∆y / line length

B = ∆x / line length
C = x0∆y – y0∆x / line length
With line length = √(∆x2 + ∆y2)

 Once the constants A,B,C are calculated, the processor needs to perform 2
multiplications and 2 additions to compute the pixel distance d. A pixel is plotted
if d < a specified line thickness parameter. Instead of partitioning the screen
intosingle pixels, we can assign to each processor either a scanline or a column of
pixels depending on the line slope

LOADING THE FRAME BUFFER


 When straight line segments and other coordinate extends are scan converted for
display with a raster system, frame buffer positions must be calculated .
 Scan conversion algorithms generate pixel positions at successive unit intervals.
This allows using incremental methods to calculate frame buffer addresses
 Suppose the frame buffer array is addressed in row major order and that pixel
positions vary from (0,0) at the lower left screen corner to (xmax,ymax) at the top
right corner. For a bi-level system (1 bit per pixel) the frame buffer bit address for
pixel position (x,y) is calculated as
addr(x,y) = addr(0,0) + y(xmax +1) + x

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Moving across the scan line calculate the frame buffer address for the pixel
at(x+1,y) as the following offset from the address for position (x,y)
addr(x +1,y) = addr(x,y) + 1
 Stepping diagonally up to the next scanline from (x,y) we get the frame buffer
address of (x+1,y+1) with the calculation
addr(x +1,y+1) = addr(x,y) + xmax + 2
 where the constant xmax + 2 is pre computed once for all line segments.

LINE FUNCTION
A procedure for specifying straight-line segments can be set up in a number of different
forms. In PHIGS, GKS, and some other packages, the two-dimensionalline function is where
parameter n is assigned an integer value equal to the number of coordinate positions to be input,
and wcpoints is the array of input world coordinate values for line segment endpoints.
This function is used to define a set of n – 1 connected straight line segments. Because
series of connected line segments occur more often than isolated line segments in graphics
applications, polyline provides a more general line function. To display a single straight-line
segment, we set n -= 2 and list the x and y values of the two endpoint coordinates.As an example
of the use of polyline, the following statements generate two connected line segments, with
endpoints at (50, 103, (150, 2501, and (250,100):
wcPoints[ll .x = SO;
wcPoints[ll .y = 100;
wcPoints[21 .x = 150;
wc~oints[2l.y = 250;
wc~oints[3l.x = 250;
wcPoints[31 .y = 100;

polyline ( 3 , wcpoints);
Coordinate references in the polyline function are stated as absolute coordinate values.
This means that the values specified are the actual point positions in the coordinate system in
use.
Some systems employ line (and point) functions with relative coordinate specifications.
In this case, coordinate values are stated as offsets from the last position referenced (called the
current position).
For example, if location(3,2) is the last position that has been referenced in an
application program, a relative coordinate specification of (2, -1) corresponds to an absolute
position of (5,1). An additional function is also available for setting the current position before
the line routine is summoned. With these packages, a user lists only the single pair of offsets in
the line command. This signals the system to display a line starting from the current position to a
final position determined by the offsets.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The current position is then updated to this final line position. A series of connected lines
is produced with such packages by a sequence of line commands, one for each line section to be
drawn. Some graphics packages provide options allowing the user to specify Line endpoints
using either relative or absolute coordinates.
Implementation of the polyline procedure is accomplished by first performing a series of
coordinate transformations, then malung a sequence of calls to a device-level line-drawing
routine. In PHIGS, the input line endpoints are actually specified in modeling coordinates,
which are then converted to world c eordinates.
Next, world coordinates are converted to normalized coordinates, then to device
coordinates. We discuss the details for carrying out these two dimensional coordinate
transformations in Chapter 6. Once in device coordinates, we display the plyline by invoking a
line routine, such as Bresenham's algorithm,n - 1 times to connect the n coordinate points.
Each successive call passes the c c ~ordinate pair needed to plot the next line section,
where the first endpoint of each coordinate pair is the last endpoint of the previous section. To
avoid setting the intensity of some endpoints twice, we could modify the line algorithm so that
the last endpoint of each segment is not plotted. We discuss methods for avoiding overlap of
displayed objects.

CIRCLE GENERATING ALGORITHM


Properties of Circles
The set of points in the circumference of the circle are all at equal distance r from the
centre (xc,yc) and its relation is given be pythagorean theorem as

(X –XC)2 + (Y-YC)2= r2

The points in the circumference of the circle can be calculated by unit increments in the x
direction from xc - r to xc+ r and the corresponding y values can be obtained as

Y=Yc±√𝐫2- (xc-x)2

The major problem here is that the spacing between the points will not be same.It can be
adjusted by interchanging x and y whenever the absolute value of the slope of the circle is
greater than 1.
The unequal spacing can be eliminated by using polar coordinates and is given by
X= XC +rcos𝜽
Y=Yc + rsin 𝜽

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The major problem in the above two methods is the computational time. The
computational time can be reduced by considering the symmetry of circles. The shape of the
circle is similar in each quadrant. Thinking one step further shows that there are symmetry
between octants too.

3 2

4 1

5 8

6 7

Midpoint circle algorithm:-


To simplify the function evaluation that takes place on each iteration of our circle
drawing algorithm, we can use Midpoint circle algorithm The equation of the circle can be
expressed as a function as given below
fcircle (x, y) = x2+ y2 - r2

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

If the point is inside the circle then f(x,y)<0 and if it is outside then f(x,y)>0 and if the
point is in the circumference of the circle then f(x,y)=0.Thus the circle function is the decision
parameter in the midpoint algorithm.Assume that we have just plotted (xk,yk), we have to decide
whether to point
(xk+1, yk) or (xk+1, yk - 1) nearer to the circle.

Now we consider the midpoint between the points and define the decision parameter as

𝟏
Pk= fcircle (xk+1, yk+𝟐)-----------1
Similarly
𝟏
=( xk+1)2+( yk+ 𝟐)2- r2 and

𝟏
Pk+1= fcircle (xk+1+1, yk+1 + 𝟐)------------2

Now by subtracting the above two equations we get

Pk+1= Pk+2(xk+1)+( yk+12- yk2)-( yk+1- yk)+1

where yk+1 is either yk or yk+1 depending on the sign of pk.

Algorithm
1. Initial values:- point(0,r)
x0 = 0
y0 = r
2. Initial decision parameter
3. At each xi position, starting at i = 0, perform the following test: if pi < 0, the next point is
(xi + 1, yi) and
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

pi+1 = pi + 2xi+1 + 1
If pi ≥ 0, the next point is (xi+1, yi-1) and
pi+1 = pi + 2xi+1 + 1 – 2yi+1
where 2xi+1 = 2xi + 2 and 2yi+1 = 2yi – 2
4. Determine symmetry points in the other octants
5. Move pixel positions (x,y) onto the circular path centered on (xc, yc) and plot the
coordinates: x = x + xc, y = y + yc
6. Repeat 3 – 5 until x ≥ y

Example
r = 10

p0 = 1 – r = -9 (if r is integer round p0 = 5/4 – r to integer) Initial point (x0, y0) = (0, 10)

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Midpoint Algorithm

ELLIPSE GENERATION ALGORITHM


Properties of ellipse

 Ellipse – A modified circle whose radius varies from a maximum value in one direction
(major axis) to a minimum value in the perpendicular direction (minor axis).

 The sum of the two distances d1 and d2, between the fixed positions F1 and F2 (called the
foci of the ellipse) to any point P on the ellipse, is the same value, i.e.

d1 + d2 = constant
 Expressing distances d1 and d2 in terms of the focal coordinates F1 = (x1, x2) and F2 = (x2,
y2),wehave:

 Cartesian coordinates:

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Polar coordinates:

Mid Point Ellipse Algorithm

 Symmetry between quadrants

 Not symmetric between the two octants of a quadrant

 Thus, we must calculate pixel positions along the elliptical arc through one quadrant and
then we obtain positions in the remaining 3 quadrants by symmetry

 Decision parameter:

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Starting at (0, ry) we take unit steps in the x direction until we reach the boundary
between region 1 and region 2. Then we take unit steps in the y direction over the
remainder of the curve in the first quadrant.

 At the boundary

 therefore, we move out of region 1 whenever

 Assuming that we have just plotted the pixels at (xi , yi).


 The next position is determined by:

If p1i < 0 the midpoint is inside the ellipse  yi is closer


If p1i ≥ 0 the midpoint is outside the ellipse  yi – 1 is closer
 At the next position [xi+1 + 1 = xi + 2]

OR

where yi+1 = yi
or yi+1 = yi – 1
 Decision parameters are incremented by:

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Use only addition and subtraction by obtaining

 At initial position (0, ry)

Algorithm:
1. Input rx, ry, and ellipse center (xc, yc), and obtain the first point on an ellipse centered on
the origin as
(x0, y0) = (0, ry)
2. Calculate the initial parameter in region 1 as

3. At each xi position, starting at i = 0, if p1i < 0, the next point along the ellipse centered on
(0, 0) is (xi + 1, yi) and

4. otherwise, the next point is (xi + 1, yi – 1) and

and continue until

Example
Region1

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Region 2
(x0, y0) = (7, 3) (Last position in region 1)

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Midpoint Ellipse Function

ATTRIBUTES OF OUTPUT PRIMITIVES


LINE ATTRIBUTES

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The graph drawing routines may be freely mixed with those described in this section,
allowing the user to control line color, width and styles. The attributes set up by these routines
apply modally, i.e, all subsequent objects (lines, characters and symbols) plotted until the next
change in attributes are affected in the same way. The only exception to this rule is that
characters and symbols are not affected by a change in the line style, but are always drawn using
a continuous line.
1. Line type

 Solid
 Dotted – very short dash with spacing equal to or greater than dash itself
 Dashed – displayed by generating an interdash spacing
Pixel count for the span and interspan length is specified
by the mask . Ex. 111100011110001111
Note : Fixed pixel with dashes can produce unequal length dashes. It depend on line
orientation. So, need to adjust the number of plotted pixels for different slopes.

2. Line Width
 .Specify in pixels and proportion of a standard line width.
 Thicker line can be produced by.
 Adding extra pixel vertically when |m| < 1
 Adding extra pixel horizontally when |m| > 1
 Issues:
 Line have different thickness on the slope
 Problem with
 . End of the line
 . Joining the two lines (polygon)

Three possible methods to adjust the shape of the line:


Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

1. Butt Cap
 To adjust the end position of the component parallel line.
2. Round Cap.
 To fill the semi circle of the each butt cap.
3. Projecting Square Cap.
 To extend the add butt cap at the specific end point.

Three possible methods to smoothly joining the line segments:


1. Miter join
 By extending the outer boundaries of each of the two lines until
they meet.
2. Round join
 To caaping the connection between two segments.
3. Bevel join
 To fill the triangular gap where the segments are m

 Pen And Brush Options


 The selected “pen” or “brush” determine the way a line will be
drawn.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Pens and brushes have size, shape, color and pattern attribute.
 Pixel mask is applied in both of them.

CURVE ATTRIBUTES
A device context (DC) contains attributes that affect line and curve output. The line and
curve attributes include the current position, brush style, brush color, pen style, pen color,
transformation, and so on.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The default current position for any DC is located at the point (0,0) in logical (or world)
space. You can set these coordinates to a new position by calling the MoveToEx function and
passing a new set of coordinates.

Note There are two sets of line- and curve-drawing functions. The first set retains the
current position in a DC, and the second set alters the position. You can identify the functions
that alter the current position by examining the function name.

If the function name ends with the preposition "To", the function sets the current position
to the ending point of the last line drawn (LineTo, ArcTo, PolylineTo, or PolyBezierTo). If the
function name does not end with this preposition, it leaves the current position intact
(Arc,Polyline, or PolyBezier).

The default brush is a solid white brush. An application can create a new brush by calling
the CreateBrushIndirect function. After creating a brush, the application can select it into its
DC by calling the SelectObject function. Windows provides a complete set of functions to
create, select, and alter the brush in an application's DC. For more information about these
functions and about brushes in general, see Brushes.

The default pen is a cosmetic, solid black pen that is one pixel wide. An application can
create a pen by using the ExtCreatePen function. After creating a pen, your application can
select it into its DC by calling theSelectObject function. Windows provides a complete set of
functions to create, select, and alter the pen in an application's DC. For more information about
these functions and about pens in general, see Pens.

The default transformation is the unity transformation (specified by the identity matrix).
An application can specify a new transformation by calling the SetWorldTransform function.
Windows provides a complete set of functions to transform lines and curves by altering their
width, location, and general appearance. For more information about these functions, see
Coordinate Spaces and Transformations.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

COLOR AND GREY SCALE LEVELS.

 Colors are represented by colors codes which are positive integers.


 Color information is stored in frame buffer or in separate table and use
pixel values as index to the color table.
 In raster scan systemswide range of colors

 Random scan monitorsfew color choices.


Color tables
 Each pixel can reference any one of the 256 table positions.
 Each entry in the table uses 24 bits to specify the RGB color.
 There are 17 million colors available .
 User can also set the color table entries in aPHIGS application program with the
function
SetColourRepresentation(ws, ci, colorptr)

Ws is a work station, ci as color index, colorptr points RGB color values.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The color lookup table with 24 bits entry accessed from a frame buffer with 8 bits per pixel.A
vale of 196 stored at a pixel position(x,y) references the location in this table containing the
value of 2081.

Gray Scale
 Apply for monitor that have no color
 Shades of grey (white->light grey->dark grey->black)
 Color code mapped onto grayscale codes
 2 bits can give 4 level of grayscale
 8 bits per pixel will allow 256 combination
 Dividing the actual code with 256 will give range of 0 and 1
 Ex:
 Color code in color display is 118
 To map to nearest grayscale then

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

AREA FILL ATTRIBUTES


Many plotting programs will allow the user to draw filled polygons or symbols. The fill
specification may take two forms:

 Solid color
 Pattern fill

FILL:
In the first case we may specify a gray shade (0-255), RGB color (r/g/b all in the 0-255
range or in hexadecimal#rrggbb), HSV color (hue-saturation-value in the 0-360, 0-1, 0-1 range),
CMYK color (cyan/magenta/yellow/black, each ranging from 0-100%), or a valid color name; in
that respect it is similar to specifying the pen color settings .
There are three fill styles:

 Hollow with color border


 Filled with solid color
 Filled with specific pattern or design.

Hollow With Color Border


The basic fill style is selected in the PHIGS application program as

setInteriorStyle (fs)

where fs is normally applied to the polygon areas it can also implemented to fill region
with curved boundaries
Filled with solid color

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

It is used to display the single color uptoincluding the borders of the region.
Function:

SetInteriorColorIndex(Fc)
Where the fill color parameter fc is to set the desired color code.

Pattern Fill
Select fill pattern with

Set interior Style Index(pi)

Where the pattern index parameter pi specified to the table position.


The following are the set of statements to fill the area defined in the fill area command.

setInteriorStyle(pattern);
setInteriorStyleIndex(2);
fillarea(n,points);

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The process of filling a rectangular pattern called tiling.the rectangular fill pattern is
sometimes called as tiling pattern.

Soft fill
The modified boundary fill and flood fill procedures that are applied to repaint area so
that the fill color is combined with the background color is referred to as soft fill and tint fill
algorithm.

Example
Using linear soft fill algorithm repaints the area that was originally painted by merging
the foreground color F with the single background color B ,where F!= B.
Assuming that we know the values of F and B we have to determine how these colors
originally combined with current color contents of the frame buffer.
The current RGB color P of each pixel within a area is defined as

P=tF+(1-t)B
Where T is the transperancy factor between o and 1 for each pixel.the value of the T is
less than 0.5,the background color contributes more to interior color.

CHARACTER ATTRIBUTES
The appearance of displayed characters is controlled by attributes such as font,size, color,
and orientation. Attributes can be set Ooth for entire character strings(text) and for individual
characters defined as marker symbols .

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

There are a great many text options that can be made available to graphics programmers
.First of all, there is the choice of font (or typeface), which is a set of characters with a particular
design style such as New York, Courier, Helvetica, London, 'Times Roman, and various special
symbol groups.
The characters in a selected font can also be displayed with assorted underlining styles
(sodx,o,t.t ,e. . .d. . , d-ouble), in boldface, in italics. and in outline or shadow styles. A particular
font and associated stvle is selected in a PHlCS program by setting an integer code for the text
font parameter t f in the function.

setTextFont {tf}
Control of text color (or intensity) is managed from an application program with

SetYextColorIndex {tc}
where text color piramcter tc specifies an allowable color code.
Text size can be adjusted without changing the width-to-height ratio of characters with

setCharacterHeight {ch}
The width only of text can be set wlth the function

setCharacterExpansionFactor (cw)
Spacing between characters is controlled separately with

setCharacterSpacing (cs)
The orientation for a displayed character string is set according to the direction of the
character up vector:

setCharacterUpVector (upvect)

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

UNIT-I
QUESTIONS
SECTION A
1. The slope intercept line equation is given by ________.
2. Expand DDA.
3. _____is used for photo realistic images and for computer drawings.
4. _____ is a faster method for calculating pixel position.
5. The efficient raster line algorithm was developed by _________.
6. The circle is a frequently used component in ______&________.
7. The mid-point method, the circle function is given by ________.
8. The general equation of ellipse is stated as ________.
9. The eccentric circle of ellipse is called as __________.
10. For any circle point the distance relationship is expressed by ________.
SECTION B
1. Explain about different types of line attributes.
2. Describe the various area fill attributes.
3. Write a note on color and gray scale level.
4. Explain about points and lines.
5. Write short notes on DDA algorithm.
6. Explain about line equations.
7. Explain about properties of circles.
8. Explain about properties of ellipse.
9. Write short notes on line width.
10. Write a short note on styles of fill attributes.
SECTION C

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

1. With procedure explain the Bresenham’s line drawing algorithm.


2. Explain briefly about circle generating algorithm.
3. Briefly discuss the midpoint ellipse algorithm.
4. Describe about area fill attributes.
5. Explain briefly about DDA line drawing algorithm.
6. Discuss briefly the character attributes.
7. Explain the ellipse generating algorithm.
8. Discuss the midpoint circle algorithm in detail.
9. Explain briefly about properties of circle and ellipse generating algorithm.
10. Explain briefly about line attributes.

UNIT-II

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

2D Geometric Transformations: Basic Transformations – Matrix Representations –


Composite Transformations – Other Transformations. 2D Viewing: The Viewing Pipeline –
Viewing Co-ordinate Reference Frame – Window-to-Viewport Co-ordinate Transformation - 2D
Viewing Functions – Clipping Operations. (MULTIMEDIA – UNITS III, IV &V)

TWO DIMENSIONAL TRANSFORMATIONS


INTRODUCTION
Transformations are a fundamental part of computer graphics. Transformations are used
to position objects, to shape objects, to change viewing positions, and even to change how
something is viewed. There are 4 main types of transformations that one can perform in 2
dimensions.

 Translations
 Scaling
 Rotation
 Shearing

BASIC TRANSFORMATION
 translation.
 rotation.
 scaling.

1.Translation
Y
P1

It is applied to an object by repositioning it along a straight line from one coordinate


location to another.
We translate a 2-D point by adding translation distances, tx & ty to the original
coordinate position (x, y) to move the point to a new position (x’, y’).

x’ = x +tx & y’ = y + ty.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The translation distance pair (tx , ty) is called a Translation vector or Shift vector.
Translation equations as a single matrix equations by column vectors represent the
coordinates:

P’ = P +T. ----------------------- (1)

 x1   x1'  tx 
Where P=   , P’ =   , T = ty 
 x 2  x 2'  
In terms of coordinate row vectors :

P = x, y  & T = tx, ty

Translation is a Rigid-body transformation that moves object without deformation.

 A straight-line segment is translated by applying the transformation


equation (1) to each of the line endpoints and redraws the line between
the new endpoint positions.
 Polygons are translated by adding the translating vector to the coordinate
position of each vertex and regenerating the polygons using the new set
of vertex coordinates.
 To change the position of a circle or ellipse we translate the center
coordinates and redraw the figure in the new location.
If tx, ty value is higher than the width value then there will be an error [Wraparound].

2. Rotation
A 2-D rotation is applied to an object by repositioning it along a circular path in the XY
plane.

P1

0
Y1 p

X1
A 2-D rotation is applied to an object by repositioning it along a circular path in the XY
plane.
To generate a rotation specify a rotation point (or) pivot point about which the object is
to be rotated.
Positive values for rotation angle define counterclockwise rotation about the pivot point.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Negative values rotate object in the clockwise direction.


This transformation can also be described as a rotation about a rotation axis that is
perpendicular to the XY plane and passes through the pivot point.

The transformation equation for rotation of a point position P when the pivot point
is at the coordinate origin:

Figure shows the angular and coordinate relationships of the original and transformed
point positions:

 In the figure r is the constant distance of the point from the origin.
 Angle Φ is the original angular position of the point from the horizontal.
 Θ is the rotation angle.
By using the trigonometric identities;
adj
cos Θ =    
hyp
opp
sin Θ = 
hyp
opp
tan Θ =    
adj

X = r cos Φ------------------(1)
Y = r sin Φ -------------------(2)

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

X’ = r cos (Φ + Θ)----------(3)
Y’ = r sin (Φ + Θ) ----------(4)

Rotation of a point about an arbitrary pivot position

Objects can be rotated about an arbitrary point by modifying the equation (7) to include
the coordinates ( xr , yr) for the selected rotation point.
The transformation equations for the rotated coordinates are obtained by the
trigonometric relationship.
X’ = xr +(x - xr) cosΘ – (y-yr) sinΘ
Y’ = yr + (x – xr) sinΘ + ( y – yr )cosΘ
Every point on an object is rotated through the same angle.
3. Scaling
 Scaling is used to alter the size of an object
 Simple 2D scaling is performed by multiplying object positions (x, y) by scaling
factors sx and sy
x’ = x · sx
y’ = y · sx

 x'   s x 0   x
 y'   0 
s y   y 
  

or P’ = S·P

 Any positive value can be used as scaling factor


 Values less than 1 reduce the size of the object
 Values greater than 1 enlarge the object
 If scaling factor is 1 then the object stays unchanged
 If sx = sy , we call it uniform scaling
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 If scaling factor <1, then the object moves closer to the origin and If scaling
factor >1, then the object moves farther from the origin

 2D Scaling
 We can control the location of the scaled object by choosing a position called the
fixed point (xf,yf)
x’ – xf = (x – xf) sx y’ – yf = (y – yf) sy
x’=x · sx + xf (1 – sx)
y’=y · sy + yf (1 – sy)
 Polygons are scaled by applying the above formula to each vertex, then
regenerating the polygon using the transformed vertices

MATRIX REPRESENTATION OF HOMOGENEOUS COORDINATES


We have seen that basic transformations can be expressed in matrix form. But many
graphic application involve sequences of geometric transformations. Hence we need a general
form of matrix to represent such transformations. This can be expressed as:

P1=M1.P+M2

Where P and P' - represent the row vectors.


T1 - is a 2 by 2 array containing multiplicative factors.
T2 - is a 2 element row matrix containing translation terms.

We can combine multiplicative and translational terms for 2D geometric transformations


into a single matrix representation by expanding the 2 by 2 matrix representations to 3 by 3
matrices. This allows us to express all transformation equations as matrix multiplications,
providing that we also expand the matrix representations for coordinate positions. To express any
2D transformations as a matrix multiplication, we represent each Cartesian coordinate position
(x,y) with the homogeneouscoordinate triple(xh,yh,h), such that

Thus, a general homogeneous coordinate representation can also be written as (h.x, h.y,
h). For 2D geometric transformations, we can choose the homogeneous parameter h to any non-
zero value. Thus, there is an infinite number of equivalent homogeneous representations for each
coordinate point (x,y). A convenient choice is simply to h=1. Each 2D position is then

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

represented with homogeneous coordinates (x,y,1). Other values for parameter h are needed, for
eg, in matrix formulations of 3D viewing transformations.

Expressing positions in homogeneous coordinates allows us to represent all geometric


transformation equations as matrix multiplications. Coordinates are represented with three
element row vectors and transformation operations are written as 3 by 3 matrices.

For Translation, we have


 x' 1 0 t x   x 
 y '  0 1 t    y 
   y  

 1  0 0 1   1 
Or
P’ = T(tx,ty)·P

Similarly for Rotation transformation, we have

 x' cos   sin  0  x 


 y'   sin  cos  0   y 
     
 1   0 0 1  1 

or

P’ = R(θ)·P

Finally for Scaling transformation, we have

 x'  s x 0 0  x 
 y '   0 sy 0   y 
  
 1   0 0 1  1 
or

P’ = S(sx,sy)·P

MATRIX/VECTOR REPRESENTATION OF TRANSLATIONS


 We can setup a sequence of transformations as a composite transformation matrix
by calculating the product of the individual transformations

 P’=M2·M1·P
P’=M·P
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Translations

 Apply two successive translations, T1 and T2

Where P and P1are represented as homogeneous coordinates column vectors .so the
composite matrix form of two dimensional transformation is

1 0 t2 x  1 0 t1x  1 0 t1x  t2 x 
0 1 t   0 1 t   0 1 t  t 
 2y   1y   1y 2y 

0 0 1  0 0 1  0 0 1 


Or

Rotations

 Two successive rotations, R1 and R2 into a point P

 Multiply two rotation matrices to get composite transformation matrix

R(1 )  R( 2 )  R(1   2 )


P'  R(1   2 )  P
• Composite two-dimensional scaling

General two-dimensional Pivot-point rotation

 Graphics package provide only origin rotation


 Perform a translate-rotate-translate sequence

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Translate the object to move pivot-point position to origin


 Rotate the object
 Translate the object back to the original position

Example of pivot-point rotation

The Rotation matrix for this euation is expressed as

 Composite matrix in coordinates form

Fixed-point scaling
Perform a translate-scaling-translate sequence
 Translate the object to move fixed-point position to origin
 Scale the object with respect to the coordinate origin
 Use inverse of translation in step 1 to return the object back to the original
position
 Composite matrix in coordinates form.

General scaling directions

 Perform a rotate-scaling-rotate sequence


 Composite matrix in coordinates form

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

OTHER TRANSFORMATION
1. Reflection
A reflection is a transformation that produces a mirror image of an object.
The mirror image for 2-D reflection is generated relative to an axis of reflection by rotating the
object 180* about the reflection axis.
Reflection about the line y=0 the x-axis is accomplished with the transformation matrix

1 0 0
0  1 
 
0 0 1

This transformation keeps x-values the same but flips the y values of coordinate position.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Reflection about the line x=0 the y-axis is accomplished with the transformation matrix.

  1 0 0
 0 1 0
 
 0 0 1

In this x-coordinates are flipped and y coordinates are same.

If we flip both x and y coordinates of a point by reflecting relative to an axis that is


perpendicular to the xy plane and that through the coordinate origin. Matrix representation:

- 1 0 0 
 0 - 1 0
 
 0 0 1

Reflection axis as the diagonal line y=x the reflection matrix is

0 1 0 
1 0 0
 
0 0 1

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Steps
First perform a clockwise rotation through a 45* angle which rotates the line y=x onto the
x-axis.
Next perform a reflection with respect to the x-axis.
Finally rotate the line y=x back to its original position with a counter clock wise rotation
through 45*.

Another equivalent steps

 First reflect the object about the x-axis.


 Then to rotate counter clockwise 90*.

Transformation matrix for reflection about the diagonal y= -x.

 0  1 0
  1 0 0
 
 0 0 1

Steps

 Clockwise rotation by 45*


 Reflection about y-axis.
 Counter clockwise rotation by 45*
 Another Format
 Reflect about y-axis.
 Rotate Counter Clockwise 90*.

2. Shear
A transformation that distorts the shape of an object such that the transformed shape appears
as if the object were composed of internal layers that had been caused to slide over each other is
called a SHEAER.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 A x-direction shear relative to the x-axis:

1 shx 0
0 1 0 
 
0 0 1

X value is changed & y value remains same.

 A y-direction shear relative to the line y-axis:

 1 0 0
 shy 1 0
 
 0 0 1

Y value is changed & x value remains constant.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

THE VIEWING PIPELINE


 Window
 A world-coordinate area selected for display.
 defines what is to be viewed
 Viewport
 An area on a display device to which a window is mapped.
 defines where it is to be displayed
 Viewing transformation
 The mapping of a part of a world-coordinate scene to device coordinates.
 A window could be a rectangle to have any orientation.
A window could be a rectangle to have any orientation.
Two-Dimensional Viewing

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Viewing Effects
• Zooming effects
• Successively mapping different-sized windows on a fixed-sized viewports.
• Panning effects
• Moving a fixed-sized window across the various objects in a scene.
• Device independent
• Viewports are typically defined within the unit square (normalized coordinates)

VIEWING COORDINATE REFERENCE FRAME


• The reference frame for specifying the world-coordinate window.
• Viewing-coordinate origin: P0 = (x0, y0)
• View up vector V: Define the viewing yv direction

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION


If a coordinate position is at the center of the viewing window, it will be displayed at the
center of the viewport.

Window-To-Viewport Mapping

The sequence of transformations are:


1. Perform a scaling transformation using a fixed-point position of (xwmin,ywmin) that
scales the window area to the size of the viewport.
2. Translate the scaled window area to the position of the viewport.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Relative proportions of objects are maintained if the scaling factors are the same (sx =
sy). Otherwise, world objects will be stretched or contracted in either x or y direction
when displayed on output device.

 How about character strings when map to viewport?

 maintains a constant character size (apply when standard character fonts


cannot be changed).

 If character size can be changed, then windowed will be applied like other
primitives.

 For characters formed with line segments, the mapping to viewport is


carried through sequence of line transformations .

 From normalized coordinates, object descriptions can be mapped to the various


display devices

 When mapping window-to-viewport transformation is done to different devices


from one normalized space, it is called workstation transformation

TWO-DIMENSIONAL VIEWING FUNCTIONS


 We define a viewing reference system in a PHIGS application program with the
 following function:
evaluateViewOrient~tionMatrix (xO, y o , xV, yi'.error, viewMatrixl
 where parameters xO and yo are the coordinates of the viewing origm, and parameters
xV and yV are the world-coordinate positions for the view up vector. An integer error
code is generated if the input parameters are in error; otherwise, the viematrix for the
world-to-viewing transformation is calculated. Any number of viewing transformation
matrices can be defined in an application.To set up the elements of a window-to-viewport
mapping matrix, we invoke the function
evaluateViewMappingMatrix(xwmin,xwmax,ywmin,ywmax,xvmin,xvmax,yv
min,yvmax)
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Next, we can store combinations of viewing and window-viewport mappings for various
workstations in a viruing tablr with
setVlewRepresentation (ws, viewIndex, viewMatrlx,viewMappingMatrix,
xclipmin, xclipmax, yclipmin,yclipmax, clipxy)
where parameter ws designates the output device (workstation), and parameter
 viewIndex sets an integer identifier for this particular window-viewport 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.
 The region against which an object is to clipped is called a clip window.
 Applications of clipping include extracting part of a defined scene for viewing,
identifying visible surfaces in 3-D views.

Viewport clipping

 It can reduce calculations by allowing concatenation of viewing and


geometric transformation matrices.

Types of clipping

 Point clipping
 Line clipping
 Area (Polygon) clipping
 Curve clipping
 Text clipping
 Point clipping (Rectangular clip window)
Line Clipping

 Possible relationships between line positions and a standard rectangular clipping


region.

 Possible relationships
 Completely inside the clipping window
 Completely outside the window
 Partially inside the window
 Parametric representation of a line

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 x = x1 + u(x2 - x1)
 y = y1 + u(y2 - y1)

 The value of u for an intersection with a rectangle boundary edge


 Outside the range 0 to 1
 Within the range from 0 to 1

Cohen-Sutherland Line Clipping

 Region code

 A four-digit binary code assigned to every line endpoint in a picture.

 Numbering the bit positions in the region code as 1 through 4 from right to left. .

 Curve clipping

 Use bounding rectangle to test for overlap with a rectangular clip window.

 Text clipping

 All-or-none string-clipping

 All-or-none character-clipping

UNIT-II
QUESTIONS
SECTION A
1. The translation distance pair ( tx , ty ) is called as __________.
2. __________ transformation that moves objects without deformation.
3. Rotation point is also called as __________.
4. Unequal values of sx and sy results ___________.
5. __________coordinate is used in mathematics to refer the effect of Cartesian equation.
6. __________coordinate is used in mathematics to refer the effect of Cartesian equation.
7. A two dimensional scene is selected for display is called a _________.
8. Windowing transformation is also called as _________.
9. Viewing window is also called as__________.
10. ________is the binary region code window based on clipping rectangle.
SECTION B
1. Describe the reflection transformation.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

2. List the types of clipping and explain point clipping.


3. Explain the matrix representation of 2D viewing.
4. Explain the viewing coordinate reference frame.
5. Define linear transformation and define their properties.
6. Give the matrix representation of rotation and scaling.
7. Explain the concept of other transformation.
8. Write short notes on windowing transformation.
9. Explain text clipping briefly.
10. Explain about viewing transformation.
SECTION C
1. Explain briefly about composite transformation.
2. Discuss in detail about window to viewport transformation.
3. Explain in detail about various transformations.
4. Define clipping and describe the clipping operation in detail
5. Explain when Sutherland line clipping algorithm in detail.
6. Explain the 2D transformation in detail.
7. Explain briefly about two-dimensional rotation.
8. Discuss briefly about pivot point rotation and fixed point scaling.
9. Discuss briefly about shear transformation.
10. Explain about two dimensional viewing pipelines.

UNIT-III
Text: Types of Text – Unicode Standard – Font – Insertion of Text – Text compression – File
formats. Image: Image Types – Seeing Color – Color Models – Basic Steps for Image Processing
– Scanner – Digital Camera – Interface Standards – Specification of Digital Images – CMS –
Device Independent Color Models – Image Processing software – File Formats – Image Output
on Monitor and Printer.

INTRODUCTION TO MULTIMEDIA
Aims and Objectives

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

In this lesson we will learn the preliminary concepts of Multimedia. We will discuss the
various benefits and applications of multimedia. After going through this chapter the reader will
be able to :

 define multimedia
 list the elements of multimedia
 enumerate the different applications of multimedia
 describe the different stages of multimedia software development

Introduction
Multimedia has become an inevitable part of any presentation. It has found a variety of
applications right from entertainment to education. The evolution of internet has also increased
the demand for multimedia content.

Definition
Multimedia is the media that uses multiple forms of information content and information
processing (e.g. text, audio, graphics, animation, video, interactivity) to inform or entertain the
user. Multimedia also refers to the use of electronic media to store and experience multimedia
content. Multimedia is similar to traditional mixed media in fine art, but with a broader scope.
The term "rich media" is synonymous for interactive multimedia.

Elements of Multimedia System


Multimedia means that computer information can be represented through audio,graphics,
image, video and animation in addition to traditional media(text and graphics).Hypermedia can
be considered as one type of particular multimedia application.

Multimedia is a combination of content forms


Audio, Video

Applications of Multimedia
Multimedia finds its application in various areas including, but not limited to,
advertisements, art, education, entertainment, engineering, medicine, mathematics, business,
scientific research and spatial, temporal applications.
A few application areas of multimedia are listed below:

 Creative industries
 Commercial
 Entertainment and Fine Arts
Multimedia applications that allow users to actively participate instead of just sitting by
as passive recipients of information are called Interactive Multimedia.

 Education
 Engineering
 Industry
 Mathematical and Scientific Research
 Medicine
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Multimedia in Public Places

TEXT
Ever since the inception of human civilization ideas have been largely articulated using
the written mode. The flexibility and ease of use of the textual medium makes it ideal for
learning. Word processing programs emerged as one the earliest application programs. In
multimedia presentations, text can be combined with other media in a powerful way to present
information and express moods.Text can be of various types.

 Plain Text
It consisting of fixed size characters having essentially the same type of appearance.

 Formatted Text
Where appearance can be changed using font parameters.

 Hyperlink
Which can serve to link different electronic documents and enable the user to jump from
one to the other in a non-linear way. Internally text is represented via binary codes as per the
ASCII table. The ASCII table is however quite limited in its scope and a new standard has been
developed to eventually replace the ASCII standard. This standard is called the Unicode
standard and is capable of representing international characters from various languages
throughout the world. Text can be inserted into an application using various means.
The simplest way is directly typing text into the application by using the keyboard;
alternatively text can be copied from another pre-existing file or application and pasted into the
application.
Nowadays we also generate text automatically from a scanned version of a paper
document or image using Optical Character Recognition (OCR) software.
When text is saved onto the hard disk, it can be compressed using various algorithms so
as to reduce the file size. All algorithms however work in a lossless mode (ie) all information in
the original file is maintained intact without loss of data in anyway. Depending on how various
visual properties of text are stored and the compression scheme followed, text can be stored into
the number of file formats each requiring its own specific application to open and modify the
contents.

TYPES OF TEXT
Essentially there are three types of text that can be used to produce pages of a document.

 Unformatted text
 Formatted text
 Hypertext
 Unformatted Text
Also known as plain text, this comprise of fixed sized characters from a limited character
set. The character set is called ASCII table which is short for American Standard Code for
Information Interchange and is one of the most widely used character sets.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

It basically consists of a table where each character is represented by a unique 7-bit


binary code. This means there are 27 or 128 code words which can be used to identify the
characters.
The characters include a to z, A to Z, 0 to 9, and other punctuation characters like
parenthesis, ampersand, single and double quotes, mathematical operators etc. All the characters
are of the same height.
In addition to normal alphabetic, numeric and punctuation characters collectively called
printable characters, the ASCII characters set also includes a number of control characters.
These include BS(Backspace), LF(Line feed), CR(Carriage return), NUL(Null),
SOH(Start of heading), STX(Start of text), ETX(End of text), EOT(End of transmission),
ENQ(Enquiry), ACK(Acknowledge), BEL(Bell), TAB(horizontal tab), VT(Vertical tab),
FF(Form feed), SO(Shift out), SI(shift in), DLE(Data link escape), DC1(device control 1),
DC2(Device control 2), NAK(Negative acknowledge), SYN(Synchronous idle), ETB(End of
trans block), CAN(Cancel), EM(End of medium), SUB(Substitute), ESC(Escape), FS(File
separator), GS(Group separator), RS(Record separator), US(unit separator)
Whenever characters included in the table are required to be stored or processed by a
computer, the corresponding numeric code is retrieved from the ASCII table in binary form and
substituted for the actual text for internal processing. This includes both the printable and control
characters example: each line of text in a document is terminated by a linefeed character.
Later as requirements increased an extended version of ASCII table was introduced
known as the extended ASCII character set, while the original table came to be known as
standard ASCII set.
The extended set used an 8- bit representation and therefore had a provision of 256
characters. The first 128 characters were the same as the original character set, now known as the
standard ASCII table while the remaining codes were used to represent small simple graphical
symbols.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Formatted Text
Formatted texts are those where apart from the actual alphanumeric characters, other
control characters are used to change the appearance of the characters example: bold, underline,
italics, varying shapes, sizes and colors. Most text processing software uses such formatting
options to change text appearance. It is also extensively used in the publishing sector for the
preparation of books, papers, magazines, journals and soon. In addition a variety of document
formatting options are supported to enable an author to structure a documents into chapters,
sections and paragraphs and with tables and graphics inserted at appropriate points. The control
characters used to format the text is application dependent and may vary from one package to
another example bold appearance.

 Hypertext
Documents provide a method of transmitting information. Reading a document is an act
of reconstructing knowledge. A book or an article on paper has a given structure and is
represented in a sequential form. Although it is possible to read individual paragraphs, without
reading previous paragraphs, authors mostly assume sequential reading. Novels as well as
movies always assume a pure sequential reception.
Technical documentation (example: manuals) consists often of a collection of relatively
independent information units. There also exists many cross- references in such documentation
which leads to multiple searches at different places for the reader. A hypertext document can be
used to handle such situations.
The term hyper is usually used to mean something excessive (beyond super) example:
hyper active, hyper tension etc. Here the term is used to mean certain extra capabilities imparted
to normal or standard text like normal text, a hypertext document can be used to reconstruct
knowledge through sequential reading but additionally it can be used to link multiple documents
in such a way that the user can navigate non-0 sequentially from one document to the other for
cross-references. These links are called hyperlinks. Hyperlinks from one of the core structures
in multimedia presentations, because multimedia emphasizes a non-linear mode of presentation.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Example: A multimedia tourist brochure can have text information about various places
of interest, with photographic images; can have voice annotations about how to get to those
places and the modes of travel available, video clips of how tourists are traveling and the
facilities provided to them. All these information can be hyperlinked like a list of hotels at each
place along with their changes. A tourist can make use of a search facility to navigate to the
information regarding a specific place of interest and then use the hyperlinks provided to view
each category of information.
Hypertext is mostly used on the World Wide Web for linking different web pages
together and allowing the user to navigate from one page to another. To crate such documents
the user uses commands of a hypertext language like HTML or SGML to specify the links.
Typically hyperlinks take the form of an underlined text string and the user initiates the access
and display of a particular document by pointing and clicking the mouse on the appropriate link.
The underlined text string on which the user clicks the mouse is called an anchor and the
document which opens as a result of clicking is called target document on the web target
documents are specified by a specific nomenclature called web sites address technically known
as Uniform Resource Locator or URL. Example of hypertext:

 Node Or Anchor
The anchor is the actual visual element (text) which not only is associated with some
meaning by itself but also provides an entry point to another document. An important factor in
designing an user interface is the concept of how the anchor can be represented properly. In most
cases the appearance of the text is changed from the surrounding text to designate a hypertext,
example: by default it is colored blue with an underline. Moreover the mouse pointer changes to
a finger icon when placed over a hypertext. The user actually clicks over the hypertext in order to
activate it and open a new document in the document viewer. In some cases instead of text an
anchor can be an image, a video or some other non-textual element. In such cases the term
hypermedia is more appropriate.

 Pointer Or Link
These provide connection to other information units known as target documents. A link
has to be defined at the time of creating the hyperlink, so that when the user clicks on an anchor
the appropriate target document can be fetched and displayed. Usually some information about
the target document should be available to the user before clicking on the anchor. If the
destination is a text document, a short description of the content can be represented. in the case
of an image, the image content can appear in thumbnail form on the screen.A visual
representation of the video content can follow in the form of a moving icon. If the content of the
destination node consists of audio information a visual representation of the audio content must
follow.
Example In the case of a music passage a picture of the composer could be displayed.

UNICODE STANDARD
The Unicode standard is a new universal character coding scheme for written characters
and text .It defines a consistent way of encoding multilingual text which enables textual data to
be exchanged universally. The Unicode standard goes far beyond ASCII’S limited more than 1
million characters.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Multilingual support is provided for European, Middle Eastern and Asian languages. The
Unicode consortium was incorporated in 1991 to promote the Unicode standard. The Unicode
Technical Committee (UTC) is the working group within the consortium responsible for the
creation, maintenance, and quality of the Unicode standard The Unicode standard draws a
distinction between characters, which are the smallest component of written language and
Glyphs, which represents the shapes, the characters can have when displayed.
The Unicode standard deals only with character codes, representation of the glyphs are
not part of the standard. These are to be dealt with by the font vendors and hardware vendors. A
font and its rendering process define a mapping from the Unicode values to glyphs. Example:
the Hindi character ‘Pa’ is represented by the Unicode sequence 0000100100101010(U + 092A),
how it will be rendered on the screen will be decided by the font vendor. The first byte represents
the language area while the next byte represents the actual character. Some of the languages and
their corresponding codes are: Latin (00) , Greek(03) , Arabic(06), Devanagiri/ Bengali (09) ,
Oriya / Tami9l (0b) etc.
The Unicode consortium based in California overlooks the development of the standard.
Members include major software and hardware vendors like Apple, Adobe, IBM, Microsoft HP,
etc. The consortium first published in the Unicode standard 1.0 in 1991. the latest version is 4.1
released in 2005. The Unicode version 3.0 is identical to the ISO standard 10646. Several
methods have been suggested to implement Unicode based on variations in storage space and
compatibility. The mapping methods are called Unicode Transformation Formats (UTF) and
Universal Character Set (UCS)

FONT
Font Appearance
The appearance of each character in case of formatted text is determined by specifying
what a font name. Font name refers to font files which contain the actual description of the
character appears on the windows platform font files are stored in specific folder called fonts
under the windows folder. These files are usually in Vector format meaning that character
descriptions are stored mathematically. This is useful because characters may need to be scaled
to various heights and mathematical descriptions can easily handle such variations without
degrading the appearance of characters.
Windows call these fonts as true types fonts because their appearance stays the same on
different devices like monitors, printers and plotters, and they have a file extension of TTF.An
alternative form of font files is the bitmap format where each character is described as a
collection of pixels.

Examples Of Default (Upper Row) And Downloaded (Lower Row) Fonts


Times Roman Arial, Century Gothic, Verdana, Courier New, ABADDON AERO
AVQUEST, Cassandra, FAKTOS.
Some of the standard font types included with the windows OS package shown in upper
row. Other than theses there are thousands of font types made by various organizations and many
of them are freely downloadable over the Internet. Each application has a default font name

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

associated with it. When a specific font requested by the user is not available in the system, then
the default font is used which is assumed to be always available.

Some software application packages allow font files to be embedded within them so that
when a presentation file crated using that package is shown on a target system which does not
have the requisite font files, and then the embedded fonts are used instead. Some examples of
downloadable fonts are shown in lower row.

FONT STYLE AND SIZE


Font characters have a number of sizes. Size is usually specified in a unit called point (pt)
where 1 point equal 1\72 of an inch. Sometimes the size may also be specified in pixels.
Standard characters in textual documents usually range from 10 to 12 pts in size, while the upper
limit may go well beyond 100.
Specified font types can be displayed in a variety of styles. Some of the common styles
used are: bold, italics , underline, super script and sub script . Some application packages allow
changing the horizontal gap between the characters called kerning and the vertical gap between
two lines of text called leading.
Some packages allow a number of special effects on text to make it more dramatic,
interesting and fun. This includes changing the appearance in a variety of ways like bending,
slanting, warping, rotating, adding shadows and 3D effects etc, other ways of manipulating text
include animations like scrolling , fading, changing colors , adding sound effects etc.

INSERTION OF TEXT
Text can be inserted in a document using variety of methods. These are;

 USING A KEY BOARD


The most common process of inserting text in to a digital document is by typing the text
using an input device like the keyboard. Usually a text editing software, like Microsoft
word, is used to control the appearance of text which allows the user to manipulate variables like
the font, size, style, color etc. Some image processing and multimedia authoring software
provide a separate text editing window where the user can type text and integrate it with the rest
of the media like background images.

 COPYING AND PASTING


Another way of inserting text in to a document is by copying text from a pre- existing
digital document. The existing document is opened using the corresponding text processing
program and portions of the text may be selected by using the key board or mouse. Using the
copy command the selected text is copied to the clipboard. This text can then be inserted in to
another existing document or a new document or even in another place of the same document by
choosing the paste command, where upon the text is copied from the clipboard in to the target
document. This text can then be edited as per the user’s requirements.

 USING AN OCR SOFTWARE

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

A third way of inserting text in to digital documents is by scanning it from a paper


documents. The text in a paper document including books, newspaper, magazines, letter heads
etc can be converted in to the electronics form using a device called the scanner.

The electronic representation of the paper document can then be saved as a file on the
hard disk of the computer. The scanned file will however be an image file in which the text will
be present as part of an image and will not be editable in a text processors. To be able to edit the
text, it needs to be converted from the image format in to the editable text format using software
called Optical Character Recognition (OCR) software. The OCR software traditionally works by
a method called pattern matching.
Here the software tries to match each and every scanned character to a already stored
definitions of characters within the software. For every match found, the software represents the
character as an editable text objects instead of an image object. This process is however largely
dependant on the appearance of the characters for finding an adequate match and thus on the
specific fonts. Some of the standard fonts may be converted with appreciable accuracy while
other fonts may not be recognized.
The conversion process is also dependant upon the quality of the scanned paper
document and on the quality of the OCR software. If the letters on the scanned page are clearly
visible and in a standard font, then using a good quality OCR software. One may expects to
convert most of the characters although no software can guarantee 100% accuracy in conversion,
research on OCR is based on another technology called feature extraction.
Using this method the software attempts to extract the core features of the characters and
compare them to a table stored within itself for recognition. It is believed that if it can be done
accurately enough, it will make the recognition process independent of the appearance or font of
characters because the core set of features will remain same in any font representation. example:
if the software algorithm can extract the line, the circle, and the arc in the positions shown below,
it will recognize the character to be ‘a’ whatever the actual shape.

TEXT COMPRESSION
Large text documents covering a number of pages may take a lot of disk space. We can
apply compression algorithms to reduce the size of then text file during storage. A reverse
algorithms must be applied to decompress the file before it contents can be displayed on screen.
However to be meaningful, the compression – decompression process must not change the
textual content in anyway, not even a single character. There are two types of compression
methods that are applied to text as explained.

 Huffmancoding
This type of coding is intended for applications in which the text to be compressed has
known characteristics in terms of the occurrences. Using the information, instead of using fixed

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

length code words, an optimum set of variable – lengths code words is derived such that the
shortest codeword is used to represent the most frequently occurring characters. This approach is
called Huffman coding.

 Lempel –Ziv (Lz) Coding


In the second approach followed by the Lempel – ziv (LZ) method, instead of using a
single character as a basis of the coding operation a string of characters is used. Example: a table
containing all the possible words that occur in a text document is held by both the encoder and
decoder. As each word occurs in the text, instead of representing the text as ASCII characters,
the encoders stores only the index of where the word in the table. The decoder converts the index
in to the appropriate words from the table. Thus the table is used as a dictionary, and the LZ
algorithm is also known as dictionary based algorithm.

 Lempel – Ziv Welsh (Lzw) Coding


Most word processing packages have a dictionary associated with them which is used for
both spell checking and compression of text. Typically they contain in the region of 25000 words
and hence, 15 bits (215 = 32768) are required to encoding the index. To encode the word
compression with such as scheme would require only 15 bits instead of 777 bits with 7 bit ASCII
code words. The above method may not however produce efficient result for documents with a
small subject of words in the dictionary. Hence the variations of the above algorithm called
Lempel-ziv welsh (LZW) method allows the dictionary to be built up dynamically by the
encoder and decoder for the document under processing. The dictionary becomes a better match
for a specific document than a standard dictionary.

FILE FORMATS
The following text formats are usually used for textual documents.

 Txt (Text)
Unformatted text document created by an editor kike note pad on those platform.
Unformatted text document can be used to transfer textual information between different
platform like windows DOS and UNIX. The data is encoded using ASCII codes but sometimes
Unicode encodings like UTF – 8 or UTF – 16 may be used.

 Doc (Document)
Developed by Microsoft as a native format for storing documents created by the ms word
package. Contains a rich set of formatting capabilities . Since it require property software it is not
considered a document exchange format.

 Rtf(Rich Text Format)


Developed by Microsoft in 1987 for cross platform document exchanges . it is the default
format for Mac OS X’s default editor test edit. The word pad editor earlier created RTF files by
the default although now it has switched to the DOC format RTF control codes are human
readable , similar to HTML code.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Example this is (\b bold) text; \\par a new paragraph begins.

 Pdf (Portable Document Format)


Developed by adobe systems for cross platform exchange of documents. In addition to
text the format also support images in graphics PDF is an open standard and any one make write
programs that can read and write PDF s without any associated royalty charges.PDF readers can
be downloaded for free from adobe site and there are several free open source readers available.
Example; X PDF (http;\\WWW.foolabs .com\ x PDF),
PDF (http:// www. Purl.org/net/Gpdf),
View PDF (http;//mac.wms-network.de/gnustep/image apps /view PDF /view pdf.html)

 Ps(Post Script)
Post script is a page description language used mainly for desktop publishing. A page
description language is a high level language that can describe the contents of a page such that it
can be accurately displayed on output devices usually a printer. Post script was developed in
1985 and soon became the ideal choice for graphical output for printing applications. In the same
year apple laser writer was the first printer to ship with post script prior to post script, then
printing graphics on a Dot matrix printer, the graphics had to be interpreted by the computer and
then sent as a series of instructions to the printer to reproduce it . These printer control languages
varied from printer to printer. Post script offered a universal language that could use for any
brand of printer .Post script represent all graphics and events text as vectors, (ie) as combination
of lines and curves.A post script compatible program converted a input document in to the PS
format, which is sent to be printer.
A post script interpret a inside the printer converted the vectors back in to the raster dots
to be printed. These allow arbitrary sealing, rotating and other transformations.

IMAGE
After text the next element that comes under the preview of multimedia are pictures. A
picture being ‘worth a thousand words’ can be made to import large amount of information in a
compact way. It is a fact that most people dislike going through pages of text especially on a
computer screen, and so it has been the endeavor of most multimedia developers to supplement
words with picture in presentation.
The pictures that we see in our everyday life can be broadly classified into two groups
those that depict some real world situation typically captured by a camera and those that have
been drawn or painted and can depict any fictitious scenario.
The first of pictures are called images and the second types are called graphics. Images
can either be pure black and white or grey scale having a number of grey shades or color
containing a number of color shades. Color is a sensation that light of different frequencies
generates on our eyes, the higher frequencies producing the blue end and the lower frequencies
producing red end of the visible spectrum.
An object appears to have a certain color because it observes the other color components
from white light and reflects only light of frequencies specific to that color to our eyes.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

To recognize and communicate color information we need to have color models. Color
models help us express color information in terms of numerical value. Generally color models
definite a set of primary color and other colors are expressed as various combinations of the
primaries.
To most well known color models are the RBG models used for colored lights like
images on a monitor screen and the CMYK model used for colored inks like images printed on
paper.

The first one defines the color red, green and blue as primary colors while the second one
defines the colors cyan, magenta and yellow as the primaries. The colors used in these models
are however dependent on the physical properties of devices which generate them. Eg:
Physical/chemical properties of CRT (Cathode Ray Tube) and are therefore referred to as device
dependent color models.
Device independent color models also exist and are based on the human perception of
color rather than the device properties. One of the most well known independent color model is
HSB model where the primaries are hue, saturation and brightness. The total range of color
model is known as gamut. Different color models may have different gamut’s indicating that
it may not always be possible to accurately convert colors from one model to another. Image
processing involves three stages, input, editing and output.
The input stage deals with the issues of converting hardcopy paper images into electronic
versions. This is usually done via a device called the scanner. A number of electronic sensors
within the scanner within the scanner each convert a small portion of the original image into
pixels and store them as binary numbers within the storage device of a computer. While scanner
is used to digitalize documents, another device called the digital camera can convert real world
scene into a digital image. Digital cameras also contain a number of these electronic sensors
which are known as Charged Coupled Device (CCD) and essentially operate on the same
principle as scanner. Once a digital version of a image is generated, an editing software is used to
manipulate the image in various way.

IMAGE TYPE
Image that we see in our everyday lives can be categorized into various types.

 Hardcopy Vs Soft Copy


The typical image that we usually come across are the pictures that have been printed on
paper or some other kinds of surfaces like plastic, cloth, wood etc, these are also called hardcopy
images because they have been printed on solid surfaces.
Sometimes images are also seen in electronic forms on the TV screen or computer
monitor. Such images have been transformed from hard copy images or real objects into the
electronic form using specialized procedures and are referred to as softcopy images.

 Continious Tone, Half-Tone And Bitone


Photographs are also known as continuous tone image because they are usually composed
of a large number of varying tones or shades of colors. Sometimes due to limitations of the

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

display or printing devices, all the colors of a photograph cannot be represented adequately. In
those cases a subset of the total number of colors are displayed. Such images are called partial
tone or half tone images. Photographic representation in a news paper is examples where they
appeared to be made up of colored dots. Here because the printing press is unable to print a large
number of colors, the photographs are broken down into discrete dots containing some of the
mostly used original colors of the original photograph.
A third category of image is called bitonal images, which uses only two colors, typically
black and white. And do not use any shades of grey. These types of images are mostly used for
special effect.

SEEING COLOR
The phenomenon of the seeing color is dependent on a triad of factors: the nature of light,
the interaction of light and matter and the physiology of human vision. Each factor plays a vital
part and the absence of I any one would make seeing color impossible. Light is a form of energy
known as electromagnetic radiation.
Electromagnetic radiation consists of a large number of waves with varying frequencies
and wavelengths. At one extreme are the radio waves having the longest wavelength (several
kilometers) and at the other extreme are the gamma rays with the shortest wavelength (0.1
nanometers) out of the total electromagnetic spectrum a small range of wave’s cause’s sensations
of light in our eyes. This is called visible spectrum of waves
The second part of the color triad is the human vision. The retina is the light sensitive part
of the eye and its surface is composed of photoreceptors or nerve endings. These receive the light
and pass it along through the optic nerve as a stimulus to the brain.
The different frequencies gives raise to the different color sensations in our eyes. Within
the visible range shorter wavelength give rise to color like violet, blue and green. While longer
wavelength produce yellow, orange and red. All the colors combine to produce white light.
White light can be split into component color by passing it through a prism.
The third factor is the interaction of light with matter. Whenever light waves strike an
object, part of the light energy get absorbed and/or transmitted, while the remaining parts gets
reflected deck to our eyes. The wavelength presented in the reflected lights imparts a specific
color to the object from which the light is reflected.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

For example a red ball looks red because it absorbs all the other wavelengths in white
light and reflects back only those wavelengths which produce a red color sensation in our eyes.
Transmission takes place when light passes through an object without being essentially changed;
the object in this case is said to be transparent. Some alterations do not take place, however
according to refractive index of the material through the light is transmitted.
Refractive Index (RI) is the ratio of speed of light in a vacuum (i.e:, space) to the speed of
light in a given transparent material(eg, air, water, gas).
For e.g.: The RI of water is 1.0003. if light travels through space at 186000 miles per
second, it travels through air at 185944 miles per second – a very slight difference. By
comparison, the RI of water is 1.333 and the RI of glass will vary from 1.5 to 1.96- a
considerable slowing of light speed. The point where two substance of differing RI meet is
called the boundary surface.
At this point a beam of transmitted light (the incident beam) changes direction according
to difference in refractive index and also the angle at which it strikes the transparent object: this
is called refraction. If light is only partly transmitted by the object (the rest being absorbed) the
object is translucent.
When light strikes an opaque object (i.e an object that does not transmit light), the
object’s surface plays an important role In determining whether the light is fully reflected, fully
diffused, or same of both. A smooth or glossy surface is one made up of particles of equal or
nearly equal refractive index. These surfaces reflect light at an intensity and angle to the incident
beam.
Scattering or diffusion is another aspect of reflection. When a substance contains
particles of a different refractive index, a light beam striking the substance will be scattered. The
amount of light scattered depends on the difference in the two refractive indices and also on the
size of the particles. Most commonly, light striking an opaque object will be both reflected and
scattered. This happens when an object is neither wholly glossy nor wholly rough.

COLOR MODELS
Color models help us in recognizing and expressing information related to color. In our
everyday life we see a large variety of colors which we cannot express by names. Researchers
have found Out of the most of the colors that we see around us can be derived from mixing a few
elementary colors. These elementary colors are known as primary colors. Primary colors mixed
in varying proportions produce other color called composite colors. This provides us with a way
to refer to any arbitrary color: by specifying the name and proportions of the primary colors from
which it can be produced.
Two primary colors mixed in equal proportions produce a secondary color. The primary
colors along with the total range of composite colors they can produce constitute a color model.
There can be multiple color models each with its own set of primary and composite colors.

 RGB Model
The RGB color model is used to describe behavior of colored lights like those emitted
from a TV screen or a computer monitor.
This model has three primary colors: red, green, blue in short RGB.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Inside a CRT, electron beams falling an red, green and blue phosphor dots produce
corresponding colored lights which mix together in different proportions to produce lights of
composite colors.
Proportions of colors are determined by the beam strength. An electron beam having the
maximum intensity falling on a phosphor dot creates 100% of the corresponding color. 50% of
the color results from a beam having half the peak strength. Proportions are measured in
percentage values.
An arbitrary color, say orange, can be specified as 96% red, 40% green and 14% blue.
This means that to produce orange colored light on the screen, the three electron beams striking
the red, green and blue phosphors need to have 96%, 40% and 14% of their maximum insanities
respectively.
All three primary colors at full intensities combine together to produce white, i.e their
brightness values are added up. Because of this, the RGB model is called an additive model.
Lower intensity values produce shades of grey. A color present at 100% of its intensity is called
saturated, otherwise the color is said to be unsaturated.
The three secondary colors of the RGB model are: magenta(formed by mixing equal
quantities of red and blue), cyan(formed by mixing equal quantities of blue and green) and
yellow (formed by equal quantities of green and red)
The three primary colors in varying percentages from composite colors.

 CMYK Model
The RGB model is only valid for describing behavior of colored lights. When specifying
colors of ink on paper we require a different model.
Consider a blue spot of ink on paper. The ink looks blue because it only reflects blue light
to our eyes while absorbing the other color components from white light.
If we now mix a spot of red ink with blue ink what resultant do we expect? If the RGB
model was followed, the resultant would have been magenta.
But try to analyze the situation here the red ink would try to absorb the blue light reflected from
the blue ink and similarly the blue ink would try to absorb the red light from the red ink.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The result is that no light comes from the ink mixture to our eyes and it looks black.
Thus, clearly the RGB model is not being followed here and we need a new model to explain its
behavior.
This new model is named CMYK model and is used to specify printed colors. The
primary colors of this model are cyan, magenta and yellow. These colors when mixed together in
equal proportions produce black, due to which the model is known as a subtractive model.
Due to impurities in the ink the actual color obtained is dark brown instead of black. So
an extra black ink is added to produce pure black which is why the color model is known as
CMYK, the k standing for the black component.
The colors of pure cyan, magenta and black inks are indicated as 100% when the inks are
mixed with other inks. The proportion and saturation of the colors decrease. Mixing cyan and
magenta in equal proportions produce blue, magenta and yellow produce red and yellow and
cyan produce green.
Thus the secondary colors of the CMYK model are the same as the primary colors of the
RGB model and vice versa. These two methods are thus known as complimentary models.

 Device Dependency And Gamut

It is to be noted that both the RGB and the CMYK models do not have universal or
absolute color values. We know exactly how much is 1 kilogram or 1 meter because these
measures are standardized and have the same value everywhere. But when we talk about 100%
red, the color that is indicated will actually be dependent on the physical characteristics of the
phosphor dots or the ink. Since these characteristics will slightly differ in different devices there
is no concept of an absolute color, but different devices there is no concept of an absolute color
but different devices will give rise to slightly different set of colors. For this reason both the
RGB and the CMYK models are known as device dependent color models.

Another issue of concern here is the total range of colors supported by each color model.
This is known as the gamut of the model. It has been found that the RGB model has a larger
gamut than the CMYK model. This is essentially means that all colors in the RGB model cannot
be expressed in terms of the CMYK model. For this reason an image displayed on a monitor
screen may have its colors slightly changed when printed on paper. When the printing system
finds no CMYK representation of a specific RGB value, it will attempt to substitute it with the
nearest or most similar CYMK value leading to a change in the color shade. Image processing
software displays a gamut warning to the user under these conditions. The lab color model is a
device independent model and is considered to have the largest gamut.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

BASIC STEPS FOR IMAGE PROCESSING


Image processing is the name given to the entire process involved with the input, editing
and output of images from a system. When studied in connection to multimedia it implies digital
manipulation of images. There are three basic steps.

 Input
Image input is the first stage of image processing. It is concerned with getting natural
images into a computer system for subsequent work. Essentially it deals with the conversion of
analog images into digital forms. This is mainly done using two devices. The first is the scanner
which can convert a printed image or document into the digital form.
The second is the digital camera which digitizes real world images, similar to how a
conventional camera works. Sometimes we can start with ready-made digital images, e.g.: copied
from a clipart gallery or a photo- cd, or downloaded from the internet. In such cases we skip the
image input stage and go straight to the image editing stage.

 Editing
After the images have been digitized and stored as files on the hard disk of a computer,
they are changed or manipulated to make them more suitable for specific requirement.
This step is called editing and usually involves one or more image editing software which
provides various tools and functionalities for editing the images.
Before the actual editing process can begin, an important step called color calibration needs to be
performed to ensure that the image looks consistent when viewed on multiple monitors.
After editing, the images are usually compressed using mathematical algorithms and then
shared into specific file formats.

 Output
Image output is the last stage in image processing concerned with displaying the edited
image to the user. The image can either be displayed in a stand-alone manner or all as part of
some application like a presentation or web page. In the most cases the image need to be
displayed on-screen via a monitor. However for some application like printing a catalog or
brochure, the images need to be printed on paper using a printer.

SCANNER
For images digitization involves physical devices like scanner or digital camera.The
scanner is a device used to convert analog images into the digital form.The most common type of
scanner for the office environment is called the flatbed scanner.It looks like a photocopying
machine with a glass panel and a moving scan head below it.
The paper document to be scanned is placed down on the glass panel and the scanner is
activated using software from a computer to which the scanner remains attached.
The traditional way of attaching a scanner to the computer is through an interface cable
connected to the parallel port (centronics) of the pc, but nowadays other forms of interfaces like
scsi or vsb are gaining prominence.
 Constuction And Working Principle

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

To start a scanning operation the paper document to be scanned is placed take down on
then glass panel of the scanner is placed and the scanner is activated using software from the host
computer. The scan head contains a source of white light. As the head moves across the paper,
the light illuminates the paper progressively.The light on getting related by the paper image is
made to fall on a grid of electronic sensors, by an arrangement of a mirror and lenses. The
electronic sensors are called charge coupled devices (CCD). And are basically converts of the
light energy in to voltage pulses. The strength of the voltage p[produced is proportional to the
intensity of the light falling on the CCD elements.Brighter regions of the image reflect more light
on to the CCD thereby producing stronger voltage signal.
Darker image portions produce weaker signals. After a complete scan the image is
converted from a continuous entity in to a discrete converted from a continuous voltage pulses..
This process is called sampling, derived from the fact that each point of the image is sampled or
examined to obtain a value regarding its brightness at the point. The voltage signals are
temporarily stored in a buffer inside the scanner. The next set up called quantization involves the
representing the voltage pulses as binary numbers and carry out an ADC inside the scanner in
conjunction with software bundled with the scanner called the scanning software.
The software has to first decide on the number of bits to be presenting the binary
representation. This information either supplied by the user is decided accordingly to some
default setting. For an n bit representation there will be 2n voltage pulse that can be represented
by binary numbers practical bit values range from 8 bits to 24 bits.This id known as bit – depth
of then image
The collection of binary numbers is stored ion the hard disk of the PC as a digital image
file. Since each number has been derived from the intensity of the incidence light, this
e4ssentially represents brightness value at different points of the image , and are known as
pixels. Larger the bit depth, more are the number of brightness value that can be stored. Thus a
24 bit digital image will be more accurate representation of the original analog image then an 8
bit image, and so would be a vector quality.
However it will also occupy a larger disk space and need more processing power to
manipulate. This increases the cost of storing and manipulating a higher quality image. The
actual value of the bit depth will be decided largely as a matter of compromise between the cost
and quality requirements.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

SCANNER TYPES
Scanners can be of various types each designed for specific purposes.

 Flatbed Scanners
The flatbed scanner is the most common type in office environments. It looks like a
photocopying machine with a glass panel on which the document to be scanned is placed face
down. Below the glass panel is a moving head a source of white usually xenon lamps. The
moving head moves slowly from the one end of the 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 array via a
system of mirrors. Depending on bright and dark regions of the document, CCD generates
varying voltage signals which are stored in a buffer and later fed to an ADC. The light is made to
fall on small strips (rows) of the document at a time. As the head moves on, the next row is
scanned.The process continues until all the rows of the document have been scanned.Text or
image on the document is therefore visible to the CCD only because of the light it reflects.

 Drum Scanners
Drum scanners is used to obtain good quality scans for professional purposes and
generally provides a better performance than flatbed scanners. It consists of a cylindrical drum
made out of a highly translucent plastic like material. The image to be scanned, usually a film, is
wet – mounted on the drum, meaning that it is soaked in a fluid. The fluid helps to camouflage
the scratches and dust grains over the film and provides improved clarity of the film. The fluid
can either be oil-based or a alcohol- based. For the sensing element, drum scanners use a photo –
multiplier tube (PMT) instead of a CCD. A PMT, also referred to as an electron multiplier, is
much more sensitive to light than the CCD and more expensive as well. It works on the principle
of photoelectric effect in which absorption of a result in an electron emission. The photon is
detected by amplifying the electron, referred to as photo – electron, by passing it through a
cascade of acceleration electrodes, called dynodes.
The multiplier consists of a sealed glass tube containing an anode and a number of
dynodes. Each dynode is charged to a higher voltage than the previous one. On hitting
each dynode, the photo-electrons will invoke emission of additional electrons, which accelerate
towards the next dynode. This process continues until the anode is reached where the
accumulation of charge results in a sharp increase in voltage pulse indicating the detection of the
photon. An amplification gain of the order of 108 can be achieved in multipliers containing
about 14 dynodes, which can provide measurable pulses from even single photons.

 Bar – Code Scanners


A bar code scanner is designed specifically to read barcodes printed on various surfaces.
A barcode is a machine – readable representation of information in a visual format. Traditionally
barcodes use a set of parallel vertical lines whose widths and spacing between them is used to
encode information. Nowadays they come in other forms like dots and concentric circles.
Barcodes relieve the operator of typing strings in a computer, the encoded information is directly
read by the scanner. They are extensively used to indicate details of products at retail outlets and
other automated environments like baggage routing in airports. The data contained in a barcode
varies with the application. In the simplest case an identification number is used as an index in a

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

database where the details about the product is stored The EAN (European Article Numbering)
and the UPC (Universal Product Code) belong to this class.
The other type is where the barcode holds the complete information and does not need
external databases. This led to barcode symbologies that can represent more than digits, typically
the entire ASCII character set. Stacked and 2D barcodes belong to this class where a 2D
matrix of lines may be used. The PDF 417 IS the most common 2D barcode. A barcode scanner
is usually smaller than the flatbed or the drum scanner and contains a light source which can
either be an LED or a LASER. The light on falling on the barcode gets reflected back and is sent
to a photoconductor for translating them in to electrical impulses. Additionally the scanner
contains a circuit for analyzing the barcode data and sending the decoded data to the output port
of the scanner.
A LASER barcode scanner is more expensive than a LED one but is capable of scanning
barcodes at a distance of about 25cm. The barcode scanner can either be hand-held or
stationary type. Hand-held types are small devices that can be held by hand and usually contains
a switch for triggering and light emission. It can be either wedge – shaped or pen- shaped, both
of which are slided over the barcode for scanning.The stationary type remains on the table and
the barcode is passed under its light port for scanning, generally found in retail counters and
markets. Most barcode scanners use the Ps\2 port for getting connected to the computer, however
they can also use the RS-232 and USB ports.

COLOR SCANNING
Since the CCD elements are sensitive to the brightness of the light, the pixels essentially
store only the brightness information of the original image.This is also known as luminance (or
luma) information To include the color of chrominance (or chroma) information there are three
CCD elements for each pixel of the image format. These three elements are sensitive to the red,
blue and green components of light.
White light reflected off the paper document is split in to the primary color components
by a glass prism and made to fall on the corresponding CCD sub – components. The signal
output from each sub – component can be combined to produce a color scanned image. The
pixels in this case contain both the luma and chroma information.(below figure)

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

DIGITAL CAMERA
CONSTRUCTION AND WORKING PRINCIPLE
Apart from the scanner used to digitize paper documents and film, another device used to
digitize real world images is the digital camera. ust like a conventional camera, a digital camera
also has a lens through which light from real world objects enter the camera. ut instead of falling
on film to initiate a chemical reaction the light instead falls on a CCD array, similar to that inside
the scanner.Just like a scanner the voltage pulses from the CCD array travel to an ADC where
they are converted to binary representations and stored as a digital image file. Unlike a scanner a
digital camera is usually not attached to a computer via a cable. The camera has its own storage
facility inside it usually in the form of a floppy drive, which can save the images created in to a
floppy disc. Images however cannot be stored in floppy discs in their raw forms as they would
tend to take too much space. So instead they are compressed to reduce their file sizes and stored
usually in the JPEG format. This is a lossy compression technique and results in slight loss in
image quality. Each floppy inserted into the camera can hold about 15 to 25 images, depending
on the amount of compression. The floppy can then simply be taken out of the camera, inserted
into a PC and the files copied. Users are usually not permitted to set parameters like bit-depth
and resolution and the digital camera uses its default set of values. Earlier digital cameras had
CCD arrays of about 640*480 elements but modern high – end cameras have as many as
20484*1536 elements in its CCD arrays. Modern digital cameras contain memory chips within
them for storing images, which can range from 50 mb to 500 mb or beyond.
These cameras can be directly interfaced with a PC via the USB port for copying the
stored images to the hard disk.

INTERFACE STANDARDS
Interface standards determine how data from acquisition devices like scanners and digital
cameras flow to the computer in an efficient way.Two main interface standards exist: TWAIN
and ISIS

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 TWAIN
TWAIN is a very important standard in image acquisition , developed by Hewlett –
Packard , Kodak, Aldus , Logitech which specifies how image acquisition devices such as
scanners , digital cameras and other devices transfer data to software applications. It is basically
an image capture API for Microsoft windows and Apple Macintosh platforms. The standard was
first released in 1992 and currently has a version of 1.9 as of January 2000. The word TWAIN is
from Kipling’s ‘the Ballad of East and West’ in which he wrote ‘….. and never the twain shall
meet …’ TWAIN is a software protocol which regulates the flow of information between
software applications and imaging devices like scanners. The standard is managed by the
TWAIN working group which is non – profit organization with representative from leading
imaging vendors. The goals of the working group included: multiple platform, support for
different types of devices of devices like flatbed scanners, handheld scanners, image capture
boards, digital cameras etc.. provide a well – defined standard that gains support and acceptance
from leading hardware and software developers , provide extensibility and ability to grow with
industry needs , easy to implement with clear documentation , support different types of data like
bitmap images , vector images , text etc.

 IMAGE AND SCANNER INTERFACE SPECIFICATION (ISIS)


The second important standard for document scanner is the Image and Scanner Interface
Specification (ISIS).It was developed by Pixel Translations and they retain control over its
development and licensing. ISIS has a wider set of features than TWAIN and typically uses the
SCSI – 2 interface while TWAIN mostly uses the USB interface . The ISIS architecture is based
on software modules like image acquisitions, file conversion, data extraction and file R/W
commands. This has the advantage of scalability, new modules are added without making system
wide changes. ISIS modules interact with each other through a system of tags and choices.

SPECIFICATIONS OF DIGITAL IMAGES


 Pixel Dimensions
The number of pixels along the height and width of a bitmap image is known as the pixel
dimensions of the image.The display size of an image on – screen is determined by the pixel
dimensions of the image plus the size and setting of the monitor.

 Image Resolution

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The number of pixels displayed per unit length of the image is known as image
resolution, usually measured in pixels per inch (ppi) .An image with a high resolution contains
more and therefore smaller pixels than an image with a low resolution.

 File Size
The digital size of an image measured in kilobytes, megabytes, or gigabytes is
proportional to the pixel dimensions of the image.Images with more pixels may produce more
detail but they require more storage space and may be slower to edit and print.

 Color Depth
This defines the number of bits required to store the information of each pixel in the
image, and in turn determines the total number of possible colors that can be displayed in the
image. Photographic images usually need a depth of 24 – bits for true representations. Increasing
the bit depth increases the capability of displaying a larger number of colors but it also increases
the file size of the image.

CONTENT MANAGEMENT SYSTEM (CMS)


A Content Management System (CMS) is a software system used for content
management. This includes computer files, image media, audio files, electronic documents and
web content. The idea behind a CMS is to make these files available inter-office, as well as over
the web. A content management system would most often be used as archival as well. Many
companies use a CMS to store files in a non-proprietary form. Companies use a CMS file share
with ease, as most systems use server based software, even further broadening file availability.

"Workflow" is the idea of moving an electronic document along for either approval, or
for adding content. Some content management systems will easily facilitate this process with
email notification, and automated routing. This is ideally a collaborative creation of documents.
A CMS facilitates the organization, control, and publication of a large body of documents and
other content, such as images and multimedia resources.

A web content management system is a content management system with additional


features to ease the tasks required to publish web content to web sites.

Web content management systems are often used for storing, controlling and publishing
industry-specific documentation such as news articles, operators' manuals, technical manuals,
sales guides, and marketing brochures.

A content management system may support the following features:

 Import and creation of documents and multimedia material


 Identification of all key users and their content management roles
 The ability to assign roles and responsibilities to different content categories or
types.
 Definition of the content workflow tasks, often coupled with event messaging
so that content managers are alerted to changes in content.
 The ability to track and manage multiple versions of a single instance of
content.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 The ability to publish the content to a repository to support access to the


content. Increasingly, the repository is an inherent part of the system, and
incorporates enterprise search and retrieval.
 Some content management systems allow the textual aspect of content to be
separated to some extent from formatting. For example the CMS may
automatically set default color, fonts, or layout.

IMAGE PROCESSING SOFTWARE

In electrical engineering and computer science, image processing is any form of signal
processing for which the input is an image, such as a photograph or video frame; the output of
image processing may be either an image or, a set of characteristics or parameters related to the
image. Most image-processing techniques involve treating the image as a two-dimensional signal
and applying standard signal-processing techniques to it.

Image processing usually refers to digital image processing, but optical and analog image
processing also are possible. This article is about general techniques that apply to all of them.
The acquisition of images (producing the input image in the first place) is referred to as imaging.

FILE FORMATS
Multimedia data and information must be stored in a disk file using formats similar to
image file formats. Multimedia formats, however, are much more complex than most other file
formats because of the wide variety of data they must store. Such data includes text, image data,
audio and video data, computer animations, and other forms of binary data, such as Musical
Instrument) control information, and graphical fonts section later in this chapter.) Typical
multimedia formats do not define new methods for storing these types of data. Instead, they offer
the ability to store data in one or more existing data formats that are already in general use.

For example, a multimedia format may allow text to be stored as PostScript or Rich Text
Format (RTF) data rather than in conventional ASCII plain-text format. Still-image bitmap data
may be stored as BMP or TIFF files rather than as raw bitmaps. Similarly, audio, video, and
animation data can be stored using industry-recognized formats specified as being supported

Multimedia formats are also optimized for the types of data they store and the format of
the medium on which they are stored. Multimedia information is commonly stored on CD-ROM.
Unlike conventional disk files, CD-ROMs are limited in the amount of information they can
store. A multimedia format must therefore make the best use of available data storage techniques
to efficiently store data on the CD-ROM medium.

There are many types of CD-ROM devices and standards that may be used by multimedia
applications. If you are interested in multimedia, you should become familiar with them.

The original Compact Disc first introduced in early 1980s was used for storing only audio
information using the CD-DA (Compact Disc-Digital Audio) standard produced by Phillips and
Sony. CD-DA (also called the Red Book) is an optical data storage format that allows the storage
of up to 74 minutes of audio (764 megabytes of data) on a conventional CD-ROM.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The CD-DA standard evolved into the CD-XA (Compact Disc-Extended Architecture)
standard, or what we call the CD-ROM (Compact Disc-Read Only Memory). CD-XA (also
called the Yellow Book) allows the storage of both digital audio and data on a CD-ROM. Audio
may be combined with data, such as text, graphics, and video, so that it may all be read at the
same time. An ISO 9660 file system may also be encoded on a CD-ROM, allowing its files to be
read by a wide variety of different computer system platforms.

The CD-I (Compact Disc-Interactive) standard defines the storage of interactive


multimedia data. CD-I (also called the Green Book) describes a computer system with audio and
video playback capabilities designed specifically for the consumer market. CD-I units allow the
integration of fully interactive multimedia applications into home computer systems.

A still-evolving standard is CD-R (Compact Disc-Recordable or Compact Disc-Write


Once), which specifies a CD-ROM that may be written to by a personal desktop computer and
read by any CD-ROM player.

UNIT-III
QUESTIONS
SECTION A
1. TIFF stands for ________________..
2. ____________format is used to exchange files between application computer platforms.
3. Adjusting the space between the lines is called _____________.
4. Define text.
5. Antialiasing is also known as______________.
6. Define image.
7. Little decoration at the end of the letter is called a _________.
8. The number of pixels displayed per unit length is called as_______________.
9. CMS stands for___________.
10. The quality of scanned image is determined its _____________.
SECTION B
1. Give a brief account on device independent color model.
2. Describe the use of digital camera in multimedia.
3. Explain briefly the basic image types.
4. Write a short note on image processing software.
5. Explain the file format for text.
6. Write short notes on Scanner.
7. Write short notes on Digital camera.
8. List and explain the specification of digital images.
9. Discuss about various text insertion methods.
10. Explain the types of text.
SECTION B
1. Discuss in detail about the various image type and image file formats.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

2. Explain the RGB color model in detail.


3. Describe in detail device independent color models.
4. Explain briefly about: a) Text compression b) Scanner.
5. What are the color models? Explain.
6. Explain the basic steps for image processing in detail with neat diagram.
7. Discuss in brief about the major text file formats.
8. List and explain the specification of digital images.
9. Discuss about various text insertion methods.
10. Explain the basic steps of image processing.

UNIT-IV
Audio: Introduction – Acoustics – Nature of Sound Waves – Fundamental Characteristics
of Sound – Microphone – Amplifier – Loudspeaker – Audio Mixer – Digital Audio –
Synthesizers – MIDI – Basics of Staff Notation – Sound Card – Audio Transmission – Audio
File formats and CODECs – Audio Recording Systems – Audio and Multimedia – Voice
Recognition and Response - Audio Processing Software.

AUDIO
After text, images and graphics the next element to be used extensively in multimedia is
sound. Sound is a form of energy capable of flowing from one place to another through a
material medium.

ACOUSTICS
Acoustics is the interdisciplinary science that deals with the study of all mechanical
waves in gases, liquids, and solids including vibration, sound, ultrasound and infrasound.
A scientist who works in the field of acoustics is an acoustician while someone working
in the field of acoustics technology may be called an acoustical or audio engineer. The
application of acoustics can be seen in almost all aspects of modern society with the most
obvious being the audio and noise control industries

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

NATURE OF SOUND WAVES


Sound is one kind of longitudinal wave, in which the particles oscillate to and fro in the
same direction of wave propagation. Sound waves cannot be transmitted through vacuum. The
transmission of sound requires at least a medium, which can be solid, liquid, or gas. Acoustics is
the branch of science dealing with the study of sound and is concerned with the generation,
transmission and reception of sound waves. The application of acoustics in technology is called
acoustical engineering.

CHARACTERISTICS OF SOUND
Sound waves travel at great distances in a very short time, but as the distance increases
the waves tend to spread out. As the sound waves spread out, their energy simultaneously

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

spreads through an increasingly larger area. Thus, the wave energy becomes weaker as the
distance from the source is increased. Sounds may be broadly classified into two general groups.
One group is NOISE, which includes sounds such as the pounding of a hammer or the slamming
of a door. The other group is musical sounds, or TONES.

The distinction between noise and tone is based on the regularity of the vibrations, the
degree of damping, and the ability of the ear to recognize components having a musical
sequence.

 Amplitude

Amplitude of wave is the maximum displacement of a particle in the path of a wave and
is measure of the peak- to – peak height of the wave.The physical manifestation of amplitude is
the intensity of energy of the wave.

 Frequency

This measures the number of vibrations of a particle in the path of a wave. The physical
manifestation of frequency of a sound wave is the pitch of sound. A high pitched sound, like that
of a whistle, has higher frequency than a dull flat sound, like the sound of a drum. Frequency is
measured in a unit called Hertz and denoted by Hz.

 Musical Note And Pitch

Sound pleasant to hear is called musical and those unpleasant to our ears are called noise.
Musical sounds most commonly originate from vibrating strings, like in guitars and violins,
vibrating plates, like drums and tabla, and vibrating air columns, like in pipes and horns .
Musicology is the scientific study of music which attempts to apply methods of systematic
investigation and research in understanding the principles of musical art.

MICROPHONE
A microphone (colloquially called a mic or mike; both pronounced) is an acoustic-to-
electric transducer or sensor that converts sound into an electrical signal. In 1876, Emile
Berliner invented the first microphone used as a telephone voice transmitter.

Microphones are used in many applications such as telephones, tape recorders, karaoke
systems, hearing aids, motion picture production, live and recorded audio engineering, FRS
radios, megaphones, in radio and television broadcasting and in computers for recording voice,
speech recognition, and for non-acoustic purposes such as ultrasonic checking or knock sensors.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Most microphones today use electromagnetic induction (dynamic microphone), capacitance


change (condenser microphone), piezoelectric generation, or light modulation to produce an
electrical voltage signal from mechanical vibration.

AMPLIFIER
Generally, an amplifier or simply amp is any device that changes, usually increases, the
amplitude of a signal. The relationship of the input to the output of an amplifier—usually
expressed as a function of the input frequency—is called the transfer function of the amplifier,
and the magnitude of the transfer function is termed the gain.
In popular use, the term usually describes an electronic amplifier, in which the input
"signal" is usually a voltage or a current. In audio applications, amplifiers drive the loudspeakers
used in PA systems to make the human voice louder or play recorded music. Amplifiers may be
classified according to the input (source) they are designed to amplify (such as a guitar amplifier,
to perform with an electric guitar), the device they are intended to drive (such as a headphone
amplifier), the frequency range of the signals (Audio, IF, RF, and VHF amplifiers, for example),
whether they invert the signal (inverting amplifiers and non-inverting amplifiers), or the type of
device used in the amplification (valve or tube amplifiers, FET amplifiers, etc.).
A related device that emphasizes conversion of signals of one type to another (for
example, a light signal in photons to a DC signal in amperes) is a transducer, a transformer, or a
sensor. However, none of these amplify power.

LOUDSPEAKER
A loudspeaker (or "speaker") is an electro acoustic transducer that converts an electrical
signal into sound. The speaker moves in accordance with the variations of an electrical signal
and causes sound waves to propagate through a medium such as air or water. After the acoustics
of the listening space, loudspeakers (and other electro acoustic transducers) are the most variable
elements in a modern audio system and are usually responsible for most distortion and audible
differences when comparing sound systems

AUDIO MIXER
In professional studios multiple microphones may be used to record multiple tracks of
sound at a time. Example recording performance of an orchestra. A device called an audio mixer
is used to record these individual tracks and edit them separately Each of these tracks a number
of controls for adjusting the volume, tempo, mute etc.,

DIGITAL AUDIO
Digital audio is created when a sound wave is converted into numbers – a process
referred to as digitizing. It is possible to digitize sound from a microphone, a synthesizer,
existing tape recordings, live radio and television broadcasts, and popular CDs. Digitized sound
is sampled sound. Ever nth fraction of a second, a sample of sound is taken and stored as digital
information in bits and bytes. The quality of this digital recording depends upon how often the
samples are taken.

SYNTHESIZER

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 Polyphony

The polyphony of a sound generator refers to its ability to play more than one note at a
time. Polyphony is generally measured or specified as a number of notes or voices. Most of the
early music synthesizers were monophonic, meaning that they could only play one note at a time.
If you pressed five keys simultaneously on the keyboard of a monophonic synthesizer, you
would only hear one note. Pressing five keys on the keyboard of a synthesizer which was
polyphonic with four voices of polyphony would, in general, produce four notes. If the keyboard
had more voices (many modern sound modules have 16, 24, or 32 note polyphony), then you
would hear all five of the notes.

 Sounds

The different sounds that a synthesizer or sound generator can produce are sometimes
called "patches", "programs", "algorithms", or "timbres". Programmable synthesizers commonly
assign "program numbers" (or patch numbers) to each sound. For instance, a sound module
might use patch number 1 for its acoustic piano sound, and patch number 36 for its fretless bass
sound. The association of all patch numbers to all sounds is often referred to as a patch map. Via
MIDI, a Program Change message is used to tell a device receiving on a given Channel to
change the instrument sound being used. For example, a sequencer could set up devices on
Channel 4 to play fretless bass sounds by sending a Program Change message for Channel four
with a data byte value of 36 (this is the General MIDI program number for the fretless bass
patch).

Multitimbral Mode

A synthesizer or sound generator is said to be multitimbral if it is capable of producing


two or more different instrument sounds simultaneously. If a synthesizer can play five notes
simultaneously, and it can produce a piano sound and an acoustic bass sound at the same time,
then it is multitimbral. With enough notes of polyphony and "parts" (multitimbral) a single
synthesizer could produce the entire sound of a band or orchestra.

Multitimbral operation will generally require the use of a sequencer to send the various
MIDI messages required. For example, a sequencer could send MIDI messages for a piano part
on Channel 1, bass on Channel 2, saxophone on Channel 3, drums on Channel 10, etc. A 16 part
multitimbral synthesizer could receive a different part on each of MIDI's 16 logical channels.

The polyphony of a multitimbral synthesizer is usually allocated dynamically among the


different parts (timbres) being used. At any given instant five voices might be needed for the
piano part, two voices for the bass, one for the saxophone, plus 6 voices for the drums. Note that
some sounds on some synthesizers actually utilize more than one "voice", so the number of notes
which may be produced simultaneously may be less than the stated polyphony of the synthesizer,
depending on which sounds are being utilized.

MIDI
MIDI (Musical Instrument Digital Interface) is a communication standard developed
for electronic musical instruments and computers. MIDI files allow music and sound

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

synthesizers from different manufacturers to communicate with each other by sending messages
along cables connected to the devices.
Creating your own original score can be one of the most creative and rewarding aspects
of building a multimedia project, and MIDI (Musical Instrument Digital Interface) is the
quickest, easiest and most flexible tool for this task.The process of creating MIDI music is quite
different from digitizing existing audio. To make MIDI scores, however you will need sequencer
software and a sound synthesizer.
The MIDI keyboard is also useful to simply the creation of musical scores. An
advantage of structured data such as MIDI is the ease with which the music director can edit the
data.
A MIDI file format is used in the following circumstances :
Digital audio will not work due to memory constraints and more processing power
requirements When there is high quality of MIDI source When there is no requirement for
dialogue.
A digital audio file format is preferred in the following circumstances.

 When there is no control over the playback hardware


 When the computing resources and the bandwidth requirements are
high.
 When dialogue is required.

AUDIO FILE FORMATS


A file format determines the application that is to be used for opening a file. Following is
the list of different file formats and the software that can be used for opening a specific file.

 The MIDI Format


The MIDI (Musical Instrument Digital Interface) is a format for sending music
information between electronic music devices like synthesizers and PC sound cards.

 The MIDI format was developed in 1982 by the music industry.


 The MIDI format is very flexible and can be used for everything from very simple
to real professional music making.
 MIDI files do not contain sampled sound, but a set of digital musical instructions
 (musical notes) that can be interpreted by your PC's sound card.
 The downside of MIDI is that it cannot record sounds (only notes). Or, to put it
another way: It cannot store songs, only tunes.
 The upside of the MIDI format is that since it contains only instructions (notes),
MIDI files can be extremely small. The example above is only 23K in size but it
plays for nearly 5 minutes.
 The MIDI format is supported by many different software systems over a large
range of platforms.
 MIDI files are supported by all the most popular Internet browsers.
 Sounds stored in the MIDI format

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

SOUND CARD
A sound card (also known as an audio card) is an internal computer expansion card that
facilitates the input and output of audio signals to and from a computer under control of
computer programs.
The term sound card is also applied to external audio interfaces that use software to
generate sound, as opposed to using hardware inside the PC. Typical uses of sound cards include
providing the audio component for multimedia applications such as music composition, editing
video or audio, presentation, education and entertainment (games) and video projection. Many
computers have sound capabilities built in, while others require additional expansion cards to
provide for audio capability.

Sound cards usually feature a digital-to-analog converter (DAC), which converts


recorded or generated digital data into an analog format. The output signal is connected to an
amplifier, headphones, or external device using standard interconnects, such as a TRS connector
or an RCA connector. If the number and size of connectors is too large for the space on the
backplate the connectors will be off-board, typically using a breakout box, or an auxiliary
backplate.

More advanced cards usually include more than one sound chip to provide for higher data
rates and multiple simultaneous functionality, for example digital production of synthesized
sounds (usually for real-time generation of music and sound effects using minimal data and CPU
time).

Digital sound reproduction is usually done with multichannel DACs, which are capable
of simultaneous digital samples at different pitches and volumes and application of real-time
effects, like filtering or distortion. Multichannel digital sound playback can also be used for
music synthesis, when used with a compliance[clarification needed], and even multiple-channel
emulation. This approach has become common as manufacturers seek simpler and lower-cost
sound cards.

Most sound cards have a line in connector for an input signal from a cassette tape or other
sound source that has higher voltage levels than a microphone. The sound card digitizes this
signal and stores it (under control of appropriate matching computer software) on the computer's
hard disk for storage, editing, or further processing. Another common external connector is the
microphone connector, for signals from a microphone or other low-level input device. Input
through a microphone jack can be used, for example, by speech recognition or voice over IP
applications.

AUDIO TRANSMISSION
 Audio file format
An audio file format is a file format for storing digital audio data on a computer system.
This data can be stored uncompressed, or compressed to reduce the file size. It can be a raw
bitstream, but it is usually a container format or an audio data format with defined storage layer.

 Types of formats
It is important to distinguish between a file format and an audio codec. A codec performs
the encoding and decoding of the raw audio data while the data itself is stored in a file with a

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

specific audio file format. Although most audio file formats support only one type of audio data
(created with an audio coder), a multimedia container format (as Matroska or AVI) may support
multiple types of audio and video data.

There are three major groups of audio file formats:

 Uncompressed audio formats, such as WAV, AIFF, AU or raw header-less PCM;


 Formats with lossless compression, such as FLAC, Monkey's Audio (filename
extension APE), WavPack (filename extension WV), TTA, ATRAC Advanced
Lossless, Apple Lossless (filename extension m4a), MPEG-4 SLS, MPEG-4
ALS, MPEG-4 DST, Windows Media Audio Lossless (WMA Lossless), and
Shorten (SHN).
 Formats with lossy compression, such as MP3, Vorbis, Musepack, AAC, ATRAC
and Windows Media Audio Lossy (WMA lossy)).
Uncompressed audio formats

There is one major uncompressed audio format, PCM, which is usually stored in a .wav
file on Windows or in a .aiff file on Mac OS. The AIFF format is based on the Interchange File
Format (IFF). The WAV format is based on the Resource Interchange File Format (RIFF), which
is similar to IFF. WAV and AIFF are flexible file formats designed to store more or less any
combination of sampling rates or bitrates. This makes them suitable file formats for storing and
archiving an original recording.

BWF (Broadcast Wave Format) is a standard audio format created by the European
Broadcasting Union as a successor to WAV. BWF allows metadata to be stored in the file. See
European Broadcasting Union: Specification of the Broadcast Wave Format (EBU Technical
document 3285, July 1997). This is the primary recording format used in many professional
audio workstations in the television and film industry. BWF files include a standardized
timestamp reference which allows for easy synchronization with a separate picture element.
Stand-alone, file based, multi-track recorders from Sound Devices, Zaxcom, HHB USA, Fostex,
and Aaton all use BWF as their preferred format.

The .cda (Compact Disk Audio Track) is a small file that serves as a shortcut to the audio
data for a track on a music CD. It does not contain audio data and is therefore not considered to
be a proper audio file format.

Lossless compressed audio formats

A lossless compressed format stores data in less space by eliminating unnecessary data.

Uncompressed audio formats encode both sound and silence with the same number of
bits per unit of time. Encoding an uncompressed minute of absolute silence produces a file of the
same size as encoding an uncompressed minute of music. In a lossless compressed format,
however, the music would occupy a smaller portion of the file and the silence would take up
almost no space at all.

Lossless compression formats enable the original uncompressed data to be recreated


exactly. They include the common[5] FLAC, WavPack, Monkey's Audio, ALAC (Apple

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Lossless). They provide a compression ratio of about 2:1 (i.e. their files take up half the space of
the originals). Development in lossless compression formats aims to reduce processing time
while maintaining a good compression ratio.

Lossy compressed audio formats


Lossy compression enables even greater reductions in file size by removing some of the
data. Lossy compression typically achieves far greater compression but somewhat reduced
quality than lossless compression by simplifying the complexities of the data.[6] A variety of
techniques are used, mainly by exploiting psychoacoustics, to remove data with minimal
reduction in the quality of reproduction. For many everyday listening situations, the loss in data
(and thus quality) is imperceptible. The popular MP3 format is probably the best-known
example, but the AAC format found on the iTunes Music Store is also common. Most formats
offer a range of degrees of compression, generally measured in bit rate. The lower the rate, the
smaller the file and the more significant the quality loss.

CODEC
A codec is a device or computer program capable of encoding or decoding a digital data
stream or signal. The word codec is a portmanteau of "compressor-decompressor" or, more
commonly, "coder-decoder". A codec (the program) should not be confused with a coding or
compression format or standard – a format is a document (the standard), a way of storing data,
while a codec is a program (an implementation) which can read or write such files. In practice
"codec" is sometimes used loosely to refer to formats, however.

A codec encodes a data stream or signal for transmission, storage or encryption, or


decodes it for playback or editing. Codecs are used in videoconferencing, streaming media and
video editing applications. A video camera's analog-to-digital converter (ADC) converts its
analog signals into digital signals, which are then passed through a video compressor for digital
transmission or storage. A receiving device then runs the signal through a video decompressor,
then a digital-to-analog converter (DAC) for analog display. The term codec is also used as a
generic name for a video conferencing unit.

Media codecs

Codecs are often designed to emphasize certain aspects of the media, or their use, to be
encoded. For example, a digital video (using a DV codec) of a sports event needs to encode
motion well but not necessarily exact colors, while a video of an art exhibit needs to perform
well encoding color and surface texture.

Audio codecs for cell phones need to have very low latency between source encoding and
playback; while audio codecs for recording or broadcast can use high-latency audio compression
techniques to achieve higher fidelity at a lower bit-rate.

There are thousands of audio and video codecs ranging in cost from free to hundreds of
dollars or more. This variety of codecs can create compatibility and obsolescence issues. The
impact is lessened for older formats, for which free or nearly-free codecs have existed for a long
time.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The older formats are often ill-suited to modern applications, however, such as playback
in small portable devices. For example, raw uncompressed PCM audio (44.1 kHz, 16 bit stereo,
as represented on an audio CD or in a .wav or .aiff file) has long been a standard across multiple
platforms, but its transmission over networks is slow and expensive compared with more modern
compressed formats, such as MP3.

Many multimedia data streams contain both audio and video, and often some metadata
that permit synchronization of audio and video. Each of these three streams may be handled by
different programs, processes, or hardware; but for the multimedia data streams to be useful in
stored or transmitted form, they must be encapsulated together in a container format.

Lower bitrate codecs allow more users, but they also have more distortion. Beyond the
initial increase in distortion, lower bit rate codecs also achieve their lower bit rates by using more
complex algorithms that make certain assumptions, such as those about the media and the packet
loss rate. Other codecs may not make those same assumptions. When a user with a low bitrate
codec talks to a user with another codec, additional distortion is introduced by each transcoding.

AUDIO RECORDING SYSTEMS


A "digital audio recording device" is any machine or device of a type commonly
distributed to individuals for use by individuals, whether or not included with or as part of some
other machine or device, the digital recording function of which is designed or marketed for the
primary purpose of, and that is capable of, making a digital audio copied recording for private
use. he definition of "digital audio recording medium" is similar:

A "digital audio recording medium" is any material object in a form commonly


distributed for use by individuals, that is primarily marketed or most commonly used by
consumers for the purpose of making digital audio copied recordings by use of a digital audio
recording device

AUDIO AND MULTIMEDIA


Multimedia content on the Web, by its definition - including or involving the use of
several media - would seem to be inherently accessible or easily made accessible.

However, if the information is audio, such as a RealAudio feed from a news conference
or the proceedings in a courtroom, a person who is deaf or hard of hearing cannot access that
content unless provision is made for a visual presentation of audio content. Similarly, if the
content is pure video, a blind person or a person with severe vision loss will miss the message
without the important information in the video being described.

Remember from Section 2 that to be compliant with Section 508, you must include text
equivalents for all non-text content. Besides including alternative text for images and image map
areas, you need to provide textual equivalents for audio and more generally for multimedia
content.

Some Definitions

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

A transcript of audio content is a word-for-word textual representation of the audio,


including descriptions of non-text sounds like "laughter" or "thunder." Transcripts of audio
content are valuable not only for persons with disabilities but in addition, they permit searching
and indexing of that content which is not possible with just the audio. "Not possible" is, of
course too strong. Search engines could, if they wanted, employ voice recognition to audio files,
and index that information - but they don't.

When a transcript of the audio part of an audio-visual (multimedia) presentation is


displayed synchronously with the audio-visual presentation, it is called captioning.

Descriptive video or described video intersperses explanations of important video with the
normal audio of a multimedia presentation. These descriptions are also called audio descriptions.

VOICE RECOGNITION AND RESPONSE

Voice recognition and voice response promise to be the easiest method of providing a
user interface for data entry and conversational computing, since speech is the easiest, most
natural means of human communication. Voice input and output of data have now become
technologically and economically feasible for a variety of applications.

Voice recognition systems analyze and classify speech or vocal tract patterns and convert
them into digital codes for entry into a computer system. Most voice recognition systems require
"training" the computer to recognize a limited vocabulary of standard words for each user.
Operators train the system to recognize their voices by repeating each word in the vocabulary
about 10 times. Trained systems regularly achieve a 99 percent plus word recognition rate.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Speaker-independent voice recognition systems, which allow a computer to understand a voice it


has never heard before, are used in a limited number of applications.

Voice recognition devices are used in work situations where operators need to perform
data entry without using their hands to key in data or instructions, or where it would Cartier
Replica provide faster and more accurate input. For example, voice recognition systems are
being used by manufacturers for the inspection, inventory, and quality control of a variety of
products, and by airlines and parcel delivery companies for voice-directed sorting of baggage
and parcels. Voice recognition is also available for some microcomputer software packages for
voice input of data and commands. However, voice input is expected to become very popular for
most word processing applications in the next few years.

Voice response devices range from mainframe audio-response units to voice-messaging


minicomputers to speech synthesizer microprocessors. Speech microprocessors can be found in
toys, calculators, appliances, automobiles, and a variety of other consumer, commercial, and
industrial products. Voice-messaging minicomputer and mainframe audio response units use
voice-response software to verbally guide an operator through the steps of a task in many kinds
of activities. They may also allow computers to respond to verbal and touch-tone input over the
telephone. Examples of applications include computerized telephone call switching,
telemarketing surveys, bank pay-by-phone bill-paying services, stock quotations services,
university registration systems, and customer credit and account balance inquiries.

AUDIO PROCESSING SOFTWARE


There are a variety of reasons to use audio editing software; while some people use it to
create and record files, others use it to edit and restore old recordings, and some use it only to
convert and change file types. Thanks to audio editing software, more people have the
opportunity to get their creative juices flowing by using the affordable and capable applications
available on the market today.

If you are curious about what you can do with audio editing software and trying to decide
if it’s the right purchase for you, here are some basic features each application allows you to
perform:

 Create – With an easy-to-use basic program, even an amateur can create unique voice
and music mixes for an internet radio station, website, PowerPoint presentation or for
personal use.
 Restore – Advanced filters and other tools within the audio editing software applications
can restore the sound of aged LPs or damaged audio recordings. You can also use these
filters to filter out background noises, static or other unwanted noise.
 Edit – Audio editing software applications include several editing tools, including cut
and paste options and the ability to edit tag or media information.
 Record – Through a compatible program, you can record your favorite podcasts, internet
radio stations and other types of streaming audio. You can also pull audio from a video or
audio file, CDs, DVDs or even your sound card, so that you can edit and listen to it on
your computer or a portable device.
 Convert – Most programs can convert file formats. For example, from a MIDI to an
MP3, WMA, WAV or OGG file.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

 We are continually researching, reviewing and ranking the top audio editing
software choices available so you have the latest and the greatest features, tools
and additions at your fingertips. We have included articles on audio editing
software, along with reviews of each top product, including: Magix Music Maker,
WavePad and Dexster Audio Editor. Our side-by-side comparison of audio
editing software will help you quickly determine which application is the best
suited to meet your individual audio editing needs.

Audio Editing Software Benefits

The top eight programs in our review ranked quite close to each other and are within a
similar price range; however, they all support different formats, editing tools and recording/
burning abilities.

There are several factors to consider when looking for suitable applications. Before
choosing a program, determine what you want to do with the software. Are you interested in
working with streaming audio, making arrangements for your iPod or MP3 player, restoring
sound files, forensics, creating audio for your website or burning a CD of your band's music?

There are also a variety of editing tools, effects and filters available. If you are a
beginner, you may want to look for a product that includes a large number of preset effects and
filters. Alternately, if you already know how to use this kind of software and know how to make
adjustments on your own, you may want a program that supports a high level of manipulation
through a 10-band equalizer, a mixer or various processors.

Below are the criteria TopTenREVIEWS used to evaluate each application:

Audio Editing
All good programs contain play, record, cut, copy, paste and so on; this criterion looks
beyond the essential editing tools to include tools such as equalizers, processors, mixers, preset
effects, filters and analyzing tools like the waveform or spectrogram.

Recording/Editing Ability
The best programs will capture audio from files, the sound card or from downloaded CDs
as well as from outside sources such as a line-in from a stereo, MIDI device or microphone. As a
bonus, it is also helpful if the product includes burning software so that you can use your CD or
DVD burner to save edited files. To be the most compatible, the product must be able to work
with and convert many file formats, like the various WAV file types, Windows Media Audio
(WMA), AIFF (used by Apple) and MP3 files.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

UNIT-IV
QUESTIONS
SECTION A
1. Sound is __________ in nature.
2. The number of vibrations per second is called ____________.
3. Define sound.
4. Sound pressure levels are measured in __________.
5. MIDI stands for ________.
6. Sound is usually represented as __________.
7. _________ is a Dolby's sound-generation professional system.
8. ___________ handle low frequencies.
9. _________ is the smallest distinguishable sound in a language.
10. Define use of Audio Processing Software.
SECTION B
1. Explain the fundamental characteristic of sound.
2. List and explain basic internal components of the sound cards.
3. Discuss the types and characteristic of synthesizers.
4. Discuss about any three audio file formats
5. Explain briefly about Audio recording systems.
6. Define acoustics and explain the nature of sound waves.
7. Explain about sound card.
8. Write a note on audio synthesizers.
9. Briefly explain about CODECS.
10. Write a note about Microphone and Amplifier.
SECTION B
1. Discuss in detail about audio transmission and audio processing software.
2. List the characteristics of sound.
3. Explain briefly about audio recording system and its fie formats.
4. Discuss in detail about voice recognition and response.
5. State the features of MIDI and differentiate MIDI from Digital Audio.
6. Discuss the important parameters of digital audio.
7. Discuss in detail about MIDI.
8. Discuss in detail about any four audio file format.
9. Explain various interfaces for audio transmission.
10. Briefly explain about audio file formats and CODECS

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

UNIT-V
Video: Analog Video Camera – Transmission of Video Signals – Video Signal Formats –
Television Broadcasting Standards – PC Video – Video File Formats and CODECs – Video
Editing – Video Editing Software. Animation: Types of Animation – Computer Assisted
Animation – Creating Movement – Principles of Animation – Some Techniques of Animation –
Animation on the Web – Special Effects – Rendering Algorithms. Compression: MPEG-1 Audio
– MPEG-1 Video - MPEG-2Audio – MPEG-2 Video.

VIDEO
Motion video is a combination of image and audio. It consists of a set of still images
called frames displayed to the user one after another at a specific speed , known as the frame
rate measured in number of frames per second. Video is the technology of electronically
capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still
images representing scenes in motion. Video technology was first developed for cathode ray
tube television systems, but several new technologies for video display devices have since been
invented. Standards for television sets and computer monitors have tended to evolve
independently, but advances in computer performance and digital television broadcasting and
recording are resulting in a convergence of standards and use of content. Computers can now
display television and film-style video clips and streaming media, encouraged by increased
processor speed, storage capacity, and broadband access to the Internet. General purpose
computing hardware can now be used to capture, store, edit, and transmit television and movie
content, as opposed to older dedicated analog technologies.

ANALOG VIDEO CAMERA


CAMCORDER
A camcorder (video camera recorder) is an electronic device that combines a video
camera and a video recorder into one unit. Equipment manufacturers do not seem to have strict
guidelines for the term usage. Marketing materials may present a video recording device as a
camcorder, but the delivery package would identify content as video camera recorder. In order
to differentiate a camcorder from other devices that are capable of recording video, like cell
phones and compact digital cameras, a camcorder is generally identified as a portable device
having video capture and recording as its primary function.

The earliest camcorders employed analog recording onto videotape. Since the 1990s
digital recording has become the norm, but tape remained the primary recording media. Starting
from early 2000s tape is being gradually replaced with other storage media including optical
disks, hard disk drives and flash memory.All tape-based camcorders use removable media in
form of video cassettes. Camcorders that do not use magnetic tape are often called tape less
camcorders and may use optical discs (removable), solid-state flash memory (removable or built-
in) or a hard disk drive (removable or built-in).

Camcorders that permit using more than one type of media, like built-in hard disk drive
and memory card, are often called hybrid camcorders. Camcorders contain 3 major components:
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

lens, imager, and recorder. The lens gathers and focuses light on the imager. The imager
(usually a CCD or CMOS sensor on modern camcorders; earlier examples often used vidicon
tubes) converts incident light into an electrical signal. Finally, the recorder converts the electric
signal into digital video and encodes it into a storable form. More commonly, the optics and
imager are referred to as the camera section.

TRANSMISSION OF VIDEO SIGNALS:


Analog transmission is a transmission method of conveying voice, data, image, signal or
video information using a continuous signal which varies in amplitude, phase, or some other
property in proportion to that of a variable.
It could be the transfer of an analog source signal using an analog modulation method such as
FM or AM, or no modulation at all.

MODES OF TRANSMISSION:
Analog transmission can be conveyed in many different fashions:
twisted-pair or coax cable
fiber-optic cable
Via air
Via water
There are two basic kinds of analog transmission, both based on how they modulate data to
combine an input signal with a carrier signal. Usually, this carrier signal is a specific frequency,
and data is transmitted through its variations. The two techniques are amplitude modulation
(AM), which varies the amplitude of the carrier signal, and frequency modulation (FM), which
modulates the frequency of the carrier

VIDEO SIGNAL FORMAT


COMPONENT VIDEO
This refers to a video signal which is stored or transmitted as three separate component
signals. The simplest form is the collection of R , G and B signals which usually form the output
of analog video cameras.

COMPOSITE VIDEO
For ease is signal transmission , specially TV broadcasting , also reduce cabel / channel
requirements , components signals are often combined in to a single signal which is transmitted
along a single wire or channel.

VIDEO RECORDING FORMATS:


BETACAM SP
Developed by Sony, perhaps the most popular component format for both field
acquisition and post production today. Betacam uses cassettes and transports similar to the old
Betamax home video format, but the similarities end there. Tape speed is six times higher, and
luminance and chrominance are recorded on two separate tracks. The two color difference
signals are compressed in time by two and recorded sequentially on a single track.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

M-II
M-II (read em-two) was developed by Matsushita for Japan's national broadcasting
company NHK. Today M-II is one of the most popular broadcast quality component formats
with quality similar to Betacam SP. Large users of M-II include NHK, of course, and NBC.
Recording technique is similar to Betacam SP but uses some enhancements which compensate
for the lower tape speed.

EBU C format
These machines use 1" tape in open reels. The main advantages are very fast transports
and low recording density, which makes the format rather immune to drop-outs. Tape costs are
high. The units can record single frames, which makes them popular in computer animation.
Some units with vacuum capstans can operate from stop to nominal speed within one video field.
The tape makes almost a full circle around the picture drum, and a single head is able to record
and playback the entire video signal.

EBU B format
Similar to C format, but uses segmented helical scan. The diameter of the picture drum is
small, and a single video field is recorded in 6 separate tracks.

D SERIES DIGITAL FORMATS


D-1 was the first practical digital format, introduced by Sony in 1986. Although still
considered a quality reference, D-1 is expensive to buy and use and has been mostly superseded
by the more cost effective later formats.
D-2 was developed by Ampex around the same time as D-1 was introduced and is meant
to be a fully transparent storage for composite video, useful for composing "spot tapes" for
programmes such as news.
D-3 and D-5 have both been developed by Matsushita.
D-5 units can use two different sample rate / resolution combinations and are generally
capable of playing back D-3 tapes. While D-5 is still a studio format, D-3 camcorders are
available from Panasonic.
D-6 is a digital HDTV recording format by Toshiba/BTS.
Stores 600 GB worth of data on a physically huge 64 minute cassette.

PC VIDEO:

Beside animation there is one more media element, which is known as video. With latest
technology it is possible to include video impact on clips of any type into any multimedia
creation, be it corporate presentation, fashion design, entertainment games, etc.
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

The video clips may contain some dialogues or sound effects and moving pictures. These
video clips can be combined with the audio, text and graphics for multimedia presentation.
Incorporation of video in a multimedia package is more important and complicated than other
media elements. One can procure video clips from various sources such as existing video films
or even can go for an outdoor video shooting.
All the video available are in analog format. To make it usable by computer, the video
clips are needed to be converted into computer understandable format, i.e., digital format. Both
combinations of software and hardware make it possible to convert the analog video clips into
digital format. This alone does not help, as the digitised video clips take lots of hard disk space to
store, depending on the frame rate used for digitisation. The computer reads a particular video
clip as a series of still pictures called frames. Thus video clip is made of a series of separate
frames where each frame is slightly different from the previous one. The computer reads each
frame as a bitmap image. Generally there are 15 to 25 frames per second so that the movement is
smooth. If we take less frames than this, the movement of the images will not be smooth.
To cut down the space there are several modern technologies in windows environment.
Essentially these technologies compress the video image so that lesser space is required.
However, latest video compression software makes it possible to compress the digitised
video clips to its maximum. In the process, it takes lesser storage space. One more advantage of
using digital video is, the quality of video will not deteriorate from copy to copy as the digital
video signal is made up of digital code and not electrical signal. Caution should be taken while
digitizing the video from analog source to avoid frame droppings and distortion. A good quality
video source should be used for digitization.

Currently, video is good for:


Promoting television shows, films, or other non-computer media that traditionally have
used trailers in their advertising.Giving users an impression of a speaker’s personality. showing
things that move. For example a clip from a motion picture. Product demos of physical products
are also well suited for video.

VIDEO FILE FORMATS:


MULTIMEDIA CONTAINER FORMATS:

The container file is used to identify and interleave different data types. Simpler container
formats can contain different types of audio codecs, while more advanced container formats can
support multiple audio and video streams, subtitles, chapter-information, and meta-data (tags) —
along with the synchronization information needed to play back the various streams together.In
most cases, the file header, most of the metadata and the synchro chunks are specified by the
container format. For example, container formats exist for optimized, low-quality, internet video
streaming which differs from high-quality DVD streaming requirements.

Container format parts have various names: "chunks" as in RIFF and PNG, "packets" in
MPEG-TS (from the communications term), and "segments" in JPEG. The main content of a
chunk is called the "data" or "payload". Most container formats have chunks in sequence, each
with a header, while TIFF instead stores offsets. Modular chunks make it easy to recover other
chunks in case of file corruption or dropped frames or bit slip, while offsets result in framing
errors in cases of bit slip.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

CODECs:

A codec is a device or computer program capable of encoding and/or decoding a digital


data stream or signal. The word codec is a portmanteau of 'compressor-decompressor' or, more
commonly, 'coder-decoder'. A codec (the program) should not be confused with a coding or
compression format or standard – a format is a document (the standard), a way of storing data,
while a codec is a program (an implementation) which can read or write such files.In practice
"codec" is sometimes used loosely to refer to formats, however.A codec encodes a data stream or
signal for transmission, storage or encryption, or decodes it for playback or editing. Codecs are
used in videoconferencing, streaming media and video editing applications.

A video camera's analog-to-digital converter (ADC) converts its analog signals into
digital signals, which are then passed through a video compressor for digital transmission or
storage. A receiving device then runs the signal through a video decompresses, then a digital-to-
analog converter (DAC) for analog display. The term codec is also used as a generic name for a
video conferencing unit.

Video Editing
Video editing is the process of manipulating and rearranging video shots to create a new
work. Editing is usually considered to be one part of the post production process — other post-
production tasks include titling, colour correction, sound mixing, etc.
Many people use the term editing to describe all their post-production work, especially in
non-professional situations. Whether or not you choose to be picky about terminology is up to
you. In this tutorial we are reasonably liberal with our terminology and we use the word editing
to mean any of the following:
Rearranging, adding and/or removing sections of video clips and/or audio clips.
Applying colour correction, filters and other enhancements.
Creating transitions between clips.
Goals of Editing

There are many reasons to edit a video and your editing approach will depend on the
desired outcome. Before you begin you must clearly define your editing goals, which could
include any of the following:

Remove unwanted footage

This is the simplest and most common task in editing. Many videos can be dramatically
improved by simply getting rid of the flawed or unwanted bits.

Choose the best footage

It is common to shoot far more footage than you actually need and choose only the best
material for the final edit. Often you will shoot several versions (takes) of a shot and choose the
best one when editing.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

ANIMATION

Animation is a visual technique that provides the illusion of motion by displaying a


collection of images in rapid sequence. Each image contains a small change, for example a leg
moves slightly, or the wheel of a car turns. When the images are viewed rapidly, your eye fills in
the details and the illusion of movement is complete.

When used appropriately in your application’s user interface, animation can enhance the
user experience while providing a more dynamic look and feel. Moving user interface elements
smoothly around the screen, gradually fading them in and out, and creating new custom controls
with special visual effects can combine to create a cinematic computing experience for your
users.

In Time Machine perceived distance provides an intuitive metaphor for a linear


progression in time. Older file system snapshots are shown further away, allowing you to move
through them to find the version you want to restore.

Figure 1-1 Time Machine user interface

The iTunes 7.0 CoverFlow interface shows album and movie covers in an engaging manner. As
you browse through the content the images animate to face the user directly. This is a great
example of the cinematic computing experience. And the CoverFlow user interface allows more
content to be displayed in a smaller area than if the images were placed side by side.
Figure 1-2 iTunes 7.0 CoverFlow user interface

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Even small uses of animation can communicate well. The iSync menu extra animates to show the
syncing is in progress (Figure Figure 1-3.) In all these cases the applications provide additional
information and context to the user through the use of animation.

Figure 1-3 iSync menu status item

Using Animation in Your Applications

How you incorporate animation into your own application largely depends on the type of
interface your application provides. Applications that use the Aqua user interface can best
integrate animation by creating custom controls or views. Applications that create their own user
interface, such as educational software, casual games, or full-screen applications such as Front
Row, have much greater leeway in determining how much animation is appropriate for their
users.

With judicious use of animation and visual effects, the most mundane system utility can
become a rich visual experience for users, thus providing a compelling competitive advantage for
your application.

TYPES OF ANIMATION:

There are many different types of animation that are used nowadays. The three main types are
clay animation, computer animation, and regular animation.

Clay Animation

Clay animation is not really a new technique as many people might think. Clay
animation began shortly after plasticine (a clay-like substance) was invented in 1897, and one of
the first films to use it was made in 1902. This type of animation was not very popular until
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Gumby was invented. The invention of Gumby was a big step in the history of clay animation.
Now, clay animation has become more popular and easier to do. Later on, more clay animation
films were made, such as the Wallace and Gromit series of movies, the advertisements that were
made for the California Raisin Advisory Board and the Celebrity Deathmatch series.

Computer Animation

Computer animation has also become common. Computer animation began about 40
years ago when the first computer drawing system was created by General Motors and IBM. It
allowed the user to view a 3D model of a car and change the angles and rotation. Years later,
more people helped make computer animation better. Movies that used computer animation are:
The Abyss, Jurassic Park, Forrest Gump, and more. Also, computer animation was used
differently, as in the show 'South Park', which used stop motion cutout animation; recently it uses
computer animation. A well-known computer animation company is Pixar. They are
responsible for making Toy Story, A Bug's Life, Monsters Inc., Finding Nemo, and more. Also,
video games have used computer animation as well.

Cel-Shaded Animation
Cel-shaded animation is makes computer graphics appear to be hand-drawn. This type of
animation is most commonly turning up in console video games. Most of the time the cel-
shading process starts with a typical 3D model. The difference occurs when a cel-shaded object
is drawn on-screen. The rendering engine only selects a few shades of each color for the object,
making it look flat.
In order to draw black ink lines outlining an object's contours, the back-face culling is
inverted to draw back-faced triangles with black-colored vertices. The vertices must be drawn
many times with a slight change in translation to make the lines thick. This produces a black-
shaded silhouette. The back-face culling is then set back to normal to draw the shading and
optional textures of the object. The result is that the object is drawn with a black outline.

The first 3D video game to feature true real-time cel shading was Jet Set Radio for the
Sega Dreamcast. After Jet Set Radio, many other cel-shaded games were introduced during a
minor fad involving cel-shaded graphics. The next games with cel-shading to capture attention in
some form were 2002's Jet Set Radio Future and Sly Cooper and the Thievius Raccoonus. Over
time, more cel-shaded titles such as Dark Cloud 2, Cel Damage, Klonoa 2, and the Viewtiful Joe
series were released with good results.

There were also some television shows that used the cel-shading style. These shows
included Family Guy, Futurama, Fairly Oddparents, Spider-Man, The Simpsons, and many
more.

Regular Animation

Animation began with Winsor McCay. He did his animations all by himself, and it took him a
long time (about a year for a five minute cartoon). But for some, it was ridiculous that they
would have to wait so much for so little. Then the modern animation studio came to be. Years
later, more people would invent more cartoon characters. Otto Messmer invented the character

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

'Felix the Cat'. Later on, the Walt Disney Studio created 'Steamboat Willie', which introduced
the character Mickey Mouse. Other companies started to make their own cartoons; some of
which we can still watch today.

Computer Assisted Animation


Computer-assisted animation is common in modern animated films. Recent films such as
"Beowulf" were created using computer-assisted animation. These techniques enhance modern
animated films in ways not seen in film history.

Definition
Computer-assisted animation is animation that could not be completed without using a
computer. Functions like in-betweening and motion capture are examples of computer-assisted
animation.

"Gumby" (Clay
"Steamboat Willie" (Regular
Animation)
Animation)

"Finding Nemo" (Computer Animation)

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

"Family Guy" (Cel-


Shaded Animation)
"Celebrity Deathmatch" (Clay
"South Park" (Computer Animation)
Animation)
In-betweening
Tweening is a technique used in two-dimensional animation that blends two animation
cels together. Each is individually drawn. These are played rapidly, which gives the impression
of movement. Between each cel or key frame in the sequence, there is a visual gap in which a
transition drawing is placed. Now computers are used to draw the transition or "in-between"
drawing so that the film looks smooth (see Resources for visual demonstrations).

Motion Capture
Motion capture uses reflective dots that are placed at an actor's joints. When he moves, a
computer picks up the dots and creates a model of the performance, which is stored in the
computer. Animators later use the sensor points as a "skeleton" to create a three-dimensional
character (see Resources for visual demonstrations).

CREATING MOVEMENT:

If you were wondering how they create movies such as Wallace and Gromit or those
groovy Lego shorts on YouTube, your search is over! Although creating stop motion animation
is not difficult, it is time-consuming, repetitive and requires patience. As long as you're
forewarned and keen, this makes a fantastic hobby and sometimes even grows into a career.

Place your camera in front of the "set" that you are going to take photos of. Check that it
can view the entire frame. It is very important to support the camera or place it so that it is sitting
steadily and cannot shake as you take the photos. Otherwise, the end result will appear chaotic
and lack continuity. Keep in mind that the more photos, the smoother the video results. If you do
not have a tripod, good alternatives include balancing on solid books, poster tack on the surface
of the set or a piece of solid furniture at the same height. In single frame, 24 pictures equals one
second of film. It's best to take two pictures of the same shot, so you only require 12.
Set up a good source of lighting. It might be a lamp or a flashlight. If your light is
flickering, you need to shut off other sources of light. Close the blind, or curtains etc.
Take a single photo of the figure in the selected position. This photo shows the Lego set
being readied for photographing.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Begin the movement sequence. Move the figure bit by bit - very small movements each
time. It may be the entire body if the figure is walking, or it may just be an arm, head or leg. If
you are moving only one body part and you find that the figure is tilting or threatening to fall
over, make use of poster tack under the feet or other area touching part of the set.
Repeat the movement sequence until your action step is completed, or your camera's
memory is full.
Save the pictures onto your computer in an easy to remember place.
Use your movie-making software as instructed (or see two popular software methods
below). The basics involve:
Import the pictures into the desired program.
Make sure the pictures are at a very small duration so they flow very fast. If you are
disappointed by the speed at which your program can animate, try exporting the project as a
video file (before adding audio), then importing it again, and using a speed effect on it, such as
double speed (these effects only work on video clips). Then, if the resulting speed is sufficient,
you may add your audio.
Add titles and credits if you would like.
Make sure you like the end result of your stop motion animation. Keep going if you need
to complete more actions to create a story.
Save the video. If you plan on having multiple stop motion segments, save each segment as a
separate movie. Once the entire group of segments is completed, you can import all the segments
into the final movie, and it will look much better and be a lot easier to finalize.
Add effects or transitions, or whatever else you feel makes it look good.
Share your movie by burning it into a CD or place it into an iPod. Continue making other ones!

PRINCIPLES OF ANIMATION
The principles are:
1. Timing
2. Ease In and Out (or Slow In and Out)
3. Arcs
4. Anticipation
5. Exaggeration
6. Squash and Stretch
7. Secondary Action
8. Follow Through and Overlapping Action
9. Straight Ahead Action and Pose-To-Pose Action

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

10. Staging
11. Appeal
12. Slow-out and Slow-in
Simply memorizing these principles isn’t the point. No one will care whether or not you know
this list. It’s whether or not you truly understand and can utilize these ideas that matter. If you
do, it will show automatically in your work.

1. Timing
Timing is the essence of animation. The speed at which something moves gives a sense
ofwhat the object is, the weight of an object, and why it is moving. Something like an eyeblink
can be fast or slow. If it’s fast, a character will seem alert and awake. If it’s slow thecharacter
may seem tired and lethargic.J. Lesseter’s example. Head that turns left and right.
Head turns back and forth really slow: it may seem as if the character is stretching hisneck (lots
of in between frames).

 A bit faster it can be seen as saying "no" (a few in between frames)

 Really fast, and the character is reacting to getting hit by a baseball bat (almost none
in between frames).

2. Ease In and Out (or Slow In and Out)


Ease in and out has to do with gradually causing an object to accelerate, or come to
rest,from a pose. An object or limb may slow down as it approaches a pose (Ease In) or
gradually start to move from rest (Ease Out).For example, a bouncing ball tends to have a lot of
ease in and out when at the top of its bounce. As it goes up, gravity affects it and slows down
(Ease In), then it starts its downward motion more and more rapidly (Ease Out), until it hits the
ground.
Note that this doesn’t mean slow movement. This really means keep the in between frames close
to each extreme.

3. Arcs
In the real world almost all action moves in an arc. When creating animation one should
try to have motion follow curved paths rather than linear ones. It is very seldom that a character
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

or part of a character moves in a straight line. Even gross body movements when you walk
somewhere tend not be perfectly straight. When a hand/arm reaches out to reach something, it
tends to move in an arc.
Simple example – Kicking a ball

4. Anticipation
Action in animation usually occurs in three sections. The setup for the motion, the actual
action and then follow-through of the action. The first part is known as anticipation. In some
cases anticipation is needed physically. For example, before you can throw a ball you must first
swing your arm backwards. The backwards motion is the anticipation, the throw itself is the
motion. Anticipation is used to lead the viewers eye to prepare them for the action that follows.
Longer period of anticipation is needed for faster actions. Example, a character zips off screen
leaving a puff of smoke. Usually just before the zip, there is a pose where the characters raises a
leg and bends both arms as if he’s about to run. That’s the anticipation pose for the off screen
run. Generally, for good clear animation, the viewer should know what is about happen
(anticipation), what is happening (the actual action itself) and what happened (related to follow
through).

5. Exaggeration
Exaggeration is used to accent an action. It should be used in a careful and balanced
manner, not arbitrarily. Figure out what the desired goal of an action or sequence is and what
sections need to be exaggerated. The result will be that the animation will seem more realistic
and entertaining. One can exaggerate motions, for example an arm may move just a bit too far
briefly in an extreme swing. Generally when animating to dialogue, one listens to the track and
picks out areas that sound like they have more stress or importance, and then tends to exaggerate
poses and motions that fall at those times.
The key is to take something and make it more extreme in order to give it more life, but
not so much that it destroys believability. Example: exaggerating the lamp proportions to give a
sense of dad and son.

6.SQUASH AND STRETCH

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

This action gives the illusion of weight and volume to a character as it moves. Also
squash and stretch is useful in animating dialogue and doing facial expressions. How extreme the
use of squash and stretch is, depends on what is required in animating the scene. Usually it's
broader in a short style of picture and subtler in a feature. It is used in all forms of character
animation from a bouncing ball to the body weight of a person walking. This is the most
important element you will be required to master and will be used often.

7.SECONDARY ACTION
This action adds to and enriches the main action and adds more dimension to the
character animation, supplementing and/or re-enforcing the main action. Example: A character is
angrily walking toward another character. The walk is forceful, aggressive, and forward leaning.
The leg action is just short of a stomping walk. The secondary action is a few strong gestures of
the arms working with the walk. Also, the possibility of dialogue being delivered at the same
time with tilts and turns of the head to accentuate the walk and dialogue, but not so much as to
distract from the walk action. All of these actions should work together in support of one
another. Think of the walk as the primary action and arm swings, head bounce and all other
actions of the body as secondary or supporting action.

8. FOLLOW THROUGH AND OVERLAPPING ACTION


When the main body of the character stops all other parts continue to catch up to the main
mass of the character, such as arms, long hair, clothing, coat tails or a dress, floppy ears or a long
tail (these follow the path of action). Nothing stops all at once. This is follow through.
Overlapping action is when the character changes direction while his clothes or hair continues
forward. The character is going in a new direction, to be followed, a number of frames later, by
his clothes in the new direction. "DRAG," in animation, for example, would be when Goofy
starts to run, but his head, ears, upper body, and clothes do not keep up with his legs. In features,
this type of action is done more subtly. Example: When Snow White starts to dance, her dress
does not begin to move with her immediately but catches up a few frames later. Long hair and
animal tail will also be handled in the same manner. Timing becomes critical to the effectiveness
of drag and the overlapping action.

9. STARIGHT AHEAD AND POSE TO POSE ANIMATION


Straight ahead animation starts at the first drawing and works drawing to drawing to the
end of a scene. You can lose size, volume, and proportions with this method, but it does have
spontaneity and freshness. Fast, wild action scenes are done this way. Pose to Pose is more
planned out and charted with key drawings done at intervals throughout the scene. Size,
volumes, and proportions are controlled better this way, as is the action. The lead animator will
turn charting and keys over to his assistant. An assistant can be better used with this method so
that the animator doesn't have to draw every drawing in a scene. An animator can do more scenes
this way and concentrate on the planning of the animation. Many scenes use a bit of both
methods of animation.

10.STAGING

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

A pose or action should clearly communicate to the audience the attitude, mood, reaction
or idea of the character as it relates to the story and continuity of the story line. The effective use
of long, medium, or close up shots, as well as camera angles also helps in telling the story. There
is a limited amount of time in a film, so each sequence, scene and frame of film must relate to the
overall story. Do not confuse the audience with too many actions at once. Use one action clearly
stated to get the idea across, unless you are animating a scene that is to depict clutter and
confusion. Staging directs the audience's attention to the story or idea being told. Care must be
taken in background design so it isn't obscuring the animation or competing with it due to excess
detail behind the animation. Background and animation should work together as a pictorial unit
in a scene

11.APPEAL
A live performer has charisma. An animated character has appeal. Appealing animation
does not mean just being cute and cuddly. All characters have to have appeal whether they are
heroic, villainous, comic or cute. Appeal, as you will use it, includes an easy to read design, clear
drawing, and personality development that will capture and involve the audience's interest. Early
cartoons were basically a series of gags strung together on a main theme. Over the years, the
artists have learned that to produce a feature there was a need for story continuity, character
development and a higher quality of artwork throughout the entire production. Like all forms of
story telling, the feature has to appeal to the mind as well as to the eye.

12.SLOW-OUT AND SLOW-IN


As action starts, we have more drawings near the starting pose, one or two in the middle,
and more drawings near the next pose. Fewer drawings make the action faster and more
drawings make the action slower. Slow-ins and slow-outs soften the action, making it more life-
like. For a gag action, we may omit some slow-out or slow-ins for shock appeal or the surprise
element. This will give more snap to the scene.
Animation techniques
Drawn on film animation: a technique where footage is produced by creating the images
directly on film stock.
Paint-on-glass animation: a technique for making animated films by manipulating slow drying
oil paints on sheets of glass.
Erasure animation: a technique using tradition 2D medium, photographed over time as the
artist manipulates the image. For example, William Kentridge is famous for his charcoal erasure
films, and Piotr Dumała for his auteur technique of animating scratches on plaster.
Pinscreen animation: makes use of a screen filled with movable pins, which can be moved in or
out by pressing an object onto the screen. The screen is lit from the side so that the pins cast
shadows. The technique has been used to create animated films with a range of textural effects
difficult to achieve with traditional animation.
Sand animation: sand is moved around on a back- or front-lighted piece of glass to create each
frame for an animated film. This creates an interesting effect when animated because of the light
contrast.
Flip book: A flip book (sometimes, especially in British English, called a flick book) is a book
with a series of pictures that vary gradually from one page to the next, so that when the pages are

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

turned rapidly, the pictures appear to animate by simulating motion or some other change. Flip
books are often illustrated books for children, but may also be geared towards adults and employ
a series of photographs rather than drawings. Flip books are not always separate books, but may
appear as an added feature in ordinary books or magazines, often in the page corners. Software
packages and websites are also available that convert digital video files into custom-made flip
books.

Animation on the web:

Animation on a web page is any form of movement of objects or images. Animations are
usually done in Adobe Flash, although Java and GIF animations are also used in many websites.
Streaming video in Flash is coming increasingly popular.

Reasons to have motion on a web page are to draw attention to something, to provide a
demonstration or to entertain. The need for movement on a page depends on the purpose and
content of the page. A financial institute would not really need animations on their pages, while
an entertainment site obviously would have such movement.

Computer Animation Special Effects


The words "special effects animation" conjure up images of starships blowing away asteroids in
some distant galaxy light years away. Although blowing up make-believe spaceships is part of
special effects animation, it's actually only a very small part. This kind of technology can be used
to create anything that can be imagined. It is additionally a multifaceted art form requiring
animators who have been trained in a number of disciplines. The use of special effects animation
calls for a great deal of planning and offers the potential to revolutionize a number of industries
not related to the production of film and

Fig:video games.
RENDERING ALGORITHMS

Rendering is the process of generating an image from a model (or models in what
collectively could be called a scene file), by means of computer programs. A scene file contains
objects in a strictly defined language or data structure; it would contain geometry, viewpoint,
texture, lighting, and shading information as a description of the virtual scene. The data
contained in the scene file is then passed to a rendering program to be processed and output to a
digital image or raster graphics image file. The term "rendering" may be by analogy with an
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

"artist's rendering" of a scene. Though the technical details of rendering methods vary, the
general challenges to overcome in producing a 2D image from a 3D representation stored in a
scene file are outlined as the graphics pipeline along a rendering device, such as a GPU. A GPU
is a purpose-built device able to assist a CPU in performing complex rendering calculations. If a
scene is to look relatively realistic and predictable under virtual lighting, the rendering software
should solve the rendering equation. The rendering equation doesn't account for all lighting
phenomena, but is a general lighting model for computer-generated imagery. 'Rendering' is also
used to describe the process of calculating effects in a video editing file to produce final video
output.

Rendering is one of the major sub-topics of 3D computer graphics, and in practice always
connected to the others. In the graphics pipeline, it is the last major step, giving the final
appearance to the models and animation. With the increasing sophistication of computer graphics
since the 1970s, it has become a more distinct subject.

Rendering has uses in architecture, video games, simulators, movie or TV visual effects,
and design visualization, each employing a different balance of features and techniques. As a
product, a wide variety of renderers are available. Some are integrated into larger modeling and
animation packages, some are stand-alone, some are free open-source projects. On the inside, a
renderer is a carefully engineered program, based on a selective mixture of disciplines related to:
light physics, visual perception, mathematics and software development.

In the case of 3D graphics, rendering may be done slowly, as in pre-rendering, or in real


time. Pre-rendering is a computationally intensive process that is typically used for movie
creation, while real-time rendering is often done for 3D video games which rely on the use of
graphics cards with 3D hardware accelerators.

Multimedia Compression
Multimedia compression is employing tools and techniques in order to reduce the file
size of various media formats. With the development of World Wide Web the importance of
compress algorithm was highlighted because it performs faster in networks due to its highly
reduced file size. Furthermore with the popularity of voice and video conferencing over the
internet ,compression method for multimedia has reached it next generation to provide smooth
service even in unreliable network infrastructure. Although many methods are used for this
purpose, in general these methods can be divided into two broad categories named Lossless and
Lossy methods.

MPEG-1 Audio
MPEG-1 Layer I or II Audio is a generic subband coder operating at bit rates in the range
of 32 to 448 kb/s and supporting sampling frequencies of 32, 44.1 and 48 kHz. Typical bit rates
for Layer II are in the range of 128-256 kbit/s, and 384 kb/s for professional applications.
MPEG-1 Layers I and II (MP1 or MP2) are perceptual audio coders for 1- or 2-channel
audio content. Layer I has been designed for applications that require both low complexity
decoding and encoding. Layer II provides for a higher compression efficiency for a slightly
higher complexity. Using MPEG-1 Layer I one can compress high quality audio CD data at a
typical bitrate of 384 kb/s while maintaining a high audio quality after decoding. Layer II

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

requires bit rates in the range of 192 to 256 kb/s for near CD quality. A Layer II decoder can also
decode Layer I bitstreams.
MPEG-1 Layer 3 (or MP3) is a 1- or 2-channel perceptual audio coder that provides
excellent compression of music signals. Compared to Layer 1 and Layer 2 it provides a higher
compression efficiency. It can typically compress high quality audio CD data by a factor of 12
while maintaining a high audio quality. In general MP3 is appropriate for applications involving
storage or transmission of mono or stereo music or other audio signals. Since it is implemented
on virtually all digital audio devices playback is always ensured
Thanks to its low complexity decoding combined with high robustness against cascaded
encoding/decoding and transmission errors, MPEG-1 Layer II is used in digital audio and video
broadcast applications (DVB and DAB). It is also used in Video CD, as well as in a variety of
studio applications.
Layer 3, or as it is mostly called nowadays ”mp3”, is the most pervasive audio coding
format for storage of music on PC platforms, and transmission of music over the Internet. Mp3
has created a new class of consumer electronics devices named after it, the mp3 player. It is
found on almost all CD and DVD players and in an increasing number of car stereo systems and
new innovative home stereo devices like networked home music servers. Additionally, Layer 3
finds wide application in satellite digital audio broadcast and on cellular phones.
MPEG-1 Layer 3 was standardized for the higher sampling rates of 32, 44.1 and 48 kHz
in MPEG-1 in 1992..
Figure 1 shows a high level overview of the MPEG-1 Layers I and II coders. The input
signal is transformed into 32 subband signals that are uniformly distributed over frequency by
means of a critically sampled QMF filterbank. The critically down sampled subband signals are
grouped in a so called allocation frame (384 and 1152 subband samples for Layer I and II
respectively). By means of Adaptive PCM, these allocation frames are subsequently quantized
and coded into an MPEG-1 bitstream. At the decoder side, the bitstream is decoded into the
subband samples which are subsequently fed into the inverse QMF filterbank.

Figure 1 – High level overview of MPEG-1 Layers I and II coder

UNIT-V
QUESTIONS
SECTION A
Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

1. CODECS stands for _______.


2. MPEG stands for _________.
3. _________ is the process of generating an image from a model by means of computer
program.
4. Define Animation.
5. What is Tweening.
6. What is Aliasing.
7. A set of still images is called __________.
8. SECAM is a _______.
9. __________ animation is also known as sprite animation.
10. _______ coding technique is known as predictive coding technique.
SECTION B
1. Describe the various audio and video standards.
2. Explain the cell animation.
3. How to edit video? Explain.
4. Explain the Rendering algorithm.
5. Explain the method to generate YC signals from RGB..
6. Explain various video signal formats.
7. Discuss the roles of I,P and B frames of MPEG-1 video standard.
8. Explain about television broadcasting standards.
9. Explain the Principles of Animation.
10. Discuss about Special Effects.

SECTION C
1. Describe how rendering algorithms helps to create special effects.
2. Explain briefly about: i) Video Editing ii) Analog Video Camera.
3. Explain the concepts of video editing.
4. Discuss any four rendering algorithms.
5. Discuss the various principles of animation.
6. Discuss about MPEG-1 audio standard.
7. Explain the following: i) Video signal format ii) PC video iii) Video file format.
8. Describe in detail about the following: i) MPEG-1 Audio ii) MPEG-1 Video.
9. State the principle of animation and explain how animation is carried on the web.
10. Describe in detail about the following: i) MPEG-2 Audio ii) MPEG-2 Video.

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.
Computer Graphics and Multimedia

Rajeshkanna Assistant Professor, Dept.BCA, Dr.N.G.P. Arts & Science College, Coimbatore.

You might also like