Unit5 Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Unit 5

Computer Animation
Introduction to Animation:
• Computer animation is the art of creating moving images via the use of computers.
• To create the illusion of movement, an image is displayed on the computer screen then
quickly replaced by a new image that is similar to the previous image, but shifted
slightly.
• This technique is identical to how the illusion of movement is achieved with television
and motion pictures.
• The basic idea behind animation is to play back the recorded images at the rates fast
enough to fool the human eye into interpreting them as continuous motion.
• Animation can make a series of dead images come alive.
• Computer animation is the art of creating moving images via the use of computers.
• Sometimes the target of the animation is the computer itself, but it sometimes the target
is another medium, such as film.
• It is also referred to as CGI (Computer-generated imagery or computer-generated
imaging), especially when used in films.
• Animation can be used in many areas like entertainment, computer aided-design,
scientific visualization, training, education, e-commerce, and computer art.
• Basically there are six animation technique: Traditional Animation (frame by
frame), Key framing animation, Procedural Animation, behavioral animation,
Performance Based (Motion Capture), Physically Based (Dynamics).
Traditional Animation (frame by frame)
• Traditionally most of the animation was done by hand.
• All the frames in an animation had to be drawn by hand.
• Since each second of animation requires 24 frames (film), the amount of efforts
required to create even the shortest of movies can be tremendous.

Principles of Animation: [Very impt]


❑ During the late 1920’s through the 1930’s, Walt Disney worked to improve the
techniques of his studio animators.
❑ Disney set up drawing classes for his animators at the Chouinard Art Institute in
Los Angeles under Instructor Don Graham.
❑ Through these lessons and interaction between Disney and his staff, a set of twelve
principles was developed.
❑ These principles were used in Disney animated productions including Snow
White, Pinocchio, Fantasia, Dumbo, and Bambi.

• There are 12 principles of animation: [V IMPT]


1. Squash and Stretch
2. Anticipation
3. Staging
4. Straight Ahead Action and Pose-to-Pose
5. Follow Through and Overlapping Action
6. Ease In, Ease Out
7. Arcs
8. Secondary Action
9. Timing
10. Exaggeration
11. Solid Drawing
12. Appeal
1. Squash and Stretch [IMPT]
• Squash and stretch is debatably the most fundamental principle. Look at what
happens when a ball hits the ground. The force of the motion squashes the ball
flat, but because an object needs to maintain its volume, it also widens on impact.
This what’s called squash and stretch.
• This is probably the most important rule of animation: it refers to the natural
deformation, weight and flexibility of objects.
• Living flesh distorts during motion.
• Exaggerated deformations will emphasize motion and impact.
• Although objects deform like rubber, they must maintain volume while being squashed
and stretched.
• For example if a rubber ball bounces and hits the ground it will tend to flatten when it
hits. This is the squash principle.
• As it starts to bounce up it will stretch in the direction it is going.
• The purpose of which is to give a sense of weight and flexibility to drawn objects.
• The key to adding fluidity and realism to a bouncing object is to keep its volume
consistent when using squash and stretch.

2. Anticipation [IMPT]
• Anticipation is the preparation for the main action.
• 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.
• Anticipation is used to prepare the audience for an action, and to make the action
appear more realistic.
• It's the precursor to the main action. It's like a visual hint that you give the viewer
to let them know whats about to happen.
• Animation can occur before an action. Before you jump, you bend your knees.
• 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.
• The player striking the soccer ball would be the main action, and the follow-through of
the leg is well… the follow through.
• We first see the woman as she’s standing on the box. She then bends her knees in
anticipation of what’s about to happen and springs into action by leaping from the
ground up into the air.


