SlideShare a Scribd company logo
STATISTICAL ANALYSIS OF IMAGES
CS-467 Digital Image Processing
1
Statistical Characteristics of Images
• Statistical analysis of images is very important
for
 global contrast evaluation and its
enhancement
 local contrast evaluation and its
enhancement
 estimation of noise
2
Histogram
• The histogram of an NxM digital image with
intensity levels {0,1,…,L-1} is a discrete
function
where is the kth intensity value and is
the number of pixels in the image with
intensity
• Evidently,
3
( ) ; 0,1,..., 1k kh r n k L= = −
kr kn
kr
( )
1
0
L
k
k
h r MN
−
=
=∑
Normalized Histogram
• The normalized histogram of an NxM image
with intensity levels {0,1,…,L-1} is its histogram
normalized by the product NM (the number
of pixels in the image). The normalized
histogram is an estimate of the probability of
occurrence of each intensity level in the
image:
• Evidently,
4
( )
( ); 0,1,..., 1k k
k
h r
p r k L
NM
= = −
( )
1
0
1
L
k
k
p r
−
=
=∑
Mean (Statistically Correct
Definition)
• The global mean value of an image is the
average intensity of all the pixels in the image
• Let A be NxM image. Then its global mean
where is the kth intensity value, is
the probability of occurrence the intensity
5
( )
1
0
L
k k
k
m r p r
−
=
= ∑
kr ( )kp r
kr
Sampling Mean
• The global sampling mean value of an image is
the average intensity of all the pixels in the image
• Let A be NxM image. Then its global mean
• Evidently, the global sampling mean is equal to
the global mean (statistical). We will call them
both simply mean
6
( )
1 1
0 0
1
,
N M
i j
m A i j
NM
− −
= =
= ∑∑
Variance (Dispersion) –
Statistically Correct Definition
• Variance (Dispersion) is the second moment of
intensity about its mean
where m is the mean, is the kth intensity
value, is the probability of occurrence
the intensity
7
( ) ( )
1
22
2
0
( )
L
k k
k
mr r p rσ µ
−
=
= = −∑
kr
( )kp r
kr
Sampling Variance (Dispersion)
• Variance (Dispersion) is the second moment of
intensity about its mean
where m is the mean
• Evidently, the global sampling variance is equal
to the global variance (statistical). We will call
them both simply variance (dispersion)
8
( )( )
1 1
22
2
0 0
1
( ) ,
N M
i j
r A i j
NM
mσ µ
− −
= =
= = −∑∑
Standard Deviation
• Standard Deviation is the square root of the
variance
9
( ) ( )
( )( )
1 1
2
1
2 0 02
0
,
N M
L
i j
k k
k
A i j m
r m p r
NM
σ σ
− −
−
= =
=
−
= = − =
∑∑
∑
Importance of Mean,
Variance, and Standard Deviation)
• Mean is a measure of average intensity
• The closer is mean to the middle of the
dynamic range, the higher contrast should be
expected
• Variance (standard deviation) is a measure of
contrast in an image
• The larger is variance (standard deviation), the
higher is contrast
10
Signal-to-Noise Ratio (SNR)
• SNR is a measure , which is used to quantify how
much a signal has been corrupted by noise
• Pimage – image power, Pnoise – noise power
• Asignal – image amplitude, Anoise – noise amplitude
11
2
10 , ,
2
10 10
10log
10log 20log
image image
noise noise
image
DB signal DB noise DB
noise
image image
DB
noise noise
P A
SNR
P A
P
SNR P P
P
A A
SNR
A A
 
= =  
 
 
= = − 
 
   
= =   
   
