Lecture Two Compression & File Specification Standards.

Slides:



Advertisements
Similar presentations
3.01C Multimedia Elements and Guidelines 3.01 Explore multimedia systems, elements and presentations.
Advertisements

2 Information Processing
Sounds, Images & Other Objects Website Production.
Chapter 9 Integrating Video. Digital video is a series of bitmap images that, when played back, create the illusion of movement. The quality and overall.
T.Sharon-A.Frank 1 Multimedia Size of Data Frame.
Guilford County SciVis V106.01
V Obtained from a Guildford County workshop-Summer, 2014.
Welcome to a New Quarter Class Rules and Responsibilities What will be learning? 106-Static and Dynamic Visualization 105-Synthesize Data for SciVis Video-Real.
1 Different Video Properties
Image Compression CSC CSC Computing with Images2 How do we use fewer bytes to encode the same or similar information? Reduce redundancy Take.
I Power Multimedia Technology Video Data. Video data Video is a sequence of individual pictures or frames, taken one after another. These are played back.
+ Video Compression Rudina Alhamzi, Danielle Guir, Scott Hansen, Joe Jiang, Jason Ostroski.
Nat 4/5 - Software Design and Development – Low Level Operations - 1 National 4/5 – Computing Science Information Systems Design and Development Media.
Digital Video An Introduction to the Digital Signal File Formats Acquisition IEEE 1394.
Skill Area 212 Introduction to Multimedia Internet and MultiMedia for SC 2.
Using Multimedia on the Web
Media File Formats Jon Ivins, DMU. Text Files n Two types n 1. Plain text (unformatted) u ASCII Character set is most common u 7 bits are used u This.
School of Computer Science & Information Technology G6DPMM - Lecture 4 Graphics & Still Image Representation.
1 Digital Video. 2  Until the arrival of the Pentium processor, in 1993, even the most powerful PCs were limited to capturing images no more than 160.
Lecture 10 Data Compression.
CS 1308 Computer Literacy and the Internet. Creating Digital Pictures  A traditional photograph is an analog representation of an image.  Digitizing.
Graphics and Multimedia Foundation Computing The beatings will continue until morale improves.
What are the common format for video files?
Digital Camcorder and Video Computer Multimedia. Two most important factors that make up a video Frames per second ( fps ) The resolution ( # of pixels.
Module Code: CU0001NI Technical Information on Digital Images Week -2.
Multimedia Data Video Compression The MPEG-1 Standard
Video Basics. Agenda Digital Video Compressing Video Audio Video Encoding in tools.
MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.
 Refers to sampling the gray/color level in the picture at MXN (M number of rows and N number of columns )array of points.  Once points are sampled,
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
2.02G Publishing Animated Videos 2.02 Develop Computer Animations.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2011.
1 CP Lecture 8 PC and Media exchange standards.
DIGITAL Video. Video Creation Video captures the real world therefore video cannot be created in the same sense that images can be created video must.
Common file formats  Lesson Objective: Understanding common file formats and their differences.  Learning Outcome:  Describe the type of files which.
Video.
GIF - Graphics Interchange Format JPEG - Joint Photographic Experts Group PNG - Portable Network Graphics GIF images are limited to the 8 bit palette which.
Data Compression. Compression? Compression refers to the ways in which the amount of data needed to store an image or other file can be reduced. This.
Still-image compression Moving-image compression and File types.
Information Processes and Technology Multimedia: Graphics.
File Formats Different applications (programs) store data in different formats. Applications support some file formats and not others. Open…, Save…, Save.
File Format. Graphics file Format GIF (Graphics Interchange Format) JPEG (Joint Photographic Experts Group) PNG (Portable Network Graphics) TIFF (Tag.
Rick Parent - CIS681 Background Perception Display Considerations Video Technology.
Rick Parent - CIS681 Background Perception Display Considerations Film and Video, Analog and Digital Technology.
File Format. Graphic file Format GIF –cross-platform compatibility –developed by CompuServe as a common format for exchanging bitmapped images between.
Multimedia Basics (1) Hongli Luo CEIT, IPFW. Topics r Image data type r Color Model : m RGB, CMY, CMYK, YUV, YIQ, YCbCr r Analog Video – NTSC, PAL r Digital.
CSCI-100 Introduction to Computing Hardware Part II.
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
Chapter 6:Graphics & Multimedia. “ MULTIMEDIA is a seamless integration of data, text, image of all kinds and sound within a digital environment. ” FELDMAN,
MULTIMEDIA Multimedia is the field concerned with the computer- controlled integration of text, graphics, drawings, still and moving images (Video), animation,
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
Information Systems Design and Development Media Types Computing Science.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
AMCOM Digital Archive Design Review - Week 4.
Video Basics.
Chapter 3 Graphics and Image Data Representations
Background Perception Display Considerations Video Technology.
Sci Vis I Exam Review Unit 6 File Formats.
VIDEO.
Chapter 3 Image Files © 2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
A computer display is made up of small squares, called pixels.
Image File Size and File Compression
1.01 Investigate graphic types and file formats.
3.01F Publishing Animated Videos
Web Design and Development
Multimedia Production
(c) V/2-Com (Verhaart) Multimedia Elements & standards 4/15/2019 (c) V/2-Com (Verhaart)
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Presentation transcript:

Lecture Two Compression & File Specification Standards

2 Last week We looked at: –Raster and vector graphics –Implications for multimedia Use of colour Image size

3 Overview By the end of this lecture you will be familiar with: Compression standards –Lossy –Lossless File specification standards –Main types used in multimedia –Where and when best used

4 Image Storage/Retrieval  Fundamental requirement of graphics system software –basic operation: saving the values contained in the frame buffer directly to file note: colour table values may also have to be stored –512x512x8-bit image requires 256kbytes –animated sequences may require such frames of data per second

5 Image Compression/Coding  To decrease the amount of storage space required –Lossy techniques (e.g. JPEG) apply some filter function to the image which reduces the quantity of data, but cannot reproduce the original image –Lossless techniques (e.g. BMP’s RLE, TIFF’s LZW) Lossless refers to compression schemes that conserve space on disk without sacrificing any data in the image original image is always reproduced Slows down the open and save operations

6 Lossless technique: Run-Length Encoding  Uses principle of scanline coherence –if one pixel on a scanline is of a certain colour, the next is likely to be of the same colour –store scanline data as (colour, number) pairs, where number counts the consecutive pixels of the same colour –storage requirements increase as run lengths get smaller

7 Example An image consists of 8x8 pixels

8 4 bits/pixel WW W W G B R R WW W W R R R R WW W W G B R R WW W W R R G G WR R G B B R R RR R B B B B B BB R R G B G G BB R R R R G G 8x8 image x 4 bits/pixel = 256 bits

9 Run Encoding W4G1B1R2 W4R4 W4G1B1R2 W4R2G2 W1R2G1B2R2 R3B5 B2R2G1B1G2 B2R4G bits (colour)+ 3 bits (number) = 196 bits

10 Quadtree Encoding Uses principle of pixel coherence –2D variation on scanline coherence –image is recursively subdivided (quartered) into homogenous areas (areas of constant colour) –image is stored as a tree structure where root node represents the entire image leaf nodes represent regions of constant colour non-leaf nodes each have 4 children representing the area subdivision

11 Example WW W W G B R R WW W W R R R R WW W W G B R R WW W W R R G G WR R G B B R R RR R B B B B B BB R R G B G G BB R R R R G G 8x8 image, 4 bits/pixel = 256 bits

12 Quadtree Encoding W R B R B G G B R R G B R R R R G G W R R R R G R B R R B B G B R R 45 5 bits = 225 bits

13 Compression Ratios Definition: CR=Uncompressed image size Compressed image size In previous examples: Run-length CR=256/196= 1.3 Quadtree CR=256/225= 1.14

14 Discrete Cosine Transform (DCT)

15 JPEG Compression Pixel blockingDCTQuantisationRLE Huffman coding Data packing

File Specification Standards

17 Standards - Why Bother? Portability –platform independence –programmer portability Not tied to proprietary formats –cost –availability Problem of plethora of standards –e.g. Photoshop supports more than 20 file formats

18 Common image file formats BMPrasterwidely usedBMP - Windows Bitmap is native format for Microsoft’s Paint - Supports lossless compression using RLE (Run-Length Encoding) - Images with up to 16 million colours GIF rasterInternet useGIF - CompuServe’s GIF (Graphics Interchange Format) - Means of compressing files for quick transfer over modem - Supports lossless compression using LZW (Lempel-Ziv-Welch) - Images limited to only 256 colours

19 Common image file formats cont… JPEGrastercompressedJPEG - Format named after the people who designed JPEG (Joint Photographic Expert Group) - Lossy compression scheme i.e. scarifies image quality to conserve space on disk – Data lossess can be controlled in Photoshop - Evaluates image in 8  8-pixel blocks using ADCT (Adaptive Discrete Cosine Transform) - Best use for photographs PNGrasterinternet usePNG - Introduced to replace.gif - Has a number of advantages over.gif

20 Common image file formats cont… TIFFrasterlarge standard - Aldus in early days of Mac to standardise the growing population of scanned images developed TIFF (Tagged Image File Format) - Widely used format both in Mac and PC platforms - Uses lossess compression techniques such as LZW, ZIP as well as lossy technique such JPEG. SWFvector Used by FlashSWF -vector graphics standard used to create animations for the web WMF / CGMvectorspecialist use

21 Common video file formats MPEG / MPG / MPV AVI MOV - QuickTime™ many other proprietary formats - e.g. Cinepak®, Intel Indeo®

22 Common audio file formats WAVsampled analogue sound AIFF AU MIDIrecords keys / instruments / time MP2 / MP3audio track from MPEG RA / RAMRealAudio streaming technology

23 The BMP file format Basic need to store pixel values - but what do they mean? Colour Look-up Table (CLUT) Pixel Value RGB Value Output Device

24 Elements of the file specification Initial identifier: BM Size of the file - allows for quick check Offset through the header to the pixel data Width & height of the bitmap, in pixels Number of bits per pixel Type of compression in use (if any) Pixels / metre in ‘x’ and ‘y’ dimensions

25 More elements Number of colours in the CLUT Number of important colours CLUT + pixel data follows Questions Why is each element included? Are there any limitations to a BMP?

26 Image & Video Coding Standards JPEG (Joint Photographic Experts Group) MPEG (Motion Picture Experts Group) –MPEG I used by the Video CD standard –MPEG II in wide use, digital TV broadcast and DVDs –MPEG IV for multimedia, MPEG VII for description –MPEG-21 for multimedia framework, started June '00

27 An MPEG Example

28 Video Coding - MPEG I-pictures (intra-coded picture) –used at the start and at cut frames P-pictures (predictive coded picture) –block(s) within the picture reference the previous picture B-pictures (bi-directional predictive coded pictures) –require info from the previous and next pictures in order to draw themselves

29 An MPEG Example

Video & Video Encoding

31 Video on Demand Theoretically requires huge bandwidth, but… Start the same movie every x minutes (BSkyB) Change the frame-rate to make movie fit slot –airline favourite Can allow viewer to pause and resume viewing Future trend for cable & satellite

32 What is video? Flick books are a sequence of still images Cine-film is a sequence of still images (frames) –objects are moved slightly between frames –when shown in rapid succession => movement Cine-film shot at 24 fps (frames per second) –projected at 48 fps to reduce flicker close to screen Video is a digital version of cine-film at ~25Hz

33 Frame Rate Number of images recorded per second Easy to reduce frame rate for playback Can ‘get away with’ 12 fps (poorer quality) –depends on the speed of the action in the video Lower frame rates often used for video conferencing Trade off in the use of bandwidth

34 Bandwidth A measure of the capacity of a communications channel Typical values: –56kbps (bits per second) for modern modem –64kbps for single ISDN channel (128k for ISDN2) –384kbps for 6 ISDN channels (video conferencing) –need ISDN30 to reach MegaStream link (c. 2Mbps)

35 Example 1 56kbps modem connection 25Hz frame rate => 56/25 = 2.24kb per frame Assume 8-bit colour depth => 2.24/8 = 280 pels Image size of about 20x14 pixels (useless!) [More typical is 192x144 pixels (8-bit depth) at frame rate of 8 fps using compression of ~30:1 to fit the bandwidth.]

36 Example 2 ISDN6 offers 384kbps. How might this be used in video conferencing? Full duplex => 384 / 2 = 192kbps each way OPTION 8fps (30:1, 8-bit pels) OPTION 25fps (29:1, 8-bit pels) Exercise:Assuming same conditions, what bandwidth would be required to support full-screen conferencing at 25fps?

37 Example 3 An AVI file is 1.9MB in size. How long will it take to download this over a 56kbps modem? 56kbps = 56,000 bits per second 1.9MB = 1.9 * 1024 * 1024 * 8 = 15,938,355 b Time = / = 285 s (4m 45s) (Assumes perfect connection and full bandwidth.)

38 Video Encoding PAL - UK television standard –768 x 576 resolution (much less in practice), 25fps NTSC - US television standard –640 x 480 resolution (again, less when in use) 29fps SECAM – France and eastern europe, far east –768 x 576 resolution (again, less when in use) 25fps

39 Frame grabber Card of electronics required for direct input of video into a computer system ‘Grabs’ an image of a set resolution at a set frame-rate, e.g. 192x144 at 15Hz Stores the image in digital form on hard disk Compression or other encoding up to software Match of framegrabber and camera required

40 Review Image compression techniques –Lossy and lossless –Run length encoding & Quadtree Common Image standards MPEG Video on demand