Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Structure of Human Eye

4TN3
Image Processing

Di it l Image
Digital I Fundamentals
F d t l

Digital Image Fundamentals Image formation in the eye


• Lens is flexible and its refraction is controlled by its
thickness.
• Elements of visual perception
• Thickness is controlled by the tension of muscles.
• Image sensing and acquisition • Focus on distance objects: lens is relatively flattened,
refractive ppower is minimum.
• Sampling and quantization • Focus on near objects: lens is thicker, refractive
power is maximum
• Relationship between pixels • Perception takes place by excitation of receptors
which transform radiant energy into electrical
impulses that are decoded by the brain.

2 5

The Human Visual System (HVS) Brightness & Intensity


• The dynamic range of light
– A true measure of image processing quality intensity to which eye can
is how well the image appears to the adapt is enormous.
observer. • Brightness is a logarithmic
function of light intensity.
• HVS cannot operate over
– The HVS is very complex and is not the entire range
understood well in a complete sense. simultaneously. It
However, many of its properties can be accomplishes large
variations due to
identified and used to our advantage. brightness adaptation.

3 6

1
Brightness & Intensity A simple image model
• Relationship between brightness and intensity is not • The image magnitude depends on:
a simple function! 1. The amount of source illumination incident
on the scene, i(x,y)
2. The amount of illumination reflected by the
objects in the scene, r(x,y)
f ( x, y ) = i( x, y ) ⋅ r ( x, y )
(x,y): coordinates
Total absorption: r(x,y)=0
Total reflection: r(x,y)=1

7 10

Brightness & Intensity Sampling & Quantization


• Computer processing: image f(x,y) must be
digitized both spatially and in amplitude
Mach Band Effect

• Digitization in spatial coordinates: sampling


• Digitization in amplitude: quantization
• Image: [f(i,j)]NxM
• What should be the values of N, M and the
number of gray levels G?
• Normally: N=2n , M=2m , G=2k

8 11

Image sensing and acquisition Sampling & Quantization


• If a sensor can be developed that is capable of
detecting energy radiated by a band of the EM
spectrum, we can image events in that band.
• Image is generated by energy of the illumination
source reflected (natural scenes) or transmitted
th
throughh objects
bj t (X-ray).
(X )
• A sensor detects the energy and converts it to
electrical signals.
• Sensor should have a material that is responsive to
the particular type of energy being detected.

9 12

2
Sampling & Quantization Effects of Reducing Gray Levels

• Number of bits required to store the image:


N x M x k.
• The more the values of N,M and G, the better
approximation of a continuous image.
• Storage and processing requirements increase
as well.

13 16

Effects of Reducing Spatial Resolution Effects of Reducing Gray Levels

14 17

Effects of Reducing Spatial Resolution Zooming and Shrinkage


• Zooming: increasing the resolution (size) of
an image.
• Shrinkage: decreasing the resolution of an
image.
zooming

shrinkage

15 18

3
Zooming Relationship between pixels
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 0 1 0 0 0 0 0
• Pixel replication: interpolated pixel in the 0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
enlarged image is set to the gray-level of its 0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0 0 1 1 0 0 0 0 0 0 0 0
nearest pixel in the original image. 0 1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
• Bilinear
Bili interpolation:
i l i interpolated
i l d pixel
i l in
i the
h 0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0 1 0 0 0 0 0 0
enlarged image is set to the average its four 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0
nearest pixels in the original image. 0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 1 0 0

19 22

Zooming: example Relationship between pixels

• Neighbors
• Adjacency
• Path
• Connectivity
• Region
• Boundary
• Distance

20 23

Shrinkage Basic relationships between pixels


• A pixel p at coordinates (x,y) has four horizontal and
vertical neighbors:
• Shrinkage by an integer number can be done N4(P)={(x+1,y), (x-1,y),(x,y+1),(x,y-1)}
by deleting some of the rows and columns of • The four diagonal neighbors of P
the image. ND(P)
(P)={(x+1
{(x+1,y+1),
y+1) (x-1
(x-1,y-1),(x-1,y+1),(x+1,y-1)}
y-1) (x-1 y+1) (x+1 y-1)}
• The eight point neighbors of P
• Shrinkage by a non-integer factor can be done N8(P)=N4(P)U ND(P)
as the inverse of zooming.

21 24

4
Adjacency Region
• R: a subset of pixels in an image.
• Two pixels are adjacent if they are neighbors • R is called a region if every pixel in R is connected
and their gray levels are similar to any other pixel in R.
• V: set of gray levels • Boundary (border or contour) of a region: set of
pixels in the region that have one or more neighbors
• Similar gray level means that the gray levels that are not in R.
of both pixels belong to set V
• Exp: 0 1 1 0 0 1 1 0
0 1 1 1 0 1 1 1
– Binary images: V={1} 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0
– Gray level image: V={32,33, …,63,64}

25 28

Adjacency Connected Components


• 4-adjacency: Two pixels p and q with values from V
are 4-adjacent if q is in N4(p)
• 8-adjacency: Two pixels p and q with values from V
are 8-adjacent if q is in N8(p)
• 4-adjacency: broken paths
• 8-adjacency: multiple paths

0 1 1 0 1 1 0 1 1
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1

26 29

Adjacency Distance measures


• m-adjacency: Two pixels p and q with values from V • For pixels p,q, and z with coordinates (x,y),
are m-adjacent if: (s,t) and (v,w), respectively, D is a distance
q is in N4(p) or functions if:
q is in ND(p) and the intersection of N4(p) and N4(q) D ( p, q ) ≥ 0
has no pixels with values in V.
q
D ( p, q ) = D ( q, p )
q
0 1 1 0 1 1 0 1 1 D ( p, z ) ≤ D ( p, q ) + D ( q , z )
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1
De = [( x − s ) 2 + ( y − t ) 2 ]1/ 2
p p

27 30

5
Distance measures
• D4 distance
D4 ( p, q ) = x − s + y − t
• D8 distance
End of Lecture
D8 ( p, q ) = max{ x − s , y − t }

Pixel values D4 distances D8 distances


0 1 1 2 1 2 1 1 1
0 1 0 1 0 1 1 0 1
0 0 1 2 1 2 1 1 1

31

Distance measures
• Dm distance: length of the shortest m-path between
two pixels
• D4, D8 distance between p and q are independent of
the pixels along the path
• Dm depends on the value of the pixels between p and
q
0 0 1 0 0 1
1 1 0 0 1 0
1 0 0 1 0 0
Dm=3 Dm=2

32

Linear & Non-linear operations

• H: an operator whose inputs and outputs are


images
• H is linear if for anyy two images
g f and g and
any two scalars a and b
H(af+bg)=aH(F)+bH(g)

33

You might also like