SlideShare a Scribd company logo
DIGITAL IMAGE PROCESSING
Image Enhancement
Image Enhancement is the process of manipulating an
image so that the result is more suitable than the
original for a specific application.
Image enhancement can be done in :
Point operations
Mask Operations
Spatial Domain
Frequency Domain
 Spatial Domain Transformation are :
DIGITAL IMAGE PROCESSING 2
Point Operation
Examples:
 Image Negative.
 Contrast Stretching.
 Thresholding.
 Brightness Enhancement.
 Log Transformation.
 Power Law Transformation.
Operation deals with pixel intensity values individually.
The intensity values are altered using particular
transformation techniques as per the requirement.
The transformed output pixel value does not depend on
any of the neighbouring pixel value of the input image.
DIGITAL IMAGE PROCESSING 3
Mask Operation
 Mask is a small matrix useful for blurring, sharpening,
edge-detection and more.
New image is generated by multiplying the input image
with the mask matrix.
The output pixel values thus depend on the
neighbouring input pixel values.
The mask may be of any dimension 3X3 4X4 ….
DIGITAL IMAGE PROCESSING 4
Mask Operation
X
DIGITAL IMAGE PROCESSING 5
Transfer function for different Intensity
Transformations
Transfer function of
a) Negative
b) Log
c) Nth root
d) Identity
e) Nth power
f) Inverse logDIGITAL IMAGE PROCESSING 6
Image Negative
 Negative images are useful for enhancing white or grey
detail embedded in dark regions of an image.
 The negative of an image with gray levels in the range
