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
Ā 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With ImagesDataminingTools Inc
Ā 
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
Ā 
F0342032038
F0342032038F0342032038
F0342032038ijceronline
Ā 
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

šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
Ā 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
Ā 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
Ā 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
Ā 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
Ā 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
Ā 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
Ā 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
Ā 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
Ā 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĆ£o Esperancinha
Ā 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
Ā 
(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
Ā 
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
Ā 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
Ā 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
Ā 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
Ā 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
Ā 

Recently uploaded (20)

šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
Ā 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
Ā 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
Ā 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Ā 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
Ā 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Ā 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Ā 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
Ā 
ā˜… 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
Ā 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Ā 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
Ā 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Ā 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
Ā 
(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
Ā 
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...
Ā 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Ā 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
Ā 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
Ā 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
Ā 
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
Ā 

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.