Vector Graphics
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 file header) that is made up of
the command used for each object that makes up the graphic image
the attributes that define 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 fill colour used)
the relative position of each object will also need to be included.
the dimensions of each object are not defined, but the relative positions of objects to each
other in the final graphic need to be defined; this means that scaling up the vector graphic
image will result in no loss of quality.
Note:When printing out vector graphics it is usually necessary to first convert it into a bit-map
image to match the format of most printers.
It is now worth considering whether a vector graphic or a bit-map image would be the best
choice for a given application.
When deciding which is the better method, we should consider the following:
Does the image need to be resized? If so, a vector graphic could be the best option.
Does the image need to be drawn to scale? Again, a vector graphic is probably the best
option.
Does the image need to look real? Usually bit-map images look more realistic than vector
graphics.
Are there file restrictions? If so, it is important to consider whether vector graphic
images can be used; if not, it would be necessary to consider the image resolution of a
bit-map image to ensure the file size is not too large.
For example, when designing a logo for a company or composing an ‘exploded diagram’ of a car
engine, vector graphics are the best choice.
However, when modifying photographs using photo software, the best method is to use bit-map
images.
Sound files
Sound requires a medium in which to travel through (it cannot travel in a vacuum).
Reason: 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 specifies the loudness
of the sound.
If the sound is to be used as a music file, it is often filtered first to remove higher frequencies
and lower frequencies which are outside the range of human hearing.
To convert the analogue data to digital, the sound waves are sampled at a given time rate.
The amplitude of the sound cannot be measured precisely, so approximate values are stored.
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 filtered 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 the figure above 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 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).
For example, a 16-bit sampling resolution is used when recording CDs to give better sound quality.
1. The amplitude of the sound wave is first determined at set time intervals (the sampling rate).
2. This gives an approximate representation of the sound wave.
3. 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.
The pros and cons of using a larger sampling resolution when recording
sound.
Video
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 25MB 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
file format.
When recording video, the frame rate refers to the number of frames recorded per second.
FILE COMPRESSION
Key terms
Lossless file compression – file compression method where the original file can be restored following
decompression.
Lossy file compression – file compression method where parts of the original file cannot be
recovered during decompression, so some of the original detail is lost.
JPEG – Joint Photographic Expert Group – a form of lossy file compression based on the inability of
the eye to spot certain colour changes and hues.
MP3/MP4 files – file compression method used for music and multimedia files.
Audio compression – method used to reduce the size of a sound file using perceptual music shaping.
Perceptual music shaping – method where sounds outside the normal range of hearing of humans,
for example, are eliminated from the music file during compression.
Bit rate – number of bits per second that can be transmitted over a network. It is a measure of the
data transfer rate over a digital telecoms network.
Run length encoding (RLE) – a lossless file compression technique used to reduce text and photo
files in particular.
It is often necessary to reduce the file size of a file to either save storage space or to reduce the time
taken to stream or transmit data from one device to another.
With this technique, all the data from the original file can be reconstructed when the file is
uncompressed again.
This is particularly important for files where loss of any data would be disastrous (such as a
spreadsheet file of important results).
With this technique, the file compression algorithm eliminates unnecessary data (as with MP3 and
JPEG formats, for example).
Lossless file compression is designed to lose none of the original detail from the file (such as Run-
Length Encoding (RLE).
Lossy file compression usually results in some loss of detail when compared to the original; it is
usually impossible to reconstruct the original file.
The algorithms used in the lossy technique have to decide which parts of the file are important (and
need to be kept) and which parts can be discarded.
File compression applications
MPEG-3 (MP3) and MPEG-4 (MP4)
MPEG-3 (MP3) uses technology known as audio compression to convert music and other sounds
into an MP3 file format.
Essentially, this compression technology will reduce the size of a normal music file by about 90%.
For example, an 80MB music file on a CD can be reduced to 8MB using MP3 technology.
Music files can be downloaded or streamed from the internet in a compressed format, or CD files can
be converted to MP3 format.
While streamed or MP3 music quality can never match the ‘full’ version found on a CD, the quality is
satisfactory for most purposes.
How can the original music file be reduced by 90% while still retaining most of the music quality?
This is done using file compression algorithms that use perceptual music shaping.
For example
This means that certain parts of the music can be removed without affecting the quality too much.
However, even the quality of MP3 files can be different, since it depends on the bit rate – this refers
to the number of bits per second used when creating the file.
Bit rates are between 80 and 320 kilobits per second; usually 200 kilobits or higher gives a sound
quality close to a normal CD.