Video&Animation

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

6thSem BCA/CS

Even sem 2023-24


Graphics & MultiMedia
UNIT 5
Unit:5 VIDEO AND ANIMATION 12 hours
• 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.
• Principles of Multimedia, Ranjan Parekh, 2007, TMH Chapter 9
& 10
INTRODUCTION TO MULTIMEDIA
• Two terms 1) Multi – more than one
• 2) Media – indicates a) Distribution tools &
information presentation
• Distribution tools includes STORAGE, CAPTURING,
HARDWARE etc
• Information presentation includes text,
animation,image ,graphics, A/V
• Unimedia means only one presentation (text only etc)
• While multimedia depicts many streams of media
Various media
• Text (e.g. books,letters,newspapers)
• Images and graphics (e.g. photographs,charts,maps,logos,sketches)
• Sound (e.g. radio, gramophone records and audio cassettes)
• Video and animation (e.g. TV, video cassettes and motion pictures)
EXAMPLE OF MULTIMEDIA
•WEBSITE
•VIDEOCONFERENCING
•YOUTUBE PRESENTATIONS
•ANIMATION MOVIES
Meaning of multimedia
•Integration of many types of media on a single
unit
•Computer information may be represented as
Audio, video, text, image etc
•Is a software technology that combine various
media like video, images, audio etc… either in
separately or in combination using a computer
ELEMENTS OF MULTIMEDIA
DEFINITION OF MULTIMEDIA

•Multimedia is combination of text, graphics,


