LECTURE 2A: ANALOGUE TO DIGITAL EVI INDRIASARI MANSOR Tel ext:
Outline Digital Data Digitization Compression Data representation of different media Images Video and Animation Sound Text Interactivity Metadata 2
Learning Outcomes Able to describe the binary numbering system and its relation to the digital data Able to explain the digitization process Able to elaborate the digital representation for multimedia elements 3
Based on material from Digital Multimedia, 3 rd Edition Published by John & Sons, 2009 © 2009 Nigel Chapman & Jenny Chapman These lecture slides © 2009 Nigel Chapman & Jenny Chapman All figures © MacAvon Media Productions 4
Analogue and Digital Signals Analogue Represented by a continuous function Eg.: Analogue sound – finite amount of information (waves) Digital Represented by a discrete set of values defined at specific instances of the input domain (time/space or both) Eg.: Digital sound – finite series of instantaneous pulses which are measured at distinct interval of time 5
Analogue and Digital Signals (cont) 6
Multimedia in Digital Form The production and consumption of multimedia depends on the ability of computers to perform operations at high speed In order to benefit from this ability, media must be in digital form The rich variety of sensory inputs that make up images, text, sound, animation must be reduced to patterns of binary digits inside a computer Programs can be used to change, combine, store, display, interact with media all types Data can be distributed anywhere in the world or conveyed to remote destinations on removable storage (CDs, DVDs or Flash drives) 7
A Multimedia System Today 8 Multimedia Content creation Compression & media encoding Distribution via networks Different instruments capture different media types in digital format S/W & H/W Assembly Storage Media server Cell Phone PDA Console Computer TV Cable Modem Wireless Wi-Fi Hotspots Satellite Advertising Digital Rights Management Subscriber Management Watermarking Encryption
Digital Data Computers are built out of device that store and operate on bits Bits are units of data that can only have one of two values (0 or 1 / on or off / true or false) Bits are usually groups into larger units such as bytes which consist of an ordered sequence of eight bits 9
Digital Data (cont) Binary System Binary number consists of 0 and 1 and is fundamental to computer Can be represented in decimal and hexadecimal for readability > > 6A 16 Used to represent characters, colors and etc 65 = A, 66 = B 106 = j Other: brightness of an image or instantaneous amplitude of a sound wave 10
11 ASCII Table – American Standard Code for information interchange. Computers only understand Numbers, so an ASCII code is the numerical representation of a character.
Digital Data (cont) Groups of bits can be interpreted as numbers to base 2, but can also be treated as characters, colours, etc 12
Digital Data (cont) 13
Digital Data (cont) 14
Digital Data (cont) Decimal to Binary Conversion (example 1) ___________________ ___________________ ____________________
Digital Data (cont) 16 Decimal to Binary Conversion (example 2) ___________________ ___________________ ____________________
Digital Data (cont) Another more fun way (I think…) Task: Conver to its binary representation
Digital Data (cont) 18
Digitization Analogue data must be converted to digital form before it can be manipulated by a computer program Digitization is the process of converting a signal from analogue to digital form 19
Digitization (cont) Digitization comprises two operations Sampling Quantization 20 An Analogue Signal Sampling & Quantization
Digitization (cont) Sampling Measuring the signal’s value at discrete intervals The continuous signal is reduced to a sequence of equally spaced values 21
Digitization (cont) Quantization The process of mapping a large set of input values to a smaller set – rounding values to some unit of precision The values are chopped off so that every one lies on the defined level 22
Digitization (cont) 23 Digital signal Sampled and quantized Discrete values
Digitization (cont) Analogue to digital conversion The process are normally carried out by special hardware device called analogue to digital converters (ADCs) Digital to Analogue conversion The reverse is performed by a digital to analogue converter (DACs) 24 8-channel digital-to- analogue converter (used in soundcard) 4-channel stereo multiplexed analogue- to-digital converter (used in soundcard)
Analogue and Digital Signals (cont) 25 ADC DAC PROCESSOR Unfiltered analogue signal Sampled digitized signal Digitally filtered signal Filtered analogue signal Digital Filters – A digital filters takes a digital signal as input & produces another signal with certain characteristics removed
Digitization (cont) Sampling Rate The sampling rate is the number of samples in a fixed amount of time or space taken from a continuous signal to make a discrete signal 26 Analog signal (blue) with a sampled signal (red) with a fixed spacing or sampling rate
Digitization (cont) 27
Digitization (cont) Advantages of Digitization More robust than analogue signal Do not suffer degradation when being copied or transmitted in a noisy media Effect of digitization Some information will be lost 28
Digitization (cont) Undersampling Undersampling leads to aliasing – loss of information during digitization Perceived in different ways in different media Sound heard as distortion Images seen as jagged edges contains fine repeating details (Moire patterns) Moving pictures jerkiness of motion 29
Digitization (cont) 30 Insufficient quantization Lead to posterization and Moiré in images (the sampling rate is not high enough to capture the frequency of the pattern) Brightness contouring Colored areas join together Quantization noise Sound is quantized to too few amplitude levels
Compression 31 Compression Any operation that can be performed on data to reduce the amount of storage required to represent it Decompression Restore the compressed data to a form in which it can be used or displayed Codec Software to perform compression and decompression
Compression (cont) Compression must often be applied to media data Compression may be lossless or lossy Lossless The algorithm always able to decompress data that has been compressed an retrieve an exact copy of the original data Less effective Lossy Some data has been discarded in the compression process and cannot be restored Only an approximation of the original copy Discarded data often insignificant 32
Compression (cont) 33 Original data Compressed data compress decompress Original data Compressed data compress decompress Decompressed data Lossless compression Lossy compression
Compression (cont) Different compression algorithms are applicable to different types of media data. Their effectiveness depends on the characteristics of the data itself 34
Assignment 1 Develop a website (not more than 3 pages) - Road safety awareness Provides road safety information for road users Encourage safer behaviour to reduce the number of people injured & killed on road every year Campaigns: - Mobile phones- Drug driving - Seatbelts- Drink driving - Motorcycling- Pedestrian crossing - Speed- Vehicle safety inspection Website not more than 3 pages Dateline : Week 4 :: 6 Oct 2011:: 4pm 35
LECTURE 2B: ANALOGUE TO DIGITAL EVI INDRIASARI MANSOR Tel ext:
Digital Representation of Media Media is represented in various format: Images Video Animation Sound Text The digital media forms need to be represented and stored so that they can be viewed, exchanged, edited and transmitted in a standard manner 37
Digital Representation of Media (cont) There are established ways of representing images, video, animation, sound and text in bits (binary data) with a specific structural form to store information such as length of media data, version and so on Binary data stored must conform to some file format in order to be processed by software Many of the most important file formats are associated with particular program. For e.g. most manipulation program can read.jpeg 38
Images Image – normally refer to ‘still’ images Used in various forms – photographs, grey or colour, used with text in documents Image can be combined to create interesting applications involving mosaics and panoramas 39 mosaic colour panaroma grey
Images (cont) All images are represented digitally as pixels 40
Images (cont) An image is defined by image width, height & pixel depth The image width gives the number of pixel that span the image horizontally Image height gives the number of lines in the image Each pixel is represented by a number of bits The pixel depth is the number bit used per pixel in an image 41
Images (cont) 42 Monitors displays pictures as a rectangular array of pixels Small, usually square, dots of color which merge optically when viewed at a suitable distance to produce an impression of continuous tones To display an image, the program must set each pixel to an appropriate colour or shade of grey Resolution: the number of pixels in a unit of length Rendering: the process of generating a pattern of pixels from a model
Images (cont) 43
Images (cont) Images may be modelled as bitmaps or vector graphics 44
Images (cont) In bitmap graphics, the image is modelled directly by an array logical pixels values Bitmapped image store the value of every logical pixel, so the amount of memory required is based on the size of the image and the resolution at which it is stored 45
Images (cont) 46 9BB5FFB1CFFFB0D2FFA9CFFF9FCBFF 86B5F9B0DBFFADD9FFA9D6FF9FD3FF 7AACEBA0CCFFA6D3FFA1D0FFA0D0FF 74A8E287B7F999C4FFA3D0FFA2D0FF 6698D36491D57AA6EFA1CEFFA5D2FF Logical pixelsPhysical pixels Simple bitmapped image representation The logical pixels correspond one-to-one to the physical pixels
Images (cont) In vector graphics, the image is stored as a mathematical description of a collection of individual lines, curves and shapes making up the image Displaying a vector image requires computation to be performed in order to interpret the model and generate an array of the pixels to be displayed A simple vector graphic image 47 <!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.0//EN” svg10.dtd> <path fill=“ ♯ F8130D” stroke=“ ♯ 1E338B” stroke-width=“20” d=“M118,118H10V10h108V118z”/>
Images (cont) 48 Vector graphics are often smaller than bitmaps, are resolution-independent and can be scaled without loss of quality, but they are only suitable for certain sorts of synthetic image, not photographs A vector drawing and a digital photograph
Images (cont) Bitmap VS Vector 49
Video & Animation All current methods of displaying moving pictures depend on the phenomenon known as persistence of vision for their effect Persistence of vision A lag in the eye’s response to visual stimuli, which results in “after-images” being seen briefly when the stimulus is no longer present If a sequence of still images is presented to our eyes at a sufficiently high rate, above what is called the fusion frequency - we experience a continuous visual sensation rather than perceiving the individual images 53
The fusion frequency depends on the brightness of the image relative to the viewing environment (around 40 images per second) Below this frequency, a flickering effect will be perceived – all illusion of motion is lost and we see the sequence of still images TWO ways to generate moving picture Sequence of frames from actual motion Creating each frame individually 54 Video & Animation (cont)
Moving pictures can be created as live-action or animation Live-action Recording actual motion as it is occurring in the real world Animation Artificially created sequences (create each frame individually) Animation may be captured from an external sources (e.g. a series of drawing) – will produce a set of bitmaped images 55
Video & Animation (cont) Live-action must be stored as video Video frames require a lot of storage so video is invariably compressed for delivery Animation may be represented in other more flexible or efficient ways (e.g. video, or specialized animation formats which do not have to support the features demanded by video) 56
Sound Sound is caused by rapid variations of air pressure over time, which are detected by the ears Can be translated into electrical signals, using a microphone, which results in a time varying waveform called audio signal Digital audio is produced from the audio signal through sampling and quantization 57
Sound (cont) Sound can be represented as a sequence of sample after digitization Digital audio Recording studio -> CDs -> MP3 player CD audio is sampled at 44.1 kHz, higher sampling rates are sometimes used Audio delivered over the Internet is compressed, often using the MP3 codec Digital audio is nothing more than a stream of numbers – it can be altered using arithmetic operations Easy to apply special effects (e.g. changing the pitch without altering duration) 58
Text A character set is a mapping from characters to character codes In order for everybody to agree on mapping between characters and number – need a standard character set Unicode is a character set capable of representing text in all known languages A font is a set of character shapes, called glyphs – one for each character in an alphabet 59
Text (cont) On computer systems, the font is stored as a collection of small vector images in a separate file - and glyphs are displayed to the screen as graphics Wide selection of fonts can be provided The appropriate choice of fonts is concerned to best convey the message in text Many aspects of layout must be controlled when text is displayed 61
Text Layout. The choice of font, the size and weight of the letters and the horizontal and the vertical space between between words making considerable different to the appearance of the text 62 Text (cont) Text Layout The choice of font, the size and weight of the letters and the horizontal and the vertical space between between words making considerable different to the appearance of the text
Interactivity Interactivity is produced by executing a program in response to user input Program are ultimately represented a bit patterns – machine instructions Each individual instruction only perform a very simple operation such comparing or adding two numbers Very few people create programs by writing down the bit patterns for each instruction – instead they write a description of the computation to be performed using a high-level programming language – incorporate math and logical notations – easily read and written by people 63
Interactivity (cont) The program that is written by a person is often translated into an equivalent sequence machine instruction – known as compilation carried out by a program known as a compiler In multimedia, programs are often written in a scripting language, such as: JavaScript (used on the web to control the behaviour of a Web browser) or ActionScript (used to control the Flash Player) 64
Metadata Metadata is structured data about data, which may be attracted to media files to help with searching and classifying them Metadata is data – can be stored and managed in a database – often called a registry or repository Metadata is important for media data because it makes organizing and searching feasible 65
Metadata (cont) Photograph Metadata may be written into a digital photo file that identify who owns it, copyright and contact information, the time and date when it was taken, the GPS coordinates of the place it was taken, making the file searchable on the computer / Internet Photographic Metadata Standards are governed by organizations that following the following standards: IPTC (International Press Telecommunications Council) XMP (Extensible Metadata Platform) Exif (Exchangeable image fiel format) Dublin Core (Dublin Core Metadata) 66
Metadata (cont) Video Metadata is useful in video – the information about its contents (such as transcripts of conversations and text description of its scenes) are not directly understandable by computer – efficient search is required Sound CDs carry a layer of metadata about the artist, dates, copyright etc Normally not displayed by CD players – can be assessed and displayed by specialized music playback or editing applications 67
Metadata (cont) Web pages Webpage may include metadata specifying what language it's written in, what tools were used to create it, and where to go for more on the subject, allowing browsers to automatically improve the experience of users Most search engines use this data when adding pages to their search index 68
Summary Digital data representation Digitization process Compression Data representation of different media Images Video and Animation Sound Text Interactivity Metadata 69