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

Representing IMAGES

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

Representing IMAGES

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

IMAGES

• Bitmap images
• Made up of PIXELS
• Two dimensional matrix of pixels.

• Each pixel is represented by a binary number.


• Hence the image is stored as a series of binary numbers.
Think
• If each pixel has only one bit for
storage, how many colours can be
stored?

• 2 bits?

• 3 bits?
• The number of bits used to represent each colour is called the Colour
Depth.

• So an 8 bit colour depth means each pixel can be one of 256 colours.

• Modern computers have 24 bit colour depth.


Resolution
• The number of pixels that make up an image.
How does this relate to storage?
• High resolution more bitsmore size.
Data Storage
• Bit
• Byte
• Nibble
Memory size using the denary
system
• SI base 10 units
• Inaccurate
IEC- International Electrotechnical
Commission

• IEC memory size system


• Accurate
• Base 2
• 64GiB RAM = ?? bytes
• 64GiB RAM = 64 x 230 bytes
Calculating file size of
an image
• Data given :
• Image resolution X by Y pixels
• Colour depth (no of bits)

• File size = image resolution X colour depth (in bits)


Qn 1
• A photograph is 1024 × 1080 pixels and uses a colour depth of 32 bits.
How many photographs of this size would fit onto a memory stick of
64GiB?
Qn 1
A photograph is 1024 × 1080 pixels and uses a colour depth of 32 bits.
How many photographs of this size would fit onto a memory stick of
64GiB?
Total no of pixels = 1024 * 1080 =1105920 pixels
Colour depth = 32 bits = 32/8 = 4 bytes
Size in bytes = 1105920 * 4 = 4423680 bytes

64 GiB = 64 × 1024 × 1024 × 1024 = 68719476736 bytes


Divide the memory stick size by the files size = 68719476736/4423680 =
15534 photos.
Qn 2
• A camera detector has an array of 2048 by 2048 pixels and uses a
colour depth of 16. Find the size of an image taken by this camera in
MiB.
Qn 2
• A camera detector has an array of 2048 by 2048 pixels and uses a
colour depth of 16. Find the size of an image taken by this camera in
MiB.

No of pixels = 2048 * 2048


Colour depth= bits per pixel = 16 bits = 16/8 = 2 bytes
Size in bytes = 2048 * 2048 * 2 = 8388608 bytes
Size in MiB = 8388608 / (1024 *1024) = 8 MiB
Calculating the size of a sound file
• Data given
• Sample rate in Hz
• Sample resolution in bits
• Length of sample in seconds
• Size= sample rate x sample resolution x length of sample
Qn 3
An audio CD has a sample rate of 44100 and a sample resolution of 16bits. The
music being sampled uses two channels to allow for stereo recording. Calculate
the file size for a 60-minute recording.

Size of file = sample rate (in Hz) × sample resolution (in bits) × length of sample (in seconds)
Qn 3
An audio CD has a sample rate of 44100 and a sample resolution of 16bits. The music being
sampled uses two channels to allow for stereo recording. Calculate the file size for a 60-minute
recording.
Size of file = sample rate (in Hz) × sample resolution (in bits) × length of sample (in seconds)

Sample rate = 44100


Sample resolution = 16 bits
No of channels = 2
Sample size = 44100 * 16 * 3600 * 2 = 5080320000 bits = 5080320000/8 bytes = 635040000 bytes
Size in MiB = 635040000 / (1024 *1024) = 605 MiB

You might also like