• For example, a baseball player, before throwing the ball, will prepare for the action by
moving his arm back (and in fact his whole body will take a special "pose").
• This allows you to prepare your audience for what will happen next and get a more
"realistic" impact. In motion design, for example, if you want to animate a rotating
object, make a slight rotation in the opposite
3. Staging
• When filming a scene, where do you put the camera? Where do the actors go? What do
you have them do? The combination of all these choices is what we call staging.
• Staging is one of the most overlooked principles. It directs the audience’s attention
toward the most important elements in a scene in a way that effectively advances the
story.
• Staging is the presentation of an idea so that it is clear. This idea can be an action,
a personality, an expression, or a mood. The key idea is that the idea is made clear
to the viewer.
• Its purpose is to direct the audience's attention, and make it clear what is of
greatest importance in a scene; what is happening, and what is about to happen.
• This can be done by various means, such as the placement of a character in the
frame, the use of light and shadow, and the angle and position of the camera.
• The essence of this principle is keeping focus on what is relevant, and avoiding
unnecessary detail.
• Do not confuse the viewer with too many simultaneous actions, use one clear action
at a time to convey the idea.
• Exceptions are the cases when you really need to show the turmoil or confusion.
• Staginess directs viewer’s attention towards the story being told.
• An important objective of staging is to lead the viewers eye to where the action will
occur so that they do not miss anything. This means that only one idea at a time occur,
or else the viewers may be looking at the wrong thing. So, the main object should be
contrasted in some way with the rest of the scene. A good example is motion, since the
eye is drawn to motion in an otherwise still scene. In a scene with everything moving,
the eye is drawn to a still object.
• The animator must use different techniques to ensure that the viewer is looking at the
correct object at the correct time. For example, in Luxo, jr. The Father appears first,
and so is the center of attention. Then the son bounds in, moving rapidly, so the center
of attention shifts to him. At a certain point the son stops and looks up at the father,
refocusing the attention on the father.

4. Straight Ahead Action and Pose-to-Pose [IMPT]


• These are two ways of drawing animation.
• Straight ahead action is where you draw each frame of an action one after another
as you go along.
• With pose-to-pose, you draw the extremes – that is, the beginning and end
drawings of action – then you go on to the middle frame, and start to fill in the
frames in-between.
• "Straight ahead" animation is when you animate a character or something as it
is moving, like when you move in real life, you animate it frame by frame,
without a plan.
• On the other hand, "pose-to-pose" animation is when you begin by placing the most
important states, or "keyframes" of your animation, creating the transition
between two keyframes.
• Pose-to-pose gives you more control over the action.
• You can see early on where your character is going to be at the beginning and end
instead of hoping you’re getting the timing right.
• By doing the main poses first, it allows you to catch any major mistakes early.
• The problem with it is that sometimes it’s too neat and perfect.
• Straight ahead action is less planned, and therefore more fresh and surprising.
• The problem with it is that it’s like running blindfolded… you can’t figure out where
you’re supposed to be at any one time.

• Straight Ahead Action in hand drawn animation is when the animator starts at
the first drawing in a scene and then draws all of the subsequent frames until he
reaches the end of the scene. This creates very spontaneous and zany looking
animation and is used for wild, scrambling action.
• Pose-to-Pose Action is when the animator carefully plans out the animation, draws
a sequence of poses, i.e., the initial, some in-between, and the final poses and then
draws all the in-between frames (or another artist or the computer draws the in-
between frames). This is used when the scene requires more thought and the poses
and timing are important.
5. Follow-Through and Overlapping Action [IMPT]
• When a moving object such as a person comes to a stop, parts might continue to move
in the same direction because of the force of forward momentum. These parts might be
hair, clothing, jowls, or jiggling flesh of an overweight person. This is where you can
see follow-through and overlapping action.
• The secondary elements (hair, clothing, fat) are following-through on the primary
element, and overlapping its action.
• Follow-through can also describe the movement of the primary element though. If you
land in a crouch after a jump, before standing up straight, that’s follow-through.
• Follow-through is the idea that certain appendages and body parts might continue
to move even after a motion is completed. So if a character with a scarf is running,
then they stop suddenly, the scarf will fly forward past the body, then fall back
where the character stopped. If a car stops moving, the antenna on top will keep
moving for a second. If a cat turns suddenly, their tail might whip around.
• Overlapping action is the idea that different parts of a body will move at different
rates. So if you walk, your arms will move at a different speed than your head.
• Overlapping action is an action that occurs because of another action. For e.g. : If a dog
is running and it suddenly stops; its ears will probably still keep moving for a bit.
• "Follow through" means that separate parts of a body will continue moving after
the character has stopped.
• "Overlapping action" is when a character changes direction, and parts of the body
continue in the direction he was previously going. OR It expresses the idea that if a
character is in motion, some parts of the character move faster than others.
• If a woman moves her head, then her hairs will also move—follow-through. And after
her head stops moving- for some time her hair will move—overlapping action.

Follow-through

6. Ease In, Ease Out OR Slow-In, Slow-Out


• Most motion starts slowly, accelerates, and then slows again before stopping.
• When you start your car, you don’t get up to 60 mph right away. It takes a little
while to accelerate and reach a steady speed. In animation speak, we would call
this an Ease Out.
• Likewise, if you brake, you’re not going to come to a full stop right away. (Unless
you crash into a tree or something.) You step on the pedal and decelerate over a
few seconds until you are at a stand-still. Animators call this an Ease In.
• Carefully controlling the changing speeds of objects creates an animation that has a
superior believability.
• When you move your arm, it won't move at a defined speed all the time. The movement
is like a robot's where it starts slowly, accelerates and then slows down to get to its final
destination.
• It also allows us to emphasize the key-poses of our animation which in a way, gives
more time for the viewer to see it.
• Gravity has an effect on slow in/slow out.
• When a ball bounces, it increases in speed as it gets closer to the ground. It decreases
in speed at the top of the arch.
• The basic jest of this principle is that we add more drawings to the beginning and to the
end of our sequence. In essence, the animation slowly moves into the arc, and then
slowly leaves.
• An object or limb may slow down as it approaches a pose (Ease In) or gradually start
to move from rest (Ease Out)
• It also allows us to emphasize the key-poses of our animation which in a way, gives
more time for the viewer to see it.
• Now do ALL things slow in and slow out? Absolutely not It's up to you as an animator
to experiment and find out what types of actions slow in, but don't slow out. Here are a
few examples:
• Slow in, but don't slow out -- A car driving fast from a distance, but as it passes you, it
whizzes by.
• Slow out without slowing in-- Someone getting ready to sneeze.
7. Arcs [IMPT]
• Natural motions move along a curved path, or an arc, not a straight line.
• Except animation of mechanical devices.
• Life doesn’t move in straight lines, and neither should animation. Most living
beings – including humans – move in circular paths called arcs.
• Arcs operate along a curved trajectory that adds the illusion of life to an animated
object in action. Without arcs, your animation would be stiff and mechanical.
• The speed and timing of an arc are crucial.
• Here we are talking about the trajectory of your animated element through time.
• An arched trajectory really helps when it comes to the realism and the impact of your
animation, as the movement appears smoother and gentler.

8. Secondary Action [IMPT]


• Secondary actions are gestures that support the main action to add more
dimension to character animation.
• They can give more personality and insight to what the character is doing or
thinking.
• Secondary action creates interests and realism in animation.
• A secondary action is an action that results directly from another action. Secondary
actions are important in heightening interest and adding a realistic complexity to the
animation.
• Secondary actions are important in heightening interest and adding a realistic
complexity to the animation.
• 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.
• As mentioned, it must be staged so that the main action isn’t overpowered.
• It’s the kind of thing that is usually more subtle or can be felt more than noticed
immediately
• Facial expressions are secondary actions.
• Secondary actions are also actions caused by the impact of another object.
• The movement of a ball that has been kicked is a secondary action.
• Eg. is to imagine a bull with a ring in the nose. The ring is an independent object that
deserves his own animations but are related to the bull's face movement.
9. Timing and spacing [IMPT]
• Timing is about where on a timeline you put each frame of action.
• In practice, the success of your animation is going to depend on your sense of
timing.
• This will set the rhythm of the animation and allow you to have some non-linear action.
That will increase a lot the quality and generate more interest for your animation.
• Spacing is the difference between two frames. In other words, it’s the detail of the
timing.
• Timing can also defines the weight of an object. Two similar objects can appear to
be vastly different weights by manipulating timing alone.
• Light objects have much less resistance and usually move much quicker than
heavy objects. So, Two similar objects can appear to be vastly different weights by
manipulating timing alone.
• Physical Timing. Correct timing makes objects appear to abide to the laws of
physics
• Speed can imply emotion. A fast walk may mean happiness and a slow walk may
mean depression
• For example, if you were to hit a croquet ball and a balloon with a mallet, the result
would be two different actions. The croquet ball would require more force to place it
into motion, would go farther, and need more force to stop it. On the other hand, the
balloon would require far less force to send it flying, and because of it's low mass and
weight, it wouldn't travel as far, and would require less force to stop it.
• Head turns back and forth really slow: it may seem as if the character is stretching his
neck (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).

10. Exaggeration [IMPT]


• Exaggeration presents a character’s features and actions in an extreme form for
comedic or dramatic effect.
• This can include distortions in facial features, body types, and expressions, but
also the character’s movement.
• Exaggeration means to take reality and make it bigger, bolder, and brighter.
• Exaggeration is used to increase the readability of emotions and actions.
• Exaggeration is an effect especially useful for animation, as perfect imitation of reality
can look static and dull in cartoons.
• Exaggeration is a great way for an animator to increase the appeal of a character, and
enhance the storytelling.
• When it comes to cartoon or non-realistic animation, exaggerating a movement will
always bring more quality to your animation.
• It allows your object or character to not look static and fixed but fluid and with their
own way of thinking.
• Forms of exaggeration can involve the supernatural or surreal, alterations in the
physical features of a character, or elements in the storyline itself.
• One can exaggerate motions, for example an arm may move just a bit too far briefly in
an extreme swing.

11. Solid Drawing or 3D Effect


• Solid drawing is all about making sure that animated forms feel like they’re in
three-dimensional space.
• Solid drawing generally refers to the ability to render a three-dimensional
character in two-dimensional space and give it weight, depth, and balance.
• The illustrations must feature volume, balance, and weight to create the illusion
of a 3D object.
• The drawer has to understand the basics of anatomy, composition, weight,
balance, light and shadow etc.
• Since the 12 Basic Principles of Animation were written before computer animation
existed, the solid drawing principle is more fundamental for a traditional animator. In
order to make his animation convincing, a traditional animator has to be able to draw a
character from any angle. Although great draughtsmanship is not a necessity for a
computer animator, an understanding of what makes a good drawing can definitely
help. Maybe in this computer age, we should call this principle “Solid Poses.”

12. Appeal [IMPT]


• People remember real, interesting, and engaging characters. Animated characters
should be pleasing to look at and have a charismatic aspect to them; this even
applies to the antagonists of the story.
• Appeal can be hard to quantify because everyone has a different standard.
• That said, you can give your character a better chance of being appealing by making
them attractive to look at.
• The difference between appealing animation and unappealing animation is not limited
to subject matter, what matters is how you present the ideas, concepts, and emotional
highs/lows to the audience—it’s about presentation
• In animation, artists use the Appeal principle to create interesting characters
that appeal to the audience. Appealing animation doesn't mean making everything
fluffy and cute but creating a clear visual design that will capture the audience's interest.
• Everybody has their own idea of what is appealing to them. This is why popular
animations have features that are generally well-liked. Disney characters have big eyes
and symmetrical faces because people generally like to look at those things. Each
animator has to find their own style and ways to add charisma to their creations.
• Appeal can be gained by correctly utilizing other principles such as exaggeration in
design, avoiding symmetry, using overlapping action, and others.
• Play around with different shapes and proportions of characters to keep things fresh
• Enlarging the most defining feature of a character can go a long way to giving the
character personality.
• Strive for a good balance between detail and simplicity.
• Character flaws are actually a good thing.
• Audiences can be sympathetic to characters that have a flaw or two.
• Even a little mouse may be so appealing that became a legend - a Mickey Mouse.

Key framing [V IMPT]


• Traditionally most of the animation was done by hand.
• All the frames in an animation had to be drawn by hand.
• Since each second of animation requires 24 frames (film), the amount of efforts
required to create even the shortest of movies can be tremendous.

• In Key framing technique, a storyboard is laid out and then the artists draw the
major frames of the animation.
• Major frames are the ones in which prominent changes take place.
• They are the key points of animation.
• Keyframing requires that the animator specifies critical or key positions for the
objects.
• The computer then automatically fills in the missing frames by smoothly
interpolating between those positions.
• A keyframe is a frame where we define changes in animation.
• Every frame is a keyframe when we create frame by frame animation.
• When someone creates a 3D animation on a computer, they usually don’t specify the
exact position of any given object on every single frame. They create keyframes.
• Keyframes are important frames during which an object changes its size,
direction, shape or other properties.
• The computer then figures out all the in-between frames and saves an extreme amount
of time for the animator.
Character Animation
Physics-Based Animation
Simulation uses the laws of physics to generate motion of pictures and other objects.
Simulations can be easily used to produce slightly different sequences while maintaining
physical realism.
Secondly, real-time simulations allow a higher degree of interactivity where the real person
can maneuver the actions of the simulated character.

Particle System: [VIMPT]


Rigid Body Dynamics:
Flexible Dynamics:

Fluid Dynamics:
Flocking:

Procedural Techniques / Procedural Animation: [VIMPT]


