0% found this document useful (0 votes)
30 views43 pages

Multimedia

this is 4th year computer science multimedia lecture notes

Uploaded by

cherinetafework
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views43 pages

Multimedia

this is 4th year computer science multimedia lecture notes

Uploaded by

cherinetafework
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Chapter 3

Multimedia Data Representation


Outline

❑ Image/Graphic data representation

❑ Image Data Types

❑ Popular Image File Formats

❑ Digital Audio and MIDI

2
Image/Graphic Data Representation

▪ The number of file formats used in multimedia continues to proliferate.

▪ GlF and JPG image file formats are the two formats that most web

browsers can decompress and display them.

3
Image/Graphic Data Representation

▪ An image could be described as two-dimensional array of points where


every point is allocated its own color.
▪ Every such single point is called pixel, short form of picture element.
▪ Image is a collection of these points that are colored in such a way that
they produce meaningful information /data.
▪ Pixel (picture element) contains the color or hue and relative brightness
of that point in the image.

▪ Most graphic/image formats incorporate compression because of the


large size of the data.
4
Image/Graphic Data Representation

▪ The number of pixels in the image determines the resolution


of the image.
▪ A digital image consists of many picture elements, called pixels

▪ The number of pixels determines the quality of the image- image


resolution.

▪ Higher resolution always yields better quality.

5
Image/Graphic Data Representation

6
Types of Images

▪ There are two basic forms of computer graphics:

o bit-maps and

o vector graphics.

▪ The kind you use determines the tools you choose.

▪ Bitmap formats are the ones used for digital photographs.

▪ Vector formats are used only for line drawings.

7
Bit-map images (also called Raster Graphics)

▪ They are formed from pixels – a matrix of dots with different colors.

▪ Bitmap images are defined by their dimension in pixels as well as by the

number of colors they represent.

▪ For example, a 640X480 image contains 640 pixels and 480 pixels in

horizontal and vertical direction respectively.

▪ If you enlarge a small area of a bit-mapped image, you can clearly see the

pixels that are used to create it.


8
Vector graphics
▪ They are really just a list of graphical objects such as lines, rectangles, ellipses,
arcs, or curves – called primitives.

▪ Draw programs, also called vector graphics programs, are used to create and
edit these vector graphics.

▪ These programs store the primitives as a set of numerical coordinates and


mathematical formulas that specify their shape and position in the image.

▪ This format is widely used by computer-aided design programs to create


detailed engineering and design drawings.

▪ It is also used in multimedia when 3D animation is desired.

▪ Draw programs have a number of advantages over paint-type program.


9
Types of Bitmap Images

1-bit Images
▪ Each pixel is stored as a single bit (0 or 1), so also referred to as binary image.

▪ Such an image is also called a 1-bit monochrome image

▪ since it contains no color.

▪ The value of the bit indicates whether it is light or dark

▪ A 640 x 480 monochrome image requires 37.5 KB of storage

10
Types of Bitmap Images

The Figure shows a 1-bit monochrome image


( “Lena” - a standard image used to illustrate many algorithms).
11
8-bit Gray-Scale Images

▪ Each pixel is usually stored as a byte (value between 0 to 255).

▪ The entire image can be thought of as a two dimensional array of pixel values.

▪ We refer to such an array as a bitmap, a representation of the

graphics/image data that parallels the manner in which it is stored in video

memory.

▪ This value indicates the degree of brightness of that point. This brightness

goes from black to white

▪ A 640 x 480 grayscale image requires over 300 KB of storage.


12
Types of Bitmap Images

The Figure shows a 8-bit gray-scale image


13
8-bit Color Images

▪ One byte for each pixel

▪ Supports 256 out of the millions possible, acceptable color quality

▪ Requires Color Look-Up Tables (LUTs)

▪ A 640 x 480 8-bit color image requires 307.2 KB of storage (the same as

8-bit greyscale).

▪ Examples: GIF

