SlideShare a Scribd company logo
1 of 16
Contrast Enhancement
Techniques
BY :
NILADRI BHATTACHARJEE
ROLL NO : 90/MCS/200003
Introduction
Contrast stretching is used to increase the dynamic range of the gray levels in the image. For example, in an 8-bit system
the image display can show a maximum of 256 gray levels. If the number of gray levels in the recorded image spread
over a lesser range, the images can be enhanced by expanding the number of gray levels to a wider range. This process
is called contrast stretching.
Contrast stretching is an Image Enhancement method which attempts to improve an image by stretching the range of
intensity values.Here, we stretch the minimum and maximum intensity values present to the possible minimum and
maximum intensity values.
Contrast stretching is only possible if minimum intensity value and maximum intensity value are not equal to the possible
minimum and maximum intensity values. Otherwise, the image generated after contrast stretching will be the same as
input image.
Contrast Enhancement Techniques
1. Linear Contrast Stretch
When the values in the original image are expanded uniformly to fill the total range of the output device, the
transformation is called linear contrast stretching.
Example: If the minimum intensity value(r min ) present in the image is 100 then it is stretched to the possible
minimum intensity value 0. Likewise, if the maximum intensity value(r max) is less than the possible maximum intensity
value 255 then it is stretched out to 255.(0–255 is taken as standard minimum and maximum intensity values for 8-bit
images).
General Formula for Contrast Stretching:
For I min = 0 and I max = 255 (for standard 8-bit grayscale image)
where,
r = current pixel intensity value ,r min = minimum intensity value present in the whole image , r max = maximum
intensity value present in the whole image.
Example of Linear contrast stretching :
Input Image Output Image
2. Histogram Equilization
Histogram Equalization is a computer image processing technique used to improve contrast in
images. It accomplishes this by effectively spreading out the most frequent intensity values, i.e.
stretching out the intensity range of the image. This method usually increases the global contrast of
images when its usable data is represented by close contrast values. This allows for areas of lower local
contrast to gain a higher contrast.
Steps of Histogram Equilization :
a. Convert the input image into a grayscale image
b. Find frequency of occurrence for each pixel value i.e. histogram of an image (value lie in the
range [0, 255] for any grayscale image)
c. Calculate Cumulative frequency of all pixel values
d. Divide the cumulative frequencies by total number of pixels and multiply them by
maximum graycount (pixel value) in the image.
Example of Histogram Equilization :
Input Image Output Image
Histogram of Input Image Histogram of Output Image
Piece-wise Linear Stretch
In piece-wise linear stretch, different linear functions are used for enhancing the DN values in different
ranges within the same image. In other words, different parts of the histogram are stretched by different
amounts. It is generally useful in cases where the original image has bi- modal histogram.
The following figure shows a sample bimodal function for piece-wise linear stretching.
A sample bi-modal histogram, piece wise linear function used for the contrast stretching and the
histogram after piece wise contrast stretch.
Using the piece-wise linear stretch function, region between the two modes of the histogram may be
compressed, whereas the regions corresponding to the histogram peaks may be enhanced as shown in
Figure. It is also used to enhance any special features in the image.
Example of piece-wise linear search :
Input Image Output Image
Logarithmic stretch
In logarithmic stretching, curves having the shape of the logarithmic function are used for rescaling
the original DN levels into the wider output range, as shown in Figure.
A sample logarithmic stretch function
General form of logarithmic stretching uses the following form.
𝐷𝑁𝑠𝑡= c log (1+DN)
Where 𝐷𝑁𝑠𝑡 and DN are the pixel values of the output and the input image and c is a constant. The
value 1 is added to each of the pixel value of the input image because if there is a pixel intensity of 0 in
the image, then log (0) is equal to infinity. So 1 is added, to make the minimum value at least 1.
As shown in Figure in logarithmic stretching, smaller values are stretched to a wider range, whereas narrower output
range is used for higher values. This type of stretching is generally used to enhance the information contained in the
dark pixels, during which process the information contained in the lighter pixels are compressed.
Example of Logarithmic stretching :
Input Image Output Image
Fig. 1 gives the schematic representation of all the above contrast stretching methods. Histogram of the original image is shown in Fig. 1(a).
The values are only in the range 60- 158. Therefore in an 8-bit display system, only the range 60-158 is used for the image display resulting in
poor contrast. Fig.1 (b) shows the linear stretching, wherein the range 60-158 is equally transformed into the full range 0-255 using linear
function. Fig.1 (c) shows the schematic of the histogram equalization stretch. The range 60-108, having low frequency, is transformed into a
relatively narrower range 0-38, whereas the high frequency range 108-158 is transferred to a wider range 38-255. Fig.1(d) shows special
stretch wherein only the range 60-92 is stretched to occupy the full display range. The remaining ranges are compressed.
Summary of all the contrast stretching methods :
Fig. 1 : Schematic representation showing various contrast
stretching algorithms .
Uses of Contrast Stretching algorithms :
• Linear stretch technique can be applied to images where substantial lack of contrast can result in false identification
of objects, its spacial relationship and significance. Contrast enhancement by linear stretch can be applied to images
with very low or very high variations of brightness.
• Histogram equilization method usually increases the overall contrast of many images, especially when the usable
data of the image is represented by close contrast values. This adjustment allows the intensities to be distributed
better on the histogram. This allows areas of lower contrast to gain a higher contrast.
• Piece-wise linear stretch function is used to enhance any special features in the image.
• Log transformation of an image means replacing all pixel values, present in the image, with its logarithmic values. Log
transformation is used for image enhancement as it expands dark pixels of the image as compared to higher pixel
values.
Drawbacks of using contrast stretching algorithms:
• The result is less dramatic, but tends to avoid the sometimes artificial appearance of equalized images.
• The drawback of linear contrast stretching method is that outliers can reduce the effectiveness of the operation.
• If the histogram equalization function is known, then the original histogram can be recovered. The calculation is
not computationally intensive. A disadvantage of the method is that it is indiscriminate. It may increase the contrast of
background noise , while decreasing the usable signal.
• Histogram equalization fails when the input image has a large area low-intensity background.
• Histogram equalization is not the best method for contrast enhancement because the mean brightness of the output
image is significantly different from the input image.
CONCLUSION
This project provides the visual results of various techniques. In the computer simulated results, the original
image is blurred. Although it has good global contrast, but the local contrast is poor as the objects in the image
are not easily perceivable.
Histogram Equalization when applied to the original image, improves the contrast of the image but the white
regions of the image get over enhanced. This is because the Histogram Equalization treats the image globally.
The Histogram Equilization method is useful in images with backgrounds and foregrounds that are both bright
or both dark. The global techniques cannot improve the contrast of the image satisfactorily.
Using the piece-wise linear stretch function, region between the two modes of the histogram may be
compressed, whereas the regions corresponding to the histogram peaks may be enhanced. It is also used to
enhance any special features in the image.
Logarithmic stretching is generally used to enhance the information contained in the dark pixels, during which
process the information contained in the lighter pixels are compressed.
References
• https://www.lkouniv.ac.in/site/writereaddata/siteContent/202004021910156883ajay_misra_geo_Digita
l_Image_Enhancement.pdf.
• https://research.ijcaonline.org/volume64/number17/pxc3885679.pdf
• Digital Image Processing by Dr. SHYAMA PRASAD MUKHERJEE UNIVERSITY, RANCHI .
Thank You.

More Related Content

Similar to project presentation-90-MCS-200003.pptx

Image Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.pptImage Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.pptssuser7ec6af
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.pptSKILL2021
 
Digital image processing - Image Enhancement (MATERIAL)
Digital image processing  - Image Enhancement (MATERIAL)Digital image processing  - Image Enhancement (MATERIAL)
Digital image processing - Image Enhancement (MATERIAL)Mathankumar S
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image EnhancementMathankumar S
 
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...Editor IJCATR
 
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 processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONecij
 
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONecij
 
Image processing
Image processingImage processing
Image processingmaheshpene
 
Histogram Based Contrast Enhn
Histogram Based Contrast EnhnHistogram Based Contrast Enhn
Histogram Based Contrast EnhnTulsi Chandan
 
Modified Contrast Enhancement using Laplacian and Gaussians Fusion Technique
Modified Contrast Enhancement using Laplacian and Gaussians Fusion TechniqueModified Contrast Enhancement using Laplacian and Gaussians Fusion Technique
Modified Contrast Enhancement using Laplacian and Gaussians Fusion Techniqueiosrjce
 
Unit 2. Image Enhancement in Spatial Domain.pptx
Unit 2. Image Enhancement in Spatial Domain.pptxUnit 2. Image Enhancement in Spatial Domain.pptx
Unit 2. Image Enhancement in Spatial Domain.pptxswagatkarve
 

Similar to project presentation-90-MCS-200003.pptx (20)

Image Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.pptImage Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.ppt
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.ppt
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.ppt
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.ppt
 
