SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
Image Enhancement
P. Kuppusamy
Content
• Image enhancement
• Spatial domain enhancement
– Point operations, Spatial operations
– Digital Negative
– Contrast Stretching
– Thresholding
– Gray level slicing
– Bit plane slicing
– Dynamic range compression
– Histogram modeling
– Adaptive Histogram Equalization
• Frequency domain enhancement
– Fourier Transforms / Spectral (Frequency) Analysis
• Color Image
– Color Image Enhancement
Image Enhancement
• Image enhancement is improving the perception of information in images
for human viewers.
• Also, providing better input for the further image processing techniques.
• It accentuates or sharpens image features such as edges, boundaries, or
contrast to make a graphic display more helpful for display and analysis.
• The enhancement doesn't increase the inherent information content of the
data, but it increases the dynamic range of the chosen features that can be
detected easily.
Image enhancement methods:
1. Spatial domain enhancement
– operate on pixels directly
1. Point operations 2. Spatial operations (Based on Filtering)
2. Frequency domain enhancement
– operate on the Fourier transform of an image
Spatial Domain Enhancement
• Spatial domain techniques are performed to the image plane itself.
• Its working with pixel values or raw data of an image.
• The operation is g(x, y) = T[f(x, y)], g is the modified output image, f is
the input original image and T [ . ] is an transformation operation on f
defined over some neighborhood of (x, y).
• Based on the operations on the image pixels, it is divided into 3
categories:
1. Point processing
2. Neighborhood processing
3. Histogram based approach.
• The 2D convolution is performed
in Spatial domain:
g(x, y)= f(x, y) * h(x, y)
• Figure shows the image size
256 x 256 pixels from (0,0) to (255, 255)
(255, 255)
(0, 0)
1. Point Processing (Operations) / Greyscale transformation
x
• The new grey level (color) value in a spatial location (m, n) in the
resulting image depends only on the grey level (color) in the same
spatial location (m, n) in the original image/
m m
n n
U[M×N] V[M×N]
Point-wise operation
(grey scale transformation)
f(∙) => v=f(u)
u(m, n) v(m, n) = f(u(m, n))
∀m = 0, 1, .. M-1
∀n = 0, 1, .. N-1
Point Processing (Operations) / Greyscale transformation
• It works on single pixel at a time i.e. T is 1 x 1 operator.
• Transfer function is S = T(r)
• S – processed point image
• r – point to be processed
Examples of point processing are:
• Digital Negative
• Contrast Stretching
• Thresholding
• Gray level slicing
• Bit plane slicing
• Dynamic range compression
Point Processing (Operations) / Greyscale transformation
• Point operations are zero-memory operations where a given gray
level r[0, L-1] is mapped to another gray level s[0, L-1]
according to a transformation. L = 256
)
(x
f
y =
L
L
x
y
Digital Negative
• Negative image is obtained by reverse (inverse) scaling of the gray levels
of the transformation,
v = L- u and umax = 255
• Useful in the display of medical images (X-ray).
• L is total number of gray levels i.e. 255
• But, Generally L range is (0 -255).
• So, v = (L -1) - u i.e. v = (256-1) – u.
L
u
0
L
v
Input intensity
O/p
Gray
level
Contrast Stretching
• Contrast stretching increases the dynamic range of the gray levels in the image.
• Low contrast images occur due to poor or non-uniform lightning conditions,
small dynamic range of imaging sensors.







+
−


+
−


=
L
u
b
v
b
u
b
u
a
v
a
u
a
u
u
v
b
a
)
(
)
(
0



L u
0 a b
va
vb
200
,
30
,
1
,
2
,
2
.
0
,
150
,
50 =
=
=
=
=
=
= b
a y
y
b
a 


• For dark region stretch α >1, a=L/3 i.e. slope < 1
• For mid region stretch β>1 ,b=2/3L
• For bright region stretch γ>1 i.e. slope > 1
Dotted line – Identity transformation
Solid line – Contrast Stretching
Clipping and Thresholding
• Clipping is a special case of contrast stretching, where α= γ=0
• Useful for noise reduction when the input signal is known and the range is [a, b]
i.e. valley between the peaks of the histogram.
• It is used for binary or other images that have bimodal distribution of gray levels.
• Thresholding is extreme contrast stretching where a = b = t and the output comes
as binary. F
f(u)
0
nu
L
,
,
,
0 u a
a u b
b u L
=
 
 
 





V
U
a b
V
U
Clipping Thresholding
u1 = u2
v1 =0, v2 = L -1
Intensity level Slicing
• Permit segmentation of certain gray level regions from the rest of the image.


 

=
otherwise
b
u
a
L
v
,
0
,


 

=
otherwise
u
b
u
a
L
v
,
,
• Transformation highlights
range [A, B] of gray levels and
reduces all others to a constant
level.
• Transformation highlights
range [A, B], but preserves all
other level.
Bit (extraction) level Slicing
• This transformation is useful in determining the number of visually significant
bits in an Image.
• Suppose each pixel is represented by 8 bits it is desired to extract the nth most
significant bit and display it .
• Higher-order bits contain the majority of the visually significant data
Range Compression (Log Transformation)
• Sometime, dynamic range of image exceeds the capability of display device. So it
need to compressed.
• Log operator is an excellent compression function.
• Dynamic range compression is achieved using log operator.
• c – normalization constant and u – input intensity
)
1
(
log10 u
c
v +
=
L
u
0
v
L
2. Local neighborhood operations
• Operation performs on local neighborhoods of input pixels.
• Image is convolved with Finite Impulse Response (FIR) filter (Spatial mask)
Local neighborhood methods:
• Min – Set the pixel value to the minimum in the neighborhood pixel
• Max – Set the pixel value to the maximum in the neighborhood pixel
• Median – Set the pixel value to the midpoint of the neighborhood pixels.
• Mean - Set the pixel value to the mean of the neighborhood pixels.
3. Histogram modeling
• Image Histogram is a graphical representation of the
lightness/color distribution in a digital image. It plots the number
of pixels for each value.
• Histogram of a digital gray image range [0, L-1] is a discrete
function
h(rk) = nk
– rk is the kth gray level (value) pixel
– nk is the number of pixels in the image having gray level rk.
0 50 100 150 200
0
500
1000
1500
2000
2500
3000
Histogram modeling
• Normalize a histogram by dividing each of its values by the total number
of pixels in the image n.
Normalized histogram p(rk) = nk / n, for k = 0, 1, …, L -1.
• nk is number of pixels of the gray value rk
• p(rk) estimation of the probability of occurrence of gray level rk.
• The sum of all components of a normalized histogram is equal to 1.
Why Histogram modeling is need?
• Histograms are the basis for numerous spatial domain processing
techniques.
• Histogram manipulation can be used effectively for image enhancement.
• Histograms can be used to provide useful image statistics.
• Information derived from histograms are quite useful in other image
processing applications, such as image compression and segmentation.
Why Histogram modeling is need?
0 50 100 150 200 250
0
0.5
1
1.5
2
2.5
3
3.5
4
x 10
4
Histogram information reveals that image is under-exposed
Why Histogram modeling is need?
Histogram information reveals that image is over-exposed
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
7000
3. Histogram Equalization – Adjust the image pixel values
• Find a map f(x) such that the histogram of the modified (equalized) image is
flat (uniform).
• Cumulative Probability Function (cdf) of a random variable approximates a
uniform distribution

=
=
x
t
t
h
x
s
0
)
(
)
(
h(t) is the histogram (pdf)

=

=
x
t
t
h
L
y
0
)
(
Uniform
Quantization

=
=
L
t
t
h
0
1
)
(
Note:
L
1

=
=
x
t
t
h
s
0
)
(
x
L
y
0
cumulative probability function
Histogram Comparison
0 50 100 150 200
0
500
1000
1500
2000
2500
3000
0 50 100 150 200 250 300
0
500
1000
1500
2000
2500
3000
before equalization after equalization
Histogram Equalization
before equalization after equalization
Histogram Equalization
Histogram Equalization
Histogram Equalization
Original Histogram Transformation Function Equalized Histogram
3.1. Adaptive Histogram Equalization
• Instead of doing histogram equalization using the whole image, compute
the distribution for a moving window around the given pixel.
• Computes several histograms, each corresponding to a distinct section of
the image, and uses them to redistribute the lightness values of the image.
• It improves the local contrast and enhancing the definitions of edges in
each region of an image.
Frequency Domain Enhancement
• The image f(x,y) is transferred into frequency domain i.e. Compute the Fourier
Transform (Discrete Fourier Transform) of the image.
• Enhancement operations (brightness, contrast) performed on Fourier Transform
of image, then find Inverse Fourier Transform for the enhanced image.
• G(u, v) = F(u, v) H(u, v) - Frequency domain representation
• When applying transformation function on input image pixels modifies the pixel
values in the output image.
H(u, v)
F(u, v) H(u, v) F(u, v)
Fourier Transforms / Spectral (Frequency) Analysis
• Fourier Transform decomposes an image into its sine and cosine components.
• The output of the transformation represents the image in the Fourier or frequency
domain, while the input image is the spatial domain equivalent.
• In the Fourier domain image, each point represents a particular frequency contained
in the spatial domain image.
• For digital images, Discrete Fourier Transform (DFT) is sufficient to use spatial
domain image. i.e. the image in the spatial and Fourier domain are of the same size.
• FT produces a complex number valued output image which can be displayed with
two images, either real and imaginary part or with magnitude and phase.
• In image processing, the magnitude of the FT contains most of the information of the
geometric structure of the spatial domain image.
• However, if want to re-transform the Fourier image into the correct spatial domain
after some processing in the frequency domain, must preserve both magnitude and
phase of the Fourier image.
• The Fourier domain image has a much greater range than the image in the spatial
domain. For good accuracy, its values are calculated and stored in float values.
• DFT takes O(n2) operations, but Fast Fourier Transform (FFT) takes O(n log2n)
operations
Fourier Transforms properties
• Superposition: The FT of a sum of signals is the sum of their Fourier transforms. Thus,
the Fourier transform is a linear operator.
• Shift: The FT of a shifted signal is the transform of the original signal multiplied by a
linear phase shift (complex sinusoid).
• Reversal: The FT of a reversed signal is the complex conjugate of the signal’s transform.
• Convolution: The FT of a pair of convolved signals is the product of their transforms.
• Correlation: The FT of a correlation is the product of the first transform times the
complex conjugate of the second one.
• Multiplication: The FT of the product of two signals is the convolution of their
transforms.
• Differentiation: The FT of the derivative of a signal is that signal’s transform multiplied
by the frequency. In other words, differentiation linearly emphasizes (magnifies) higher
frequencies.
• Domain scaling: The FT of a stretched signal is the equivalently compressed (and scaled)
version of the original transform and vice versa.
• Real images: The FT of a real-valued signal is symmetric around the origin. This fact can
be used to save space and to double the speed of image FFTs by packing alternating
scanlines into the real and imaginary parts of the signal being transformed.
• Parseval’s Theorem: The energy (sum of squared values) of a signal is the same as the
energy of its Fourier transform.
Frequency Domain Enhancement
• Finite curves of image can be expressed as the integral of sines/cosines multiplied
by a weighing function.
Steps of filtering in the frequency domain
1. Calculate the DFT of the image f(u, v)
2. Generate a frequency domain filter H
– H(u, v) and F(u, v) should have the same size
» H(u, v) should NOT be centered. Centered H(u, v) is for displaying
purpose only.
» If H(u, v) is centered, F(u, v) needs to be centered too and some post-
processing is required.
» H(u, v) is located at top-left corner
3. Multiply F(u, v) with filter function H (u, v) (element by element).
G(u, v) = H(u, v) F(u, v)
4. Compute the inverse of DFT result G(u, v) .
5. Take the real part of the IDFT
v))
(G(u,
age
filteredim 
=
Construct Frequency Domain from Spatial Domain filter
Calculate the DFT of the image f(u, v)
- Given image f and spatial filter 9 x 9
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
1 1 1 1 1 1 1 1
1
81
1
image f Spatial filter h
9 x 9
DFT of image
Construct Frequency Domain from Spatial Domain filter
– H(u, v) and F(u, v) should have the same size
» If H(u, v) is centered, F(u, v) needs to be centered too and expand it.
» H(u, v) is located at top-left corner
300
300
9
9
300
9
9
300
DFT of filter
DFT of filter
frequency domain representation
Construct Frequency Domain from Spatial Domain filter
Multiply DFT of F(u, v) with DFT of expanded H (u, v) (element by element)
G(u, v) = H(u, v) F(u, v)
not centered
F
not centered H not centered
F∙H
Centered F Centered F∙H
Centered H
Frequency Domain Enhancement
Compute the inverse of DFT result G(u, v) and Take real part of IDFT
From Centered From Not centered
Direct Construction of Frequency Domain Filters
• Ideal LowPass Filters (ILPF)
– Cut off all high-frequency components of the Fourier transform that are
at a distance greater than a specified distance D0 (cut off frequency)
from the origin of the (centered) transform
– The transfer function (frequency domain filter) is defined by
– D(u,v) is the distance from point (u, v) to the origin (center) of the
frequency domain filter.
– Usually, the image to be filtered is even-sized, but, in this case, the
center of the filter is (M/2,N/2).
– Then the distance D(u,v) can be obtained by
)
,
(
if
0
)
,
(
if
1
)
,
(
0
0





=
D
v
u
D
D
v
u
D
v
u
H
]
)
2
/
(
)
2
/
[(
)
,
( 2
/
1
2
2
N
v
M
u
v
u
D −
+
−
=
• Determine the cutoff frequency D0
– Compute circles that enclose specified amounts of total image power PT.
 
−
=
=
−
=
=
=
1
0
1
0
2
|
)
,
(
|
M
u
u
N
v
v
T v
u
F
P



T
D
v
u
D
P
v
u
F /
)
|
)
,
(
|
(
0
)
,
(
2
ILPF transfer function plot
Filter displayed as a image
Filter radial cross section
• As the filter radius increases, very less
power is removed/filtered out, but
more details are preserved.
• Ringing effect is clear in most cases
except for the last one.
• Ringing effect is the consequence of
applying ideal lowpass filters
Image 500 x 500 Fourier spectrum
Circles radii 5, 15, 30, 80, 230
Color Image
• Color is a reflection of wavelengths back to the eyes.
• The visible spectrum shows the wavelengths of each of the component
color.
• Color Scheme is the combination of colors
1. Achromatic color - have lightness but no dominant hue or
saturation.
Ex. white, grey and black
2. Monochromatic - comprised of variations of one color.
3. Chromatic color scheme - Any color in which one particular
wavelength or hue predominates.
Ex. blue and green
Achromatic
No color
Monochromatic
Single Color
Chromatic
Having color
Color Image properties
Color Appearance Parameters
• Hue: dominant color corresponding to a dominant wavelength of mixture
light wave
• Saturation / Chroma / Colorfulness: Relative purity or amount of
white light mixed with a hue (inversely proportional to amount of white
light added)
• Brightness / lightness: Intensity of the pixel
• Opacity / Transparency: Indicates the element is fully transparent or
not.
Color Image Enhancement
• Improves the color balance or contrast of the color image
Enhancement of color image:
• The input color coordinates of each pixel are independently transformed
into another set of color coordinates.
• Apply enhancement algorithm for individual monochrome images.
• Since each image plane Tk (m, n),k=1,2,3 is enhanced independently,
care has to be taken so that the enhanced coordinates T’k are within the
color gamut (range) of R-G-B system.
References
• Richard Szeliski, Computer Vision: Algorithms and Applications,
Springer 2010

Mais conteúdo relacionado

Mais procurados

ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptVikramBarapatre2
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processingNashid Alam
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restorationMd Shabir Alam
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
10 color image processing
10 color image processing10 color image processing
10 color image processingbabak danyal
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Edge Detection algorithm and code
Edge Detection algorithm and codeEdge Detection algorithm and code
Edge Detection algorithm and codeVaddi Manikanta
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamNazmul Islam
 
Image segmentation
Image segmentation Image segmentation
Image segmentation Amnaakhaan
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformationsYahya Alkhaldi
 

Mais procurados (20)

ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).ppt
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processing
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
10 color image processing
10 color image processing10 color image processing
10 color image processing
 
Dip Image Segmentation
Dip Image SegmentationDip Image Segmentation
Dip Image Segmentation
 
EDGE DETECTION
EDGE DETECTIONEDGE DETECTION
EDGE DETECTION
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
Edge Detection algorithm and code
Edge Detection algorithm and codeEdge Detection algorithm and code
Edge Detection algorithm and code
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul Islam
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

Semelhante a Image enhancement

Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfGaurav Sharma
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Sciencebaaburao4200
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2Surabhi Ks
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)asodariyabhavesh
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam 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.pptShabanamTamboli1
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.pptAJAYMALIK97
 
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
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersKuppusamy P
 
