You are on page 1of 30

Nurturing Unlimited of Innovative and Knowledgeable Leaders

Universiti Kuala Lumpur Malaysia France Institute

Digital Images
Fundamentals

07/08/2019
1

Contents
•This lecture will cover:
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

– The human visual system


– Light and the electromagnetic spectrum
– Image model (representation)
– Image sensing and acquisition
– Sampling, quantization and resolution
– Pixel relationships
– Image operations
– Averaging

07/08/2019
2

fdzl 1
Human Visual System
Nurturing Unlimited of Innovative and Knowledgeable Leaders

•The best vision model we have!


Universiti Kuala Lumpur Malaysia France Institute

•Knowledge of how images form in the eye


can help us with processing digital images
•We will take just a whirlwind tour of the
human visual system

07/08/2019
3

Structure Of The Human Eye


• The lens focuses light from
Nurturing Unlimited of Innovative and Knowledgeable Leaders

objects onto the retina


Universiti Kuala Lumpur Malaysia France Institute

• The retina is covered with


light receptors called
cones (6-7 million) and
rods (75-150 million)
• Cones are concentrated
around the fovea and are
very sensitive to colour
• Rods are more spread out
and are sensitive to low
levels of illumination

07/08/2019
4

fdzl 2
Image Formation In The Eye
• Muscles within the eye can be used to change
Nurturing Unlimited of Innovative and Knowledgeable Leaders

the shape of the lens allowing us focus on


Universiti Kuala Lumpur Malaysia France Institute

objects that are near or far away


• An image is focused onto the retina causing rods
and cones to become excited which ultimately
send signals to the brain

07/08/2019
5

Brightness Adaptation & Discrimination

•The human visual system can perceive


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

approximately 1010 different light intensity


levels
•However, at any one time we can only
discriminate between a much smaller
number – brightness adaptation
•Similarly, the perceived intensity of a
region is related to the light intensities of
the regions surrounding it
07/08/2019
6

fdzl 3
Light And The Electromagnetic Spectrum
• Light is just a particular part of the
electromagnetic spectrum that can be sensed
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

by the human eye


• The electromagnetic spectrum is split up
according to the wavelengths of different forms
of energy

07/08/2019
7

Reflected Light
•The colours that we perceive are
determined by the nature of the light
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

reflected from an object


•For example, if white
light is shone onto a
green object most
wavelengths are
absorbed, while green Colours
Absorbed

light is reflected from


the object

fdzl 4
Sampling, Quantization And Resolution
Nurturing Unlimited of Innovative and Knowledgeable Leaders

•In the following slides we will consider what


Universiti Kuala Lumpur Malaysia France Institute

is involved in capturing a digital image of


a real-world scene
– Image sensing and representation
– Sampling and quantization
– Resolution

07/08/2019
9

Image Representation

•Before we discuss image acquisition recall


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

that a digital image is composed of M


rows and N columns of pixels
each storing a value col

•Pixel values are most


often grey levels in the
range 0-255(black-white)
•We will see later on
that images can easily
be represented as
matrices row
f (row, col)

07/08/2019
10

fdzl 5
Image Representation

•Image representation in RGB


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

•Image representation in gray scale

Image Acquisition
•Images are typically generated by
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

illuminating a scene and absorbing the


energy reflected by the objects in that
scene – Typical notions of
illumination and scene
can be way off:
• X-rays of a skeleton
• Ultrasound of an
unborn baby
• Electro-microscopic
images of molecules
07/08/2019
12

fdzl 6
Image Sensing
• Incoming energy lands on a sensor material
Nurturing Unlimited of Innovative and Knowledgeable Leaders

responsive to that type of energy and this


Universiti Kuala Lumpur Malaysia France Institute

generates a voltage
• Collections of sensors are arranged to capture
images

Imaging Sensor

Line of Image Sensors


Array of Image Sensors 13

Image Sensing
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

07/08/2019
Using Sensor Strips and Rings 14

fdzl 7
Image Sampling And Quantization
• A digital sensor can only measure a limited
number of samples at a discrete set of
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

energy levels
• Quantization is the process of converting a
continuous analogue signal into a digital
representation of this signal

07/08/2019
15

Image Sampling And Quantization


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

07/08/2019
16

fdzl 8
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

scene

07/08/2019
07/08/2019

only an approximation of a real world


•Remember that a digital image is always
Image Sampling And Quantization

Image Sampling And Quantization (cont…)

18
17

9
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

07/08/2019
07/08/2019

Image Representation
Image Representation

20
19

10
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

07/08/2019
07/08/2019

Format of image
Image Representation

22
21

11
Image Representation
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

07/08/2019
23

Spatial Resolution

• The spatial resolution of an image is


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

determined by how sampling was carried out


• Spatial resolution simply refers to the smallest
discernable detail in an image
– Vision specialists will
often talk about pixel
size
– Graphic designers will
talk about dots per
inch (DPI)

07/08/2019
24

fdzl 12
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

128 * 128
1024 * 1024

64 * 64
512 * 512
07/08/2019

Spatial Resolution (cont…)


Spatial Resolution (cont…)

32 * 32
256 * 256

26
25

13
Intensity Level Resolution
• Intensity level resolution refers to the number of
Nurturing Unlimited of Innovative and Knowledgeable Leaders

intensity levels used to represent the image


Universiti Kuala Lumpur Malaysia France Institute

– The more intensity levels used, the finer the level of detail
discernable in an image
– Intensity level resolution is usually given in terms of the number of
bits used to store each intensity level

Number of Intensity
Number of Bits Examples
Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
07/08/2019
27

Intensity Level Resolution (cont…)


256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

07/08/2019
16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp) 28

fdzl 14
Saturation & Noise
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

07/08/2019
29

Resolution: How Much Is Enough?


•The big question with resolution is always
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

how much is enough?


– This all depends on what is in the image and
what you would like to do with it
– Key questions include
• Does the image look aesthetically pleasing?
• Can you see what you need to see within the
image?

07/08/2019
30

fdzl 15
Resolution: How Much Is Enough? (cont…)
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

•The picture on the right is fine for


counting the number of cars, but not for
reading the number plate
07/08/2019
31

Intensity Level Resolution (cont…)


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

Low Detail Medium Detail High Detail

07/08/2019
32

fdzl 16
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

07/08/2019
07/08/2019

Intensity Level Resolution (cont…)


Intensity Level Resolution (cont…)

34
33

17
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

07/08/2019

Pixel Relationships
Intensity Level Resolution (cont…)

35

18
Neighborhoods of a pixel
• A pixel p at location (x,y) has two horizontal and
two vertical neighbors
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

• This set of four pixels is called 4-neighbors of p


and is denoted by N4(p)
• Each of these neighbors is at a unit distance
from p.
• If p is a boundary pixel then it will have less
number of neighbors.

Diagonal & 8-neighbors

• A pixel p has four diagonal neighbors = ND(p).


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

• The points of N4(p) and ND(p) together are


called 8-neighbors of p.
N8(p) = N4(p) U ND(p)
• If p is a boundary pixel then both ND(p) and
N8(p) will have less number of pixels.

fdzl 19
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

Image Operations

Image Algebra

• Addition is used to combine information in


Nurturing Unlimited of Innovative and Knowledgeable Leaders
Universiti Kuala Lumpur Malaysia France Institute

two images.
• Subtraction is used to detect motion.
• Multiplication and division are used to
adjust brightness of an image.
• AND and OR are used to perform a
masking operation (an easy way to
extract an ROI).
• NOT creates a negative of original image.

fdzl 20
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

07/08/2019
07/08/2019
Basic Matrix

Matrix operation

42
41

21
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

+
=
Image Algebra - Addition
Image Algebra - Addition

22
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders


=
Image Algebra - Addition

Image Algebra - Subtraction

23
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

a. Original Image
b. Image multiplied by 2
Image Algebra - Subtraction

Image Algebra: Multiplication

24
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

a. Original Image

fashion on pixel data.


Image Algebra - AND
Image Algebra: Division

b. Image divided by 2

• Logic operations operate in bit-wise

25
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

Image Algebra - OR
Image Algebra - AND

26
Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders
Image Algebra - NOT

Original image Result of NOT operation

Matrix operation-Exercise

10 33 40 20 40 40
Nurturing Unlimited of Innovative and Knowledgeable Leaders

A= B=
Universiti Kuala Lumpur Malaysia France Institute

65 70 25 60 75 15
10 20 15 90 30 50
Let Say A is a matirx image 3 * 3 and B is a matrix image 3* 3.
Find the image C based on the operation below:

i. A + B
ii. A – B
iii. B - A
iv. B * A
v. A * B
07/08/2019
54

fdzl 27
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

8/7/2019
Averaging

56
Image Averaging for Noise Reduction

28
fdzl
Universiti Kuala Lumpur Malaysia France Institute Universiti Kuala Lumpur Malaysia France Institute
Nurturing Unlimited of Innovative and Knowledgeable Leaders Nurturing Unlimited of Innovative and Knowledgeable Leaders

8/7/2019
8/7/2019

58
57
Image Averaging for Noise Reduction

Image Averaging for Noise Reduction

29
Summary
Nurturing Unlimited of Innovative and Knowledgeable Leaders

•We have looked at:


Universiti Kuala Lumpur Malaysia France Institute

– Human visual system


– Light and the electromagnetic spectrum
– Image representation
– Image sensing and acquisition
– Sampling, quantisation and resolution
•Next time we start to look at techniques for
image transformation
07/08/2019
59

fdzl 30

You might also like