SlideShare a Scribd company logo
IMAGE CONTRAST
ENHANCEMENT METHODS
7-10-2015
ANALYSIS OF CONTRAST ENHANCEMENT
METHODS
 Contrast is the difference in
visual properties that makes
an object (or image)
distinguishable from other
objects and the
background.
 It is the different between
the darker and the lighter
pixel of the image, if it is big
the image will have high
contrast and in the other
case the image will have
low contrast.
CONTRAST DEFINITION
CONTRAST ENHANCEMENT METHODS
 The principal objective of enhancement is to process an
image so that the result is more suitable than the
original image for a specific application.
 For example, a method that is quite useful for
enhancing X-ray images may not necessarily be the
best approach for enhancing pictures of Mars
transmitted by a space probe.
Image
enhancement
Spatial
domain
methods
Frequency
domain
methods
SPATIAL DOMAIN METHODS
 The term spatial domain refers to the image plane
itself.
 Spatial domain methods are procedures that
operate directly on these pixels in an image.
 Spatial domain processes will be denoted by the
expression g(x,y)=T[f(x,y)], where f(x,y) is the input
image, g(x,y) is the processed image, and T is an
operator on f, defined over some neighborhood of
(x, y).
FREQUENCY DOMAIN METHODS
 Frequency domain processing techniques are
based on modifying the Fourier transform of an
image.
 More suitable for filtering spectrums.
 Any function that periodically repeats itself can be
expressed as the sum of sines and cosines of
different frequencies, each multiplied by a different
coefficient.
LOGARITHMIC TRANSFORMATION
 The general form is
s = c * log (1 + r),
where s is the output value, r is the input value and
c is a constant.
 This transformation maps a narrow range of low
gray-level values in the input image into a wider
range of output levels.
MATHEMATICAL MODELING
FLOW CHART FOR IMPLEMENTATION OF
LOGARITHMIC TRANSFORMATION
CODE FOR LOGARITHMIC TRANSFORMATION
im=imread('cameraman.tif');
subplot(231),imshow(im);
title('original image');
imd=im2double(im);
c=2.5;
d=0.5;
im3=c*log(1+imd);
im4=d*log(1+imd);
subplot(232),imshow(im3);
title('transformed image(c=2.5)');
subplot(233),imshow(im4);
title('transformed image(c=0.5)');
subplot(234),imhist(im);
title('histogram of the original image');
subplot(235),imhist(im3);
title('histogram of the transformed image(c=2.5)');
subplot(236),imhist(im4);
title('histogram of the transformed image(c=0.5)');
EXPERIMENTAL RESULTS
POWER-LAW TRANSFORMATION
 The general form is s = c * 𝐫 𝜸
,
where c and γ are positive
constants.
 Power-law curves with
fractional values of γ map a
narrow range of dark input
values into a wider range of
output values, with the
opposite being true for higher
values of input levels.
FLOW CHART FOR IMPLEMENTATION OF
POWER LAW TRANSFORMATION
CODE FOR POWER LAW TRANSFORMATION
im=imread('cameraman.tif');
subplot(231),imshow(im);
title('original image');
imd=im2double(im);
gamma=0.25;
im3=imd.^gamma;
gamma=2.5;
im4=imd.^gamma;
subplot(232),imshow(im3);
title('transformed image(gamma=0.25)');
subplot(233),imshow(im4);
title('transformed image(gamma=2.5)');
subplot(234),imhist(im);
title('histogram of the original image');
subplot(235),imhist(im3);
title('histogram of the transformed image(gamma=0.5)');
subplot(236),imhist(im4);
title('histogram of the transformed image(gamma=2.5)');
EXPERIMENTAL RESULTS
GAMMA CORRECTION
 The exponent in the
power-law equation is
referred to as gamma.
The process used to
correct this power-law
response phenomena
is called gamma
correction.
 The process used to
correct power-law
response phenomena
is called gamma
correction.
 𝟏. 𝟖 < 𝛄 < 2.5
HISTOGRAM EQUALIZATION
 The general form is
