Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

Topic – 004

Image Representation

|
Introduction

• Image - this is a 2D or 3D
representation of an object
–There are 2 types
• Analog
• Digital
|
Image Representation

• Analog
– Be printed/developed
– Captured using analog camera
• Digital
– A representation usually in 0s and 1s done by computer or any
other digital system
– Graphics is similar even though something considered as
computer generated

|
Image Representation

• There are several but the main include


– Pixel
– Depth
– Resolution

|
Pixel

• A pel, dots, or picture element


• A physical point in a raster image
• A smallest addressable element in an all points
addressable display device;
• A the smallest controllable element of a picture
represented on the screen.
• Several of them form the image
|
Bit Color Depth

• The colour information stored in an image.


– The higher the bit depth of an image, the more
colours it can store.
• The simplest image,
– 1 bit image,
– Can only show two colours
– Black or White.

|
Bit Color Depth

• 1 bit can only store one of two values,


– 0 (white) and 1 (black).
• 8 bit image can store 28 possible colours,
• 24 bit image can display about 224 colours.
• 32 bit image can display about 232 colours.
• 48 bit image can display about 248 colours.

|
Bit Colour Depth

32 bit.png
1 bit.png 2 bit.png 4 bit.png 8 bit.png
4,294,967,296
2 colours 4 colours 16 colours 256 colours
colours
4 KB (-96%) 6 KB (-94%) 13 KB (-87%) 37 KB (-62%)
98 KB

|
Binary Colour Depth

• Reads pixels in terms of 0s and 1s.


• Such images occupy very small storage space.
• Images here don’t have much detail.
– e.g. black and white newspapers or printouts.
– Example of information represented in black and
white only – text

|
Grey scale Colour Depth

• Pixel is represented using 8 bits.


• Images tending to black will be tending to 0.
– i.e. eight 0z – 00000000 – black in decimal 0.
• Images tending to white are represented using 1.
– i.e. eight 1z – 11111111 – white in decimal 255.

|
Grey scale Colour Depth

• 0 = 00000000
–127 = 01111111
–128 = 10000000
• 255 = 11111111

|
Grey scale Colour Depth

• Occupies more space than binary image.


• Enough to show the kind of image being
represented.
• Examples include:
– Ultra sound, X rays, MRI
– Microwave image taken using microwave signals using
Radar (Radio detection and ranging) systems