14
8-bit Color Images

15
8-bit Color Images cont’

▪ Such image files use the concept of a lookup table to store color

information.

▪ Basically, the image stores not color but instead just a set of bytes, each

of which is an index into a table with 3-byte values that specify the color

for a pixel with that lookup table index.

16
Color lookup Tables (LUTs)

▪ It used in 8-bit color images to store only the index, or code value, for each pixel.

▪ Then, if a pixel stores, say, the value 25, the meaning is to go to row 25 in a color lookup
table (LUT).

▪ While images are displayed as two-dimensional arrays of values, they are usually stored
in row-column order as simply a long series of values.

▪ For an 8-bit image, the image file can store in the file header information just what 8-
bit values for R, G, and B correspond to each index.

▪ Figure below displays this idea.

▪ The LUT is often called a palette.

17
Color lookup Tables (LUTs) Con’t

18
24-bit Color Images

▪ Each pixel is represented by three bytes (e.g., RGB)

▪ Supports 256 x 256 x 256 possible combined colors (16,777,216)

▪ A 640 x 480 24-bit color image would require 921.6 KB of storage

▪ Most 24-bit images are 32-bit images,

▪ The extra byte of data for each pixel is used to store an alpha value

representing special effect information

19
Image Resolution

▪ Image resolution refers to the spacing of pixels in an image and is

measured in pixels per inch, ppi, sometimes called dots per inch, dpi.

▪ The higher the resolution, the more pixels in the image.

▪ A printed image that has a low resolution may look pixelated or made up

of small squares, with jagged edges and without smoothness.

▪ Image size refers to the physical dimensions of an image

20
3.2. Popular Image File Formats

▪ Choosing the right file type for your image to save in is of vital importance.

▪ If you are, for example, creating image for web pages, then it should load fast.

▪ So such images should be small size.

▪ To choose file type:

▪ resulting size of the image \large file size or small\

▪ quality of image possible by the file type

▪ portability of file across different platforms

▪ The most common formats used on internet are the GIF, JPG, and PNG.
21
Standard System Independent Formats

Graphics Interchange Format (GIF)

▪ Graphics Interchange Format (GIF) devised CompuServe, initially for

transmitting graphical images over phone lines via modems.

▪ Limited to only 8-bit (256) color images, suitable for images with few distinctive

colors (e.g., graphics drawing)

▪ Supports animation multiple pictures per file (animated GIF)

▪ GIF format has long been the most popular on the Internet, mainly because of

its small size


22
Standard System Independent Formats

GIF Image

23
Standard System Independent Formats
PNG

▪ Stands for Portable Network Graphics

▪ It is intended as a replacement for GIF in the WWW and image editing tools.

▪ GIF uses LZW compression, which is patented by Unisys.

▪ All use of GIF may have to pay royalties to Unisys due to the patent.

▪ PNG uses unpatented zip technology for compression

▪ Supports interlacing(Method of progressive display)

▪ PNG can be animated through the MNG extension of the format, but browser support is less

for this format.


24
Standard System Independent Formats
JPEG/JPG

▪ A standard for photographic image compression

▪ created by the Joint Photographic Experts Group

▪ Intended for encoding and compression of photographs and similar images

▪ Takes advantage of limitations in the human vision system to achieve high rates of
compression

▪ Uses complex lossy compression, which allows user to set the desired level of quality
(compression).

▪ A compression setting of about 60% will result in the optimum balance of quality and file
size.

▪ Though JPGs can be interlaced, they do not support animation and transparency unlike
GIF. 25
Standard System Independent Formats
TIFF
▪ Tagged Image File Format (TIFF), stores many different types of images (e.g.,
monochrome, grayscale, 8-bit & 24-bit RGB, etc.)

▪ Uses tags, keywords defining the characteristics of the image that is included in the
file. For example, a picture 320 by 240 pixels would include a ‘width’ tag followed by the
number ‘320’ and a ‘depth’ tag followed by the number ‘240’.

