Digital Image Processing - COMP4173
Lecture 2: Human Visual System and Image Acquisition
Prof. Hongjian Shi (时红建)
Department of Computer Science and Technology
BNU-HKBU United International University
Email:
[email protected]Office: T3-601-R3;
Office Hours: Tues., Wed., Thur. 9:00-11:50; Wed. 16:00-16:50
1
Human Visual System (HVS)
• Human perception of pictures is crucial and the result of any
processing is decidedly nonlinear in its perception of light and
shade perception
• Employing the perceptual characteristics of the HVS can achieve
compression schemes much better performance
• Perceptual Based Image Processing
• Focus on perceptually significant information
• Discard perceptually insignificant information
• Issues:
• Biological
• Psychophysical
Human Eye
• The amount of light entering the eye is controlled by the pupil, which dilates and
contracts accordingly
• The cornea and lens, whose shape is adjusted by the ciliary body, focus the light on
the retina, where receptors convert it into nerve signals that pass to the brain
• A mesh of blood vessels, the choroid, supplies the retina with oxygen and sugar
How Does Human Eye Work?
• Scattered light from the object enters through the cornea (角膜)
• The light is projected onto the retina(视网膜)
• The retina sends messages to the brain through the optic nerve
• The brain interprets what the object is.
The retina is to receive and transmits images to the brain. It is composed of
three types of cells:
• Rods: able to function in low light create black and-white images without much light
• Cones: able to see color and detail of objects with enough light
• Ganglion cells: interpret the messages from the rods and cones and send the
information on to the brain by way of the optic nerve
Retina
Simple diagram of the organization of the retina
Image Information
• Distance between center of lens and retina (focal length) vary between 14-17 mm.
• When object is 3 m or more away, f = 17mm with lowest refractive power.
• Image length h = 17(mm) x (15/100)
Artificial Silicon Retina (ASR) for the Blind
The diameter is 2 mm and
thinner than a human hair.
ASR is placed between inner
retina and outer retina
Light Sensing
• Light passes through cornea, iris, lens and form image on retina.
• Two types of photoreceptors on retina:
• Cones cluster at Fovea, detect color at bright light - photopic vision
• Rods spread at back of eye, general vision - scotopic vision
Brightness Adaptation
• HVS can view large intensity
range (1010)
• But simultaneous perceived
intensity range is much smaller.
• If one is at Ba intensity (outside)
and walk into a dark theater, he
can only distinguish up to Bb. It
will take much longer for eye to
adapt for the scotopic vision to
pick up.
Weber’s Law
• Weber’s law relates the perceived brightness of an object to the
brightness of its background. The law can be derived by measuring the
‘Just Noticeable Difference’ between two visual stimuli.
• Consider a foreground object with intensity 𝐼𝑓 and a background with
intensity 𝐼𝑏 . We can define the threshold ∆𝐼 as the intensity difference
∆𝐼 = 𝐼𝑓 − 𝐼𝑏 at which the foreground object is just visible (with a 50%
probability) by a human.
∆𝐼
• Weber law states that = 𝑘 ≅ 0.02.
𝐼
Weber Law
• HVS sensitivity to intensity difference differs at different
background intensities.
• Weber ratio: ∆𝐼/𝐼: Just noticeable intensity difference versus
background intensity. It is a function of 𝑙𝑜𝑔𝐼.
I I+ I
Simultaneous Contrast
• The perceived brightness of inner circles looks different due to
different background intensity levels even they are identical.
Mach Band Effect
• Perceived Brightness changes
around strong edges.
• Human feel brighter at the
boundary but darker at dark
place or closer to dark, this is
called Mach band effect
Spatial Frequency Sensitivity
• Contrast sensitivity of the HVS: Horizontal axis represents the frequency of an alternating pattern
of parallel stripes with sinusoidal varying intensity.
• The vertical scale shows the contrast sensitivity of the HVS which is the ratio of the maximum
visible range of intensities to the minimum discernible peak-to-peak intensity variation at the
specified frequency
Sinusoidal grating for demonstrating
Contrast sensitivity of the HVS HVS Frequency response
Visual Masking and Temporal Vision
• Threshold intensity increases at
background with large non-
uniform spatial, temporal changes.
• Perceived spatial resolution is
reduced sharply at scene change
• Flicker fusion: the basis of movie
and TV
• Eye is more sensitive to flicker at
high luminance than low luminance.
Frequency Threshold Vision
• Using spatial grating, it is found that contrast sensitivity is a
function of spatial and temporal frequencies.
• In general, the contrast sensitivity decreases as spatial and
temporal frequencies increases.
Eye Illusion
Human vision is not
fully understood
Same color
22
23
Light and Electromagnetic Spectrum
24
• Wavelength lamda and mu are related by
• C is the speed of light (2.99x108 m/s)
• Energy 𝐸 = ℎ𝑣, h is the Planck’s constant
• Frequency ν is measured by Hertz
• Electromagnetic waves can be visualized as propagating waves
with wavelength
• EM energy becomes large with short wavelength
25
Light Spectrum
• Chromatic Light spans electromagnetic spectrum from 0.43 μm
(violet) to 0.79 μm (red). (micron=10-6m, nm = 10-9m)
• Radiance – total amount of energy flow from light source (unit in W)
• Luminance – total energy that an observer perceives (unit in lumen (lm))
• Brightness – a subjective descriptor of light, not measured
• Achromatic (monochromatic) light is void of color. Perception is
from black to grays and then to white – gray-scale images
• Light with different electromagnetic spectrums have different
applications from x-ray to microwave to wireless communication
26
Light Range
Visible light can be represented by the combination of different colors with
changing electromagnetic wavelengths from violet to red in the visible spectrum
1666 Sir Isaac Newton
discovered 6 broad
regions: violet, blue,
green, yellow, orange,
red. Each color blends
smoothly into next
27
Color Fundamentals
Chromatic (colored) light spans to electromagnetic waves between approximately
400 nm and 700 nm which corresponds to colors from violet to red. These colors
are perceived by the human eye in the following way
28
Image Sensing and Acquisition
• CCD (charge-coupled device) camera
• CMOS (complementary metal oxide semiconductor) scanner (Intel RAM)
29
30
31
Matrix elements are called pixels
32
Neighbors of a pixel
• A pixel p at coordinates (x,y) has 4 neighbors:
(x-1,y), (x+1,y), (x,y-1), (x,y+1).
• These pixels are called N4(p)
p
• N8(p) are the eight immediate neighbors of p
• Two pixels are connected if they are
neighbors or their gray levels satisfy certain
conditions (e.g. : g1= g2)
• Two pixels p, q are 4 adjacent if q N4 ( p)
• Two pixels p, q are 8 adjacent if q N8 ( p) 33
Distance Measures
Assume we have 3 pixels: p:(x,y), q:(s,t) and z:(v,w)
A distance function D is a metric that satisfies the
following conditions:
a) D( p, q) 0, D( p, q) 0 iff p q
b) D ( p, q ) D ( q, p )
c ) D ( p, z ) D ( p , q ) D ( q, z )
Example: Euclidean Distance : D( p, q) ( x s) 2 ( y t ) 2
34
Distance Measures
2
2 1 2
• City Block Distance : 2 1 0 1 2
2 1 2
D4 ( p, q) | x s | | y t | 2
D4 1 N4
• Chess Board Distance 2 2 2 2 2
2 1 1 1 2
D8 ( p, q) max(| x s |, y t |) 2 1 0 1 2
2 1 1 1 2
2 2 2 2 2
D8 1 N8
35
Image Scaling
• Image Enlargement
• Pixel Replication
• Nearest Neighbor Interpolation
• Bilinear Interpolation
• Bicubic Interpolation
• Fractional Interpolation
• Adaptive Interpolation
• Image Reduction
• Alternative line reduction
• Fractional linear reduction
• Intensity / gradient based reduction
• Wavelet method 36
A A A B B B
• Pixel Replication: A B 3
A A A B B B
C D A A A B B B
C C C D D D
C C C D D D
C C C D D D
A A B B B
A A B B B
A B 3
• Nearest Neighbor Interpolation: C C D D D
C D
C C D D D
C C D D D
37
Bilinear Interpolation:
38
• Bicubic Interpolation goes one further step by considering the
closest 4x4 neighborhood and gives closer pixels higher weighting in
calculation
f i 1, j 1 f i 1, j
fi, j
F
f i 2, j f i 1, j 2
p1 (t ) (t 3 2t 2 t ) / 2
p2 (t ) (3t 3 5t 2 2) / 2
p3 (t ) (3t 3 4t 2 t ) / 2
p4 (t ) (t 3 t 2 ) / 2
39
4x Bilinear Interpolation 4x Bicubic Interpolation 4x Edge Directed Interpolation
40
Image enlargement is helpful to see more details!
41
Negative Image
• g(x,y) = 255 – f(x,y)
One can see details in shadows!
One can turn day scenario to
night scenario
42