|
Grey scale Colour Depth
• A very limited but true direct color system,
• 3 bits (8 possible levels) for each of the R and G
components, and the two remaining bits in the byte
pixel to the B component (four levels), enabling 256 (8×
8 × 4) different colors.
• The normal human eye is less sensitive to the blue
component than to the red or green (two thirds of the
eye's receptors process the longer wavelengths), so it is
assigned one bit less than the others.
|
Coloured
• Pixel is represented using 24 bits
– 8 bits per color i.e. (red, green, blue)
– The total number of possible colours is given by 224 colours
• They have almost all details – exact colours of the image.
• Occupies large space.
• Examples:
– Photographic images
– Computer generated images
– Scanned images (Computed Tomography)

|
Colour  Depth

• High color (15/16-bit)


–4 bits (16 possible levels) for each of
the R, G, and B components,
–4 bits for alpha (transparency),
• (16 × 16 × 16) different colors with 16
levels of transparency.
|
Colour  Depth

• True color (24-bit)


–Supports 24-bit for three RGB colors.
–Method of representing a very large
number of colors, shades, and hues.
–256 shades of red, green, and blue, for
a total of 2 , or alternately 256 .
24 3

|
Colour  Depth

• Deep color (30/36/48-bit)


– Consists of over 4 billion or more colors
– Supports 30/36/48 bits per pixel across three RGB
colors
– With an alpha channel of the same precision this
becomes 40/48/64 bits per pixel

|
Indexed
• Each pixel will be represented using an index.
• Index points to a location in a map (an array of colour
elements also know as a palette) with the colours
representing that image.
• The map stores only those colors for the image in
consideration.
• Map represented from an image by a number.
– e.g. if the image referring colours 0.12, 0.53, 0.8 in the map.

|
Indexed

• When an image is
encoded in this way,
color information is not
directly carried by the
image pixel data, but
is stored in a separate
piece of data called a
palette
|
Image Size

• Binary:
– Each pixel has 1 bit.
– An eighth of a byte.
– 8 pixels = 1 byte.
– For an image of 64 x 64 pixels
• (64 x 64)/8 = 512 bytes.
• A 600 x 600 image will have 360000 pixels
– No of bits = 360000/8 = 45000 Bytes ~ 45KB ~ 0.043MB

|
Image Size
• Grey scale: • Colours RGB:
– Each pixel has 8 bits = 1 byte. – Each pixel has 24 bits.
– For same image of 64 x 64 – For same image of 64 x 64
pixels. pixels.
• 64 x 64 = 4096 bytes = 4KB. • (64 x 64 x 24)/8 = 12kbs.
• A 600 x 600 image will have 360000 • A 600 x 600 image will have 360000
pixels pixels
• No of bits = 360000x8/8 = 360000 • No of bits = 360000x24/8 =
Bytes ~ 351.56KB ~ 0.34MB 1080000 Bytes ~ 1054.69KB ~
1.03MB

|
Image Resolution

• Number of pixels in an image


• Identified by the width and height of the image
– An image that is 2048 pixels wide and 1536 pixels high
(2048 x 1536) contains (multiply) 3,145,728 pixels (or
3.1 Megapixels)
– 320 x 240 = 76800 pixels (or ? Megapixels)
– 700 x 400 = 280000 pixels (or ? Megapixels)

|
Image Resolution
• As the megapixels in a portable device in your camera
increase so does the possible maximum size image you
can produce.
• Cameras are categorized in terms of the no of pixels
there on 1M pixel cameras = 1 million pixels to represent
the image.
• This means that a 5 megapixel camera is capable of
capturing a larger image than a 3 megapixel camera.

|
Image Resolution
• Aspect ratio
– This is the ratio of the width to
the height of an image that can
be produced by a digital
camera.
• E.g.
– 480 : 640, aspect ratio 3:4.
– 8.5 inches by 11 ~ 2:3

|
Image Resolution

• Display/Monitor Resolution
– Number of pixels per inch (ppi) on a monitor
– Windows systems usually have 96ppi resolution.
– Some high resolution video adapters/monitors
support 120ppi.

|
Image Resolution

• Output Resolution
– Refers to number of dots per inch (dpi) on a (hard
copy) output device.
– Many professional printers have 300dpi or 600dpi
resolution.
– High-quality image setters can print at a range
between 1200dpi and 2400dpi, or higher.

|
Image Resolution

• You can tell how big your image is going to be by


using pixels per inch or PPI. Divide the number of
pixels in the photo by the PPI to determine the
size of the printed photo in inches.
– The 2272 by 1704  image displayed on a monitor with
96ppi will be 23.6 by 17.7 inch.
– Or a same 2272 by 1704 image printed on a 300dpi
printer will be 7.5 by 5.68 inch.
|
HSB Colour Model
• This model is based on the
human perception of colour.
• The three fundamental
characteristics of colours are:
– Hue.
– Saturation.
– Brightness.

|
HSB Colour Model

• Hue – the wavelength of the light.


• Hue is often identified by the name of the colour.
• Hue is the actual color.
• It is measured as a location on the standard colour
wheel as a degree between 00 to 3600.

|
HSB Colour Model

• Saturation - Is the strength or purity of the colour.


• It represents the amount of gray in proportion to
the hue and is measured as a percentage from 0%
(gray) to 100% (fully saturated).
• At 0% saturation, hue is ineffective.

|
HSB Colour Model

• Brightness - Is the relative lightness or darkness of


the colour.
• It is measured as a percentage from 0%(black) to
100%(white).
• At 0% or 100% brightness, both hue and saturation
are ineffective.

|
YUV Colour Model
• A color encoding system used for analog television, such
as NTSC and PAL.
• The YUV color model represents the human perception
of color more closely than the standard RGB model used
in computer graphics hardware.
• In YUV, Y is the luminance (brightness) component while
U and V are the chrominance (color) components

|
YUV Colour Model

• The theory behind this model is that human


perception is more sensitive to brightness than
any chrominance information,
• A more suitable coding distinguishes between
luminance and chrominance.

|
Gamut

• The gamut of a colour system is the range of


colours that can be displayed or printed in any
given color model.
• No two computer monitors can produce exactly
the same colors nor can two printers
• The colors you see on a monitor can be very
different from those you see in print and those
you see in “real life.”
|
Gamut
• The actual set of colors that a
given device can reproduce is
called the color gamut of the
device.
– The human eye can discriminate
up to ten million colors
Wyszecki (1975).
• On the right is a Chromaticity
Diagram which illustrates
gamut of RGB and CMYK
colour systems.
|
Digital Image Processing

|
Digital Image Processing

• Image processing is the science of analyzing,


synthesizing, sampling, encoding, transforming,
decoding, enhancing, transporting, archiving, and
in general manipulating images in some way.
• The distinction between useful and unwanted
information is often subjective as well as
objective.

|
Digital Image Processing

• Hence image processing tends to be application


dependent.
• This is a very large area containing the following
sub-areas:
– Image analysis is concerned with techniques for
extracting descriptions from images that are necessary
for higher-level scene analysis methods.

|
Digital Image Processing
– Image recognition is concerned with the techniques
for recovering information about objects in the image.
A sub-area is character recognition.
– Image enhancement is concerned with the technique
to improve the image and to correct some defects,
such as, colour and tonal adjustment,
Transformations, e.g., scale, rotate, Special effects,
e.g., texture, stylize, blur, sharpen.

|
FUNDAMENTALS STEPS IN IMAGE PROCESSING
• Image Acquisition. (Imaging)
• Image Sampling and Quantization and Compression. (Imaging)
• Image enhancement and restoration.(processing)
• Image Segmentation.
• Image Feature Extraction. (analysis)
• Image Representation. (analysis)
• Image Recognition. (understanding)

|
Questions & Discussion

• https://www.tutorialspoint.com/dip/index.htm
• https://www.youtube.com/watch?v=C2P9iDq-sN0

08/21/2021 |
Ole Sangale Road, Madaraka Estate. PO Box 59857-00200, Nairobi, Kenya
Tel +254 (0)20 606155, 606268, 606380 Fax +254 (0)20 607498
Mobile +254 (0)722 25 428, (0)733 618 135 Email info@strathmore.edu
www.strathmore.edu |

You might also like