Image enhancement in spatial domain.ppt
Image enhancement in spatial domain.pptImage enhancement in spatial domain.ppt
Image enhancement in spatial domain.pptpravin patil
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point ProcessingGayathri31093
 

Semelhante a Image enhancement (20)

Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Module 2
Module 2Module 2
Module 2
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
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
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt
 
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...
 
aip.pptx
aip.pptxaip.pptx
aip.pptx
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
Image enhancement in spatial domain.ppt
Image enhancement in spatial domain.pptImage enhancement in spatial domain.ppt
Image enhancement in spatial domain.ppt
 
Lecture-11.pdf
Lecture-11.pdfLecture-11.pdf
Lecture-11.pdf
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 

Mais de Kuppusamy P

Recurrent neural networks rnn
Recurrent neural networks   rnnRecurrent neural networks   rnn
Recurrent neural networks rnnKuppusamy P
 
Image segmentation
Image segmentationImage segmentation
Image segmentationKuppusamy P
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matchingKuppusamy P
 
Flowchart design for algorithms
Flowchart design for algorithmsFlowchart design for algorithms
Flowchart design for algorithmsKuppusamy P
 
Algorithm basics
Algorithm basicsAlgorithm basics
Algorithm basicsKuppusamy P
 
Problem solving using Programming
Problem solving using ProgrammingProblem solving using Programming
Problem solving using ProgrammingKuppusamy P
 
