Chapter 2
Chapter 2
2
What is “media” ?
Information represented in different formats/media
– text
Discrete media: time independent
– graphics
– images
– animation
Continuous media: time dependent
– audio
– video
• Analog vs Digital
– analog format: the time-varying feature (variable) of the signal is a continuous representation of
the input, i.e., analogous to the input audio, image, or video signal
– Physical world is analog !
Multimedia System
• Multimedia: information represented through audio, graphics,
images, video, and animation in an integrated and interactive
manner (as contrast to traditional single-modality media, i.e.,
text and graphics drawing).
– A/D conversion
• to 1/0 discrete signals
• Why digitized ?
– Bulky storage (space, cost, lifetime)
– Poor quality
– Poor/no compression
– Poor portability/mobility/editibility
MP3 player, iPod, YouTube ? No way
Film -> Polaroid -> Digital camera
Image/Video Digitization
• Digital image is a 2-D array of pixels
• Each pixel represented by bits
– R:G:B Original
– Y:U:V Image
• Y = 0.299R + 0.587G + 0.114B (Luminance or Brightness)
U = B - Y (Chrominance 1, color difference)
V = R - Y (Chrominance 2, color difference)
• Video is sequence of images (frames) displayed at constant frame rate
– e.g. 24 images/sec
Digital Representation of Media
There are established ways of representing images, video, animation, sound and text in
bits.
Media data may be represented as a textual description in a suitable language, or as
binary data with specific structural form.
Images come in many different format :
- Photographs - Paintings - Drawings
- Symbols - Corporate Logos - Flags
- Maps - Diagrams - Graphs
Images can be used to :
- Provide facts. - Explain a process.
- Pinpoint locations. - Tell stories.
- Compare. - Identify.
8
File Format - Multimedia
• For Multimedia Databases –to allow searching for pictures using characteristics
such as
– colour
– texture
– shapes of objects
• to allow searching for audio (or say a song) characteristics of personal features
usingcertain specification of a program
• There are many applications that includes digital libraries (image catalog, musical
dictionary), multimedia directory services (yellow pages), broadcast media selection
(radio and TV channel)
• and multimedia edition (personalized electronic news services).
9
Audio File Format -MIDI
• Musical Instrument Digital Interface (MIDI) provides a relatively simple
way for a single keyboard to control a variety of instruments
• MIDI is a simple digital protocol and was rapidly incorporated into
computer music applications.
• The MIDI is used as the foundation for Internet music playback and
other new kinds of music publishing.
• A MIDI file is a sequence of chunks. These chunk have the same
general format as the chunks used by AIFF, IFF and WAVE; each chunk
has a 4-character type, a 4-byte length code (in MSB format), and
some data
10
Three types of MIDI files:
12
Images Also known as pel is the smallest unit that can be
drawn
13
Image Representation
• Bitmap techniques or Bitmap Graphics
– Pixel-by-pixel representation of the color
– Wide range of colors and shades in complex images.
• Vector techniques or Vector Graphics
- Comprise mathematical representations : Stored as a mathematical description of a
collection of individual lines, curves and shapes making up the image
– e.g. line = two end points
- Displaying a vector image
– requires some computation to be performed in order to interpret the model and generate an
array of pixel to be displayed
– The process of interpreting the vector description known as rasterizing
– Scalable
– Small file size
14
…Continued
• 8-bit GIF (Graphics Interchange Format) : one of the most
important formats because of its historical connection to the WWW and
HTML markup language as the first image type recognized by net
browsers.
15
Media Data Types
Table 1 : Macromedia Director file formats
File import File export Native
.BMP , .DIB .PAL, .ACT .AIFF, .AVI, .DIR, .FLA .BMP .AVI , .DIR,
.GIF , .JPG, .PICT .AU, .MOV .FLC, .FLI .MOV .DXR,
, .PNG .MP3, .GIF, .PPT .EXE
.PNT , .PSD .WAV
.TGA , .TIFF
.WMF
16
Resolution
• Resolution
– Image resolution is the number of pixels in a digital image.
– Device resolution is also a measure of how finely a device
approximates continuous images using finite pixels
– Higher resolution always yields better quality.
– Different monitors can have different resolutions
• The concept of resolution is simple, but it differ according to
where it is used.
17
Image Resolution
18
Example
For an image that has a logical pixel dimensions of 198 pixel wide and
149 high and to be displayed on a screen with resolution of 72 dpi,
What will be the image size on the screen?
19
Which type of image to use?
• You have to take in your consideration the following factors to decide which type to
use:
1. Memory requirements
2. Visual characteristics
3. Possibilities for transformation & effects
4. The most important factor is the source of the image
• Photographs from digital camera, screen shots, scanned images and captured video
frames are all inherently bitmaps- because of the way the hardware from which they
originate works.
• Charts, diagrams and other data visualizations generated by a program from data
usually, but not invariably, use vector graphics
20
Multimedia Presentation
22
Bit depth
• Bit depth quantifies how many unique colors are available in an
image's color palette in terms of the number of 0's and 1's, or "bits,"
which are used to specify each color.
• This does not mean that the image necessarily uses all of these colors,
but that it can instead specify colors with that level of precision.
23
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.
• Fig. 1 shows a 1-bit monochrome image (called “Lena” by multimedia scientists —
this is a standard image used to illustrate many algorithms).
• What is the image file storage size for a 640 x 480 monochrome
image?
• Solution:
image size = width(M) × height(N) × bit depth(B)
image size = 640 × 480 × 1 Divide by 8 because
there are 8 bits in a byte
8
= 38 400 bytes Divide by 1024 because
there are 1024 bytes in
1024 1KB
= 37.5 kB
25
8-Bit Gray-Level Images
• What is the image file storage size for a 640 x 480 8-bit grayscale image?
• Solution:
image size = width(M) × height(N) × bit depth(B)
image size = 640 × 480 × 1
= 307,200 bytes
1024
= 300 kB
27
Comparison
• An important point: many 24-bit color images are actually stored as 32-bit images, with the extra byte of
data for each pixel used to store an alpha value representing special effect information (e.g.,
transparency).
• The figure on the next slide shows the image forestfire.bmp, a 24-bit image in Microsoft Windows BMP
format. Also shown are the grayscale images for just the Red, Green, and Blue channels, for this image.
30
24 bit image “forestfire.bmp” From R channel
33
Assignment (5 marks)
Explain and discuss the following Colours and
Colour Systems? Give examples for each.
1. The CMY Colour model
2. RGB Colour model
3. HSV Colour model
4. HSB Colour model
5. YUV Colour model
Text
W w
Outline font
Font attributes
Five attributes are often used for specifying a font:
• Family — fonts in the same family have similar design, look and feel. Here are some of the common
families:
– Times, Helvetica, Courier, Garamond, Univers
• Shape — refers to the different appearance within a family.
– normal (upright), italic, SMALL CAP
• Weight — measures the darkness of the characters, or the thickness of the strokes. The commonly
used names are:
– ultra light, extra light, light, semi light, medium, semi bold, bold, extra bold, etc.
• Width — the amount of expansion or contraction with respect to the normal or medium in the family.
• Size — unit of measure is point.
– 1 inch = 72.27 point in printing industry.
– 1 inch = 72 point in PostScript systems.
–
• This technique uses two fields to create a frame. One field contains all the
odd lines in the image, the other contains all the even lines of the image.
• A PAL based television display, for example, scans 50 fields every second
(25 odd and 25 even). The two sets of 25 fields work together to create a
full frame every 1/25th of a second, resulting in a display of 25 frames per
second.
• Such scan of every second line is called interlacing.
• QuickTime was originally developed by Apple for storing audio and video in
Macintosh systems
– It supports video playback at up to 30 frames per second on a small window (typical size
300X200 with 8 or 16 bit color)
– It is a software-only system
– It supports a number of compression algorithms
Multimedia Information Systems 51
…
• MPEG (Motion Picture Expect Group) is a working group under ISO
– There are several versions of mpeg standard. The most commonly used now
is mpeg-1
– It requires hardware support for encoding and decoding (on slow systems)
– The maximum data rate is 1.5Megabit/sec
– The next generation mpeg-2 is now getting popular
– Mpeg-2 improves mpeg-1 by increasing the maximum data rate to
15Mbit/sec
– It can interleave audio and video