Signal-to-Noise Ratio (SNR)
• Since clean image and noise amplitudes are
unknown, to estimate SNR, the following
method is used
• where m is the mean and σ is the standard
deviation of an image
12
m
SNR
σ
≈
Signal-to-Noise Ratio (SNR)
• The Rose criterion says that if an image has
SNR>5, then a level of noise is so small that it
shall be considered negligible and the image shall
be considered clean. If SNR<5, then some noise
should be expected.
• The lower is SNR, the stronger is noise
• Small-detailed images (for example, satellite
images) may have lower SNR because the
presence of many small details always lead to the
higher standard deviation
13
Mean Square Error and Standard Deviation
Between Two Images
• For two NxM digital images A and B the mean
square error (deviation) (MSE) is defined as
follows:
• For two NxM digital images A and B the
standard deviation (the root mean square
error - RMSE) is defined as follows:
14
( ) ( )( )
1 1
2
0 0
1
, ,
N M
i j
MSE A i j B i j
NM
− −
= =
= −∑∑
( ) ( )( )
1 1
2
0 0
1
, ,
N M
i j
RMSE MSE A i j B i j
NM
− −
= =
= = −∑∑
Peak Signal-to-Noise Ratio (PSNR)
• PSNR is the ratio between the maximum
possible power of an image and a power of
corrupting noise
• To estimate PSNR of an image, it is necessary
to compare this image to an “ideal” clean
image with the maximum possible power
15
Peak Signal-to-Noise Ratio (PSNR)
• where L is the number of maximum possible
intensity levels (the minimum intensity level
suppose to be 0) in an image, MSE is the mean
square error, RMSE is the root mean square
error between a tested image and an “ideal”
image
16
2
10 10
( 1) 1
10log 20log
L L
PSNR
MSE RMSE
 − − 
=   
  
Peak Signal-to-Noise Ratio (PSNR)
• PSNR is commonly used to estimate the efficiency
of filters, compressors, etc.
• How it works: a clean image should be distorted
by noise or compressed, respectively. Then a
noisy image, a filtered image or a compressed
image shall be compared to the clean one
(“ideal”) in terms of PSNR
• The larger is PSNR, the more efficient is a
corresponding filter or compression method, and
the fewer an analyzed image differs from the
“ideal” one
17
Peak Signal-to-Noise Ratio (PSNR)
• PSNR <30.0 (this corresponds to RMSE>11) is
commonly considered low. This means the presence of
clearly visible noise or smoothing of many edges
• PSNR > 30.0 (this corresponds to RMSE <8.6) is
commonly considered as acceptable (some noise is still
visible or small details are still smoothed)
• PSNR > 33.0 (this corresponds to RMSE <5.6) is
commonly considered as good
• PSNR > 35.0 (this correspond to RMSE <4.5) is
commonly considered as excellent (it is usually not
possible to find any visual distinction from the “ideal”
image)
18
Mean Absolute Error
between two images (MAE)
• Mean Absolute Error between two NxM digital
images A and B measures the absolute
closeness of these images to each other:
19
( ) ( )
1 1
0 0
1
, ,
N M
i j
MAE A i j B i j
NM
− −
= =
−∑∑
Contrast Enhancement
• If an actual dynamic range of an image
is too narrow, its histogram is also too narrow
and, as a result, this image has a low contrast
• To take care of this problem, the range of the
image should be extended and its histogram
should be equalized, to ensure that more
intensity values are presented in the image
and there are no sharp spikes in the histogram
20
{ }0 1 0, ,..., , ;k kr r r k L r r L<< − <<
Histogram Equalization
• The histogram of an image can be equalized
using the following transformation
where r is the initial intensity value, s is the
intensity value after the transformation
• Function T must be monotonically increasing
and limited
is a new range
21
0 ( ) ls T r s≤ ≤
0( ); ks T r r r r= ≤ ≤
{ }0 ,..., ls s
Histogram Equalization
22
© 1992-2008 R.C. Gonzalez & R.E. Woods
Example of Contrast Enhancement
23
© 1992-2008 R.C. Gonzalez & R.E. Woods
Contrast Stretching
(“Piecewise Linear”, “Break Line”
Correction)
• Contrast Stretching is a process that expands the range of
intensity levels in an image so that it spans the full intensity
range
24
© 1992-2008 R.C. Gonzalez & R.E. Woods
Intensity Level Slicing
• Intensity level slicing is a process of
highlighting of some intensity subrange with a
possible suppression of other subranges.
25
© 1992-2008 R.C. Gonzalez & R.E. Woods
Linear Histogram Equalization
• Linear histogram equalization for an image
with the range can be
done as follows
• If , then
26
{ }0 1, ,..., , 1kr r r k L≤ −
0
0 0 0
0 0
( ) ( ) ( )
i i
k
i i k r j j
j j
r r
s T r r r p r r n r
MN= =
−
= = − + = +∑ ∑
© 1992-2008 R.C. Gonzalez & R.E. Woods
0 0r =
0 0
( ) ( ) ;
0,1,...,
i i
k
i i k r j j
j j
r
s T r r p r n
MN
i k
= =
= = =
=
∑ ∑
Linear Histogram Equalization
27
© 1992-2008 R.C. Gonzalez & R.E. Woods
See also Fig. 3.20. Let us make the same experiments
Linear Contrast Correction
• Linear contrast correction is a kind of
histogram equalization for an image with the
range ,
which produces an output image with the pre-
determined mean and standard deviation
28
;
0,1,...,
new new
i i new old
old old
s r m m
i k
σ σ
σ σ
 