Parts of Computer, Hardware and Software
Parts of Computer, Hardware and Software Parts of Computer, Hardware and Software
Parts of Computer, Hardware and Software Kuppusamy P
 
Java methods or Subroutines or Functions
Java methods or Subroutines or FunctionsJava methods or Subroutines or Functions
Java methods or Subroutines or FunctionsKuppusamy P
 
Java iterative statements
Java iterative statementsJava iterative statements
Java iterative statementsKuppusamy P
 
Java conditional statements
Java conditional statementsJava conditional statements
Java conditional statementsKuppusamy P
 
Java introduction
Java introductionJava introduction
Java introductionKuppusamy P
 
Logistic regression in Machine Learning
Logistic regression in Machine LearningLogistic regression in Machine Learning
Logistic regression in Machine LearningKuppusamy P
 
Anomaly detection (Unsupervised Learning) in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine LearningAnomaly detection (Unsupervised Learning) in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine LearningKuppusamy P
 
Machine Learning Performance metrics for classification
Machine Learning Performance metrics for classificationMachine Learning Performance metrics for classification
Machine Learning Performance metrics for classificationKuppusamy P
 
Machine learning Introduction
Machine learning IntroductionMachine learning Introduction
Machine learning IntroductionKuppusamy P
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-LearningKuppusamy P
 