Digital image processing - Image Enhancement (MATERIAL)
Digital image processing  - Image Enhancement (MATERIAL)Digital image processing  - Image Enhancement (MATERIAL)
Digital image processing - Image Enhancement (MATERIAL)
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image Enhancement
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
 
Histogram Equalization.pdf
Histogram Equalization.pdfHistogram Equalization.pdf
Histogram Equalization.pdf
 
G0813841
G0813841G0813841
G0813841
 
Image enhancement in spatial domain.ppt
Image enhancement in spatial domain.pptImage enhancement in spatial domain.ppt
Image enhancement in spatial domain.ppt
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
 
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
 
Image processing
Image processingImage processing
Image processing
 
Histogram Based Contrast Enhn
Histogram Based Contrast EnhnHistogram Based Contrast Enhn
Histogram Based Contrast Enhn
 
Q01761119124
Q01761119124Q01761119124
Q01761119124
 
Modified Contrast Enhancement using Laplacian and Gaussians Fusion Technique
Modified Contrast Enhancement using Laplacian and Gaussians Fusion TechniqueModified Contrast Enhancement using Laplacian and Gaussians Fusion Technique
Modified Contrast Enhancement using Laplacian and Gaussians Fusion Technique
 
Unit 2. Image Enhancement in Spatial Domain.pptx
Unit 2. Image Enhancement in Spatial Domain.pptxUnit 2. Image Enhancement in Spatial Domain.pptx
Unit 2. Image Enhancement in Spatial Domain.pptx
 

Recently uploaded

Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaPraksha3
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2John Carlo Rollon
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxFarihaAbdulRasheed
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsHajira Mahmood
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
TOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxTOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxdharshini369nike
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Masticationvidulajaib
 
Forest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are importantForest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are importantadityabhardwaj282
 
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayZachary Labe
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 

Recently uploaded (20)

Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutions
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
TOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxTOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptx
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Mastication
 
Forest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are importantForest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are important
 
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work Day
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 

