SlideShare a Scribd company logo
1 of 2
Download to read offline
Histogram Equalization of Grayscale and Color
Image
Mr. Saeed Ullah
Korean Institute of Science & Technology Information,
University of Science & Technology,
Daejeon, South Korea
Saeedonline12@gmail.com
Indra Kumari
Electronics and Telecommunication Research Institute,
University of Science & Technology,
Daejeon, South Korea
Kumariindra7@etri.re.kr
Summary—This report presents the Histogram Equalization of
Grayscale and Color Image. Tools used in this project are OpenCV
3.2 Library which is a library used for Computer Vision, and Visual
Studio 2015 (64 bit).
I. INTRODUCTION
Histogram is the intensity distribution of an image.
Histograms plots how many times (frequency) each intensity
value in image occurs. By looking at the histogram for a
specific image a viewer will be able to judge the entire tonal
distribution at a glance. A Histogram has two axis the x axis
and the y axis. The x axis contains event whose frequency you
have to count. The y axis contains frequency. An image
histogram is a graphical representation of the number of pixels
in an image as a function of their intensity. Histogram
equalization is used to enhance contrast. It is not necessary that
contrast will always be increase in this. There may be some
cases were histogram equalization can be worse. In that cases
the contrast is decreased.
Consider the following image. Say, depth of the image is 2 bits.
Therefore the value range for each and every pixel is from 0 to
3.
Fig.1. Sample Image (Depth = 2 bits)
Histogram of the image shows how the pixel values are
distributed. As in the above image there are 5 pixels with value
0, 7 pixels with value 1, 9 pixels with value 2 and 4 pixels with
value 3. These information is tabulated as follows.
Fig.2. Intensity Distribution of sample image
Histogram of an image usually presented as a graph. The
following graph represents the histogram of the above image.
Fig.3. Image Histogram
There are various techniques to achieve histogram equalization.
In OpenCV, there is a built OpenCV function to equalize
histogram.
II. OPENCV CODE
i) For Grayscale Image
Mat img = imread("..//data//green.JPG",
CV_LOAD_IMAGE_GRAYSCALE); //open and read the
image in Grayscale Format
Mat img_hist_equalized;
equalizeHist(img, img_hist_equalized);
//equalize the histogram
ii) For Colored Image
Mat img = imread("../data/green.jpg",
CV_LOAD_IMAGE_COLOR); //open and read the
Colored image.
vector<Mat> channels;
Mat img_hist_equalized;
cvtColor(img, img_hist_equalized, CV_BGR2YCrCb);
//change the color image from BGR to YCrCb
format
split(img_hist_equalized, channels); //split the
image into channels
equalizeHist(channels[0], channels[0]);
//equalize histogram on the 1st channel (Y)
merge(channels, img_hist_equalized); //merge 3
channels including the modified 1st channel into
one image
cvtColor(img_hist_equalized, img_hist_equalized,
CV_YCrCb2BGR); //change the color image from
YCrCb to BGR format (to display image properly)
III. RESULTS
Fig. 4. Original Image Fig. 5. Histogram Equalized Image
Fig. 6. Original Image Fig. 7. Histogram Equalized Image
CONCLUSION: - OpenCV provides many built-in functions for
Histograms and Histogram Equalizations, in which some of the
basic functions along with the source code and implementation on
images were discussed in this report.

More Related Content

What's hot

Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)Moe Moe Myint
 
Ijarcet vol-2-issue-3-1280-1284
Ijarcet vol-2-issue-3-1280-1284Ijarcet vol-2-issue-3-1280-1284
Ijarcet vol-2-issue-3-1280-1284Editor IJARCET
 
Quality Assessment of Gray and Color Images through Image Fusion Technique
Quality Assessment of Gray and Color Images through Image Fusion TechniqueQuality Assessment of Gray and Color Images through Image Fusion Technique
Quality Assessment of Gray and Color Images through Image Fusion TechniqueIJEEE
 
IRJET- Histogram Specification: A Review
IRJET-  	  Histogram Specification: A ReviewIRJET-  	  Histogram Specification: A Review
IRJET- Histogram Specification: A ReviewIRJET Journal
 
Spectral approach to image projection with cubic b spline interpolation
Spectral approach to image projection with cubic b spline interpolationSpectral approach to image projection with cubic b spline interpolation
Spectral approach to image projection with cubic b spline interpolationiaemedu
 