▪ Developed by the Aldus Corp. in the 1980s and later supported by the Microsoft

▪ TIFF is a lossless format (when not utilizing the new JPEG tag which allows for JPEG
compression)

▪ It does not provide any major advantages over JPEG and is not as user-controllable.

▪ Do not use TIFF for web images. They produce big files, and more importantly, most
web browsers will not display TIFFs. 26
System Dependent Formats
Microsoft Windows: BMP
▪ Bit Map (BMP) is the major system standard graphics file format for Microsoft
Windows, used in Microsoft Paint and other programs.

▪ It makes use of run-length encoding compression and can efficiently store 24-
bit bitmap images.

▪ Note, however, that BMP has many different modes, including uncompressed
24-bit images.

▪ A system standard graphics file format for Microsoft Windows

▪ Used in Many PC Graphics programs

▪ It is capable of storing 24-bit bitmap images 27


System Dependent Formats

Macintosh: PAINT and PICT


▪ PAINT was originally used in Mac Paint program, initially only for 1-bit
monochrome images.

▪ PICT is a file format that was developed by Apple Computer in 1984 as


the native format for Macintosh graphics.

▪ The PICT format is a meta-format that can be used for both bitmap
images and vector images though it was originally used in MacDraw (a
vector based drawing program) for storing structured graphics.

28
3.3. Digital Audio and MIDI
▪ What is Sound?
▪ Sound is produced by a rapid variation in the average density or pressure of air
molecules above and below the current atmospheric pressure.

▪ We perceive sound as these pressure fluctuations cause our eardrums to vibrate.

▪ These usually minute changes in atmospheric pressure are referred to as sound


pressure and the fluctuations in pressure as sound waves.

▪ Sound waves are produced by a vibrating body, be it a guitar string, loudspeaker cone or
jet engine.

▪ The vibrating sound source causes a disturbance to the surrounding air molecules,
causing them bounce off each other with a force proportional to the disturbance.

▪ The back and forth oscillation of pressure produces a sound waves. 29


3.3. Digital Audio and MIDI
Digitizing Sound
▪ Microphone produces analog signal

▪ Computers understands only discrete(digital) entities

▪ This creates a need to convert Analog audio to Digital audio — specialized


hardware.

▪ This is also known as Sampling (dividing time into discrete pieces).

30
Common Audio Formats
▪ There are two basic types of audio files:

1. The Traditional Discrete Audio File:

2. Streaming Audio File Formats

1. The Traditional Discrete Audio File:


▪ In traditional audio file, you can save to a hard drive or other digital storage medium.

▪ WAV: The WAV format is the standard audio file format for Microsoft Windows applications,

and is the default file type produced when conducting digital recording within Windows.

▪ It supports a variety of bit resolutions, sample rates, and channels of audio.

▪ This format is very popular upon IBM PC platforms, and is widely used as a basic format for

saving and modifying digital audio data. 31


1. The Traditional Discrete Audio File:
▪ AIF: The Audio Interchange File Format (AIFF) is the standard audio format
employed by computers using the Apple Macintosh operating system.

▪ Like the WAV format, it supports a variety of bit resolutions, sample rates, and
channels of audio and is widely used in software programs used to create and
modify digital audio.

▪ AU: The AU file format is a compressed audio file format developed by Sun
Microsystems and popular in the unix world.

▪ It is also the standard audio file format for the Java programming language.
Only supports 8-bit depth thus cannot provide CD-quality sound.

32
1. The Traditional Discrete Audio File:
▪ MP3: MP3 stands for Motion Picture Experts Group, Audio Layer 3 Compression.

▪ MP3 files provide near-CD-quality sound but are only about 1/10th as large as a
standard audio CD file.

▪ Because MP3 files are small, they can easily be transferred across the Internet
and played on any multimedia computer with MP3 player software.