sk=
L−1 ∗(rk−rkmin)
rkmax−rkmin
where
k=0,1,2,…L-1, r and s are
the input and output pixels of
the image, L is the different
values that can be the pixels,
and rkmax and rkmin are the
maximum and minimum gray
values of the input image.
 This method usually increase
the global contrast of the
image. This allows for area’s
of lower contrast to gain
higher contrast.
EXPERIMENT RESULTS
CODE FOR HISTOGRAM EQUALIZATION
input_image=imread('dollars.tif');
input_image_process=input_image;
output_image_process=histeq(input_image_process);
output_image=im2uint8(mat2gray(output_image_process));
input_hist=imhist(input_image);
output_hist=imhist(output_image);
subplot(2,2,1),imshow(input_image),title('Input image')
subplot(2,2,2),imshow(output_image),title('Output image')
subplot(2,2,3),plot(input_hist),title('Input histogram')
xlabel('Gray levels')
ylabel('Relative frecuency')
set(gca, 'xlim', [0 255]);
subplot(2,2,4),plot(output_hist),title('Output histogram')
xlabel('Gray levels'),ylabel('Relative frecuency')
set(gca, 'xlim', [0 255]);
FLOW CHART FOR HISTOGRAM EQUALIZATION
ADVANTAGES
 The method is useful in images with backgrounds and
foregrounds that are both bright or both dark.
 A advantage of the method is that it is a fairly
straightforward technique and an invertible operator.
DISADVANTAGE
 A disadvantage of the method is that it is indiscriminate.
It may increase the contrast of background noise, while
decreasing the usable signal.
CONTRAST STRETCHING
 Low-contrast images can result from poor
illumination, lack of dynamic range in the imaging
sensor, or even wrong setting of a lens aperture
during image acquisition.
 The idea behind contrast stretching is to increase
the dynamic range of the gray levels in the image
being processed.
CONTRAST STRETCHING FLOWCHART
CODE FOR CONTRAST STRECHING
im=imread('cameraman.tif');
subplot(231),imshow(im);
title('original image');
imd=double(im);
m=80;
e=3;
im3=1 ./ (1 + (m./imd).^e);
subplot(222),imshow(im3);
title('contrast stretched image(m=80,e=3)');
subplot(223),imhist(im);
title('histogram of the original image');
subplot(224),imhist(im3);
title('histogram of contrast stretched image(m=80,e=3)');
EXPERIMENTAL RESULTS
APPLICATION
 (Left) Original sensed fingerprint; (center) image
enhanced by detection and thinning of ridges;
(right) identification of special features called
minutia", which can be used for matching to millions
of fingerprint representations in a database.
CONCLUSION
 Image enhancement is basically improving the