A/V, animation etc that is delivered
interactively to the user by electronically or
digitally manipulated devices
VIDEO
• What is video? - MOTION MEDIUM OF IMAGES &
SOUND
• Video is a recording or presentation of an image or of
moving images
• Eg: 1) Home video of a wedding
• 2) Youtube video of a tutorial
• Video is the next medium after text, image and audio
• Combines sequence of images & associated audio.
VIDEO - EXPANSION OF THE LETTERS
• V- VISION
• I -INTERACTION
• D – DIMINUTION
• E – ELECTRONICS
• O – OPERATE
VIDEO RECORDING & SAVING
• STORAGE DEVICES:
• 1) DVD – Digital Versatile disc
• 2) SSD - Solid State Drive
• 3) Flash memory
• 4) Memory Stick & Card
• 5) Floppies & Hard Disk
• 6) Cloud Storage
EXAMPLES:
Video data
• Major difficulty in handling video files is SIZE , so compression is
essential (GB or TB range)
• Earlier, Video data was captured by Analog camera , then by
advanced digital Video cameras
• Digital video cameras had electronic sensors called CCD (Charge
Coupled Devices)
• Cameras were monochrome (single)and polychrome (multi-
color)
• Color cameras uses RGB components for producing Combined
COLORS
VIDEO ADAPTER
• This takes video data from VRAM (video RAM) to channelize &
send it to video monitor
• This is a hardware that have processing power
• This processing system takes video signals to monitor screen
• So Video data must be compressed using compression
algorithms
• Compression may be carried out by means of h/w and/or s/w
• Some popular video compression algorithms:FFV1,H.264
Lossless & Lagarith
Video signals….
• COMPOSITE Video are transmitted (eg: TV
transmission)
• Signals have 2 transformances -1) Luminance
information 2) Chrominance Information
• Luminance is Brightness factor
• Chrominance is Color factor
• Composite video are transformed on to a single
channel/cable
ADJUSTABLE PARAMETERS
•Brightness
•Contrast
•Color
•Frame Dimension
•Frame Rate
Video Data Standards
• Parameters like color, brightness have to be
standardized
• Various standards:
• ITU-R (ITU Radiocommunication Sector)
• ATSC (Advanced Television Systems Committee)
• DVB (Digital Video Broadcasting)
• SMPTE (Society of Motion Picture & Television
Engineers
WHAT IS VIDEO-EDITING SOFTWARE?
• To modify & enhance the quality of video
• Video parameters which are adjustable are acted by
this software
• Brightness, contrast, color, frame dimensions ,frame
rate etc. are manipulated
• After video is edited by these software , it is saved in
various formats
• These formats may be AVI, MOV, MPEG
MOTION VIDEO
• Combination of image & audio
• Still images called frames displayed to the user
• Frames are shown in a series at a speed called frame
rate
•Fps – Frames per second is the measure of frame
rate
ILLUSION OF MOTION

•Due to persistence of vision, moving


frames causes an illusion of motion
•Frame rate must be 20 and 30 per
second
•Audio is added and synchronized with
movement of images
EXAMPLE - ILLUSION OF MOTION
ANALOG VIDEO CAMERA
•Used to record a succession of still images
•Converted to brightness & color information of
the images into electrical signals
•Signals are transmitted to one place to another
(Wired/Wireless)
•At the receiving end, these signals are
re-converted to images
More on Analog cameras…
•An analog camera is a traditional camera used in
CCTV systems.
•It sends video over cable to VCRs or DVRs.
•IP cameras are all digital cameras
•Stored in the Internet
•Many security camera systems today are hybrid
WORKING ….
• They record images to a video recorder and send them
through a cable to a Digital Video Recorder (DVR).
HOW TO CHOOSE A SUITABLE CAMERA?
1. Purchase cost & Running cost
2. Factors like weight, portability & methods
of mounting
3. Features like Controls, Zooming &
facilities
4. Performance: Resolution, color quality,
noise reduction, stability..
TRANSMISSION OF VIDEO SIGNALS
COMPOSITE VIDEO – CONNECTOR
S-VIDEO
S-VIDEO – HOW IT IS CARRIED?
TV BROADCASTING…
TV SYSTEMS
• MAJOR TV SYSTEMS:
• 1) NTSC – National Television System Committee
• Used in Korea, Japan, Canada, North America etc
• Set up in 1940 in the US
• Each NTSC video frame has:
• 525 horizontal lines
• 30 frames/sec
PAL (Phase Alternation Lines)
• Popular TV Broadcasting standard
• Europe, Asia, Africa & Australia
• In 1967, by Mr. Walter Bruch at Telefrunken, Germany
• PAL system uses:
• 625 horizontal lines
• 25 frames/second
• 2 fields / frame
• contains variants like B, G, I, D, N, Nc
PAL…
• Uses a luminance and chrominance part in video signal
• Luminance component is called Y
• Chrominance part has 2 sub-components U (4.43 Mhz) & V (4.43
Mhz)
• U is In-phase & V is quadrature and they are amplitude-modulated
• PAL have lots of variants (PAL-B,PAL-G,PAL-G, …etc) differing in
bandwidth/sound carrier etc..
SECAM
• Sequential color with memory
• Broadcasting standard in Russia, France , Middle East
• 625 horizontal lines/frame and 25 frames/sec
• SECAM transmits only one color signal at a time, whereas NTSC & PAL
transmits 2 color signals at a time
• NTSC & PAL uses amplitude modulation to encode chroma but SECAM
use frequency modulation
• NTSC & PAL lumina is one component Y, but SECAM lumina has 2 sub-
components, Db and Dr
COMPOSITE VIDEO….
PC VIDEO - OVERVIEW
Video in PC
• Videos need to be converted to digital format for
recording/editing/broadcasting
• Issues in PC videos:
• Huge file sizes
• Processing power (Pentuim – II with fast disks)
• Prices of compression hardware & software
• Demand of higher bit-rate
• Quality maintenance needed (like Medical Analysis)
• Installing capture card in PC end
• Efficient A/D and D/A converter
PC Video - Features
• PC screen must avoid any distortion in rendered
display
• Depends on good horizontal addressability & sampling
rate in NTSC/PAL/SECAM etc..
• V-Signals are sampled from camera before sending
them to PC
PC video procedures requires:
•Source devices
•Video capture cards
•Video capture software
•Signal Connectors
•Video standards
PC video recording systems
CAMCORDER RECORDER - VIDEO
SOURCE DEVICE
• Source is the media on which video is recorded (example: TAPES)
• Recording conforms to standards like NTSC/PAL/SECAM
• Compatible source device is needed to play back it.
• Output signal fed to PC as Component video / composite video/S-
Video
• Example of source & source device:
• 1) camcorder with pre-recorded video tape
• 2) VCP with pre-recorded video cassette
• 3) Video camera with live footage
VIDEO CAPTURE CARD (frame grabber)
• U card with features to handle audio-video inputs and A/D & D/A
conversions
• Supports formats (NTSC/PAL) with desired complexities in design
• A circuit board have:
• 1) Video input port (accepts NTSC/PAL/SECAM input signals)
• Most of these cards support Interfaces like HDMI
• 2) Compression-decompression hardware for video
• 3) Compression-decompression hardware for audio
VIDEO CAPTURE CARD - HDMI
CIRCUIT BOARD OF CAPTURE CARD HAS:
• Video input port (accepts NTSC/PAL/SECAM input signals)
• Most of these cards support Interfaces like HDMI
• Compression-decompression hardware for video
• Compression-decompression hardware for audio
• A/D and D/A conversion
• Audio input/output ports
• Frame buffer to store converted video
• Hardware acceleration chip
VIDEO CAPTURE SOFTWARE
• Comes with capture hardware
• A/V output is defined by certain parameters called tuning parameters:
• 1) Frame rate
• 2) Brightness / Contrast
• 3) Color controls
• 4) Frame size of video
• 5) Sampling rate
• 6) compression scheme
• 7) Audio volume
VIDEO CAPTURE SOFTWARE
Usage of capture software
• AVI utility allows user to handle and save video data in AVI files
format
• Suited to small volume files where no compression is needed
• Play-back done with Windows media player/ Real Player
• User can prefer to convert these captured AVI files to MPEG through
MPEG compression algorithm ( AVI-to-MPEG converter utility)
• Windows Media player will properly playback MPEG videos
• MPEG Capture cards area available for large volume video files
Capture software…….
• DAT to MPEG converter takes DAT files from Video-CD to translates to
MPEG for editing tasks (with MPEG Editor)
• Tasks of editing:
• 1) Fix Start/End of video clips
• 2) Transition effects
• 3) Sub-titling
• 4) Joining multiple portions
CONNECTION SCHEME
• This has a source and source device (example VHS tape & VCP)
• Source device will have A/V input & output ports as its part of scheme
• Audio systems include speakers, microphones, Audio jacks, cables,
sound cards etc
• Similarly video systems has also such connection schemes
VIDEO SIGNALS & CONNECTORS
• IEEE 1394 (FIREWIRE) CONNECTOR – Supported by
Apple Computers
• DVI CONNECTOR – Digital Visual Interface
• HDMI CONNECTOR – High definition multimedia
Interface
• SDI CONNECTOR – Serial Digital Interface
IEEE 1394 (FIREWIRE) CONNECTOR
DVI CONNECTOR
HDMI CONNECTOR
SDI CONNECTOR
CODEC IN VIDEO SYSTEMS
WHAT IS CODEC?
• Short form of compression/decompression or Coder/decoder
• After a digital file is produced, it is a RAW or UNCOMPRESSED data
• CODEC software reduces its size by some filtering and such process
• Once its compressed & stored , it may be played back by
decompressing by CODECs
• Playback devices cannot directly handle decompressed files
• But decompressed files may not be 100% identical as uncompressed
original file
• Decompression happens in memory/Buffer of Computers
HOW A CODEC WORKS?
LOSSLESS & LOSSY COMPRESSION
• Compression focuses on redundant information in the media file
• These reduceable information may be either discarded or expressed
compactly
• First type of redundancy is lossless compression & second type is Lossy.
• Lossless CODEC will reproduce the original file from the compressed file to
an almost 100% originality
• The algorithms will not discard any data without any quality degradation of
content
• Areas: Health informatics, Medical diagnostics (X-Ray imaging,ultra
sonography)
LOSSY CODEC
• Sometimes any small changes in content reproduction is
allowable due with respect to cost of purchase and maintenance
• LOSSY CODEC may bring slight changes when reproduced with
decompression
• Here human eye or ear may sense well to make up the
differences
• LOSSY CODECs has compression ratios of the order 10 – 50
percent
• Areas like educational or corporate presentations, Web page
content
Statistical & Perceptual Redundancies
• Some redundancy occur due to the statistical relationship of media
data within
• Example: Repeated letters in text document etc,.
• There is a statistics in repeated patterns
• But perceptual redundancies originate from human sensory
perceptions.
• Some sound can be discarded without affecting perfection
• Some visuals human eye can make out without finishing
COMPRESSION MEASUREMENTS
• Compression ratio will quantifies the amount of compression
• Ratio of uncompressed size : compressed size
• Example: 10 MB file reduced to 4 MB due to compression = 2.5 : 1
• Compression factor denotes inverse of compression ratio.
• example 2.5 : 1 is inversed as 0.4
• Space savings : representation of size reduction… 60% indicates
that by 10MB gets reduced to 4 MB, 60% space is saved
• Other techniques in Compression are variable-length encoding,
Entropy, Differential encoding
Lossless compression techniques *
• Also called entropy coding (GENERIC TERM)
• Treats data as sequences of bits to compress media
data (image/text/sound/video)
• Various methods are used to achieve lossless
compression
Types in Lossless compression *
• Run-Length Encoding (RLE)
• Differential Coding
• DPCM
• Adaptive DPCM
• Delta Modulation
• Lempel-Ziv Coding (LZ) coding
• Shannon-Fano Coding
• Huffmann coding
LOSSY COMPRESSION
•Also called source coding or perceptual coding
•HUMAN sensory abilities are used
•Human brain can cognize, imagine and extend
ideas
Lossy compression algorithms *
• Discrete Fourier Transform (DFT)
• Forward and Reverse Transform DFT
• Discrete cosine transform (DCT)
• Forward and Reverse DCT
IMAGE COMPRESSION
• On image data for easy storage
• Areas like
• 1) Multimedia presentations
• 2)Slide shows in Kiosks
• 3) CD/DVD applications
• 4)Photo galleries
• 5)Online museums
• When image quality degrades, defects called artifacts
• Both lossless & lossy compression
ANIMATION
• Created from a sequence of still images – which is changed from the
previous image
• This successive display FOOLS the human eye & brain to feel a motion
• This is called STOP-MOTION ANIMATION
• Created by artists – Lead artists / Experts – draws frames called key-
frames. This process is called tweening
• Tweening needs much work and is time-consuming
• Computers do this by reducing time/effort and makes drawings
accurate. They use animated-GIF and Flash-SWF to view in
Internet/PC
USES OF ANIMATION
• Animation involves moving still pictures that creates viewer
interests and impresses them.
• Examples:
• Piston motion in IC engine
• Movement of sub-atomic particles
• Movement of planetary bodies
• Flight simulators of Aircraft/Guided missiles
• Fluid-flow simulations
• Chemical plant simulation
TYPES OF ANIMATIONS
•Key frames & Tweening
•Cel animation
•Stop-motion animation
•Flipbook animation
•Motion Cycling
Key frames & Tweening
• Key frames define the action changes and these key
frames are drawn by Animators/Experts
• Assistant experts produces intermediate frames
• This process is tweening
• Key frame-1, key frame-2,.... like
• About 24 frames/second is suitable frame rate
• Digital frames & tweens can be created by
Computers
CEL ANIMATION
•Derived from traditional animation
•Cel is a word from celluloid (transparent
piece of film)
•Old time movies & cinemas
•Layered scheme is followed with
foreground & background cels
Stop-Motion animation
•Frames with small increments into
moving effect
•Computers can create & employ
frames for stop motion
•Example: Animating clay-figures in
small increments
FLIPBOOK ANIMATION