= + − 
 
=
{ }0 1, ,..., , 1kr r r k L≤ −

More Related Content

What's hot

Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portion
Moe Moe Myint
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
thanhhoang2012
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processing
nikesh gadare
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
Tawose Olamide Timothy
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Poonam Seth
 
image enhancement
 image enhancement image enhancement
image enhancement
Rajendra Prasad
 
05 histogram processing DIP
05 histogram processing DIP05 histogram processing DIP
05 histogram processing DIP
babak danyal
 
Image transforms
Image transformsImage transforms
Image transforms
11mr11mahesh
 
Image processing SaltPepper Noise
Image processing SaltPepper NoiseImage processing SaltPepper Noise
Image processing SaltPepper NoiseAnkush Srivastava
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
Moe Moe Myint
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
SN Chakraborty
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
Ahmed Daoud
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
Kuppusamy P
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
Maria Akther
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
DeepikaT13
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
Hemantha Kulathilake
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
Shajun Nisha
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformationsYahya Alkhaldi
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
AAKANKSHA JAIN
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
Md Shabir Alam
 

What's hot (20)

Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portion
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processing
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
image enhancement
 image enhancement image enhancement
image enhancement
 
05 histogram processing DIP
05 histogram processing DIP05 histogram processing DIP
05 histogram processing DIP
 
Image transforms
Image transformsImage transforms
Image transforms
 
Image processing SaltPepper Noise
Image processing SaltPepper NoiseImage processing SaltPepper Noise
Image processing SaltPepper Noise
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 

Viewers also liked

New technology new approaches - tmf - july 2016
New technology new approaches - tmf - july 2016New technology new approaches - tmf - july 2016
New technology new approaches - tmf - july 2016
Stevan Zivanovic
 
Documentos para buscar
Documentos para buscarDocumentos para buscar
Documentos para buscarpardelocas
 
All about New Zealand Wines
All about New Zealand WinesAll about New Zealand Wines
All about New Zealand Wines
Bhavisha Jangid
 
9th standard kannada question paper
9th standard kannada question paper9th standard kannada question paper
9th standard kannada question paper
KarnatakaOER
 
Karangan (kawan baik saya)
Karangan (kawan baik saya)Karangan (kawan baik saya)
Karangan (kawan baik saya)
y_shinwei
 
как работает кэшбэк сервис копикот.ру
как работает кэшбэк сервис копикот.рукак работает кэшбэк сервис копикот.ру
как работает кэшбэк сервис копикот.ру
Копикот.ру Кэшбэк-сервис
 

Viewers also liked (7)

New technology new approaches - tmf - july 2016
New technology new approaches - tmf - july 2016New technology new approaches - tmf - july 2016
New technology new approaches - tmf - july 2016
 
Documentos para buscar
Documentos para buscarDocumentos para buscar
Documentos para buscar
 
All about New Zealand Wines
All about New Zealand WinesAll about New Zealand Wines
All about New Zealand Wines
 