▪ MIDI/MID: MIDI (Musical Instrument Digital Interface), is not a file format


for storing or transmitting recorded sounds, but rather a set of instructions
used to play electronic music on devices such as synthesizers.

▪ MIDI files are very small compared to recorded audio file formats.

33
2. Streaming Audio File Formats
• Streaming is a network technique for transferring data from a server to
client in a format that can be continuously read and processed by the
client computer.

• Using this method, the client computer can start playing the initial
elements of large time-based audio or video files before the entire file is
downloaded.

• As the Internet grows, streaming technologies are becoming an


increasingly important way to deliver time-based audio and video data.

• For streaming to work, the client side has to receive the data and
continuously feed it to the player application. 34
2. Streaming Audio File Formats
▪ RA/RM

▪ For audio data on the Internet, the de facto standard is RealNetwork’s


RealAudio (.RA) compressed streaming audio format.

▪ These files require a RealPlayer program or browser plug-in.

▪ The latest versions of RealNetworks server and player software can handle
multiple encodings of a single file, allowing the quality of transmission to vary
with the available bandwidth.

▪ Webcast radio broadcast of both talk and music frequently uses RealAudio.

▪ Streaming audio can also be provided in conjunction with video as a combined


RealMedia (RM) file. 35
2. Streaming Audio File Formats

▪ ASF

▪ Microsofts Advanced Streaming Format (ASF) is similar to designed to

RealNetwork’s RealMedia format, in that it provides a common definition for

internet streaming media and can accommodate not only synchronized audio, but

also video and other multimedia elements, all while supporting multiple

bandwidths within a single media file.

▪ Also like RealNetwork’s RealMedia format, Microsofts ASF requires a program

or browser plugin.
36
2. Streaming Audio File Formats
▪ MOV

▪ Apple QuickTime movies (MOV files) can be created without a video channel and used as
a sound-only format.

▪ Since version 4.0, QuickTime provides true streaming capability.

▪ QuickTime also accepts different audio sample rates, bit depths, and offers full
functionality in both Windows as well as the Mac OS.

▪ Popular audio file formats are:

o au (Unix)

o aiff (MAC)

o wav (PC)

o Mp3(multiple) 37
MIDI

▪ MIDI stands for Musical Instrument Digital Interface.

▪ Definition of MIDI: MIDI is a protocol that enables computer, synthesizers,

keyboards, and other musical device to communicate with each other.

▪ This protocol is a language that allows interworking between instruments from

different manufacturers by providing a link that is capable of transmitting and

receiving digital data.

▪ MIDI transmits only commands; it does not transmit an audio signal.

▪ It was created in 1982. 38


MIDI

Components of a MIDI System

1. Synthesizer: It is a sound generator (various pitch, loudness, tone color). A good

(musician’s) synthesizer often has a microprocessor, keyboard, control panels,

memory, etc.

2.Sequencer: It can be a stand-alone unit or a software program for a personal

computer. (It used to be a storage server for MIDI data. Nowadays it is more a

software music editor on the computer. It has one or more MIDI INs and MIDI

OUTs.
39
MIDI

40
MIDI
Basic MIDI Concepts
▪ Track: Track in sequencer is used to organize the recordings. Tracks can be turned on
or off on recording or playing back.

▪ Channel: MIDI channels are used to separate information in a MIDI system. There are
16 MIDI channels in one cable. Channel numbers are coded into each MIDI message.

▪ Timbre: The quality of the sound, e.g., flute sound, cello sound, etc.

▪ Multi-timbral: capable of playing many different sounds at the same time (e.g., piano,
brass, drums,..)

▪ Pitch: The Musical note that the instrument plays

▪ Voice: Voice is the portion of the synthesizer that produces sound.


41
Questions

1.What is the difference bit map and vectors graphics? Which one is

better? Why.

2.What is grayscale Image?

3.What are the different popular file formats of images?

4.Explain briefly the common audio formats. Where we used?

42
43

You might also like