•Book with flip pictures changing


gradually in series as turned rapidly
•Flipbook animation example is
illustrated text for school children
•Uses human eye quality of persistence
of vision
MOTION CYCLING

•Motions like walking, running, flying


etc..
•A cycle represents a repetitive action
•A walk cycle denotes 8 to 12 frames
•This sequence divided into 2 halves –
frame 1 to x and frame x+1 to max
PRINCIPLES OF ANIMATION
• Traditional drawings (animation) was seen initially
like in Walt Disney Studio during 1930s
• 1) Squash & Stretch
• 2) Staging
• 3) Follow-through & overlapping
• 4) Slow-in & Slow-out
• 5) Arcs
• 6) Timing
Computer-based Animation
•Important animations are:
•Frame-based Animation
•Path-based Animation
•Transformations
•Shape changes
Frame-based Animation
•Key-frames & in-between frames are created by
Computing workstations
•Reduces the laborious work of artists
•Playback done with these frames by varying
position, size, orientation, color
•In-between frames created by INTERPOLATING
other frames
Path-based Animation
•Path of objects are animated
through straight-lines or curve
(using PC)
•Object images moved along specific
paths called SPLINES
Transformations
•3 basic transformation upon objects:
•TRANSLATION: moving an object in straight-line
in any direction along screen
•ROTATIONS: changing the orientation of an
object in angular manner in
clockwise/anticlockwise direction
•SCALING: object magnification or shrinking
Shape changes
•Altering shapes by reforming or deforming
the pictures
•Mathematical modelling available
RENDERING ALGORITHMS
• Well thought procedure for visualizing the output
• Rendering needs much time and space
• Forms of RENDERING:
• 1) WIRE-FRAME RENDERING
• 2) HIDDEN LINE RENDERING
• 3) SHADED RENDERING
WIRE FRAME RENDERING
HIDDEN LINE RENDERING
SHADED RENDERING
WIRE-FRAME RENDERING

•Object made up of only lines, no surfaces


•Straight / curved lines
•Fast rendering task
•Small memory needed
HIDDEN LINE RENDERING
• Advanced form of wire-frame rendering
SHADED RENDERING

You might also like