• In a procedural animation, the objects are animated by a procedure − a set of rules
− not by keyframing.
• 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.
• Used in video games.
Behavioral animation
In behavioral animation, an autonomous character determines its own actions, at least to
a certain extent.
This gives the character some ability to improvise, and frees the animator from the need
to specify each detail of every character's motion.
Performance Based (Motion Capture)
• In which magnetic or vision-based sensors record the actions of a human or animal
object in three dimensions.
• A computer then uses these data to animate the object.
• Motion capture is pretty popular with the animators mainly because some of the
commonplace human actions can be captured with relative ease.
• However, there can be serious discrepancies between the shapes or dimensions of the
subject and the graphical character and this may lead to problems of exact execution.
Groups of Objects.
Deformations
• Animation deformations are a process that are applied in the animation evaluation and
do not make permanent changes to the original object.
• The original object's parameters are retained but the object appears deformed
• This technology allows you to deform a character made out of one, or many, drawing
or image layers and make it move as if it were a cut-out puppet.
• It also allows you to take an area in a single bitmap image and create animation by
distortion.
• It can prove useful in many situations including cut-out animation. When paired with
your creativity, the Deformation Effect can produce some stunning results.
• There are 2 main types of deformer: Bone Deformer and Curve Deformer –
Skinning deformer
• The Bone Deformer is mostly used when animating the extremities of a character
such as arms or legs and will add fluidity and a natural feel to the animation.
• The Bone effect can be manipulated to rotate a limb at an articulation joint and to
also shorten or elongate the extremities of a limb.
• when editing curves, you can deform a straight line into an arc.
• The Bone Deformer allows you to create a basic or advanced skeleton structure in
which the parent deformer will move the child deformers.
• Curve Deformers are mostly used to animate elements that do not have joints, for
example hair or facial features.
Image Manipulation and Storage

Introduction: What is an Image?


• An image is nothing more than a two dimensional signal. It is defined by the
mathematical function f(x,y) where x and y are the two co-ordinates horizontally and
vertically. The value of f(x,y) at any point is gives the pixel value at that point of 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. An image map is a file containing
information that associates different locations on a specified image with hypertext links.
• A disk image is a copy of the entire contents of a storage device, such as a hard drive
or DVD. The disk image represents the content exactly as it is on the original storage
device, including both data and structure information. 3)
• Another use of the term image is for a section of random access memory (RAM) that
has been copied to another memory or storage location.
• Analog image processing: In this type of processing, the images are manipulated by
electrical means by varying the electrical signal. The common example include is the
television image.
• Digital image processing: The digital image processing deals with developing a digital
system that performs operations on a digital image. Digital image processing deals with
manipulation of digital images through a digital computer.
• DIP focuses on developing a computer system that is able to perform processing on an
image.
• The input of that system is a digital image and the system process that image using
efficient algorithms, and gives an image as an output. The most common example is
Adobe Photoshop. It is one of the widely used application for processing digital
images.
Digital image file formats: [Do full forms well] [VIMPT]
1. TIFF (also known as TIF), file types ending in .tif
• TIFF stands for Tagged Image File Format.
• TIFF images create very large file sizes.
• TIFF images are uncompressed and thus contain a lot of detailed image.
• TIFF is the most common file type used in photo software (such as Photoshop), as well
as page layout software (such as Quark and InDesign), again because a TIFF contains
a lot of image data.
2. JPEG (also known as JPG), file types ending in .jpg
• JPEG stands for Joint Photographic Experts Group, which created this standard
for this type of image formatting.
• JPEG files are images that have been compressed to store a lot of information in
a small-size file.
• Most digital cameras store photos in JPEG format, because then you can take
more photos on one camera card than you can with other formats.
• A JPEG is compressed in a way that loses some of the image detail during the
compression in order to make the file small (and thus called “lossy” compression).
3. GIF, file types ending in .gif
• GIF stands for Graphic Interchange Format.
• The compression is lossless
• GIFs also have an extremely limited color range suitable for the web but not for
printing.
• This format is never used for photography, because of the limited number of
colors.
• GIFs can also be used for animations.
4. PNG, file types ending in .png
• PNG stands for Portable Network Graphics.
• It also allows for a full range of color and better compression.
• It’s used almost exclusively for web images, never for print images.
• For photographs, PNG is not as good as JPEG, because it creates a larger file.
5. Raw image files
• Raw image files contain data from a digital camera (usually).
• The files are called raw because they haven’t been processed and therefore can’t
be edited or printed yet.
• There are a lot of different raw formats–each camera company often has its own
proprietary format.
• Raw files usually contain a vast amount of data that is uncompressed.
• Because of this, the size of a raw file is extremely large. Usually they are converted to
TIFF before editing and color-correcting.
6. GIF89a:
• It is an animated GIF image, formatted according to GIF Version 89a.
• One of the chief advantage format is the ability to create an animated image that can
be played after transmitting to a viewer page that moves - for example, a twirling icon
or a banner with a hand that waves or letters that magically get larger.
• A GIF89a can also be specified for interlaced GIF presentation.
7. SVG:
• SVG is Scalable Vector Graphics, the 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, whether the small screen of a smartphone or a large widescreen display in
a PC.
• Files usually have .svg extension.
Image compression [VIMPT]
• Image compression is the method of data compression on digital images.
• The main objective in the image compression is:
• Store data in an efficient form
• Transmit data in an efficient form
• Image compression can be lossy or lossless.

