1.2 Multimedia
1.2 Multimedia
1.2
Multimedia
Zain Merchant
2
Zain Merchant
3
Zain Merchant
4
Images can be stored in a computer in two common formats: bit-map image and
vector graphic.
Bit-map images
Bit-map images are made up of pixels (picture elements); the image is stored in a
two-dimensional matrix of pixels.
Pixels can take different shapes, such as or
When storing images as pixels, we have to consider
• at least 8 bits (1 byte) per pixel are needed to code a coloured image (this gives
256 possible colours by varying the intensity of the blue, green and red
elements)
• true colour requires 3 bytes per pixel (24 bits), which gives more than one million
colours
• the number of bits used to represent a pixel is called the colour depth.
In terms of images, we need to distinguish between bit depth and colour depth;
for example, the number of bits that are used to represent a single pixel (bit depth)
will determine the colour depth of that pixel. As the bit depth increases, the
number of possible colours which can be represented also increases. For example,
a bit depth of 8 bits per pixel allows 256 (28) different colours (the colour depth) to
be represented, whereas using a bit depth of 32 bits per pixel results in 4 294 967
296 (232) different colours. The impact of bit depth and colour depth is considered
later.
We will now consider the actual image itself and how it can be displayed on a
screen. There are two important de nitions here:
• Image resolution refers to the number of pixels that make up an image; for
example, an image could contain 4096 × 3192 pixels (12 738 656 pixels in total).
• Screen resolution refers to the number of horizontal pixels and the number of
vertical pixels that make up a screen display (for example, if the screen resolution
is smaller than the image resolution then the whole image cannot be shown on
the screen or the original image will now be a lower quality).
We will try to clarify the difference by using an example.
Figure below has been taken by a digital camera using an image resolution of
4096 × 3192 pixels:
Zain Merchant
fi
5
Suppose we wish to display previous gure on a
screen with screen resolution of 1920 × 1080. To
display this image the web browser (or other
software) would need to re-size rst gure so that it
now ts the screen. This could be done by removing
pixels so that it could now be displayed, or part of the
image could be cropped (and, in this case, rotated
through 90°) as shown in gure on left
However, a lower resolution copy of rst gure (for
example, 1024 × 798) would now t on the screen
without any modi cation to the image. We could
simply zoom in to enlarge it to full screen size;
however, the image could now become pixelated (in
other words, the number of pixels per square inch
(known as the pixel density) is smaller, causing
deterioration in the image quality).
We will now consider a calculation which shows how
pixel density can be calculated for a given screen.
Imagine we are using an Apple iPhone 8 which has
5.5-inch screen size and screen resolution of 1920
pixels × 1080 pixels:
1. add together the squares of the resolution size ((19202 + 10802) = (3 686 400 +
16 640) = 4 852 800)
2. nd the square root 4852800()= 2202.907
3. divide by screen size (2202.907 ÷ 5.5 = 401)
This gives us the pixel density of 401 pixels per square inch (ppi) (which is the
same as the published gure from the manufacturer).
A pixel-generated image can be scaled up or scaled down; it is important
to understand that this can be done when deciding on the resolution. The
resolution can be varied on many cameras before taking, for example, a digital
photograph. When magnifying an image, the number of pixels that makes up the
image remains the same but the area they cover is now increased. This means
some of the sharpness could be lost. This is known as the pixel density and is key
when scaling up photographs. For example, look at next gure.
Image A is the original. By the time it has been scaled up to make image E it has
become pixelated (‘fuzzy’). This is because images A and E have different pixel
densities.
The main drawback of using high resolution images is the increase in le size. As
the number of pixels used to represent the image is increased, the size of the le
will also increase. This impacts on how many images can be stored on, for
Zain Merchant
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
6
example, a hard drive. It also impacts on the time to download an image from the
internet or the time to transfer images from device to device. Bit-map images rely
on certain properties of the human eye and, up to a point, the amount of le
compression used. The eye can tolerate a certain amount of resolution reduction
before the loss of quality becomes signi cant.
Vector graphics
Vector graphics are images that use 2D points to describe lines and curves and
their properties that are grouped to form geometric shapes. Vector graphics can
be designed using computer aided design (CAD) software or using an application
which uses a drawing canvas on the screen.
A vector graphic will contain a drawing list (included in a le header) that is made
up of
• the command used for each object that makes up the graphic image
• the attributes that de ne the properties that make up each object (for example
consider the ellipse of the robot’s mouth – this will need the position of the two
centres, the radius from centres, the thickness and style of each line, the line
colour and any ll colour used)
• the relative position of each object will also need to be included
• the dimensions of each object are not de ned, but the relative positions of
objects to each other in the nal graphic need to be de ned; this means that
scaling up the vector graphic image will result in no loss of quality.
When printing out vector graphics it is usually necessary to rst convert it into a bit-
map image to match the format of most printers.
Zain Merchant
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
7
Sound files
Sound requires a medium in which to travel through (it cannot travel in a vacuum).
This is because it is transmitted by causing oscillations of particles within the
medium. The human ear picks up these oscillations (changes in air pressure) and
interprets them as sound. Each sound wave has a frequency and wavelength; the
amplitude speci es the loudness of the sound.
Zain Merchant
fi
fi
fi
8
Figure above shows a sound wave. The x-axis shows the time intervals when
the sound was sampled (0 to 20), and the y-axis shows the amplitude of the
sampled sound (the amplitudes above 10 and below 0 are ltered out in this
example).
At time interval 1, the approximate amplitude is 9; at time interval 2, the
approximate amplitude is 4, and so on for all 20 time intervals. Because the
amplitude range in Figure 1.6 is 0 to 10, then 4 binary bits can be used to
represent each amplitude value (for example, 9 would be represented by the
binary value 1001). Increasing the number of possible values used to represent
Zain Merchant
fi
fi
fi
fi
9
sound amplitude also increases the accuracy of the sampled sound (for example,
using a range of 0 to 127 gives a much more accurate representation of the sound
sample than using a range of, for example, 0 to 10). This is known as the sampling
resolution (also known as the bit depth).
Sampling rate is the number of sound samples taken per second. The higher the
sampling rate and/or sampling resolution, the greater the le size. For example, a
16-bit sampling resolution is used when recording CDs to give better sound
quality.
So, how is sampling used to record a sound clip?
• The amplitude of the sound wave is rst determined at set time intervals (the
sampling rate).
• This gives an approximate representation of the sound wave.
• The sound wave is then encoded as a series of binary digits.
Using a higher sampling rate or larger resolution will result in a more faithful
representation of the original sound source.
Recorded sound is often edited using software. Common features of such software
include the ability to
• edit the start/stop times and duration of a sample
• extract and save (or delete) part of a sample
• alter the frequency and amplitude of a sample
• fade in and fade out
• mix and/or merge multiple sound tracks or sources
• combine various sound sources together and alter their properties
• remove ‘noise’ to enhance one sound wave in a multiple of waves (for example,
to identify and extract one person’s voice out of a group of people)
• convert between different audio formats.
Video
This section considers the use of video and extends beyond the syllabus. While
this is not speci cally mentioned in the syllabus, it has been included here for
completeness. Many specialist video cameras exist. However, most digital cameras,
smart phones and tablets are also capable of taking moving images by ‘stitching’ a
number of still photos (frames) together. They are often referred to as DV (digital
video) cameras; they store compressed photo frames at a speed of 25 MB per
second – this is known as motion JPEG.
In both single frame and video versions, the camera picks up the light from the
image and turns it into an electronic signal using light-sensitive sensors. In the case
of the DV cameras, these signals are automatically converted into a compressed
digital le format.
Zain Merchant
fi
fi
fi
fi
10
When recording video, the frame rate refers to the number of frames recorded per
second.
Zain Merchant