interpretability or perception of information in images for
human viewers and providing `better' input for other
automated image processing techniques.
 For dark images with low contrast the better results will be
with the logarithm and the power law transformations using
in the second one gamma values lower than 1.
 For light images it would be use the power law
transformation with gamma higher than 1.
 For image with low contrast in gray scale the better methods
are histogram equalization and contrast stretching.
THANK YOU

More Related Content

PPTX
Digital image processing
PPT
12-Image enhancement and filtering.ppt
PPTX
Image enhancement techniques
PPT
image enhancement
PPT
Image pre processing
PPTX
Image enhancement
PPT
Image enhancement ppt nal2
PPT
Spatial domain and filtering
Digital image processing
12-Image enhancement and filtering.ppt
Image enhancement techniques
image enhancement
Image pre processing
Image enhancement
Image enhancement ppt nal2
Spatial domain and filtering

What's hot (20)

PDF
Image Registration (Digital Image Processing)
PPT
Image enhancement
PPTX
Image enhancement lecture
PPTX
Image enhancement techniques
PPT
Digital Image Processing (DIP)
PDF
Digital image classification
PPTX
Region based segmentation
PPT
Image segmentation
PPT
ImageProcessing10-Segmentation(Thresholding) (1).ppt
PPTX
Histogram Equalization
PPTX
Fundamentals steps in Digital Image processing
PPSX
Edge Detection and Segmentation
PPTX
Histogram Processing
PPTX
SPATIAL FILTERING IN IMAGE PROCESSING
PPT
Chapter10 image segmentation
PPTX
image_enhancement-NDVI-5.pptx
PPTX
Psuedo color
PPT
Thresholding.ppt
PPTX
Point processing
PPT
Image Restoration
Image Registration (Digital Image Processing)
Image enhancement
Image enhancement lecture
Image enhancement techniques
Digital Image Processing (DIP)
Digital image classification
Region based segmentation
Image segmentation
ImageProcessing10-Segmentation(Thresholding) (1).ppt
Histogram Equalization
Fundamentals steps in Digital Image processing
Edge Detection and Segmentation
Histogram Processing
SPATIAL FILTERING IN IMAGE PROCESSING
Chapter10 image segmentation
image_enhancement-NDVI-5.pptx
Psuedo color
Thresholding.ppt
Point processing
Image Restoration
Ad

Viewers also liked (19)

PPT
Image enhancement
PPT
Enhancement in frequency domain
PPTX
Image Enhancement in Spatial Domain
PPT
Frequency Domain Image Enhancement Techniques
PPTX
The application of image enhancement in color and grayscale images
PDF
Digital Image Processing - Image Enhancement
PPT
Digital Image Processing
DOCX
A novel approach for denoising and enhancement of extremely low light video
PDF
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
PPT
Multi Aperture Photography
PDF
Q01761119124
PPTX
Blogging and academic identity
PPTX
study Coded Aperture
PPTX
rs and gis
PPTX
Statistic chapter 1 & 2
PPT
Digital Image Processing_ ch2 enhancement spatial-domain
PPT
Wong weisenbeck
PPT
Entering data, histogram, box plot
PPTX
Image enhancement
Enhancement in frequency domain
Image Enhancement in Spatial Domain
Frequency Domain Image Enhancement Techniques
The application of image enhancement in color and grayscale images
Digital Image Processing - Image Enhancement
Digital Image Processing
A novel approach for denoising and enhancement of extremely low light video
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
Multi Aperture Photography
Q01761119124
Blogging and academic identity
study Coded Aperture
rs and gis
Statistic chapter 1 & 2
Digital Image Processing_ ch2 enhancement spatial-domain
Wong weisenbeck
Entering data, histogram, box plot
Ad

Similar to Introduction to image contrast and enhancement method (20)

PDF
Image enhancement techniques a review
PDF
A Review Paper on Low Light Image Enhancement Methods for Un- Uniform Illumin...
PPTX
Lect 03 - first portion
PPTX
image processing using matlab in faculty 1
PPT
Image Enhancement in the Spatial Domain U2.ppt
PPT
Digital Image through Scanner, Digital Camera. Concept of Gray Levels.
PPTX
Digital Image Processing - Image Enhancement.pptx
PPTX
Image processing second unit Notes
PPTX
image enhancement-POINT AND HISTOGRAM PROCESSING.pptx
PDF
Hybrid Technique for Image Enhancement
PPTX
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN.pptx
PPTX
UNIT-2-PPT1-Image Enhancement in Spatial Domain.pptx
PDF
An Inclusive Analysis on Various Image Enhancement Techniques
PDF
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
PPTX
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
PPTX
Unit 2. Image Enhancement in Spatial Domain.pptx
PPTX
Chapter 3 Image Enhanvement_ComputerVision.pptx
PDF
Contrast Enhancement Techniques: A Brief and Concise Review
PPTX
Image enhancement techniques
PDF
Image Enhancement
Image enhancement techniques a review
A Review Paper on Low Light Image Enhancement Methods for Un- Uniform Illumin...
Lect 03 - first portion
image processing using matlab in faculty 1
Image Enhancement in the Spatial Domain U2.ppt
Digital Image through Scanner, Digital Camera. Concept of Gray Levels.
Digital Image Processing - Image Enhancement.pptx
Image processing second unit Notes
image enhancement-POINT AND HISTOGRAM PROCESSING.pptx
Hybrid Technique for Image Enhancement
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN.pptx
UNIT-2-PPT1-Image Enhancement in Spatial Domain.pptx
An Inclusive Analysis on Various Image Enhancement Techniques
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
Unit 2. Image Enhancement in Spatial Domain.pptx
Chapter 3 Image Enhanvement_ComputerVision.pptx
Contrast Enhancement Techniques: A Brief and Concise Review
Image enhancement techniques
Image Enhancement

More from Abhishekvb (6)

DOCX
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
PPTX
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
PPTX
Dietary Spectrometer Sensor
PPTX
Case Study on Basamati Rice Patent Battle
PPTX
VLSI Introduction to PSPICE
PPTX
NAND gate
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
Dietary Spectrometer Sensor
Case Study on Basamati Rice Patent Battle
VLSI Introduction to PSPICE
NAND gate

Recently uploaded (20)

PPTX
additive manufacturing of ss316l using mig welding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Sustainable Sites - Green Building Construction
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Welding lecture in detail for understanding
PPTX
Geodesy 1.pptx...............................................
additive manufacturing of ss316l using mig welding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
Sustainable Sites - Green Building Construction
Automation-in-Manufacturing-Chapter-Introduction.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
OOP with Java - Java Introduction (Basics)
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
bas. eng. economics group 4 presentation 1.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Welding lecture in detail for understanding
Geodesy 1.pptx...............................................

Introduction to image contrast and enhancement method

  • 2. ANALYSIS OF CONTRAST ENHANCEMENT METHODS  Contrast is the difference in visual properties that makes an object (or image) distinguishable from other objects and the background.  It is the different between the darker and the lighter pixel of the image, if it is big the image will have high contrast and in the other case the image will have low contrast. CONTRAST DEFINITION
  • 3. CONTRAST ENHANCEMENT METHODS  The principal objective of enhancement is to process an image so that the result is more suitable than the original image for a specific application.  For example, a method that is quite useful for enhancing X-ray images may not necessarily be the best approach for enhancing pictures of Mars transmitted by a space probe.
  • 5. SPATIAL DOMAIN METHODS  The term spatial domain refers to the image plane itself.  Spatial domain methods are procedures that operate directly on these pixels in an image.  Spatial domain processes will be denoted by the expression g(x,y)=T[f(x,y)], where f(x,y) is the input image, g(x,y) is the processed image, and T is an operator on f, defined over some neighborhood of (x, y).
  • 6. FREQUENCY DOMAIN METHODS  Frequency domain processing techniques are based on modifying the Fourier transform of an image.  More suitable for filtering spectrums.  Any function that periodically repeats itself can be expressed as the sum of sines and cosines of different frequencies, each multiplied by a different coefficient.
  • 7. LOGARITHMIC TRANSFORMATION  The general form is s = c * log (1 + r), where s is the output value, r is the input value and c is a constant.  This transformation maps a narrow range of low gray-level values in the input image into a wider range of output levels. MATHEMATICAL MODELING
  • 8. FLOW CHART FOR IMPLEMENTATION OF LOGARITHMIC TRANSFORMATION
  • 9. CODE FOR LOGARITHMIC TRANSFORMATION im=imread('cameraman.tif'); subplot(231),imshow(im); title('original image'); imd=im2double(im); c=2.5; d=0.5; im3=c*log(1+imd); im4=d*log(1+imd); subplot(232),imshow(im3); title('transformed image(c=2.5)'); subplot(233),imshow(im4); title('transformed image(c=0.5)'); subplot(234),imhist(im); title('histogram of the original image'); subplot(235),imhist(im3); title('histogram of the transformed image(c=2.5)'); subplot(236),imhist(im4); title('histogram of the transformed image(c=0.5)');
  • 11. POWER-LAW TRANSFORMATION  The general form is s = c * 𝐫 𝜸 , where c and γ are positive constants.  Power-law curves with fractional values of γ map a narrow range of dark input values into a wider range of output values, with the opposite being true for higher values of input levels.
  • 12. FLOW CHART FOR IMPLEMENTATION OF POWER LAW TRANSFORMATION
  • 13. CODE FOR POWER LAW TRANSFORMATION im=imread('cameraman.tif'); subplot(231),imshow(im); title('original image'); imd=im2double(im); gamma=0.25; im3=imd.^gamma; gamma=2.5; im4=imd.^gamma; subplot(232),imshow(im3); title('transformed image(gamma=0.25)'); subplot(233),imshow(im4); title('transformed image(gamma=2.5)'); subplot(234),imhist(im); title('histogram of the original image'); subplot(235),imhist(im3); title('histogram of the transformed image(gamma=0.5)'); subplot(236),imhist(im4); title('histogram of the transformed image(gamma=2.5)');
  • 15. GAMMA CORRECTION  The exponent in the power-law equation is referred to as gamma. The process used to correct this power-law response phenomena is called gamma correction.  The process used to correct power-law response phenomena is called gamma correction.  𝟏. 𝟖 < 𝛄 < 2.5
  • 16. HISTOGRAM EQUALIZATION  The general form is sk= L−1 ∗(rk−rkmin) rkmax−rkmin where k=0,1,2,…L-1, r and s are the input and output pixels of the image, L is the different values that can be the pixels, and rkmax and rkmin are the maximum and minimum gray values of the input image.  This method usually increase the global contrast of the image. This allows for area’s of lower contrast to gain higher contrast.
  • 18. CODE FOR HISTOGRAM EQUALIZATION input_image=imread('dollars.tif'); input_image_process=input_image; output_image_process=histeq(input_image_process); output_image=im2uint8(mat2gray(output_image_process)); input_hist=imhist(input_image); output_hist=imhist(output_image); subplot(2,2,1),imshow(input_image),title('Input image') subplot(2,2,2),imshow(output_image),title('Output image') subplot(2,2,3),plot(input_hist),title('Input histogram') xlabel('Gray levels') ylabel('Relative frecuency') set(gca, 'xlim', [0 255]); subplot(2,2,4),plot(output_hist),title('Output histogram') xlabel('Gray levels'),ylabel('Relative frecuency') set(gca, 'xlim', [0 255]);
  • 19. FLOW CHART FOR HISTOGRAM EQUALIZATION
  • 20. ADVANTAGES  The method is useful in images with backgrounds and foregrounds that are both bright or both dark.  A advantage of the method is that it is a fairly straightforward technique and an invertible operator. DISADVANTAGE  A disadvantage of the method is that it is indiscriminate. It may increase the contrast of background noise, while decreasing the usable signal.
  • 21. CONTRAST STRETCHING  Low-contrast images can result from poor illumination, lack of dynamic range in the imaging sensor, or even wrong setting of a lens aperture during image acquisition.  The idea behind contrast stretching is to increase the dynamic range of the gray levels in the image being processed.
  • 23. CODE FOR CONTRAST STRECHING im=imread('cameraman.tif'); subplot(231),imshow(im); title('original image'); imd=double(im); m=80; e=3; im3=1 ./ (1 + (m./imd).^e); subplot(222),imshow(im3); title('contrast stretched image(m=80,e=3)'); subplot(223),imhist(im); title('histogram of the original image'); subplot(224),imhist(im3); title('histogram of contrast stretched image(m=80,e=3)');
  • 25. APPLICATION  (Left) Original sensed fingerprint; (center) image enhanced by detection and thinning of ridges; (right) identification of special features called minutia", which can be used for matching to millions of fingerprint representations in a database.
  • 26. CONCLUSION  Image enhancement is basically improving the interpretability or perception of information in images for human viewers and providing `better' input for other automated image processing techniques.  For dark images with low contrast the better results will be with the logarithm and the power law transformations using in the second one gamma values lower than 1.  For light images it would be use the power law transformation with gamma higher than 1.  For image with low contrast in gray scale the better methods are histogram equalization and contrast stretching.

Editor's Notes

  • #21: May decreases the contrast.