JPEG compression [VIMPT]


• JPEG, which stands for Joint Photographic Experts Group (the name of the
committee that created the JPEG standard) is a lossy compression algorithm for
images.
• A lossy compression scheme is a way to inexactly represent the data in the image,
such that less memory is used yet the data appears to be very similar. This is why
JPEG images look almost the same as the original images they were derived from most
of the time, unless the quality is reduced significantly, in which case there will be visible
differences.
• The JPEG algorithm takes advantage of the fact that humans can't see colours at
high frequencies. These high frequencies are the data points in the image that are
eliminated during the compression. JPEG compression also works best on images
with smooth colour transitions.
• JPEG uses transform coding, it is largely based on the following observations:
• A large majority of useful image contents change relatively slowly across
images, i.e., it is unusual for intensity values to alter up and down several
times in a small area, for example, within an 8 x 8 image block. A
translation of this fact into the spatial frequency domain, implies,
generally, lower spatial frequency components contain more information
than the high frequency components which often correspond to less useful
details and noises.
• Experiments suggest that humans are more immune to loss of higher
spatial frequency components than loss of lower frequency components.
Human vision is insensitive to high frequency components.
JPEG Compression Algorithm:
• First step is to divide an image into blocks with each having dimensions of 8 x8.
• Let’s for the record, say that this 8x8 image contains the following values.
• [Hint: Do not by heart the values, draw 8x8 Matrix and fill it with numbers from
0 to 255]

• The range of the pixels intensities now are from 0 to 255. We will change the range
from -128 to 127.
• Subtracting 128 from each pixel value. After subtracting 128 from each of the pixel
value, we got the following results.
[Hint: don’t calculate for complete matrix just for few values as per the values you
have considered in above step.] for Eg if you number in matrix 1 is 52 then new
value will be [52-128]= -76
-76 -73 -67
-65 -69 -73
-66

• Now we will compute using this formula. DCT

• The answer of DCT [Discrete Cosine Transform] will be stored in Aj,k


• There is a standard matrix that is used for computing JPEG compression. This
matrix is also called as Luminance Matrix. Given by Q j,k.
• Now use the formula below:
[Hint: Write a similar matrix as above with majority numbers zero… ]

• Now we will perform the real trick which is done in JPEG compression which is
ZIG-ZAG movement. You have to perform zig zag until you find all zeroes ahead.
• The zig zag sequence for the above matrix is shown below.


• Hence our image is now compressed.
Summarizing JPEG compression
• The first step is to convert an image to Y’CbCr and just pick the Y’ channel and
break into 8 x 8 blocks.
• Then starting from the first block, map the range from -128 to 127.
• After that you have to find the DCT of the matrix.
• The result of this should be quantized.
• The last step is to apply encoding in the zig zag manner and do it till you find all
zero.
• Save this one dimensional array and you are done.
Image Processing:

Enhancement methods in image processing


• 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.
Contrast stretching [VIMPT]
• Contrast stretching (also called Normalization) attempts to improve an image by
stretching the range of intensity values it contains to make full use of possible
values.
• Idea behind Contrast stretching is to increase the dynamic range of gray levels in
an image being processed.
• contrast stretching is restricted to a linear mapping of input to output values.
• Image enhancement techniques have been widely used in many applications of image
processing where the subjective quality of images is important for human interpretation.
• In other words, contrast is the difference in visual properties that makes an object
distinguishable from other objects and the background.
• contrast is determined by the difference in the colour and brightness of the object with
other objects.
• Our visual system is more sensitive to contrast therefore, we can perceive the world
similarly regardless of the considerable changes in illumination conditions.
Histogram Equalization [VIMPT]
SUM:
Smoothing [Average] and Median Filtering

Smoothing Filters: Average Filters: [VIMPT]


Median Filters: [VIMPT]
Example of Median Filter: IMPT
SUMS: [VIMPT]

You might also like