Basics of image processing using MATLAB
Basics of image processing using MATLABBasics of image processing using MATLAB
Basics of image processing using MATLABMohsin Siddique
 
A Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session KeyA Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session KeySougata Das
 
A MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHM
A MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHMA MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHM
A MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHMcsandit
 
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...Koteswar Rao Jerripothula
 
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...IJCSEA Journal
 
An enhanced difference pair mapping steganography method to improve embedding...
An enhanced difference pair mapping steganography method to improve embedding...An enhanced difference pair mapping steganography method to improve embedding...
An enhanced difference pair mapping steganography method to improve embedding...eSAT Publishing House
 
Digital image processing lab 1
Digital image processing lab 1Digital image processing lab 1
Digital image processing lab 1Moe Moe Myint
 
A PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGES
A PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGESA PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGES
A PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGEScscpconf
 
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...IJERA Editor
 
IRJET- 3D Vision System using Calibrated Stereo Camera
IRJET- 3D Vision System using Calibrated Stereo CameraIRJET- 3D Vision System using Calibrated Stereo Camera
IRJET- 3D Vision System using Calibrated Stereo CameraIRJET Journal
 

What's hot (17)

Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)Digital Image Processing (Lab 08)
Digital Image Processing (Lab 08)
 
Ijarcet vol-2-issue-3-1280-1284
Ijarcet vol-2-issue-3-1280-1284Ijarcet vol-2-issue-3-1280-1284
Ijarcet vol-2-issue-3-1280-1284
 
Ijetcas14 372
Ijetcas14 372Ijetcas14 372
Ijetcas14 372
 
Quality Assessment of Gray and Color Images through Image Fusion Technique
Quality Assessment of Gray and Color Images through Image Fusion TechniqueQuality Assessment of Gray and Color Images through Image Fusion Technique
Quality Assessment of Gray and Color Images through Image Fusion Technique
 
IRJET- Histogram Specification: A Review
IRJET-  	  Histogram Specification: A ReviewIRJET-  	  Histogram Specification: A Review
IRJET- Histogram Specification: A Review
 
Spectral approach to image projection with cubic b spline interpolation
Spectral approach to image projection with cubic b spline interpolationSpectral approach to image projection with cubic b spline interpolation
Spectral approach to image projection with cubic b spline interpolation
 
Basics of image processing using MATLAB
Basics of image processing using MATLABBasics of image processing using MATLAB
Basics of image processing using MATLAB
 
A Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session KeyA Biometric Approach to Encrypt a File with the Help of Session Key
A Biometric Approach to Encrypt a File with the Help of Session Key
 
A MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHM
A MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHMA MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHM
A MODIFIED HISTOGRAM BASED FAST ENHANCEMENT ALGORITHM
 
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
Image segmentation using advanced fuzzy c-mean algorithm [FYP @ IITR, obtaine...
 
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
 
An enhanced difference pair mapping steganography method to improve embedding...
An enhanced difference pair mapping steganography method to improve embedding...An enhanced difference pair mapping steganography method to improve embedding...
An enhanced difference pair mapping steganography method to improve embedding...
 
Digital image processing lab 1
Digital image processing lab 1Digital image processing lab 1
Digital image processing lab 1
 
A PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGES
A PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGESA PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGES
A PROPOSED HSV-BASED PSEUDOCOLORING SCHEME FOR ENHANCING MEDICAL IMAGES
 
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Images
 
IRJET- 3D Vision System using Calibrated Stereo Camera
IRJET- 3D Vision System using Calibrated Stereo CameraIRJET- 3D Vision System using Calibrated Stereo Camera
IRJET- 3D Vision System using Calibrated Stereo Camera
 

Similar to histogram equalization of grayscale and color image

Fuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast EnhancementFuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast EnhancementSamrudh Keshava Kumar
 
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABJim Jimenez
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...IJMER
 
Performance Evaluation of Filters for Enhancement of Images in Different Appl...
Performance Evaluation of Filters for Enhancement of Images in Different Appl...Performance Evaluation of Filters for Enhancement of Images in Different Appl...
Performance Evaluation of Filters for Enhancement of Images in Different Appl...IOSR Journals
 
The method of comparing two image files
 The method of comparing two image files The method of comparing two image files
The method of comparing two image filesMinh Anh Nguyen
 
The method of comparing two image files
The method of comparing two image filesThe method of comparing two image files
The method of comparing two image filesMinh Anh Nguyen
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Matlab Based Image Compression Using Various Algorithm
Matlab Based Image Compression Using Various AlgorithmMatlab Based Image Compression Using Various Algorithm
Matlab Based Image Compression Using Various Algorithmijtsrd
 
A review on image enhancement techniques
A review on image enhancement techniquesA review on image enhancement techniques
A review on image enhancement techniquesIJEACS
 
Image Enhancement by Image Fusion for Crime Investigation
Image Enhancement by Image Fusion for Crime InvestigationImage Enhancement by Image Fusion for Crime Investigation
Image Enhancement by Image Fusion for Crime InvestigationCSCJournals
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subratSubrat Prasad
 
Object based image enhancement
Object based image enhancementObject based image enhancement
Object based image enhancementijait
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) ijceronline
 
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVALA COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVALcscpconf
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image queryeSAT Publishing House
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image queryeSAT Journals
 

