Introduction z Basic Sound Concepts z Computer Representation
Introduction z Basic Sound Concepts z Computer Representation of Sound z Basic Image Concepts z Image Representation and Formats z Video Signal Representation z Color Encoding z Computer Video Format Introduction to Multimedia 1
Basic Sound Concepts z Acoustics xstudy of sound - generation, transmission and reception of sound waves. z Sound is produced by vibration of matter. x. During vibration, pressure variations are created in the surrounding air molecules. x. Pattern of oscillation creates a waveform • the wave is made up of pressure differences. x. Waveform repeats the same shape at intervals called a period. • Periodic sound sources - exhibit more periodicity, more musical - musical instruments, wind etc. • Aperiodic sound sources - less periodic - unpitched percussion, sneeze, cough. Introduction to Multimedia 2
Basic Sound Concepts z Sound Transmission x. Sound is transmitted by molecules bumping into each other. x. Sound is a continuous wave that travels through air. y. Sound is detected by measuring the pressure level at a point. y. Receiving x. Microphone in sound field moves according to the varying pressure exerted on it. x. Transducer converts energy into a voltage level (i. e. energy of another form - electrical energy) y. Sending x. Speaker transforms electrical energy into sound waves. Introduction to Multimedia 3
Frequency of a sound wave Frequency is the reciprocal value of the period. Air pressure period amplitude time Introduction to Multimedia 4
Basic Sound Concepts y. Wavelength is the distance travelled in one cycle x 20 Hz is 56 feet, 20 KHz is 0. 7 in. y. Frequency represents the number of periods in a second (measured in hertz, cycles/second). x. Frequency is the reciprocal value of the period. x. Human hearing frequency range: 20 Hz - 20 Khz, voice is about 500 Hz to 2 Khz. Infrasound from 0 - 20 Hz Human range from 20 Hz - 20 KHz Ultrasound from 20 k. Hz - 1 GHz Hypersound from 1 GHz - 10 THz Introduction to Multimedia 5
Basic Sound Concepts y. Amplitude of a sound is the measure of the displacement of the air pressure wave from its mean or quiescent state. y. Subjectively heard as loudness. Measured in decibels. 0 db 35 db 70 db 120 db - essentially no sound heard quiet home noisy street discomfort Introduction to Multimedia 6
Computer Representation of Audio y. A transducer converts pressure to voltage levels. y. Convert analog signal into a digital stream by discrete sampling. x. Discretization both in time and amplitude (quantization). y. In a computer, we sample these values at intervals to get a vector of values. y. A computer measures the amplitude of the waveform at regular time intervals to produce a series of numbers (samples). Introduction to Multimedia 7
Computer Representation of Audio y. Sampling Rate: xrate at which a continuous wave is sampled (measured in Hertz) • CD standard - 44100 Hz, Telephone quality - 8000 Hz. x. Direct relationship between sampling rate, sound quality (fidelity) and storage space. x. Question • How often do you need to sample a signal to avoid losing information? x. Answer • To decide a sampling rate - must be aware of difference between playback rate and capturing(sampling) rate. • It depends on how fast the signal is changing. In reality - twice per cycle (follows from the Nyquist sampling theorem). Introduction to Multimedia 8
Sampling Sample Height samples Introduction to Multimedia 9
Nyquist Sampling Theorem y. If a signal f(t) is sampled at regular intervals of time and at a rate higher than twice the highest significant signal frequency, then the samples contain all the information of the original signal. y. Example x. Actual playback frequency for CD quality audio is 22050 Hz x. Because of Nyquist Theorem - we need to sample the signal twice, therefore sampling frequency is 44100 Hz. Introduction to Multimedia 10
Data Rate of a Channel y. Noiseless Channel • Nyquist proved that if any arbitrary signal has been run through a low pass filter of bandwidth H, the filtered signal can be completely reconstructed by making only 2 H (exact) samples per second. If the signal consists of V discrete levels, Nyquist’s theorem states: max datarate = 2 *H log_2 V bits/sec • noiseless 3 k. Hz channel with quantization level 1 bit cannot transmit binary signal at a rate exceeding 6000 bits per second. y. Noisy Channel • Thermal noise present is measured by the ratio of the signal power S to the noise power N (signal-to-noise ratio S/N). Representative unit of noisy channel is decibel 10 log (S/N). • Max datarate - H log_2 (1+S/N) Introduction to Multimedia 11
Quantization y. Sample precision - the resolution of a sample value y. Quantization depends on the number of bits used measuring the height of the waveform. y 16 bit CD quality quantization results in 64 K values. y. Audio formats are described by sample rate and quantization. • Voice quality - 8 bit quantization, 8000 Hz mono(8 Kbytes/sec) • 22 k. Hz 8 -bit mono (22 k. Bytes/s) and stereo (44 Kbytes/sec) • CD quality - 16 bit quantization, 44100 Hz linear stereo (196 Kbytes/s) Introduction to Multimedia 12
Quantization and Sampling Sample Height 0. 75 0. 25 samples Introduction to Multimedia 13
Audio Formats y. Audio formats are characterized by four parameters x. Sample rate: Sampling frequency x. Encoding: audio data representation • -law encoding corresponds to CCITT G. 711 - standard for voice data in telephone companies in USA, Canada, Japan • A-law encoding - used for telephony elsewhere. • A-law and -law are sampled at 8000 samples/second with precision of 12 bits, compressed to 8 -bit samples. • Linear Pulse Code Modulation(PCM) - uncompressed audio where samples are proportional to audio signal voltage. x. Precision: number of bits used to store audio sample • -law and A-law - 8 bit precision, PCM can be stored at various precisions, 16 bit PCM is common. x. Channel: Multiple channels of audio may be interleaved at sample boundaries. Introduction to Multimedia 14
Computer Representation of Voice z Best known technique for voice digitization is pulse-code-modulation (PCM). y. Consists of the 2 step process of sampling and quantization. y. Based on the sampling theorem. x. If voice data are limited to 400 Hz, then PCM samples 8000 samples per second which is sufficient for input voice signal. y. PCM provides analog samples which must be converted to digital representation. x. Each of these analog samples must be assigned a binary code. Each sample is approximated by being quantized. Introduction to Multimedia 15
Computer Representation of Music y. MIDI (Music Instrument Digital Interface) xstandard that manufacturers of musical instruments use so that instruments can communicate musical information via computers. x. The MIDI interface consists of: • Hardware - physical connection b/w instruments, specifies a MIDI port (plugs into computers serial port) and a MIDI cable. • Data format - has instrument specification, notion of beginning and end of note, frequency and sound volume. Data grouped into MIDI messages that specify a musical event. • An instrument that satisfies both is a MIDI device (e. g. synthesizer) x. MIDI software applications include • music recording and performance applications, musical notations and printing applications, music education etc. Introduction to Multimedia 16
Computer Representation of Speech x. Human ear is most sensitive in the range 600 Hz to 6000 Hz. x. Speech Generation • real-time signal generation allows transformation of text into speech without lengthy processing • Limited vs. large vocabulary (depends on application) • Must be understandable, must sound natural x. Speech Analysis • Identification and Verification - recognize speakers using acoustic fingerprint • Recognition and Understanding - analyze what has been said • How something was said - used in lie detectors. x. Speech transmission - coding, recognition and synthesis methods - achieve minimal data rate for a given quality. Introduction to Multimedia 17
Basic Concepts (Digital Image Representation) y. An image is a spatial representation of an object, a 2 D or 3 D scene etc. y. Abstractly, an image is a continuous function defining a rectangular region of a plane xintensity image - proportional to radiant energy received by a sensor/detector xrange image - line of sight distance from sensor position. y. An image can be thought of as a function with resulting values of the light intensity at each point over a planar region. Introduction to Multimedia 18
Digital Image Representation y. For computer representation, function (e. g. intensity) must be sampled at discrete intervals. x. Sampling quantizes the intensity values into discrete intervals. • Points at which an image is sampled are called picture elements or pixels. • Resolution specifies the distance between points - accuracy. x. A digital image is represented by a matrix of numeric values each representing a quantized intensity value. • I(r, c) - intensity value at position corresponding to row r and column c of the matrix. • Intensity value can be represented by bits for black and white images (binary valued images), 8 bits for monochrome imagery to encode color or grayscale levels, 24 bit (color-RGB). Introduction to Multimedia 19
Image Formats y. Captured Image Format xformat obtained from an image frame grabber x. Important parameters • Spatial resolution (pixels X pixels) • Color encoding (quantization level of a pixel - 8 -bit, 24 -bit) • e. g. “Sun. Video” Video digitizer board allows pictures of 320 by 240 pixels with 8 -bit grayscale or color resolution. Parallax-X video includes resolution of 640 X 480 pixels and 24 -bit frame buffer. Introduction to Multimedia 20
Image Formats y. Stored Image Format - format when images are stored y. Images are stored as 2 D array of values where each value represents the data associated with a pixel in the image. x. Bitmap - this value is a binary digit x. For a color image - this value may be a collection of • 3 values that represent intensities of RGB component at that pixel, 3 numbers that are indices to table of RGB intensities, index to some color data structure etc. y. Image file formats include - GIF (Graphical Interchange Format) , X 11 bitmap, Postscript, JPEG, TIFF Introduction to Multimedia 21
Image Formats y. Graphics Format xspecifies graphics images through graphics primitives and attributes. • Graphics primitives - line, rectangle, circles, ellipses, specifications of 2 D and 3 D objects • Graphics attributes - line style, line width, color x. Graphics formats represent a higher level of image representation, i. e. , they are not represented by a pixel matrix initially. • Advantage - less storage space per graphical image • Disadvantage - more overhead during display time; must convert from a graphical image to the image format which may be a bitmap or pixmap. • E. g PHIGS (programmer’s hierarchical interactive graphics system), GKS (graphical kernel system). Introduction to Multimedia 22
Basic Concepts (Video Representation) y. Human eye views video ximmanent properties of the eye determine essential conditions related to video systems. y. Video signal representation consists of 3 aspects: x. Visual Representation • objective is to offer the viewer a sense of presence in the scene and of participation in the events portrayed. x. Transmission • Video signals are transmitted to the receiver through a single television channel x. Digitalization • analog to digital conversion, sampling of gray(color) level, quantization. Introduction to Multimedia 23
Visual Representation y. The televised image should convey the spatial and temporal content of the scene x. Vertical detail and viewing distance • Aspect ratio: ratio of picture width and height (4/3 = 1. 33 is the conventional aspect ratio). • Viewing angle = viewing distance/picture height x. Horizontal detail and picture width • Picture width (conventional TV service ) - 4/3 * picture height x. Total detail content of the image • Number of pixels presented separately in the picture height = vertical resolution • Number of pixels in the picture width = horizontal resolution*aspect ratio • product equals total number of picture elements in the image. Introduction to Multimedia 24
Visual Representation x. Perception of Depth • In natural vision, this is determined by angular separation of images received by the two eyes of the viewer • In the flat image of TV, focal length of lenses and changes in depth of focus in a camera influence depth perception. x. Luminance and Chrominance • Color-vision - achieved through 3 signals, proportional to the relative intensities of RED, GREEN and BLUE. • Color encoding during transmission uses one LUMINANCE and two CHROMINANCE signals x. Temporal Aspect of Resolution • Motion resolution is a rapid succession of slightly different frames. For visual reality, repetition rate must be high enough (a) to guarantee smooth motion and (b) persistance of vision extends over interval between flashes(light cutoff b/w frames). Introduction to Multimedia 25
Visual Representation x. Continuity of motion • Motion continuity is achieved at a minimal 15 frames per second; is good at 30 frames/sec; some technologies allow 60 frames/sec. • NTSC standard provides 30 frames/sec - 29. 97 Hz repetition rate. • PAL standard provides 25 frames/sec with 25 Hz repetition rate. x. Flicker effect • Flicker effect is a periodic fluctuation of brightness perception. To avoid this effect, we need 50 refresh cycles/sec. Display devices have a display refresh buffer for this. x. Temporal aspect of video bandwidth • depends on rate of the visual system to scan pixels and on human eye scanning capabilities. Introduction to Multimedia 26
Transmission (NTSC) y. Video bandwidth is computed as follows x 700/2 pixels per line X 525 lines per picture X 30 pictures per second x. Visible number of lines is 480. y. Intermediate delay between frames is x 1000 ms/30 fps = 33. 3 ms y. Display time per line is x 33. 3 ms/525 lines = 63. 4 microseconds y. The transmitted signal is a composite signal xconsists of 4. 2 Mhz for the basic signal and 5 Mhz for the color, intensity and synchronization information. Introduction to Multimedia 27
Color Encoding y. A camera creates three signals x. RGB (red, green and blue) y. For transmission of the visual signal, we use three signals • 1 luminance (brightness-basic signal) and 2 chrominance (color signals). x. In NTSC, luminance and chrominance are interleaved x. Goal at receiver • separate luminance from chrominance components • avoid interference between them prior to recovery of primary color signals for display. Introduction to Multimedia 28
Color Encoding y. RGB signal - for separate signal coding xconsists of 3 separate signals for red, green and blue colors. Other colors are coded as a combination of primary color. (R+G+B = 1) --> neutral white color. y. YUV signal xseparate brightness (luminance) component Y and xcolor information (2 chrominance signals U and V) • Y = 0. 3 R + 0. 59 G + 0. 11 B • U = (B-Y) * 0. 493 • V = (R-Y) * 0. 877 x. Resolution of the luminance component is more important than U, V x. Coding ratio of Y, U, V is 4: 2: 2 Introduction to Multimedia 29
Color Encoding(cont. ) y. YIQ signal xsimilar to YUV - used by NTSC format • Y = 0. 3 R + 0. 59 G + 0. 11 B • U = 0. 60 R - 0. 28 G + 0. 32 B • V = 0. 21 R -0. 52 g + 0. 31 B y. Composite signal x. All information is composed into one signal x. To decode, need modulation methods for eliminating interference b/w luminance and chrominance components. Introduction to Multimedia 30
Digitalization y. Refers to sampling the gray/color level in the picture at MXN array of points. y. Once points are sampled, they are quantized into pixels • sampled value is mapped into an integer • quantization level is dependent on number of bits used to represent resulting integer, e. g. 8 bits per pixel or 24 bits per pixel. y. Need to create motion when digitizing video xdigitize pictures in time xobtain sequence of digital images per second to approximate analog motion video. Introduction to Multimedia 31
Computer Video Format y. Video Digitizer x. A/D converter y. Important parameters resulting from a digitizer • digital image resolution • quantization • frame rate x. E. g. Parallax X Video - camera takes the NTSC signal and the video board digitizes it. Resulting video has • 640 X 480 pixels spatial resolution • 24 bits per pixel resolution • 20 fps (lower image resolution - more fps) x. Output of digital video goes to raster displays with large video RAM memories. • Color lookup table used for presentation of color Introduction to Multimedia 32
Digital Transmission Bandwidth y. Bandwidth requirement for images xraw image transmission b/w = size of image = spatial resolution x pixel resolution xcompressed image - depends on compression scheme xsymbolic image transmission b/w = size of instructions and primitives carrying graphics variables y. Bandwidth requirement for video xuncompressed video = image size X frame rate xcompressed video - depends on compression scheme xe. g HDTV quality video uncompressed - 345. 6 Mbps, compressed using MPEG (34 Mbps with some loss of quality). Introduction to Multimedia 33
- Slides: 33