[0,L-1] is obtained by using the expression
s = L -1 - r
L-1 = Maximum pixel value .
r = Pixel value of an image.
DIGITAL IMAGE PROCESSING 7
Image Negative
Original Image Image negative
DIGITAL IMAGE PROCESSING 8
Image Negative
Matlab code : % program for image enhancement using image negative
clear all
clc
close all
a=imread('clown.png');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
b(i,j)=255-a(i,j);
end
end
subplot(1,2,1),subimage((a)),title('Original Image');
subplot(1,2,2),subimage((b)),title('Image after image
negative transformation')
DIGITAL IMAGE PROCESSING 9
Image Negative
Output screen:
DIGITAL IMAGE PROCESSING 10
Contrast Stretching
 Contrast stretching is done in three ways:
 Multiplying each input pixel intensity value with a
constant scalar.
Example: s=2*r
Using Histogram Equivalent
Applying a transform which makes dark portion darker
by assigning slope of < 1 and bright portion brighter by
assigning slope of > 1.
 Contrast basically the difference between the intensity
values of darker and brighter pixels .
 Contrast stretching expands the range of intensity levels
in an image.
DIGITAL IMAGE PROCESSING 11
Contrast Stretching (Using Transfer Function)
Formulation is given below:
s = l*r ; for 0 <= r <= a
= m(r-a) + v ; for a < r <= b
= n(r-b) + w ; for b < rDIGITAL IMAGE PROCESSING 12
Contrast Stretching
Original Image Contrast Enhanced Image
DIGITAL IMAGE PROCESSING 13
Contrast Stretching
Matlab code: % program to increase the contrast of an image
x=input('Enter the factor which contrast should be
increased');
a=imread('clown.png');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
b(i,j)=a(i,j)*x;
end
end
subplot(1,2,1),subimage(a),title('Original Image');
subplot(1,2,2),subimage(b),title('contrast
Image'),xlabel(sprintf('Contrast increased by a factor of
%g',x));
DIGITAL IMAGE PROCESSING 14
Contrast Stretching By Multiplication of each pixel with a scalar.
Contrast Stretching
Output screen:
DIGITAL IMAGE PROCESSING 15
Contrast Stretching
Matlab code: % program to increase the contrast of an image
x=input('Enter the factor which contrast should be
increased');
a=imread('clown.png');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
if(a(i,j)<50)
b(i,j)=a(i,j);%slope of transfer function between i/p
and o/p is 1
elseif (a(i,j)>200)
b(i,j)=a(i,j);
else
b(i,j)=a(i,j)*x;%slope of transfer function between i/p
and o/p is x.Hence contrast of some particular pixel value
range increased
DIGITAL IMAGE PROCESSING 16
Contrast Stretching by using threshold function.
Contrast Stretching
Matlab code:
end
end
end
subplot(1,2,1),subimage(a),title('Original Image');
subplot(1,2,2),subimage(b),title('contrast
Image'),xlabel(sprintf('Contrast increased by a factor of %g
in the range 50 to 200',x));
DIGITAL IMAGE PROCESSING 17
Contrast Stretching
Output screen:
DIGITAL IMAGE PROCESSING 18
Contrast Stretching
Matlab code : % program to increase the contrast of an image by histogram
equivalent
a=imread('clown.png');
b=histeq(a);
subplot(2,2,1),subimage(a),title('Original Image');
subplot(2,2,2),subimage(b),title('contrast
Image'),xlabel(sprintf('Contrast increased by Histogram
equivalent'));
subplot(2,2,3),imhist(a),title('Histogram of Original Image');
subplot(2,2,4),imhist(b),title('Histogram of Contrast Image');
DIGITAL IMAGE PROCESSING 19
Contrast Stretching By Histogram Equalisation.
Contrast Stretching
Output screen :
DIGITAL IMAGE PROCESSING 20
Thresholding
 Extreme Contrast Stretching yields Thresholding.
 Thresholded image has maximum contrast as it has
only BLACK & WHITE gray values.
 In Contrast Stretching figure, if l & n slope are made
ZERO & if m slope is increased then we get
Thresholding Transformation
 If r1 = r2, s1 = 0 & s2 = L-1 ,then we get Thresholding
function.
DIGITAL IMAGE PROCESSING 21
Expression goes as under:
s = 0; if r = a
s = L – 1 ; if r >a
where, L is number of
gray levels.
Thresholding Function
DIGITAL IMAGE PROCESSING 22
Thresholding
Original Image Transformed Image
DIGITAL IMAGE PROCESSING 23
Thresholding
DIGITAL IMAGE PROCESSING 24
Matlab code: % program for image thresholding
a=imread('pout.tif');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
if(a(i,j)<125)
b(i,j)=0;%pixel values below 125 are mapped to zero
else
b(i,j)=255;%pixel values equal or above 125 are mapped to 255
end
end
end
subplot(1,2,1),subimage(a),title('Original Image');
subplot(1,2,2),subimage(b),title('threshold Image');
Thresholding
DIGITAL IMAGE PROCESSING 25
Output screen:
Brightness Enhancement
DIGITAL IMAGE PROCESSING 26
Brightness Enhancement is shifting of intensity
values to a higher level.
The darker and the lighter pixels both get their
values shifted by some constant value.
 Example : In x-ray images brightness can be
enhanced to find the darker spots.
Brightness Enhancement
Matlab code : % program to increase the brightness of an image
x=input('Enter the factor which brightness should be increased');
a=imread('clown.png');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
b(i,j)=a(i,j)+x;
end
end
subplot(1,2,1),subimage(a),title('Original Image');
subplot(1,2,2),subimage(b),title('Brighter
Image'),xlabel(sprintf('Brightness increased by a factor of %g',x));
DIGITAL IMAGE PROCESSING 27
Brightness Enhancement
Output screen:
DIGITAL IMAGE PROCESSING 28
The log transformation is given by the expression
s = c log(1 + r)
where c is a constant and it is assumed that r≥0.
 This transformation maps a narrow range of low-
level grey scale intensities into a wider range of
output values.
Similarly maps the wide range of high-level grey scale
intensities into a narrow range of high level output
values.
This transform is used to expand values of dark pixels
and compress values of bright pixels.
Log Transformation
DIGITAL IMAGE PROCESSING 29
Logarithmic Transformation Contd…
Original Image Transformed Image
DIGITAL IMAGE PROCESSING 30
Log Transformation
Matlab code: % program for image enhancement using logarithmic
transformation
A=input('Enter the value of constant A');
a=imread('clown.jpg');
a=rgb2gray(a);
[m,n]=size(a);
a=double(a);
for i=1:1:m
for j=1:1:n
b(i,j)=A*log(1+a(i,j));
end
end
figure,subplot(1,2,1),subimage(uint8(a)),title('Original Image');
subplot(1,2,2),subimage(uint8(b)),title('Image after logarithmic
transformation'),xlabel(sprintf('Constant is %g',A));
DIGITAL IMAGE PROCESSING 31
Log Transformation
Output screen:
DIGITAL IMAGE PROCESSING 32
Power Law Transformation
s = c *(r γ )
Expression for power law transformation is given by:
s is the output pixels value.
r is the input pixel value.
c and γ are real numbers.
For various values of γ different levels of
enhancements can be obtained.
 This technique is quite commonly called as Gamma
Correction , used in monitor displays.
DIGITAL IMAGE PROCESSING 33
Power Law Transformation
Different display monitors display images at different
intensities and clarity because every monitor has built-in
gamma correction in it with certain gamma ranges .
A good monitor automatically corrects all the images
displayed on it for the best contrast to give user the best
experience.
The difference between the log-transformation function
and the power-law functions is that using the power-law
function a family of possible transformation curves can
be obtained just by varying the γ .
DIGITAL IMAGE PROCESSING 34
Power Law Transformation
A
DC
B
A : original
image
For c=1
B : γ =3.0
C : γ =4.0
D : γ =5.0
DIGITAL IMAGE PROCESSING 35
Power Law Transformation
Matlab code:
% program for image enhancement using power law
A=input('Enter the value of constant A');
x=input('Enter the value of power x');
a=imread('clown.png');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
b(i,j)=A*(a(i,j)^x);
end
end
subplot(1,2,1),subimage(a),title('Original Image');
subplot(1,2,2),subimage(b),title('Image after power law
transformation'),xlabel(sprintf('Constant is %gnPower is
%g',A,x));
DIGITAL IMAGE PROCESSING 36
Power Law Transformation
Output screen:
DIGITAL IMAGE PROCESSING 37
DIGITAL IMAGE PROCESSING 38
References:
 Digital Image Processing by Gonzalez And Woods.
 Wikipedia
Matlab Help
THANK YOU
DIGITAL IMAGE PROCESSING 39

More Related Content

What's hot

SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
muthu181188
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
A B Shinde
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
Amnaakhaan
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
Anuj Arora
 
Point processing
Point processingPoint processing
Point processing
panupriyaa7
 
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
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
Revanth Chimmani
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
DEEPASHRI HK
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
Karthika Ramachandran
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
asodariyabhavesh
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
ISRAR HUSSAIN
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
sakshij91
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
A B Shinde
 
Image segmentation
Image segmentation Image segmentation
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTES
Ezhilya venkat
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Md Shabir Alam
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
University of Potsdam
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
Inamul Hossain Imran
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing Basics
A B Shinde
 

What's hot (20)

SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
Point processing
Point processingPoint processing
Point processing
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTES
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing Basics
 

Viewers also liked

digital image processing, image processing
digital image processing, image processingdigital image processing, image processing
digital image processing, image processing
Kalyan Acharjya
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
babak danyal
 
5 spatial filtering p1
5 spatial filtering p15 spatial filtering p1
5 spatial filtering p1Gichelle Amon
 
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
Hemantha Kulathilake
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
babak danyal
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
Madhu Bala
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 

Viewers also liked (8)

digital image processing, image processing
digital image processing, image processingdigital image processing, image processing
digital image processing, image processing
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
 
5 spatial filtering p1
5 spatial filtering p15 spatial filtering p1
5 spatial filtering p1
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 

Similar to Image enhancement techniques

imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
salutiontechnology
 
image enhancement.pptx
image enhancement.pptximage enhancement.pptx
DIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptxDIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptx
NidhiSharma764884
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
Moe Moe Myint
 
Image processing
Image processingImage processing
Image processingmaheshpene
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
alobaidimki
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
ankushspencer015
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
SangeethaSasi1
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
Priyanka Rathore
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainMalik obeisat
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
SAhsanShahBukhari
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
ssuser0bf6a8
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
Ashok Kumar
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
VladsGamerHut
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
Amarjeetsingh Thakur
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
Amarjeetsingh Thakur
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
Gayathri31093
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
Prof. Dr. Subhasis Bose
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
Mayuri Narkhede
 

Similar to Image enhancement techniques (20)

imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
 
image enhancement.pptx
image enhancement.pptximage enhancement.pptx
image enhancement.pptx
 
DIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptxDIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptx
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image processing
Image processingImage processing
Image processing
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
 

Recently uploaded

Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
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
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
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
 
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
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 

Recently uploaded (20)

Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
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
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
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
 
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
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Image enhancement techniques

  • 2. Image Enhancement Image Enhancement is the process of manipulating an image so that the result is more suitable than the original for a specific application. Image enhancement can be done in : Point operations Mask Operations Spatial Domain Frequency Domain  Spatial Domain Transformation are : DIGITAL IMAGE PROCESSING 2
  • 3. Point Operation Examples:  Image Negative.  Contrast Stretching.  Thresholding.  Brightness Enhancement.  Log Transformation.  Power Law Transformation. Operation deals with pixel intensity values individually. The intensity values are altered using particular transformation techniques as per the requirement. The transformed output pixel value does not depend on any of the neighbouring pixel value of the input image. DIGITAL IMAGE PROCESSING 3
  • 4. Mask Operation  Mask is a small matrix useful for blurring, sharpening, edge-detection and more. New image is generated by multiplying the input image with the mask matrix. The output pixel values thus depend on the neighbouring input pixel values. The mask may be of any dimension 3X3 4X4 …. DIGITAL IMAGE PROCESSING 4
  • 6. Transfer function for different Intensity Transformations Transfer function of a) Negative b) Log c) Nth root d) Identity e) Nth power f) Inverse logDIGITAL IMAGE PROCESSING 6
  • 7. Image Negative  Negative images are useful for enhancing white or grey detail embedded in dark regions of an image.  The negative of an image with gray levels in the range [0,L-1] is obtained by using the expression s = L -1 - r L-1 = Maximum pixel value . r = Pixel value of an image. DIGITAL IMAGE PROCESSING 7
  • 8. Image Negative Original Image Image negative DIGITAL IMAGE PROCESSING 8
  • 9. Image Negative Matlab code : % program for image enhancement using image negative clear all clc close all a=imread('clown.png'); [m,n]=size(a); for i=1:1:m for j=1:1:n b(i,j)=255-a(i,j); end end subplot(1,2,1),subimage((a)),title('Original Image'); subplot(1,2,2),subimage((b)),title('Image after image negative transformation') DIGITAL IMAGE PROCESSING 9
  • 11. Contrast Stretching  Contrast stretching is done in three ways:  Multiplying each input pixel intensity value with a constant scalar. Example: s=2*r Using Histogram Equivalent Applying a transform which makes dark portion darker by assigning slope of < 1 and bright portion brighter by assigning slope of > 1.  Contrast basically the difference between the intensity values of darker and brighter pixels .  Contrast stretching expands the range of intensity levels in an image. DIGITAL IMAGE PROCESSING 11
  • 12. Contrast Stretching (Using Transfer Function) Formulation is given below: s = l*r ; for 0 <= r <= a = m(r-a) + v ; for a < r <= b = n(r-b) + w ; for b < rDIGITAL IMAGE PROCESSING 12
  • 13. Contrast Stretching Original Image Contrast Enhanced Image DIGITAL IMAGE PROCESSING 13
  • 14. Contrast Stretching Matlab code: % program to increase the contrast of an image x=input('Enter the factor which contrast should be increased'); a=imread('clown.png'); [m,n]=size(a); for i=1:1:m for j=1:1:n b(i,j)=a(i,j)*x; end end subplot(1,2,1),subimage(a),title('Original Image'); subplot(1,2,2),subimage(b),title('contrast Image'),xlabel(sprintf('Contrast increased by a factor of %g',x)); DIGITAL IMAGE PROCESSING 14 Contrast Stretching By Multiplication of each pixel with a scalar.
  • 16. Contrast Stretching Matlab code: % program to increase the contrast of an image x=input('Enter the factor which contrast should be increased'); a=imread('clown.png'); [m,n]=size(a); for i=1:1:m for j=1:1:n if(a(i,j)<50) b(i,j)=a(i,j);%slope of transfer function between i/p and o/p is 1 elseif (a(i,j)>200) b(i,j)=a(i,j); else b(i,j)=a(i,j)*x;%slope of transfer function between i/p and o/p is x.Hence contrast of some particular pixel value range increased DIGITAL IMAGE PROCESSING 16 Contrast Stretching by using threshold function.
  • 17. Contrast Stretching Matlab code: end end end subplot(1,2,1),subimage(a),title('Original Image'); subplot(1,2,2),subimage(b),title('contrast Image'),xlabel(sprintf('Contrast increased by a factor of %g in the range 50 to 200',x)); DIGITAL IMAGE PROCESSING 17
  • 19. Contrast Stretching Matlab code : % program to increase the contrast of an image by histogram equivalent a=imread('clown.png'); b=histeq(a); subplot(2,2,1),subimage(a),title('Original Image'); subplot(2,2,2),subimage(b),title('contrast Image'),xlabel(sprintf('Contrast increased by Histogram equivalent')); subplot(2,2,3),imhist(a),title('Histogram of Original Image'); subplot(2,2,4),imhist(b),title('Histogram of Contrast Image'); DIGITAL IMAGE PROCESSING 19 Contrast Stretching By Histogram Equalisation.
  • 20. Contrast Stretching Output screen : DIGITAL IMAGE PROCESSING 20
  • 21. Thresholding  Extreme Contrast Stretching yields Thresholding.  Thresholded image has maximum contrast as it has only BLACK & WHITE gray values.  In Contrast Stretching figure, if l & n slope are made ZERO & if m slope is increased then we get Thresholding Transformation  If r1 = r2, s1 = 0 & s2 = L-1 ,then we get Thresholding function. DIGITAL IMAGE PROCESSING 21
  • 22. Expression goes as under: s = 0; if r = a s = L – 1 ; if r >a where, L is number of gray levels. Thresholding Function DIGITAL IMAGE PROCESSING 22
  • 23. Thresholding Original Image Transformed Image DIGITAL IMAGE PROCESSING 23
  • 24. Thresholding DIGITAL IMAGE PROCESSING 24 Matlab code: % program for image thresholding a=imread('pout.tif'); [m,n]=size(a); for i=1:1:m for j=1:1:n if(a(i,j)<125) b(i,j)=0;%pixel values below 125 are mapped to zero else b(i,j)=255;%pixel values equal or above 125 are mapped to 255 end end end subplot(1,2,1),subimage(a),title('Original Image'); subplot(1,2,2),subimage(b),title('threshold Image');
  • 26. Brightness Enhancement DIGITAL IMAGE PROCESSING 26 Brightness Enhancement is shifting of intensity values to a higher level. The darker and the lighter pixels both get their values shifted by some constant value.  Example : In x-ray images brightness can be enhanced to find the darker spots.
  • 27. Brightness Enhancement Matlab code : % program to increase the brightness of an image x=input('Enter the factor which brightness should be increased'); a=imread('clown.png'); [m,n]=size(a); for i=1:1:m for j=1:1:n b(i,j)=a(i,j)+x; end end subplot(1,2,1),subimage(a),title('Original Image'); subplot(1,2,2),subimage(b),title('Brighter Image'),xlabel(sprintf('Brightness increased by a factor of %g',x)); DIGITAL IMAGE PROCESSING 27
  • 29. The log transformation is given by the expression s = c log(1 + r) where c is a constant and it is assumed that r≥0.  This transformation maps a narrow range of low- level grey scale intensities into a wider range of output values. Similarly maps the wide range of high-level grey scale intensities into a narrow range of high level output values. This transform is used to expand values of dark pixels and compress values of bright pixels. Log Transformation DIGITAL IMAGE PROCESSING 29
  • 30. Logarithmic Transformation Contd… Original Image Transformed Image DIGITAL IMAGE PROCESSING 30
  • 31. Log Transformation Matlab code: % program for image enhancement using logarithmic transformation A=input('Enter the value of constant A'); a=imread('clown.jpg'); a=rgb2gray(a); [m,n]=size(a); a=double(a); for i=1:1:m for j=1:1:n b(i,j)=A*log(1+a(i,j)); end end figure,subplot(1,2,1),subimage(uint8(a)),title('Original Image'); subplot(1,2,2),subimage(uint8(b)),title('Image after logarithmic transformation'),xlabel(sprintf('Constant is %g',A)); DIGITAL IMAGE PROCESSING 31
  • 33. Power Law Transformation s = c *(r γ ) Expression for power law transformation is given by: s is the output pixels value. r is the input pixel value. c and γ are real numbers. For various values of γ different levels of enhancements can be obtained.  This technique is quite commonly called as Gamma Correction , used in monitor displays. DIGITAL IMAGE PROCESSING 33
  • 34. Power Law Transformation Different display monitors display images at different intensities and clarity because every monitor has built-in gamma correction in it with certain gamma ranges . A good monitor automatically corrects all the images displayed on it for the best contrast to give user the best experience. The difference between the log-transformation function and the power-law functions is that using the power-law function a family of possible transformation curves can be obtained just by varying the γ . DIGITAL IMAGE PROCESSING 34
  • 35. Power Law Transformation A DC B A : original image For c=1 B : γ =3.0 C : γ =4.0 D : γ =5.0 DIGITAL IMAGE PROCESSING 35
  • 36. Power Law Transformation Matlab code: % program for image enhancement using power law A=input('Enter the value of constant A'); x=input('Enter the value of power x'); a=imread('clown.png'); [m,n]=size(a); for i=1:1:m for j=1:1:n b(i,j)=A*(a(i,j)^x); end end subplot(1,2,1),subimage(a),title('Original Image'); subplot(1,2,2),subimage(b),title('Image after power law transformation'),xlabel(sprintf('Constant is %gnPower is %g',A,x)); DIGITAL IMAGE PROCESSING 36
  • 37. Power Law Transformation Output screen: DIGITAL IMAGE PROCESSING 37
  • 38. DIGITAL IMAGE PROCESSING 38 References:  Digital Image Processing by Gonzalez And Woods.  Wikipedia Matlab Help
  • 39. THANK YOU DIGITAL IMAGE PROCESSING 39