9th standard kannada question paper
9th standard kannada question paper9th standard kannada question paper
9th standard kannada question paper
 
Taller3 word
Taller3 wordTaller3 word
Taller3 word
 
Karangan (kawan baik saya)
Karangan (kawan baik saya)Karangan (kawan baik saya)
Karangan (kawan baik saya)
 
как работает кэшбэк сервис копикот.ру
как работает кэшбэк сервис копикот.рукак работает кэшбэк сервис копикот.ру
как работает кэшбэк сервис копикот.ру
 

Similar to Lecture 3

Module 2
Module 2Module 2
Module 2
UllasSS1
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
BHAGYAPRASADBUGGE
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
SAhsanShahBukhari
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
Tirusew1
 
Module 1.pptx
Module 1.pptxModule 1.pptx
Module 1.pptx
Mattupallipardhu
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
Dip3
Dip3Dip3
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
shabanam tamboli
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
ShabanamTamboli1
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
ssuser0bf6a8
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation ppt
KNaveenKumarECE
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
ShardaSalunkhe1
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
Surabhi Ks
 
Adaptive unsharp masking
Adaptive unsharp maskingAdaptive unsharp masking
Adaptive unsharp masking
Ravi Teja
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
DEEPASHRI HK
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
Amnaakhaan
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
University of Potsdam
 

Similar to Lecture 3 (20)

Module 2
Module 2Module 2
Module 2
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
 
Module 1.pptx
Module 1.pptxModule 1.pptx
Module 1.pptx
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Dip3
Dip3Dip3
Dip3
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation ppt
 
h.pdf
h.pdfh.pdf
h.pdf
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Adaptive unsharp masking
Adaptive unsharp maskingAdaptive unsharp masking
Adaptive unsharp masking
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 

More from Wael Sharba

Project 8
Project 8Project 8
Project 8
Wael Sharba
 
Project 7
Project 7Project 7
Project 7
Wael Sharba
 
Project 6
Project 6Project 6
Project 6
Wael Sharba
 
Project 5
Project 5Project 5
Project 5
Wael Sharba
 
Project 4
Project 4Project 4
Project 4
Wael Sharba
 
Project 2
Project 2Project 2
Project 2
Wael Sharba
 
Project 1
Project 1Project 1
Project 1
Wael Sharba
 
Project 3
Project 3Project 3
Project 3
Wael Sharba
 
Project 9
Project 9Project 9
Project 9
Wael Sharba
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
Wael Sharba
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
Wael Sharba
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
Wael Sharba
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
Wael Sharba
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
Wael Sharba
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
Wael Sharba
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
Wael Sharba
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
Wael Sharba
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
Wael Sharba
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Wael Sharba
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
Wael Sharba
 

More from Wael Sharba (20)

Project 8
Project 8Project 8
Project 8
 
Project 7
Project 7Project 7
Project 7
 
Project 6
Project 6Project 6
Project 6
 
Project 5
Project 5Project 5
Project 5
 
Project 4
Project 4Project 4
Project 4
 
Project 2
Project 2Project 2
Project 2
 
Project 1
Project 1Project 1
Project 1
 
Project 3
Project 3Project 3
Project 3
 
Project 9
Project 9Project 9
Project 9
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 