Similar to histogram equalization of grayscale and color image (20)

Fuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast EnhancementFuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast Enhancement
 
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
 
Performance Evaluation of Filters for Enhancement of Images in Different Appl...
Performance Evaluation of Filters for Enhancement of Images in Different Appl...Performance Evaluation of Filters for Enhancement of Images in Different Appl...
Performance Evaluation of Filters for Enhancement of Images in Different Appl...
 
B0310408
B0310408B0310408
B0310408
 
Ba34321326
Ba34321326Ba34321326
Ba34321326
 
The method of comparing two image files
 The method of comparing two image files The method of comparing two image files
The method of comparing two image files
 
The method of comparing two image files
The method of comparing two image filesThe method of comparing two image files
The method of comparing two image files
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
F0342032038
F0342032038F0342032038
F0342032038
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Matlab Based Image Compression Using Various Algorithm
Matlab Based Image Compression Using Various AlgorithmMatlab Based Image Compression Using Various Algorithm
Matlab Based Image Compression Using Various Algorithm
 
A review on image enhancement techniques
A review on image enhancement techniquesA review on image enhancement techniques
A review on image enhancement techniques
 
Image Enhancement by Image Fusion for Crime Investigation
Image Enhancement by Image Fusion for Crime InvestigationImage Enhancement by Image Fusion for Crime Investigation
Image Enhancement by Image Fusion for Crime Investigation
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
 
Object based image enhancement
Object based image enhancementObject based image enhancement
Object based image enhancement
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVALA COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
A COMPARATIVE ANALYSIS OF RETRIEVAL TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image query
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image query
 

More from Saeed Ullah

downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...
downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...
downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...Saeed Ullah
 
dilating and eroding in open cv
dilating and eroding in open cvdilating and eroding in open cv
dilating and eroding in open cvSaeed Ullah
 
line and circle detection using hough transform
line and circle detection using hough transformline and circle detection using hough transform
line and circle detection using hough transformSaeed Ullah
 
aip shape detection and tracking using contours
aip shape detection and tracking using contoursaip shape detection and tracking using contours
aip shape detection and tracking using contoursSaeed Ullah
 
aip edge detection using sobel and canny methods
aip edge detection using sobel and canny methodsaip edge detection using sobel and canny methods
aip edge detection using sobel and canny methodsSaeed Ullah
 
captcha formation with warping and random number generation
captcha formation with warping and random number generationcaptcha formation with warping and random number generation
captcha formation with warping and random number generationSaeed Ullah
 
aip basic open cv example
aip basic open cv exampleaip basic open cv example
aip basic open cv exampleSaeed Ullah
 
Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...
Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...
Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...Saeed Ullah
 
A comprehensive study on nondestructive inspection of reinforced concrete uti...
A comprehensive study on nondestructive inspection of reinforced concrete uti...A comprehensive study on nondestructive inspection of reinforced concrete uti...
A comprehensive study on nondestructive inspection of reinforced concrete uti...Saeed Ullah
 

More from Saeed Ullah (9)

downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...
downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...
downsampling and upsampling of an image using pyramids (pyr up and pyrdown me...
 
dilating and eroding in open cv
dilating and eroding in open cvdilating and eroding in open cv
dilating and eroding in open cv
 
line and circle detection using hough transform
line and circle detection using hough transformline and circle detection using hough transform
line and circle detection using hough transform
 
aip shape detection and tracking using contours
aip shape detection and tracking using contoursaip shape detection and tracking using contours
aip shape detection and tracking using contours
 
aip edge detection using sobel and canny methods
aip edge detection using sobel and canny methodsaip edge detection using sobel and canny methods
aip edge detection using sobel and canny methods
 
captcha formation with warping and random number generation
captcha formation with warping and random number generationcaptcha formation with warping and random number generation
captcha formation with warping and random number generation
 
aip basic open cv example
aip basic open cv exampleaip basic open cv example
aip basic open cv example
 
Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...
Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...
Online Transaction Processing (OLTP) System for Dir Maidan Palace (Saeed BS p...
 
A comprehensive study on nondestructive inspection of reinforced concrete uti...
A comprehensive study on nondestructive inspection of reinforced concrete uti...A comprehensive study on nondestructive inspection of reinforced concrete uti...
A comprehensive study on nondestructive inspection of reinforced concrete uti...
 

Recently uploaded

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 

histogram equalization of grayscale and color image

  • 1. Histogram Equalization of Grayscale and Color Image Mr. Saeed Ullah Korean Institute of Science & Technology Information, University of Science & Technology, Daejeon, South Korea Saeedonline12@gmail.com Indra Kumari Electronics and Telecommunication Research Institute, University of Science & Technology, Daejeon, South Korea Kumariindra7@etri.re.kr Summary—This report presents the Histogram Equalization of Grayscale and Color Image. Tools used in this project are OpenCV 3.2 Library which is a library used for Computer Vision, and Visual Studio 2015 (64 bit). I. INTRODUCTION Histogram is the intensity distribution of an image. Histograms plots how many times (frequency) each intensity value in image occurs. By looking at the histogram for a specific image a viewer will be able to judge the entire tonal distribution at a glance. A Histogram has two axis the x axis and the y axis. The x axis contains event whose frequency you have to count. The y axis contains frequency. An image histogram is a graphical representation of the number of pixels in an image as a function of their intensity. Histogram equalization is used to enhance contrast. It is not necessary that contrast will always be increase in this. There may be some cases were histogram equalization can be worse. In that cases the contrast is decreased. Consider the following image. Say, depth of the image is 2 bits. Therefore the value range for each and every pixel is from 0 to 3. Fig.1. Sample Image (Depth = 2 bits) Histogram of the image shows how the pixel values are distributed. As in the above image there are 5 pixels with value 0, 7 pixels with value 1, 9 pixels with value 2 and 4 pixels with value 3. These information is tabulated as follows. Fig.2. Intensity Distribution of sample image Histogram of an image usually presented as a graph. The following graph represents the histogram of the above image. Fig.3. Image Histogram There are various techniques to achieve histogram equalization. In OpenCV, there is a built OpenCV function to equalize histogram. II. OPENCV CODE i) For Grayscale Image Mat img = imread("..//data//green.JPG", CV_LOAD_IMAGE_GRAYSCALE); //open and read the image in Grayscale Format Mat img_hist_equalized; equalizeHist(img, img_hist_equalized); //equalize the histogram ii) For Colored Image Mat img = imread("../data/green.jpg", CV_LOAD_IMAGE_COLOR); //open and read the Colored image. vector<Mat> channels; Mat img_hist_equalized; cvtColor(img, img_hist_equalized, CV_BGR2YCrCb); //change the color image from BGR to YCrCb format split(img_hist_equalized, channels); //split the image into channels equalizeHist(channels[0], channels[0]); //equalize histogram on the 1st channel (Y)
  • 2. merge(channels, img_hist_equalized); //merge 3 channels including the modified 1st channel into one image cvtColor(img_hist_equalized, img_hist_equalized, CV_YCrCb2BGR); //change the color image from YCrCb to BGR format (to display image properly) III. RESULTS Fig. 4. Original Image Fig. 5. Histogram Equalized Image Fig. 6. Original Image Fig. 7. Histogram Equalized Image CONCLUSION: - OpenCV provides many built-in functions for Histograms and Histogram Equalizations, in which some of the basic functions along with the source code and implementation on images were discussed in this report.