project presentation-90-MCS-200003.pptx

  • 1. Contrast Enhancement Techniques BY : NILADRI BHATTACHARJEE ROLL NO : 90/MCS/200003
  • 2. Introduction Contrast stretching is used to increase the dynamic range of the gray levels in the image. For example, in an 8-bit system the image display can show a maximum of 256 gray levels. If the number of gray levels in the recorded image spread over a lesser range, the images can be enhanced by expanding the number of gray levels to a wider range. This process is called contrast stretching. Contrast stretching is an Image Enhancement method which attempts to improve an image by stretching the range of intensity values.Here, we stretch the minimum and maximum intensity values present to the possible minimum and maximum intensity values. Contrast stretching is only possible if minimum intensity value and maximum intensity value are not equal to the possible minimum and maximum intensity values. Otherwise, the image generated after contrast stretching will be the same as input image.
  • 3. Contrast Enhancement Techniques 1. Linear Contrast Stretch When the values in the original image are expanded uniformly to fill the total range of the output device, the transformation is called linear contrast stretching. Example: If the minimum intensity value(r min ) present in the image is 100 then it is stretched to the possible minimum intensity value 0. Likewise, if the maximum intensity value(r max) is less than the possible maximum intensity value 255 then it is stretched out to 255.(0–255 is taken as standard minimum and maximum intensity values for 8-bit images). General Formula for Contrast Stretching:
  • 4. For I min = 0 and I max = 255 (for standard 8-bit grayscale image) where, r = current pixel intensity value ,r min = minimum intensity value present in the whole image , r max = maximum intensity value present in the whole image. Example of Linear contrast stretching : Input Image Output Image
  • 5. 2. Histogram Equilization Histogram Equalization is a computer image processing technique used to improve contrast in images. It accomplishes this by effectively spreading out the most frequent intensity values, i.e. stretching out the intensity range of the image. This method usually increases the global contrast of images when its usable data is represented by close contrast values. This allows for areas of lower local contrast to gain a higher contrast. Steps of Histogram Equilization : a. Convert the input image into a grayscale image b. Find frequency of occurrence for each pixel value i.e. histogram of an image (value lie in the range [0, 255] for any grayscale image) c. Calculate Cumulative frequency of all pixel values d. Divide the cumulative frequencies by total number of pixels and multiply them by maximum graycount (pixel value) in the image.
  • 6. Example of Histogram Equilization : Input Image Output Image Histogram of Input Image Histogram of Output Image
  • 7. Piece-wise Linear Stretch In piece-wise linear stretch, different linear functions are used for enhancing the DN values in different ranges within the same image. In other words, different parts of the histogram are stretched by different amounts. It is generally useful in cases where the original image has bi- modal histogram. The following figure shows a sample bimodal function for piece-wise linear stretching. A sample bi-modal histogram, piece wise linear function used for the contrast stretching and the histogram after piece wise contrast stretch.
  • 8. Using the piece-wise linear stretch function, region between the two modes of the histogram may be compressed, whereas the regions corresponding to the histogram peaks may be enhanced as shown in Figure. It is also used to enhance any special features in the image. Example of piece-wise linear search : Input Image Output Image
  • 9. Logarithmic stretch In logarithmic stretching, curves having the shape of the logarithmic function are used for rescaling the original DN levels into the wider output range, as shown in Figure. A sample logarithmic stretch function General form of logarithmic stretching uses the following form. 𝐷𝑁𝑠𝑡= c log (1+DN) Where 𝐷𝑁𝑠𝑡 and DN are the pixel values of the output and the input image and c is a constant. The value 1 is added to each of the pixel value of the input image because if there is a pixel intensity of 0 in the image, then log (0) is equal to infinity. So 1 is added, to make the minimum value at least 1.
  • 10. As shown in Figure in logarithmic stretching, smaller values are stretched to a wider range, whereas narrower output range is used for higher values. This type of stretching is generally used to enhance the information contained in the dark pixels, during which process the information contained in the lighter pixels are compressed. Example of Logarithmic stretching : Input Image Output Image
  • 11. Fig. 1 gives the schematic representation of all the above contrast stretching methods. Histogram of the original image is shown in Fig. 1(a). The values are only in the range 60- 158. Therefore in an 8-bit display system, only the range 60-158 is used for the image display resulting in poor contrast. Fig.1 (b) shows the linear stretching, wherein the range 60-158 is equally transformed into the full range 0-255 using linear function. Fig.1 (c) shows the schematic of the histogram equalization stretch. The range 60-108, having low frequency, is transformed into a relatively narrower range 0-38, whereas the high frequency range 108-158 is transferred to a wider range 38-255. Fig.1(d) shows special stretch wherein only the range 60-92 is stretched to occupy the full display range. The remaining ranges are compressed. Summary of all the contrast stretching methods : Fig. 1 : Schematic representation showing various contrast stretching algorithms .
  • 12. Uses of Contrast Stretching algorithms : • Linear stretch technique can be applied to images where substantial lack of contrast can result in false identification of objects, its spacial relationship and significance. Contrast enhancement by linear stretch can be applied to images with very low or very high variations of brightness. • Histogram equilization method usually increases the overall contrast of many images, especially when the usable data of the image is represented by close contrast values. This adjustment allows the intensities to be distributed better on the histogram. This allows areas of lower contrast to gain a higher contrast. • Piece-wise linear stretch function is used to enhance any special features in the image. • Log transformation of an image means replacing all pixel values, present in the image, with its logarithmic values. Log transformation is used for image enhancement as it expands dark pixels of the image as compared to higher pixel values.
  • 13. Drawbacks of using contrast stretching algorithms: • The result is less dramatic, but tends to avoid the sometimes artificial appearance of equalized images. • The drawback of linear contrast stretching method is that outliers can reduce the effectiveness of the operation. • If the histogram equalization function is known, then the original histogram can be recovered. The calculation is not computationally intensive. A disadvantage of the method is that it is indiscriminate. It may increase the contrast of background noise , while decreasing the usable signal. • Histogram equalization fails when the input image has a large area low-intensity background. • Histogram equalization is not the best method for contrast enhancement because the mean brightness of the output image is significantly different from the input image.
  • 14. CONCLUSION This project provides the visual results of various techniques. In the computer simulated results, the original image is blurred. Although it has good global contrast, but the local contrast is poor as the objects in the image are not easily perceivable. Histogram Equalization when applied to the original image, improves the contrast of the image but the white regions of the image get over enhanced. This is because the Histogram Equalization treats the image globally. The Histogram Equilization method is useful in images with backgrounds and foregrounds that are both bright or both dark. The global techniques cannot improve the contrast of the image satisfactorily. Using the piece-wise linear stretch function, region between the two modes of the histogram may be compressed, whereas the regions corresponding to the histogram peaks may be enhanced. It is also used to enhance any special features in the image. Logarithmic stretching is generally used to enhance the information contained in the dark pixels, during which process the information contained in the lighter pixels are compressed.