Mais de Kuppusamy P (20)

Recurrent neural networks rnn
Recurrent neural networks   rnnRecurrent neural networks   rnn
Recurrent neural networks rnn
 
Deep learning
Deep learningDeep learning
Deep learning
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matching
 
Flowchart design for algorithms
Flowchart design for algorithmsFlowchart design for algorithms
Flowchart design for algorithms
 
Algorithm basics
Algorithm basicsAlgorithm basics
Algorithm basics
 
Problem solving using Programming
Problem solving using ProgrammingProblem solving using Programming
Problem solving using Programming
 
Parts of Computer, Hardware and Software
Parts of Computer, Hardware and Software Parts of Computer, Hardware and Software
Parts of Computer, Hardware and Software
 
Strings in java
Strings in javaStrings in java
Strings in java
 
Java methods or Subroutines or Functions
Java methods or Subroutines or FunctionsJava methods or Subroutines or Functions
Java methods or Subroutines or Functions
 
Java arrays
Java arraysJava arrays
Java arrays
 
Java iterative statements
Java iterative statementsJava iterative statements
Java iterative statements
 
Java conditional statements
Java conditional statementsJava conditional statements
Java conditional statements
 
Java data types
Java data typesJava data types
Java data types
 
Java introduction
Java introductionJava introduction
Java introduction
 
