Lecture3 Histogram Representation and Processing
Lecture3 Histogram Representation and Processing
Processing
Lecture 3
Histogram Representation and Processing
Histogram Processing
• Histograms plots how many times (frequency) each intensity value in
image occurs
• Image below (left) has 256 distinct gray levels (8 bits)
• Histogram (right) shows frequency (how many times) each gray level
occurs
• E.g. K = 16, 10 pixels have intensity value = 2
• Only statistical information
• No indication of location of pixels
Rough guess about the histogram of these
images ?
Histogram Processing
• Different images can have same histogram
• 3 images below have same histogram
• Half of pixels are gray, half are white
• Same histogram = Same statistics
• Distribution of intensities could be different
Histogram Processing
• Many cameras display real time
histograms of scene
• Helps taking pictures according
to your requirement
• Also easier to detect types of
processing previously applied to
image
?
• Can we reconstruct image from histogram ?
• Why ???
Histogram
• Histograms help detect image acquisition issues
• Histogram representation of an image can be useful in following
characteristics of an image.
• Exposure: amount of light per unit area reaching the image sensor
• Brightness: average intensity of all pixels in image
• Contrast: difference of foreground and background (objects distinction)
• Dynamic Range: Number of distinct pixels in image
• Artifacts: Image alteration after it is being captured
Histogram Processing
Histogram Processing
Histogram Processing
Histogram Processing
Histogram Processing
Contrast
• Good Contrast?
• Widely spread intensity
values
• Large difference between
min and max intensity
values
High Dynamic Range Imaging
• High dynamic range means very bright and very dark parts in a single
image (many distinct values)
• Dynamic range in photographed scene may exceed number of
available bits to represent pixels
• Solution:
• Capture multiple images at different exposures
• Combine them using image processing
Histogram Equalization
Example 3.5
s0 = 1.33 = 1
s1 = 3.08 = 3
s2 = 4.55 = 5
s3 = 5.67 = 6
s4 = 6.23 = 6
s5 = 6.65 = 7
s6 = 6.86 = 7
s7 = 7.00 = 7
• 1 bit = 2
• 2 bits = 4
• 3 bits = 8
• 4 bits = 16
• 8 bits = 256
s0 = 1.33 = 1
s1 = 3.08 = 3
s2 = 4.55 = 5
s3 = 5.67 = 6
s4 = 6.23 = 6
s5 = 6.65 = 7
s6 = 6.86 = 7
s7 = 7.00 = 7
How all sk values are mapped to zq
s0 = 1.33 = 1
s1 = 3.08 = 3
s2 = 4.55 = 5
s3 = 5.67 = 6
s4 = 6.23 = 6
s5 = 6.65 = 7
s6 = 6.86 = 7
s7 = 7.00 = 7
Histogram Matching (Specification)
Comparison of Probability Distribution between
Specified Histogram and
Actually Produced Histogram