Professional Documents
Culture Documents
Image Enhancement: Biometrics Course
Image Enhancement: Biometrics Course
Image
Enhancement
• PRESENTED BY:
• SAIF ALABACHI
• COMPUTER ENGINEERING
• UNIVERSITY OF TECHNOLOGY
What is Image Enhancement
Improve the quality of an image or accentuate features. Techniques are more general
purpose, and, unlike restoration, a strong model of the degradation process is not assumed.
12/23/2020 2
Enhancement Techniques
When recording image data, there are often particular problems: lighting, motion blur, noise,…
We transform an image A into a new image Anew of the same size, by mapping a grey
level u at pixel location p in A by a gradation function g onto a grey level v=g(u).
12/23/2020 3
Power-Law Transformation
➢ Change contrast and brightness by transforming pixel intensities.
➢ Assign the same new intensity value to all pixels having a given original value.
𝒊𝒏𝒆𝒘 = 𝒄 ∗ 𝒊𝜸
12/23/2020 4
Digital negative
Image negative is produced by subtracting each pixel from the maximum intensity value.
𝒊𝒏𝒆𝒘 = 𝑳 − 𝒙
12/23/2020 5
Contrast Stretching
α𝑥 0≤𝑥<𝑎
𝑦 = ቐ β 𝑥 − 𝑎 + 𝑦𝑎 𝑎≤𝑥<𝑏
γ 𝑥 − 𝑏 + 𝑦𝑏 𝑏≤𝑥<𝐿
0 0≤𝑥<𝑎
𝑦 = ቐβ 𝑥 − 𝑎 𝑎≤𝑥<𝑏
β 𝑏−𝑎 𝑏≤𝑥<𝐿
𝑎 = 50, 𝑏 = 150, β = 2
12/23/2020 7
Range Compression
𝑦 = 𝑐𝑙𝑜𝑔10 (1 + 𝑥)
Where, ‘y’ and ‘x’ are the output and input pixel values and c is the scaling
constant represented by the following expression (for 8-bit)
255
c=
(log 1+𝑚𝑎𝑥𝐼𝑛𝑝𝑢𝑡𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒 )
12/23/2020
𝑐 = 100
8
Homework:
12/23/2020 9
Histogram
12/23/2020 10
Image Histogram
The histogram of a digital image with gray levels from 0 to 𝐿 − 1 is a discrete function ℎ(𝑟𝑘 ) = 𝑛𝑘 ,
where:
nk
• Normalized histogram: p rk
n
12/23/2020 11
Image Histogram
12/23/2020 12
Histogram and Probability Density Function (PDF)
𝐻 𝑢
ℎ 𝑢 =
|𝛺|
• Denominator is the size of histogram (num. of pixels)
• h -> PDF, relative frequencies are set between 0 and 1.
12/23/2020 13
Histogram Modifications
12/23/2020 14
Histogram Equalization
• Histogram equalization is an effective techn for improving the appearance of a poor image
• The function is the same as histogram stretch but often provides more visually pleasing results
across a wider range of images
• Involves probability theory which treat as the probability distribution of gray levels
• Can use a sigmoid lookup to map input to output grey levels
• A sigmoid function g(i) controls the mapping from input to output pixel
• Can easily be implemented in hardware for maximum efficiency
• Often images poorly use the full range of the gray scale.
Solution:
Transform image such that its histogram is spread out more evenly in gray scale
12/23/2020 15
12/23/2020
Corresponding
Histograms
Source image
Histogram Equalization
Equalized Image
16
Histogram Equalization
Normalized histogram p (PDF) of an image f, whose intensity values span from 0 to L-1
𝑔𝑖,𝑗 = 𝑓𝑙𝑜𝑜𝑟((𝐿 − 1) 𝑝𝑛 )
𝑛=0
12/23/2020 17
Histogram Equalization – Discrete Case
12/23/2020 18
Histogram Equalization – Discrete Case
12/23/2020 19
Histogram Equalization – Example 1
12/23/2020 20
Histogram Equalization – Example 2
12/23/2020 21
Histogram Equalization – Example 3
12/23/2020 22
Histogram Equalization – Example 4
12/23/2020 23