290 likes | 658 Views
Histograms. Outline. Histogram – Definition Histogram of Image Histogram Equalization Histogram Matching. What is a Histogram. What is a Histogram?. {3, 11, 12, 19, 22, 23, 24, 25, 27, 29, 35, 36, 37, 45, 49}. What is a Histogram?.
E N D
Outline • Histogram – Definition • Histogram of Image • Histogram Equalization • Histogram Matching LNMIIT DIP Winter Workshop 2011. Manohar Kuse
LNMIIT DIP Winter Workshop 2011. Manohar Kuse What is a Histogram
What is a Histogram? • {3, 11, 12, 19, 22, 23, 24, 25, 27, 29, 35, 36, 37, 45, 49} LNMIIT DIP Winter Workshop 2011. Manohar Kuse
What is a Histogram? • {3, 11, 12, 19, 22, 23, 24, 25, 27, 29, 35, 36, 37, 45, 49} LNMIIT DIP Winter Workshop 2011. Manohar Kuse
What is a Histogram? LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Computing CDF • Cumulative Distribution Function LNMIIT DIP Winter Workshop 2011. Manohar Kuse Normalized CDF : Divide by total data points. In this case 15.
LNMIIT DIP Winter Workshop 2011. Manohar Kuse Image Histograms
Image Histograms • Assume “I” to be a mxn image matrix • Create an empty array “A” of size 255 • Iterate through rows,cols • A[ I(r,c) ] ← A[ I(r,c) ] + 1 • “A” is the Histogram • Plot it LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Image Histograms LNMIIT DIP Winter Workshop 2011. Manohar Kuse
LNMIIT DIP Winter Workshop 2011. Manohar Kuse Histogram Equalization
Histogram Equalization • Intensity Transform Function • Stretching of Histogram • Enhances Contrast LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Algorithm for Histogram Equalization • Assume “I” to be a MxNimage matrix • Compute Histogram Matrix • Compute CDF • Apply the Intensity transformation at every pixel intensity : LNMIIT DIP Winter Workshop 2011. Manohar Kuse Proof of why is formula works can be found at : http://homepages.inf.ed.ac.uk/rbf/HIPR2/histeq.htm
Example - Image LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Example – Histogram & CDF LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Example – Intensity Mapping * V is Intensity LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Results – Histogram Equalization LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Results – Histogram Equalization LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Enhancement of X-Ray Imagery LNMIIT DIP Winter Workshop 2011. Manohar Kuse One drawback of the technique is that it also enhances noise
LNMIIT DIP Winter Workshop 2011. Manohar Kuse Histogram Matching
Histogram Matching – Definition Histogram Matching Input Image LNMIIT DIP Winter Workshop 2011. Manohar Kuse Reference Image
Histogram Matching - Algorithm • Assume “I” as input image. “R” to be the reference image • Compute Histograms: “h” & “g” • Compute Normalized CDF: “H”, “G” • Match a value of “H” to a value of “G”. LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Example LNMIIT DIP Winter Workshop 2011. Manohar Kuse H & h (Input Image) G & g (Reference Image)
Example LNMIIT DIP Winter Workshop 2011. Manohar Kuse H & h G & g
Application – Image Mosaic LNMIIT DIP Winter Workshop 2011. Manohar Kuse
Thanks LNMIIT DIP Winter Workshop 2011. Manohar Kuse Blue Mosque, Istanbul