Logistic regression in Machine Learning
Logistic regression in Machine LearningLogistic regression in Machine Learning
Logistic regression in Machine Learning
 
Anomaly detection (Unsupervised Learning) in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine LearningAnomaly detection (Unsupervised Learning) in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine Learning
 
Machine Learning Performance metrics for classification
Machine Learning Performance metrics for classificationMachine Learning Performance metrics for classification
Machine Learning Performance metrics for classification
 
Machine learning Introduction
Machine learning IntroductionMachine learning Introduction
Machine learning Introduction
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
 

Último

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 

Último (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 

Image enhancement

  • 2. Content • Image enhancement • Spatial domain enhancement – Point operations, Spatial operations – Digital Negative – Contrast Stretching – Thresholding – Gray level slicing – Bit plane slicing – Dynamic range compression – Histogram modeling – Adaptive Histogram Equalization • Frequency domain enhancement – Fourier Transforms / Spectral (Frequency) Analysis • Color Image – Color Image Enhancement
  • 3. Image Enhancement • Image enhancement is improving the perception of information in images for human viewers. • Also, providing better input for the further image processing techniques. • It accentuates or sharpens image features such as edges, boundaries, or contrast to make a graphic display more helpful for display and analysis. • The enhancement doesn't increase the inherent information content of the data, but it increases the dynamic range of the chosen features that can be detected easily. Image enhancement methods: 1. Spatial domain enhancement – operate on pixels directly 1. Point operations 2. Spatial operations (Based on Filtering) 2. Frequency domain enhancement – operate on the Fourier transform of an image
  • 4. Spatial Domain Enhancement • Spatial domain techniques are performed to the image plane itself. • Its working with pixel values or raw data of an image. • The operation is g(x, y) = T[f(x, y)], g is the modified output image, f is the input original image and T [ . ] is an transformation operation on f defined over some neighborhood of (x, y). • Based on the operations on the image pixels, it is divided into 3 categories: 1. Point processing 2. Neighborhood processing 3. Histogram based approach. • The 2D convolution is performed in Spatial domain: g(x, y)= f(x, y) * h(x, y) • Figure shows the image size 256 x 256 pixels from (0,0) to (255, 255) (255, 255) (0, 0)
  • 5. 1. Point Processing (Operations) / Greyscale transformation x • The new grey level (color) value in a spatial location (m, n) in the resulting image depends only on the grey level (color) in the same spatial location (m, n) in the original image/ m m n n U[M×N] V[M×N] Point-wise operation (grey scale transformation) f(∙) => v=f(u) u(m, n) v(m, n) = f(u(m, n)) ∀m = 0, 1, .. M-1 ∀n = 0, 1, .. N-1
  • 6. Point Processing (Operations) / Greyscale transformation • It works on single pixel at a time i.e. T is 1 x 1 operator. • Transfer function is S = T(r) • S – processed point image • r – point to be processed Examples of point processing are: • Digital Negative • Contrast Stretching • Thresholding • Gray level slicing • Bit plane slicing • Dynamic range compression
  • 7. Point Processing (Operations) / Greyscale transformation • Point operations are zero-memory operations where a given gray level r[0, L-1] is mapped to another gray level s[0, L-1] according to a transformation. L = 256 ) (x f y = L L x y
  • 8. Digital Negative • Negative image is obtained by reverse (inverse) scaling of the gray levels of the transformation, v = L- u and umax = 255 • Useful in the display of medical images (X-ray). • L is total number of gray levels i.e. 255 • But, Generally L range is (0 -255). • So, v = (L -1) - u i.e. v = (256-1) – u. L u 0 L v Input intensity O/p Gray level
  • 9. Contrast Stretching • Contrast stretching increases the dynamic range of the gray levels in the image. • Low contrast images occur due to poor or non-uniform lightning conditions, small dynamic range of imaging sensors.        + −   + −   = L u b v b u b u a v a u a u u v b a ) ( ) ( 0    L u 0 a b va vb 200 , 30 , 1 , 2 , 2 . 0 , 150 , 50 = = = = = = = b a y y b a    • For dark region stretch α >1, a=L/3 i.e. slope < 1 • For mid region stretch β>1 ,b=2/3L • For bright region stretch γ>1 i.e. slope > 1 Dotted line – Identity transformation Solid line – Contrast Stretching
  • 10. Clipping and Thresholding • Clipping is a special case of contrast stretching, where α= γ=0 • Useful for noise reduction when the input signal is known and the range is [a, b] i.e. valley between the peaks of the histogram. • It is used for binary or other images that have bimodal distribution of gray levels. • Thresholding is extreme contrast stretching where a = b = t and the output comes as binary. F f(u) 0 nu L , , , 0 u a a u b b u L =            V U a b V U Clipping Thresholding u1 = u2 v1 =0, v2 = L -1
  • 11. Intensity level Slicing • Permit segmentation of certain gray level regions from the rest of the image.      = otherwise b u a L v , 0 ,      = otherwise u b u a L v , , • Transformation highlights range [A, B] of gray levels and reduces all others to a constant level. • Transformation highlights range [A, B], but preserves all other level.
  • 12. Bit (extraction) level Slicing • This transformation is useful in determining the number of visually significant bits in an Image. • Suppose each pixel is represented by 8 bits it is desired to extract the nth most significant bit and display it . • Higher-order bits contain the majority of the visually significant data
  • 13. Range Compression (Log Transformation) • Sometime, dynamic range of image exceeds the capability of display device. So it need to compressed. • Log operator is an excellent compression function. • Dynamic range compression is achieved using log operator. • c – normalization constant and u – input intensity ) 1 ( log10 u c v + = L u 0 v L
  • 14. 2. Local neighborhood operations • Operation performs on local neighborhoods of input pixels. • Image is convolved with Finite Impulse Response (FIR) filter (Spatial mask) Local neighborhood methods: • Min – Set the pixel value to the minimum in the neighborhood pixel • Max – Set the pixel value to the maximum in the neighborhood pixel • Median – Set the pixel value to the midpoint of the neighborhood pixels. • Mean - Set the pixel value to the mean of the neighborhood pixels.
  • 15. 3. Histogram modeling • Image Histogram is a graphical representation of the lightness/color distribution in a digital image. It plots the number of pixels for each value. • Histogram of a digital gray image range [0, L-1] is a discrete function h(rk) = nk – rk is the kth gray level (value) pixel – nk is the number of pixels in the image having gray level rk. 0 50 100 150 200 0 500 1000 1500 2000 2500 3000
  • 16. Histogram modeling • Normalize a histogram by dividing each of its values by the total number of pixels in the image n. Normalized histogram p(rk) = nk / n, for k = 0, 1, …, L -1. • nk is number of pixels of the gray value rk • p(rk) estimation of the probability of occurrence of gray level rk. • The sum of all components of a normalized histogram is equal to 1. Why Histogram modeling is need? • Histograms are the basis for numerous spatial domain processing techniques. • Histogram manipulation can be used effectively for image enhancement. • Histograms can be used to provide useful image statistics. • Information derived from histograms are quite useful in other image processing applications, such as image compression and segmentation.
  • 17. Why Histogram modeling is need? 0 50 100 150 200 250 0 0.5 1 1.5 2 2.5 3 3.5 4 x 10 4 Histogram information reveals that image is under-exposed
  • 18. Why Histogram modeling is need? Histogram information reveals that image is over-exposed 0 50 100 150 200 250 0 1000 2000 3000 4000 5000 6000 7000
  • 19. 3. Histogram Equalization – Adjust the image pixel values • Find a map f(x) such that the histogram of the modified (equalized) image is flat (uniform). • Cumulative Probability Function (cdf) of a random variable approximates a uniform distribution  = = x t t h x s 0 ) ( ) ( h(t) is the histogram (pdf)  =  = x t t h L y 0 ) ( Uniform Quantization  = = L t t h 0 1 ) ( Note: L 1  = = x t t h s 0 ) ( x L y 0 cumulative probability function
  • 20. Histogram Comparison 0 50 100 150 200 0 500 1000 1500 2000 2500 3000 0 50 100 150 200 250 300 0 500 1000 1500 2000 2500 3000 before equalization after equalization
  • 24. Histogram Equalization Original Histogram Transformation Function Equalized Histogram
  • 25. 3.1. Adaptive Histogram Equalization • Instead of doing histogram equalization using the whole image, compute the distribution for a moving window around the given pixel. • Computes several histograms, each corresponding to a distinct section of the image, and uses them to redistribute the lightness values of the image. • It improves the local contrast and enhancing the definitions of edges in each region of an image.
  • 26. Frequency Domain Enhancement • The image f(x,y) is transferred into frequency domain i.e. Compute the Fourier Transform (Discrete Fourier Transform) of the image. • Enhancement operations (brightness, contrast) performed on Fourier Transform of image, then find Inverse Fourier Transform for the enhanced image. • G(u, v) = F(u, v) H(u, v) - Frequency domain representation • When applying transformation function on input image pixels modifies the pixel values in the output image. H(u, v) F(u, v) H(u, v) F(u, v)
  • 27. Fourier Transforms / Spectral (Frequency) Analysis • Fourier Transform decomposes an image into its sine and cosine components. • The output of the transformation represents the image in the Fourier or frequency domain, while the input image is the spatial domain equivalent. • In the Fourier domain image, each point represents a particular frequency contained in the spatial domain image. • For digital images, Discrete Fourier Transform (DFT) is sufficient to use spatial domain image. i.e. the image in the spatial and Fourier domain are of the same size. • FT produces a complex number valued output image which can be displayed with two images, either real and imaginary part or with magnitude and phase. • In image processing, the magnitude of the FT contains most of the information of the geometric structure of the spatial domain image. • However, if want to re-transform the Fourier image into the correct spatial domain after some processing in the frequency domain, must preserve both magnitude and phase of the Fourier image. • The Fourier domain image has a much greater range than the image in the spatial domain. For good accuracy, its values are calculated and stored in float values. • DFT takes O(n2) operations, but Fast Fourier Transform (FFT) takes O(n log2n) operations
  • 28. Fourier Transforms properties • Superposition: The FT of a sum of signals is the sum of their Fourier transforms. Thus, the Fourier transform is a linear operator. • Shift: The FT of a shifted signal is the transform of the original signal multiplied by a linear phase shift (complex sinusoid). • Reversal: The FT of a reversed signal is the complex conjugate of the signal’s transform. • Convolution: The FT of a pair of convolved signals is the product of their transforms. • Correlation: The FT of a correlation is the product of the first transform times the complex conjugate of the second one. • Multiplication: The FT of the product of two signals is the convolution of their transforms. • Differentiation: The FT of the derivative of a signal is that signal’s transform multiplied by the frequency. In other words, differentiation linearly emphasizes (magnifies) higher frequencies. • Domain scaling: The FT of a stretched signal is the equivalently compressed (and scaled) version of the original transform and vice versa. • Real images: The FT of a real-valued signal is symmetric around the origin. This fact can be used to save space and to double the speed of image FFTs by packing alternating scanlines into the real and imaginary parts of the signal being transformed. • Parseval’s Theorem: The energy (sum of squared values) of a signal is the same as the energy of its Fourier transform.
  • 29. Frequency Domain Enhancement • Finite curves of image can be expressed as the integral of sines/cosines multiplied by a weighing function. Steps of filtering in the frequency domain 1. Calculate the DFT of the image f(u, v) 2. Generate a frequency domain filter H – H(u, v) and F(u, v) should have the same size » H(u, v) should NOT be centered. Centered H(u, v) is for displaying purpose only. » If H(u, v) is centered, F(u, v) needs to be centered too and some post- processing is required. » H(u, v) is located at top-left corner 3. Multiply F(u, v) with filter function H (u, v) (element by element). G(u, v) = H(u, v) F(u, v) 4. Compute the inverse of DFT result G(u, v) . 5. Take the real part of the IDFT v)) (G(u, age filteredim  =
  • 30. Construct Frequency Domain from Spatial Domain filter Calculate the DFT of the image f(u, v) - Given image f and spatial filter 9 x 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 81 1 image f Spatial filter h 9 x 9 DFT of image
  • 31. Construct Frequency Domain from Spatial Domain filter – H(u, v) and F(u, v) should have the same size » If H(u, v) is centered, F(u, v) needs to be centered too and expand it. » H(u, v) is located at top-left corner 300 300 9 9 300 9 9 300 DFT of filter DFT of filter frequency domain representation
  • 32. Construct Frequency Domain from Spatial Domain filter Multiply DFT of F(u, v) with DFT of expanded H (u, v) (element by element) G(u, v) = H(u, v) F(u, v) not centered F not centered H not centered F∙H Centered F Centered F∙H Centered H
  • 33. Frequency Domain Enhancement Compute the inverse of DFT result G(u, v) and Take real part of IDFT From Centered From Not centered
  • 34. Direct Construction of Frequency Domain Filters • Ideal LowPass Filters (ILPF) – Cut off all high-frequency components of the Fourier transform that are at a distance greater than a specified distance D0 (cut off frequency) from the origin of the (centered) transform – The transfer function (frequency domain filter) is defined by – D(u,v) is the distance from point (u, v) to the origin (center) of the frequency domain filter. – Usually, the image to be filtered is even-sized, but, in this case, the center of the filter is (M/2,N/2). – Then the distance D(u,v) can be obtained by ) , ( if 0 ) , ( if 1 ) , ( 0 0      = D v u D D v u D v u H ] ) 2 / ( ) 2 / [( ) , ( 2 / 1 2 2 N v M u v u D − + − =
  • 35. • Determine the cutoff frequency D0 – Compute circles that enclose specified amounts of total image power PT.   − = = − = = = 1 0 1 0 2 | ) , ( | M u u N v v T v u F P    T D v u D P v u F / ) | ) , ( | ( 0 ) , ( 2 ILPF transfer function plot Filter displayed as a image Filter radial cross section
  • 36. • As the filter radius increases, very less power is removed/filtered out, but more details are preserved. • Ringing effect is clear in most cases except for the last one. • Ringing effect is the consequence of applying ideal lowpass filters Image 500 x 500 Fourier spectrum Circles radii 5, 15, 30, 80, 230
  • 37. Color Image • Color is a reflection of wavelengths back to the eyes. • The visible spectrum shows the wavelengths of each of the component color. • Color Scheme is the combination of colors 1. Achromatic color - have lightness but no dominant hue or saturation. Ex. white, grey and black 2. Monochromatic - comprised of variations of one color. 3. Chromatic color scheme - Any color in which one particular wavelength or hue predominates. Ex. blue and green Achromatic No color Monochromatic Single Color Chromatic Having color
  • 38. Color Image properties Color Appearance Parameters • Hue: dominant color corresponding to a dominant wavelength of mixture light wave • Saturation / Chroma / Colorfulness: Relative purity or amount of white light mixed with a hue (inversely proportional to amount of white light added) • Brightness / lightness: Intensity of the pixel • Opacity / Transparency: Indicates the element is fully transparent or not.
  • 39. Color Image Enhancement • Improves the color balance or contrast of the color image Enhancement of color image: • The input color coordinates of each pixel are independently transformed into another set of color coordinates. • Apply enhancement algorithm for individual monochrome images. • Since each image plane Tk (m, n),k=1,2,3 is enhanced independently, care has to be taken so that the enhanced coordinates T’k are within the color gamut (range) of R-G-B system.
  • 40. References • Richard Szeliski, Computer Vision: Algorithms and Applications, Springer 2010