Digi Notes Unit5
Digi Notes Unit5
Vidyalankar School of
Information Technology
Wadala (E), Mumbai
www.vsit.edu.in
Certificate
This is to certify that the e-book titled “Computer
Graphics and Animation” comprises all elementary
learning tools for a better understating of the relevant
concepts. This e-book is comprehensively compiled as
per the predefined eight parameters and
guidelines.
Contents
Computer Animation:
Principles of Animation, Key framing, Deformations, Character Animation, Physics-Based Animation,
Procedural Techniques, Groups of Objects.
Image Manipulation and Storage:
What is an Image? Digital image file formats, Image compression standard – JPEG, Image Processing -
Digital image enhancement, contrast stretching, Histogram Equalization, smoothing and median
Filtering.
References:
Sr.
Reference Book Titles Author/s Publisher Edition Module Nos.
No
2nd
3 Computer Graphics Hearn, Baker Pearson All
D. F. Rogers, J. A. 2nd
5 Mathematical Elements for CG TMH Unit 2 & 3
Adams
Requisites III IV V
Principles of Animation
▪ The principles of animation form the basis of all motion work.
▪ The 12 principles of animation were first introduced by Disney animators Ollie Johnston and
Frank Thomas in their book The Illusion of Life: Disney Animation, which was originally
released in 1981.
Key framing
▪ A keyframe in animation is a drawing that defines the starting and ending points of any
smooth transition. The drawings are called "frames" because their position in time is
measured in frames on a strip of film.
Fig: Keyframe Animation
▪ A sequence of keyframes defines which movement the viewer will see, whereas the position
of the keyframes on the film, video, or animation defines the timing of the movement.
Because only two or three keyframes over the span of a second do not create the illusion of
movement, the remaining frames are filled with inbetweens.
▪ The intermediate frames between the keyframe. The number of in-betweens needed is
determined by the media to be used to display animation.
Deformations:
▪ In computer graphics, free-form deformation (FFD) is a geometric technique used to
model simple deformations of rigid objects. It is based on the idea of enclosing an object
within a cube or another hull object, and transforming the object within the hull as the hull
is deformed.
▪ Deformation of the hull is based on the concept of so-called hyper-patches, which are three-
dimensional analogs of parametric curves such as Bézier curves, B-splines.
▪ The technique was first described by Thomas W. Sederberg and Scott R. Parry in 1986, and
is based on an earlier technique by Alan Barr.
▪ Interactive deformation is an important aspect of geometry processing, used for
instance in CAGD (Computer Animation Graphics and Design) and the movie industry.
▪ Shape manipulation is driven by a variation optimization, which guarantees high quality
deformations by minimizing physically-inspired energies subject to user-controlled
constraints
▪ We distinguish between linear and nonlinear approaches, depending on whether the energy
minimization leads to the solution of a linear or nonlinear problem.
Character Animation
▪ Character animation is a specialized area of the animation process, which involves bringing
animated characters to life. The role of a Character Animator is analogous to that of a film
or stage actor, and character animators are often said to be "actors with a pencil" (or a mouse).
▪ Character animators breathe life in their characters, creating the illusion of thought, emotion
and personality. Character animation is distinguished from creature animation, which
involves bringing photo-realistic animals and creatures to life.
▪ Character animation is generally defined as the art of making a particular character move
in a two- or three-dimensional context. It is a process central to the concept of animation.
▪ In computer animation, character animation is the creation of an animated person or animal.
The animator will make a unique character-generated individual and decide how the character
will look, move, and interact with its environment.
▪ The idea of character animation has evolved through various types of animation techniques.
Many associate early character animation with Walt Disney Studios, where cartoon artists
created particular characters and presented them with particular traits and characteristics on
screen. This requires combining a lot of technical drawing or animation with some top-level
ideas about how the character moves, "thinks," behaves and otherwise appears consistently
on screen.
▪ As primitive cartoon animation gave way to modern three-dimensional animation, character
animation has evolved along with it.
▪ Today’s character animation involves elements like character rigging and the creation of
object-oriented frameworks for creating character sequences.
▪ At the same time, processes like voice dubbing by celebrities and advanced character profiles
are doing the conceptual work of building that character’s persona and background. One
example is the early CGI Toy Story movies, where the careful creation of specialized on-
screen characters has sold lots of merchandise and driven the films to legacy blockbuster
status.
Procedural Techniques
▪ A procedural animation is a type of computer animation, used to automatically generate
animation in real-time to allow for a more diverse series of actions than could otherwise be
created using predefined animations.
▪ Procedural animation is used to simulate particle systems (smoke, fire, water), cloth and
clothing, rigid body dynamics, and hair and fur dynamics, as well as character animation.
▪ In a procedural animation objects are animated by a procedure (a set of rules). The animator
specifies rules and initial conditions and runs simulation. Rules are often based on physical
rules of the real world expressed by mathematical equations.
1. Physics-based modeling/animation
▪ It deals with things that are not alive. Physics-based modeling/animation refers to
techniques that include various physical parameters, as well as geometrical information, into
models. The behavior of the models is simulated using well-know natural physical laws.
Physics-based modeling/animation can be considered as a sub-set of procedural animation
and includes particle systems, flexible dynamics, rigid body dynamics, fluid dynamics, and
fur/hair dynamics.
Groups of Objects
▪ Multiple objects are animated using any standard technique such as flocking and particle
systems
▪ During flocking, as the number of objects in the group increases, the intelligence of an
individual group member decreases. This creates an emergent behavior that arises as a result
of limited interactions of group members / objects.
▪ They interact with only few of the nearest neighbours. The motion of the objects in a group
is called a “boid”
▪ When boid is applied on flocks then, external physical forces acts on boid such as gravity,
wind etc. Boid acts to global environments and to the behavior of other group members.
▪ In particle system, the number of particles are much higher than the number of boids in a
flock. During animation, the exact number of particles may fluctuate.
▪ Particles are independent from each other. It ignores the neighborhoods and interacts with
the global environment. Unlike flocking, particle system interacts with the environment by
experiencing external forces and collision with the objects.
▪ Particle system creates new particles with initial parameters, terminates or destroys old
particles, computes necessary forces and updates the velocities and position of the
remaining particles.
What is an Image?
▪ An image is a picture that has been created or copied and stored in electronic form.
▪ An image can be described in terms of vector graphics or raster graphics.
▪ An image stored in raster form is sometimes called a bitmap.
1. JPEG
▪ It is a graphic image file produced according to a standard from the JPEG.
▪ JPEGs usually have a .jpg file extension.
1. JPEG
▪ It stands for Joint Photographic Experts Group.
▪ It is a graphic image file produced according to a standard from the JPEG.
▪ JPEGs have a .jpg file extension.
2. GIF
▪ It stands for Graphics Interchange Format.
▪ The GIF uses the 2D raster data type and is encoded in binary.
▪ GIF files ordinarily have the .gif extension.
3. GIF89a
▪ It is an animated GIF image, formatted according to GIF Version 89a.
▪ Animated GIF image has the ability to create an animated image that can be played after
transmitting to a viewer page that moves.
4. PNG
▪ It stands for Portable Network Graphics.
▪ It is a file format for image compression that was designed to provide a number of
improvements over the GIF format.
▪ A PNG file is compressed in lossless fashion (meaning all image information is restored when
the file is decompressed during viewing).
▪ PNGs have a .png extension.
5. SVG
▪ It stands for Scalable Vector Graphics.
▪ The image is a description of an image as an application of XML.
▪ Any program such as a browser that recognizes XML can display the image using the
information provided in the SVG format.
▪ Scalability means that the file can be viewed on a computer display of any size and resolution.
▪ SVGs have .svg extension.
6. TIFF
▪ It stands for Tag Image File Format.
▪ It is a common format for exchanging raster graphics (bitmap) images between application
programs, including those used for scanner images.
▪ These files have a .tiff or ".tif" file name suffix.
7. BMP
▪ The BMP file format handles graphic files within the Microsoft Windows OS.
▪ BMP files are uncompressed, and therefore large and lossless.
8. WebP
▪ WebP is a new open image format that uses both lossless and lossy compression.
▪ It was designed by Google to reduce image file size to speed up web page loading.
▪ Its principal purpose is to supersede JPEG as the primary format for photographs on the web.
9. HEIF
▪ It stands for High Efficiency Image File Format
▪ It is an image container format that was standardized by MPEG.
10. BAT
▪ BAT was released into the public domain by C-Cube Microsystems.
▪ The "official" file format for JPEG files is SPIFF (Still Picture Interchange File Format), but
by the time it was released, BAT had already achieved wide acceptance.
11. BPG
▪ It stands for Better Portable Graphics.
▪ Its purpose is to replace the JPEG image format when quality or file size is an issue.
JPEG compression
▪ JPEG stands for Joint photographic experts group.
▪ It is the first interanational standard in image compression.
▪ It is widely used today.
▪ It could be lossy as well as lossless.
Steps to perform JPEG compression:
▪ The first step is to an image of 8 x 8 blocks.
▪ Let’s say that the image has the following pixel values.
▪ The range of the pixels intensities now are from 0 to 255. We will change the range from -
128 to 127. Starting from the first block, we will subtract 128 from each of the pixel values.
▪ After that we have to find the discrete fourier transform of the matrix using the following.
▪ Image enhancement is the process of adjusting digital images so that the results are more
suitable for display or further image analysis.
▪ For example, you can remove noise, sharpen, or brighten an image, making it easier to identify
key features.
▪ Methods of image enhancement:
o Filtering with morphological operators
o Histogram equalization
o Noise removal using a Wiener filter
o Linear contrast adjustment
o Median filtering
o Unsharp mask filtering
o Contrast-limited adaptive histogram equalization (CLAHE)
o Decorrelation stretch
Contrast stretching
▪ Contrast stretching (often called normalization) is a simple image enhancement technique
that attempts to improve the contrast in an image by `stretching' the range of intensity values
it contains to span a desired range of values, e.g. the the full range of pixel values that the
image type concerned allows.
▪ It differs from the more sophisticated histogram equalization where it can only apply a linear
scaling function to the image pixel values.
▪ As a result the `enhancement' is less harsh.
▪ Contrast stretching techniqus accept a graylevel image as input and produce another graylevel
image as output.
▪ The contrast of an image is a measure of its dynamic range, or the "spread" of its histogram.
▪ The dynamic range of an image is defined to be the entire range of intensity values contained
within an image.
▪ Contrast stretching is a linear mapping of input to output values.
Procedure:
▪ The first step is to determine the limits over which image intensity values will be extended.
▪ These lower and upper limits will be called a and b, respectively (for standard 8-bit grayscale
pictures, these limits are usually 0 and 255).
▪ Next, the histogram of the original image is examined to determine the value limits (lower =
c, upper = d) in the unmodified picture.
▪ If the original range covers the full possible set of values, straightforward contrast stretching
will achieve nothing, but even then sometimes most of the image data is contained within a
restricted range; this restricted range can be stretched linearly, with original values which lie
outside the range being set to the appropriate limit of the extended output range.
▪ Then for each pixel, the original value r is mapped to output value s using the function:
Fig: Image enhancement after contrast stretching
Fig: 12.5: X-ray image (a) Low contrast chest x-ray image, (b) Low contrast histogram
where floor() rounds down to the nearest integer. This is equivalent to transforming the pixel
intensities, k, of f by the function
This transformation comes from the intensities of f and g as continuous random variables X, Y on [0,L
− 1] with Y defined by
▪ Smoothing technique is applied by taking average of neighbourhood pixels, where each pixel
is replaced by the average value of the pixels contained in some neighborhood about it.
▪ Smoothing is used for blurring and noise reduction.
▪ Blurring is used in pre – processing steps to remove small details from an image prior to
knowledge extraction.
▪ The idea of smoothing or mean filtering is to replace each pixel value in an image with the
mean(average) value of its neighborhood, including itself.
▪ This process eliminates pixel values which are unrepresentative of their surroundings.
▪ The median filter is a nonlinear digital filtering technique, often used to remove noise from
an image or signal.
▪ Such noise reduction is a typical pre-processing step to improve the results of later processing
(for example, edge detection on an image).
▪ Median filtering is very widely used in digital image processing because, under certain
conditions, it preserves edges while removing noise.
▪ Median filtering is one kind of smoothing technique.
Questions:
1. Explain 4 principles of Animation.
2. Differentiate between Key framing & procedural animation.
3. What is Physics Based animation?
4. What are the types of deformations used in animation?
5. Explain any 5 image file formats.
6. How JPEG compression happens? Explain the technique in detail.
7. What is Median filtering in Image processing?
8. Write a short note on Histogram equalization.