Lecture 3

  • 1. STATISTICAL ANALYSIS OF IMAGES CS-467 Digital Image Processing 1
  • 2. Statistical Characteristics of Images • Statistical analysis of images is very important for  global contrast evaluation and its enhancement  local contrast evaluation and its enhancement  estimation of noise 2
  • 3. Histogram • The histogram of an NxM digital image with intensity levels {0,1,…,L-1} is a discrete function where is the kth intensity value and is the number of pixels in the image with intensity • Evidently, 3 ( ) ; 0,1,..., 1k kh r n k L= = − kr kn kr ( ) 1 0 L k k h r MN − = =∑
  • 4. Normalized Histogram • The normalized histogram of an NxM image with intensity levels {0,1,…,L-1} is its histogram normalized by the product NM (the number of pixels in the image). The normalized histogram is an estimate of the probability of occurrence of each intensity level in the image: • Evidently, 4 ( ) ( ); 0,1,..., 1k k k h r p r k L NM = = − ( ) 1 0 1 L k k p r − = =∑
  • 5. Mean (Statistically Correct Definition) • The global mean value of an image is the average intensity of all the pixels in the image • Let A be NxM image. Then its global mean where is the kth intensity value, is the probability of occurrence the intensity 5 ( ) 1 0 L k k k m r p r − = = ∑ kr ( )kp r kr
  • 6. Sampling Mean • The global sampling mean value of an image is the average intensity of all the pixels in the image • Let A be NxM image. Then its global mean • Evidently, the global sampling mean is equal to the global mean (statistical). We will call them both simply mean 6 ( ) 1 1 0 0 1 , N M i j m A i j NM − − = = = ∑∑
  • 7. Variance (Dispersion) – Statistically Correct Definition • Variance (Dispersion) is the second moment of intensity about its mean where m is the mean, is the kth intensity value, is the probability of occurrence the intensity 7 ( ) ( ) 1 22 2 0 ( ) L k k k mr r p rσ µ − = = = −∑ kr ( )kp r kr
  • 8. Sampling Variance (Dispersion) • Variance (Dispersion) is the second moment of intensity about its mean where m is the mean • Evidently, the global sampling variance is equal to the global variance (statistical). We will call them both simply variance (dispersion) 8 ( )( ) 1 1 22 2 0 0 1 ( ) , N M i j r A i j NM mσ µ − − = = = = −∑∑
  • 9. Standard Deviation • Standard Deviation is the square root of the variance 9 ( ) ( ) ( )( ) 1 1 2 1 2 0 02 0 , N M L i j k k k A i j m r m p r NM σ σ − − − = = = − = = − = ∑∑ ∑
  • 10. Importance of Mean, Variance, and Standard Deviation) • Mean is a measure of average intensity • The closer is mean to the middle of the dynamic range, the higher contrast should be expected • Variance (standard deviation) is a measure of contrast in an image • The larger is variance (standard deviation), the higher is contrast 10
  • 11. Signal-to-Noise Ratio (SNR) • SNR is a measure , which is used to quantify how much a signal has been corrupted by noise • Pimage – image power, Pnoise – noise power • Asignal – image amplitude, Anoise – noise amplitude 11 2 10 , , 2 10 10 10log 10log 20log image image noise noise image DB signal DB noise DB noise image image DB noise noise P A SNR P A P SNR P P P A A SNR A A   = =       = = −        = =       
  • 12. Signal-to-Noise Ratio (SNR) • Since clean image and noise amplitudes are unknown, to estimate SNR, the following method is used • where m is the mean and σ is the standard deviation of an image 12 m SNR σ ≈
  • 13. Signal-to-Noise Ratio (SNR) • The Rose criterion says that if an image has SNR>5, then a level of noise is so small that it shall be considered negligible and the image shall be considered clean. If SNR<5, then some noise should be expected. • The lower is SNR, the stronger is noise • Small-detailed images (for example, satellite images) may have lower SNR because the presence of many small details always lead to the higher standard deviation 13
  • 14. Mean Square Error and Standard Deviation Between Two Images • For two NxM digital images A and B the mean square error (deviation) (MSE) is defined as follows: • For two NxM digital images A and B the standard deviation (the root mean square error - RMSE) is defined as follows: 14 ( ) ( )( ) 1 1 2 0 0 1 , , N M i j MSE A i j B i j NM − − = = = −∑∑ ( ) ( )( ) 1 1 2 0 0 1 , , N M i j RMSE MSE A i j B i j NM − − = = = = −∑∑
  • 15. Peak Signal-to-Noise Ratio (PSNR) • PSNR is the ratio between the maximum possible power of an image and a power of corrupting noise • To estimate PSNR of an image, it is necessary to compare this image to an “ideal” clean image with the maximum possible power 15
  • 16. Peak Signal-to-Noise Ratio (PSNR) • where L is the number of maximum possible intensity levels (the minimum intensity level suppose to be 0) in an image, MSE is the mean square error, RMSE is the root mean square error between a tested image and an “ideal” image 16 2 10 10 ( 1) 1 10log 20log L L PSNR MSE RMSE  − −  =      
  • 17. Peak Signal-to-Noise Ratio (PSNR) • PSNR is commonly used to estimate the efficiency of filters, compressors, etc. • How it works: a clean image should be distorted by noise or compressed, respectively. Then a noisy image, a filtered image or a compressed image shall be compared to the clean one (“ideal”) in terms of PSNR • The larger is PSNR, the more efficient is a corresponding filter or compression method, and the fewer an analyzed image differs from the “ideal” one 17
  • 18. Peak Signal-to-Noise Ratio (PSNR) • PSNR <30.0 (this corresponds to RMSE>11) is commonly considered low. This means the presence of clearly visible noise or smoothing of many edges • PSNR > 30.0 (this corresponds to RMSE <8.6) is commonly considered as acceptable (some noise is still visible or small details are still smoothed) • PSNR > 33.0 (this corresponds to RMSE <5.6) is commonly considered as good • PSNR > 35.0 (this correspond to RMSE <4.5) is commonly considered as excellent (it is usually not possible to find any visual distinction from the “ideal” image) 18
  • 19. Mean Absolute Error between two images (MAE) • Mean Absolute Error between two NxM digital images A and B measures the absolute closeness of these images to each other: 19 ( ) ( ) 1 1 0 0 1 , , N M i j MAE A i j B i j NM − − = = −∑∑
  • 20. Contrast Enhancement • If an actual dynamic range of an image is too narrow, its histogram is also too narrow and, as a result, this image has a low contrast • To take care of this problem, the range of the image should be extended and its histogram should be equalized, to ensure that more intensity values are presented in the image and there are no sharp spikes in the histogram 20 { }0 1 0, ,..., , ;k kr r r k L r r L<< − <<
  • 21. Histogram Equalization • The histogram of an image can be equalized using the following transformation where r is the initial intensity value, s is the intensity value after the transformation • Function T must be monotonically increasing and limited is a new range 21 0 ( ) ls T r s≤ ≤ 0( ); ks T r r r r= ≤ ≤ { }0 ,..., ls s
  • 22. Histogram Equalization 22 © 1992-2008 R.C. Gonzalez & R.E. Woods
  • 23. Example of Contrast Enhancement 23 © 1992-2008 R.C. Gonzalez & R.E. Woods
  • 24. Contrast Stretching (“Piecewise Linear”, “Break Line” Correction) • Contrast Stretching is a process that expands the range of intensity levels in an image so that it spans the full intensity range 24 © 1992-2008 R.C. Gonzalez & R.E. Woods
  • 25. Intensity Level Slicing • Intensity level slicing is a process of highlighting of some intensity subrange with a possible suppression of other subranges. 25 © 1992-2008 R.C. Gonzalez & R.E. Woods
  • 26. Linear Histogram Equalization • Linear histogram equalization for an image with the range can be done as follows • If , then 26 { }0 1, ,..., , 1kr r r k L≤ − 0 0 0 0 0 0 ( ) ( ) ( ) i i k i i k r j j j j r r s T r r r p r r n r MN= = − = = − + = +∑ ∑ © 1992-2008 R.C. Gonzalez & R.E. Woods 0 0r = 0 0 ( ) ( ) ; 0,1,..., i i k i i k r j j j j r s T r r p r n MN i k = = = = = = ∑ ∑
  • 27. Linear Histogram Equalization 27 © 1992-2008 R.C. Gonzalez & R.E. Woods See also Fig. 3.20. Let us make the same experiments
  • 28. Linear Contrast Correction • Linear contrast correction is a kind of histogram equalization for an image with the range , which produces an output image with the pre- determined mean and standard deviation 28 ; 0,1,..., new new i i new old old old s r m m i k σ σ σ σ   = + −    = { }0 1, ,..., , 1kr r r k L≤ −