Créer une présentation
Télécharger la présentation

Télécharger la présentation
## Course Book Details

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Course Book Details**Title: The Science of Digital Media Author: Jennifer Burg Publisher: Pearson International Edition Publication Year: 2009 Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer**General Course Contents**Part-I: Digital Data Representation and Communication Part-II: Digital Image Representation Part-III: Digital Image Processing Part-IV: Digital Video Processing Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer**General Course Contents**• Part-I: Digital Data Representation and Communication • Analog to Digital Conversion • Data Storage • Data Communication • Compression Methods • Standards and Standardization Organization for Digital Media • Mathematical Modelling Tools for the Study of Digital Media Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer**Analog to Digital Conversion**Analog versus Discrete Phenomena Image and Sound Data represented as Functions and Waveforms Sampling and Aliasing Quantization, Quantization Error, and Signal-to-Noise Ratio Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Analog versus Discrete Phenomena • Analog Phenomena • are continuous, eg., stead stream of water, a line on the graph or a continuous rotating dial on a radio • no clear separation between one point and the next • no separation between any two points, there is an infinite number of other points exist • Discrete phenomena • are clearly separated • there is a point (in space or time) • there are neighbouring point • there is nothing between two points**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Analog versus Discrete Phenomena • Analog-to-Digital conversion • Converting the continuous phenomena of images, sound and motion into a discrete representation that can be handled by computer • Advantages of Digital media over Analog • possibility to increase digital media resolution (due to increase media storage and data rate in communication channels) • image and sound are communicated**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Analog versus Discrete Phenomena • Advantages of Digital media over Analog • analog data communication is vulnerable to noise than digital, so it looses some of its quality in transmission • digital data is communicated entirely with 0s and 1s, error-correcting strategies is possible to ensure data is received and interpreted correctly • digital data can be communicated more compactly than analog (excellent compression algorithms) • provides varying bandwidth among various broadcasts to consumers**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • primary media in digital media are Images and Sound i.e., IMAGE + SOUND = VIDEO • both images and sound can be represented as functions visualized by their corresponding graphs • Sound is a one-dimensional function i.e., a function with one variable as input**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Taking sound as a continuous phenomenon, then it corresponds to continuous function: where is time and is the air pressure amplitude • The essential form of function representing sound is sinusoidal i.e., has a shape of sine wave. Consider a triangle in a Unit Cycle**Analog to Digital Conversion**A -axis sin( ) = c/h cos( ) = a/h h c -axis C a B • Image and Sound Data Represented as Functions and Waveforms • Sines and Cosines are called Sinusoidal functions Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • According to Pythagorean theorem the equation for Unit Cycle is • As you move “Q” around the Unit cycle counterclockwise, angle goes from 0 to (in radians) • For multiple times of rounds where “k” is number of times (“k” is +ve in counterclockwise and –ve otherwise)**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Generalized definitions of sine and cosine are: • If and “k” is an integer then**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Sine and cosine functions are periodic (their values cycle in regular pattern as indicated in the table below • Angle conversion formula from Radians to Degree and vice versa: where: r = angle in radian and d = angle in degrees**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Sine and Cosine angles visualization is as indicated in the figure below: • x-axis represents the size of the angle while y-axis represents the sine of the angle**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • How Sinusoidal function relates to wave and thus to sound and images? • Sound is a Mechanical Wave • i.e., it results from the motion of particles through a transmission medium eg., the motion of molecules in air • sound cannot be transmitted through vacuum • movement associated with sound wave is initiated by a vibration, consider a vibrating string, its wave swings left to right and vice versa**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Sound is a Mechanical Wave • when wave is moving from left to right, air molecules are pushed next to each other, hence pressure rises, when string moves right to left, air molecules spread out, hence pressure is reduced**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • The periodic changing of air pressure – high to low, high to low, etc., forms a mechanical wave • Below is a diagram of single-frequency (440Hz) tone with no overtones, represented as a waveform**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • The motion of the air molecules is back and forth from left to right -> to the direction in which the wave is radiating out from string • Longitudinal wave • A wave in which the motion of individual particles is parallel to the direction in which energy is being transported • The wave is periodic if it repeats a pattern over time • The pattern that is repeated constitutes one cycle of the wave • Wavelength is the length (in distance) of one complete cycle • The frequency of a wave is the number of times a cycle repeats per unit time (in the case of sound, is the rate at which air molecules that are vibrating). • Frequency is measure in cycles per second or Hertz**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Abbreviations for Frequency or Sampling rate1Hz = 1 cycle/s1KHz = 1000 Hz1MHz = 1,000,000 Hz • Period of a wave is the amount of time it takes for one cycle to complete. Period and frequency are reciprocals of each other where T = period and f = frequency**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Amplitude is the height of the wave • In order to create a sine function representing a sound wave of frequency f Hz, you must convert to angular frequency first. Where is the angular frequency in Radians/s and is frequency of a sine wave measured in Hz. • The amplitude of the wave corresponds to sound loudnessThe larger to amplitude the louder the sound • Frequency of the wave corresponds to the pitch of the soundThe higher the frequency the higher-pitched the sound**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Single-frequency tone waves can be added to form more complex waveform • A complex waveform can be reversed by breaking it down mathematically into frequency components by a method called Fourier transform • The simple sinusoidal waves are called the frequency components of the more complex wave**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Fourier transform • makes it possible to store a complex sound wave in digital form • determine the wave’s frequency components • filters out components that are not wanted (improves quality or compresses digital audio file) • Sinusoidal waveforms are used to represent changing color amplitudes in digital images too**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Regardless of the medium, analog-to-digital requires the same two steps Sampling and Quantization • Sampling • Chooses discrete points at which to measure a continuous phenomenon (called signal) • For images the sample points are evenly separated in space • For sound the sample points are evenly separated in time • Sampling rate (or the resolution) is the number of samples taken per unit time or unit space**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Image and Sound Data Represented as Functions and Waveforms • Quantization • Requires that each sample be represented in a fixed number of bits, called the sample size or equivalently the bit depth • Bit depth is for limiting precision with which each sample can be represented**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Sampling and Aliasing • Sampling • a process of converting a signal (e.g., a function of continuous time or space) into a numeric sequence (a function of discrete time or space) • Undersampling means the sampling rate did not keep up with the rate of change of pattern in the image or sound • Aliasing • In digital image arises from undersampling and results in an image that does not match the original source, it may be blurred or have a false pattern similarly for audio wave**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Sampling and Aliasing • Nyquist Theorem • It specifies the sampling rate needed for a given spatial or temporal frequency • It states that to guarantee that no aliasing will occur, you must use a sampling rate that is greater that twice the frequency of the signal being sampled**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Sampling and Aliasing • Nyquist Theorem • The Nyquist theorem applied to a single-frequency, one dimensional wave is summarized in the following equation: where = minimum sampling rate and = frequency of sine wave is called the Nyquist frequency • Nyquist theorem applies equally to digital images**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Quantization • Quantization is the second step in analog-to-digital conversion • For digital images, each sample represents a color at a discrete point in a two dimensional image • Number of colors possible is determined by the sample size or bit depth (color depth for images)**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Quantization • One bit of color per sample == two colors because a bit has two values 0 or 1. Eight bits, then 28 = 256 colors possible, etc • In general, if n is the number of bits used to quantize a digital sample, then the maximum number of different values that can be represented, m, is m = 2n • The large the bit depth, the more subtle the color changes can be in a digitized image, the bigger the file size • For digital audio, the common sample sizes are 8 and 16 bits**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Quantization Error • is the difference between the actual analog value and quantized digital value • the error is due either to rounding or truncation. It is sometimes considered as an additional random signal called quantization noise**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Quantization Error**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-Noise Ratio (SNR) • Is the ratio of the meaningful content of a signal versus the associated noise • For analog is the ratio of the average power in the signal versus the power in the noise level. Think of a signal send over a network compared to the extend in which the signal is corrupted • For digitized image or sound, is the ratio of maximum sample value versus the maximum quantization error. The ratio depends on the bit depth. It is also called signal-to-quantization-noise ratio (SQNR)**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-quantization-noise ratio (SQNR) • Is measured in terms of decibels (dB). A dB is a dimensionless unit, they cancels in division • A dB is used to describe the relative power or intensity of two phenomena. Where I and I0 are the intensities (power across a surface area) of two signals of sound, data signal on a communication network or output of lasers etc, measured in watts**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-quantization-noise ratio (SQNR) • Another definition for decibels is: Where E and E0 are amplitude, potential or pressure in volts • The two definitions are equivalent, take the relationship between power I, potential E and resistance R**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-quantization-noise ratio (SQNR) • Assuming that R is constant for the two signals, then**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-quantization-noise ratio (SQNR) • Using the second definition of decibels, SQNR applies to linearly quantized samples • The sample values range from with ‘n’ bits for quantization • Audio signal in sine wave goes from +ve to –ve values • Maximum quantization error is half a quantization level**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-quantization-noise ratio (SQNR) • Therefore, In short, let ‘n’ be the bit depth of digitized media file (e.g., digital audio) then SQNR is:**Analog to Digital Conversion**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Quantization, Quantization Error and Signal-to-Noise Ratio • Signal-to-quantization-noise ratio (SQNR) • SQNR is directly related to Dynamic range • Dynamic range is the ratio of the largest-amplitude sound(or color, for digital images) and the smallest that can be represented with a given bit depth.**Data Storage**Metropolia University of Applied Sciences, Digital Media, Erkki Rämö, Principal Lecturer • Digital media requires the handling of large amount of data • See example of File sizes for Uncompressed Digital Image, Audio and Video in the table below**Data Storage**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Digital media requires the handling of large amount of data • Table below shows common abbreviations for data sizes**Data Storage**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Digital media requires the handling of large amount of data • Confusion between the prefixes kilo-, mega-, and giga-eg., for the case of Hertz:kilo- means 103 = 1000mega- means 106 = 1,000,000giga- means 109 = 1,000,000,000 • In the case of data storage kilo- means 103 or 210mega- means 106 or 220 giga- means 109 or 230**Data Storage**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Digital media requires the handling of large amount of data • Manufacturers wants to make their storage media look larger, so they generally use the power of 10 • While many computers will give file sizes defined in powers of 2**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • The importance of Data Communication in the study of Digital Media • Digital files are typically very large, can be stored in CDs and DVDs, send them in email, and post them on web pages -> consideration to transmission media • Sound and video are time-based media, they require large amount of data. • Capturing and transmitting in real-time require data transmission rate is the same as that of which data is played • Consideration is taken to bandwidth and data rate • Digital communication media at home and offices • Cellular phones, digital cable, digital television, HDTV and more**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • Whether data is in analog or digital, they both need a communication channel from sender to receiver e.g., • Land-based or cellular telephone • Shortwave or regular radios • Cable • terrestrial or satellite television • wired or wireless computer networks**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • How do you know which communication are being send digitally? • Transmission medium does not determine the form of data, digital or analog • Copper wire – can transmit both analog and digital data (eg., telephone or computer networks) • Coaxial cable (e.g., television) • Optical fiber (e.g., high-speed computer networks) • Free space (e.g., radio or television) • Copper wire, coaxial cable and optical fiber all require a physical line between the sender and receiver**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • How do you know which communication are being send digitally? • Across copper wire or coaxial cable, data can be transmitted by changing voltages • Through Optical fiber, data can be communicated by a fluctuating beam of light • Free space, data can be communicated through electromagnetic waves sent by satellite or radio transmission • It is the representation of data, not the transmission medium that determine if communication is analog or digital**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • What is the difference between ways analog and digital data are transmitted across a network? • Take analog telephone transmissions through wire to start with • First sound is captured electronically, changes in air pressure are tranlated to changes in voltage • For the spoken word “boo,” the voltages rise and fall as indicated in the figure below**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • What is the difference between ways analog and digital data are transmitted across a network? • If the word “boo,” is digitized, it is sampled and quantized such that data are transformed into sequence of 0s and 1s as in figure below • +V (voltage level) may represent 1 bit and –V(voltage level) may represent 0 bit • Communication begins with some initial sychronization between sender and receiver**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • What is the difference between ways analog and digital data are transmitted across a network? • A sending device maintains a steady voltage for a fixed amount of time to send each bit • The receiving device samples the transmission at evenly-spaced points in time to interpret whether 0 or 1 has been sent • Varying the voltage levels in the manner just described is called Baseband transmission • The line of communication between sender and receiver is called a Baseband channel • Baseband transmission is used across wire and coaxial cable, across relatively short distances (due to noise and attenuation)**Data Communication**Metropolia University of Applied Sciences, Digital Media, ErkkiRämö, Principal Lecturer • Analog compared with Digital Data Communication • What is the difference between ways analog and digital data are transmitted across a network? • Attenuation is the weakening of a signal over time and/or space • Modulated data transmission (or bandpass transmission) • Is based on the observation that a continuously oscillating signal degrades more slowly and thus is better for long distance communication • Modulated data transmission makes use of a carrier signal on which data are “written” • Data are written on the carrier signal by means of modulation techniques