0% found this document useful (0 votes)
35 views

Vector Graphics

Uploaded by

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

Vector Graphics

Uploaded by

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

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.

Comparison between vector graphics and bit-map images

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.

High and low frequency wave signals.


Sound is an analogue value; this needs to be digitised in order to store sound in a computer.

This is done using an analogue to digital converter (ADC).

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).

Sampling rate is the number of sound samples taken per second.


The higher the sampling rate and/or sampling resolution, the greater the file 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?

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.

Common features of Sound editing software.

They have the ability to:

1. Edit the start/stop times and duration of a sample.


2. Extract and save (or delete) part of a sample.
3. Alter the frequency and amplitude of a sample.
4. Fade in and fade out.
5. Mix and/or merge multiple sound tracks or sources.
6. 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).
7. Convert between different audio formats.

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.

The two most common forms of file compression are:

1. Lossless file compression.


2. Lossy file compression.

Lossless file compression

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).

Lossy file compression

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.

MP3 files are used in MP3 players, computers or mobile phones.

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.

Perceptual music shaping removes certain sounds.

For example

1. Frequencies that are outside the human hearing range.


2. If two sounds are played at the same time, only the louder one can be heard by the ear, so
the softer sound is eliminated.

This means that certain parts of the music can be removed without affecting the quality too much.

MP3 files use what is known as a lossy format,


Reason: Since part of the original file is lost following the compression algorithm. This means that
the original file cannot be put back together again.

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.

MPEG-4 (MP4) files are slightly different to MP3 files.


 This format allows the storage of multimedia files rather than just sound.
 Music, videos, photos and animation can all be stored in the MP4 format.
 Videos, for example, could be streamed over the internet using the MP4 format without
losing any real discernible quality.

Photographic (bit-map) images.


 When a photographic file is compressed, both the file size and quality of image are reduced.
 A common file format for images is JPEG, which uses lossy file compression. Once the image is
subjected to the JPEG compression algorithm, a new file is formed and the original file can no
longer be constructed.
 A JPEG will reduce the raw bit-map image by a factor of between 5 and 15, depending on the
quality of the original.
 Vector graphics can also undergo some form of file compression. Scalable vector graphics (.svg)
are defined in XML text files which, therefore, allows them to be compressed.

Run-length encoding (RLE)


Run-length encoding (RLE) can be used to compress a number of different file formats.
It is a form of lossless/reversible file compression that reduces the size of a string of adjacent,
identical data (such as repeated colours in an image).
A repeating string is encoded into two values.
 The first value represents the number of identical data items (such as characters) in the run.
 The second value represents the code of the data item (such as ASCII code if it is a keyboard
character). RLE is only effective where there is a long run of repeated units/bits.

Using RLE on text data


Consider the text string ‘aaaaabbbbccddddd’.
Assuming each character requires 1byte, then this string needs 16 bytes. If we assume ASCII code is
being used, then the string can be coded as follows:

General methods of compressing files.


All the above file compression techniques are excellent for very specific types of file.
However, it is also worth considering some general methods to reduce the size of a file without the
need to use lossy or lossless file compression:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy