Professional Documents
Culture Documents
Agenda
Human Visual System (The Eye)
What’s a Digital Image?
Digital Image Acquisition.
Digital Image Representation.
Pixel Neighborhood and Connectivity.
Distance Measure
Adjacency, Connectivity, Regions, and Boundaries
Image Operations
1
Human Visual System (Eye)
Structure of the Eye
The eye is nearly a sphere, with an
average diameter of ~ 20 mm.
Three membranes enclose the
eye: the cornea and sclera outer
cover; the choroid; and the retina.
The light receptors are the Rods
(~75 – 150M), which are sensitive
to light intensity, and Cones (~ 6 -
7M), which are sensitive to colors
and concentrated in the fovea, a
1.5 mm spot). These receptors do
not exist in blind spot.
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 3
2
Human Visual System (Eye)
Image formation in the Eye
The focal lengths of the lens of the eye has a range of
14mm to 17mm.
The size of the image, h, can be obtained from the
geometry as: h/17 = 15/100 h = 2.55 mm.
3
Human Visual System (Eye)
Brightness Adaptation and Discrimination
The phenomenon Simultaneous Contrast is
related to the fact that a region’s perceived
brightness does not depend simply on its
intensity.
4
Human Visual System (Eye)
Adaptation and Discrimination (The optical illusions)
5
Light and the Electromagnetic Spectrum
Line Sensor
Array Sensor
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 12
6
Digital Image Acquisition
Digital imaging systems (line and circular)
7
Digital Image Acquisition
Sampling & Quantization
8
Digital Image Acquisition
Real Images formation
A real image can be represented as a y
two-dimensional continuous light
intensity function f(x,y); where x and y
denote the spatial coordinates any point
in the image, where
0 < f(x,y) <
g(x,y)
f (x,y) = i (x,y) * r (x,y)
Where:
i(x,y) is the intensity (illumination) of the
source, and r(x,y) is the reflectance of
the object (both are continuous). Where,
0 < i (x,y) <
x
& 0< r (x,y)< 1
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 17
9
Digital Image Acquisition
What is the best quantization level ?
Digital images are typically quantized to 256
levels (0 for black and 255 for white).
10
Digital Image Size
The digital image size (i.e. the number of bits
required to store the digital image) is determines by
its dimensions ( M x N ) and the number of bits k
required to store the intensity levels ( L = 2k )
11
Digital Image Resolution
Digital image resolution is determined by the
number of pixels (samples) in the image.
12
Digital Image Resolution
Image resolution vs spatial resolution.
13
Intensity Resolution/Levels
Intensity resolution is the number of bits used to
quantize intensity. For example, an image whose
intensity is quantized into 256 levels has 8 bits of
intensity resolution.
False contouring is the effect caused when using
insufficient number of intensity levels in smooth areas
of a digital image (quite visible in images displayed
using 16 or less intensity levels).
A rule of thumb for the lowest spatial and intensity
resolution to print an image in 5cm x 5cm with
reasonably free of sampling checkerboards and false
contouring is 256 x 256 with 64 intensity levels .
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 27
Image size:
452 x 374.
Displayed
256 128 16 8
at different
intensity
levels
64 32 4 2
14
Image Quality (isopreference curve)
How to determine
N and k for each
image with
Low details Medium details
different details
to have
High
reasonable
details
quality?
Isopreference curve
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 29
Image Interpolation
Image interpolation is the process of using known data to
estimate values at unknown locations (used to obtain high-
resolution image from its low-resolution form).
Interpolation is a basic tool used extensively in tasks such
as image resizing (shrinking and zooming in/out), rotating,
and geometric corrections.
Methods for image interpolation:
Nearest Neighbor interpolation: assigns the neighbor intensity
level to the new location.
Bilinear interpolation approximate the value at the new location
using bilinear interpolation of the 4-neighbor pixels.
Bicubic interpolation approximate the value at the new location
using bicubic interpolation of the (4x4) 16-neighbor pixels
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 30
15
Image Interpolation
Bilinear interpolation
Image Interpolation
16
Image Interpolation
Image Interpolation
17
Image Interpolation
18
Digital image Types
Grayscale (Intensity) Images
We need 8 bits to
store a grayscale
value.
Index R G B
1
2
3
4
5
6
7
8
.
. Color Map
CS409: Digital Image Processing Prof. Dr. Mostafa GadalHaqq. 38
19
Digital image Types
RGB (Color) Images
In normalized values:
R,G,B = {0-1, 0-1, 0-1}
0 = Black
1 = White
• Image sampling:
• Rectangular sampling - In most cases, images are sampled by laying
a rectangular grid over an image.
• Hexagonal sampling - An alternative sampling scheme is shown.
• Pixel Neighborhoods:
• 4-connected and 8-connected neighborhood (Rectangular sampling)
• 6-connected neighborhood (Hexagonal sampling)
20
Types of Pixel Neighborhoods
Basic Relationships Between Pixels
Distance Measures
If pixels p and q have coordinates (x, y) and (s, t),
respectively.
The Euclidean distance between p and q
D4(p, q) = |x – s| + |y – t|
D8(p, q) = max( |x – s| , |y – t| )
21
Distance Measures
Results of D4 and D8 distances
Adjacency:
4-adjacency : Two pixels p and q are 4-adjacent if
q is in the set N4(p).
8-adjacency. Two pixels p and q are 8-adjacent if
q is in the set N8(p).
Connectivity: Let S represent a subset of pixels:
Two pixels p and q are said to be connected in S
if there exists a path between them consisting
entirely of pixels in S.
the set of pixels that are connected to each other
in S is called a connected component of S.
22
Adjacency, Connectivity, Regions, and Boundaries
Path:
A (digital) path (or curve) from pixel p with coordinates (x, y)
to pixel q with coordinates (s, t) is a sequence of distinct
pixels with coordinates
(x0 , y0), (x1 , y1), …, (xn , yn)
where (x0 , y0)= (x, y); (xn , yn)= (s, t); and
pixels (xi , yi) and (xi-1 , yi-1) are adjacent for 1<= i <= n.
In this case, n is the length of the path. If (x0 , y0)= (s, t) the
path is a closed path.
We can define 4- or 8-paths depending on the type of
adjacency specified.
Region:
If R be a subset of pixels in an image, we call R a
region of the image if R is a connected set.
Boundary:
The boundary (also called border or contour) of a
region R is the set of pixels in the region that have
one or more neighbors that are not in R.
23
Adjacency, Connectivity, Regions, and Boundaries
24
Types of image Operations
25
Types of image Operations
Local Operations
26
Types of image Operations
Arithmetic Operations?
27
Types of image Operations
Logical Operations?
28
Types of image Operations
Geometric Operation
(Transformation)
Forward Transformations
Inverse Transformations
29
Types of image Operations
Space Transformation (Fourier Transformation)
Forward Kernel
Inverse Kernel
H( a f + b g ) = a H( f ) + b H( g )
30
Homework 1
Next time
Chapter 3:
Intensity Transformations
and Spatial Filtering
31