ee 663 histogram equalization i - kfupm...spatial & frequency domains there are two broad...
TRANSCRIPT
![Page 1: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/1.jpg)
EE663Image Processing
Histogram Equalization IDr. Samir H. Abdul-Jauwad
Electrical Engineering DepartmentCollege of Engineering Sciences
King Fahd University of Petroleum & MineralsDhahran – Saudi [email protected]
![Page 2: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/2.jpg)
Contents
Over the next few lectures we will look at image enhancement techniques working in the spatial domain:
– What is image enhancement?– Different kinds of image enhancement– Histogram processing– Point processing– Neighbourhood operations
![Page 3: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/3.jpg)
A Note About Grey Levels
So far when we have spoken about image grey level values we have said they are in the range [0, 255]
– Where 0 is black and 255 is whiteThere is no reason why we have to use this range
– The range [0,255] stems from display technologes
For many of the image processing operations in this lecture grey levels are assumed to be given in the range [0.0, 1.0]
![Page 4: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/4.jpg)
What Is Image Enhancement?
Image enhancement is the process of making images more usefulThe reasons for doing this include:
– Highlighting interesting detail in images– Removing noise from images– Making images more visually appealing
![Page 5: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/5.jpg)
Image Enhancement Examples
![Page 6: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/6.jpg)
Image Enhancement Examples (cont…)
![Page 7: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/7.jpg)
Image Enhancement Examples (cont…)
![Page 8: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/8.jpg)
Image Enhancement Examples (cont…)
![Page 9: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/9.jpg)
Spatial & Frequency Domains
There are two broad categories of image enhancement techniques
– Spatial domain techniques• Direct manipulation of image pixels
– Frequency domain techniques• Manipulation of Fourier transform or wavelet transform of an
image
For the moment we will concentrate on techniques that operate in the spatial domain
![Page 10: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/10.jpg)
Image HistogramsThe histogram of an image shows us the distribution of grey levels in the imageMassively useful in image processing, especially in segmentation
Grey Levels
Freq
uenc
ies
![Page 11: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/11.jpg)
Histogram Examples (cont…)
![Page 12: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/12.jpg)
Histogram Examples (cont…)
![Page 13: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/13.jpg)
Histogram Examples (cont…)
![Page 14: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/14.jpg)
Histogram Examples (cont…)
![Page 15: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/15.jpg)
Histogram Examples (cont…)
![Page 16: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/16.jpg)
Histogram Examples (cont…)
![Page 17: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/17.jpg)
Histogram Examples (cont…)
![Page 18: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/18.jpg)
Histogram Examples (cont…)
![Page 19: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/19.jpg)
Histogram Examples (cont…)
A selection of images and their histogramsNotice the relationships between the images and their histogramsNote that the high contrast image has the most evenly spaced histogram
![Page 20: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/20.jpg)
Histogram EqualisationSpreading out the frequencies in an image (or equalising the image) is a simple way to improve dark or washed out imagesThe formula for histogram equalisation is given where
– rk: input intensity– sk: processed intensity– k: the intensity range
(e.g 0.0 – 1.0)– nj: the frequency of intensity j– n: the sum of all frequencies
)( kk rTs
k
jjr rp
1)(
k
j
j
nn
1
![Page 21: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/21.jpg)
Equalisation Transformation Function
![Page 22: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/22.jpg)
Equalisation Examples1
![Page 23: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/23.jpg)
Equalisation Transformation Functions
The functions used to equalise the images in the previous example
![Page 24: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/24.jpg)
Equalisation Examples2
![Page 25: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/25.jpg)
Equalisation Transformation Functions
The functions used to equalise the images in the previous example
![Page 26: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/26.jpg)
Equalisation Examples (cont…)
3
4
![Page 27: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/27.jpg)
Equalisation Examples (cont…)
3
4
![Page 28: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/28.jpg)
Equalisation Transformation Functions
The functions used to equalise the images in the previous examples
![Page 29: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/29.jpg)
Contrast Stretching
We can fix images that have poor contrast by applying a pretty simple contrast specificationThe interesting part is how do we decide on this transformation function?
![Page 30: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/30.jpg)
Contrast Stretching
• To increase the dynamic range of the gray levels in the image being processed.
![Page 31: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/31.jpg)
Contrast Stretching
• The locations of (r1,s1) and (r2,s2) control the shape of the transformation function.
– If r1= s1 and r2= s2 the transformation is a linear function and produces no changes.
– If r1=r2, s1=0 and s2=L-1, the transformation becomes a thresholding function that creates a binary image.
![Page 32: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/32.jpg)
Contrast Stretching
• More on function shapes:
– Intermediate values of (r1,s1) and (r2,s2) produce various degrees of spread in the gray levels of the output image, thus affecting its contrast.
– Generally, r1≤r2 and s1≤s2 is assumed.
![Page 33: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/33.jpg)
Contrast Stretching
![Page 34: EE 663 Histogram Equalization I - KFUPM...Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques • Direct manipulation](https://reader030.vdocuments.site/reader030/viewer/2022041101/5eda0812bb309434ee032280/html5/thumbnails/34.jpg)
Summary
We have looked at:– Different kinds of image enhancement– Histograms– Histogram equalisation
Next time we will start to look at point processing and some neighbourhood operations