0% found this document useful (0 votes)
7 views12 pages

CV Module 1 Histogram Processing

The document discusses histogram processing, a key technique in image processing that analyzes and modifies the intensity distribution of images to enhance quality and extract information. It covers the basics of image histograms, types of histogram processing such as histogram equalization and matching, and their applications in fields like medical imaging, remote sensing, and security. The document emphasizes the importance of histogram processing in improving image contrast, normalizing brightness, and facilitating feature extraction for various applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views12 pages

CV Module 1 Histogram Processing

The document discusses histogram processing, a key technique in image processing that analyzes and modifies the intensity distribution of images to enhance quality and extract information. It covers the basics of image histograms, types of histogram processing such as histogram equalization and matching, and their applications in fields like medical imaging, remote sensing, and security. The document emphasizes the importance of histogram processing in improving image contrast, normalizing brightness, and facilitating feature extraction for various applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Vision

Module-1

Histogram Processing

By

Dr. Shahana Gajala Qureshi


Asst. Professor G-2, SCAI

1
Histogram Processing
❑ Histogram processing is a fundamental technique in image processing that
involves analyzing and modifying the intensity distribution of an image.
❑ A histogram represents the frequency of pixel intensity values, allowing us to
understand the contrast, brightness, and overall tonal distribution of an image.
❑ By manipulating histograms, we can enhance image quality, improve visibility,
and extract meaningful information.
❑ Histogram processing is crucial in image enhancement and computer vision
applications because it helps:
a. Enhance Image Contrast : Adjusting the histogram can improve the visibility of
features in an image.
b. Normalize Brightness : It helps in equalizing brightness variations across
images, making them more consistent.
c. Feature Extraction : Histogram analysis is used in object detection, pattern
recognition, and image segmentation.
d. Preprocessing for Machine Learning : Many image-based AI models rely on
histogram normalization to improve accuracy.

2
Histogram Processing Cont…
Histogram processing has numerous applications, including:
a) Medical Imaging : Enhancing X-ray, MRI, and CT scan images for better
diagnosis.
b) Remote Sensing : Improving satellite images for land use classification and
environmental monitoring.
c) Security & Surveillance : Enhancing CCTV footage for better visibility in
low-light conditions.
d) Photography & Image Editing : Adjusting brightness and contrast in digital
photos. • Industrial Inspection : Detecting defects in manufactured products
through image analysis.
❑ By leveraging histogram processing techniques like histogram equalization,
stretching, and matching, we can significantly improve image quality and extract
meaningful insights for various applications.

3
Histogram Processing Cont…
Basics of Image Histograms
❑ An image histogram is a statistical representation of the tonal distribution of
pixel intensity values in an image. It is a graph where:
• The x-axis represents the range of possible intensity values (0 to 255 for an
8-bit image).
• The y-axis represents the number of pixels that have each intensity value.
❑ By examining the histogram, we can analyze the brightness, contrast, and
exposure of an image. Histograms are widely used in image processing for
enhancement, segmentation, and feature extraction.
How Histograms Represent the Distribution of Pixel Intensities
Histograms provide a visual way to understand how pixel intensities are
distributed across an image. The shape of the histogram can reveal important
characteristics of an image:
❖ Dark images : The histogram is skewed toward the left (more pixels with
lower intensity values).
❖ Bright images : The histogram is skewed toward the right (more pixels with
higher intensity values).
❖ Low contrast images : The histogram is narrow and clustered in a small range,
indicating that the pixel values are close to each other.
4
Histogram Processing Cont…
❖ High contrast images : The histogram is spread across the full range of intensity
values, from 0 (black) to 255 (white), representing a well-balanced distribution
of tones.
Grayscale and Color Image Histograms
1. Grayscale Image Histogram
1. A grayscale image contains only one intensity channel, where each pixel has a
value between 0 (black) and 255 (white).
2. The histogram of a grayscale image shows the distribution of these intensity
values. !
3. Example: A well-lit image may have a histogram with a peak in the middle
(balanced contrast), while a dark image may have a peak on the left side
(lower intensity values).
2. Color Image Histogram
1. A color image is typically represented in RGB (Red, Green, Blue) format ,
meaning each pixel has three intensity values (one for each channel).
2. Instead of a single histogram, color images have separate histograms for the
Red, Green, and Blue channels.
3. The Red histogram shows the intensity distribution of red pixels, the Green
histogram shows green intensities, and the Blue histogram shows blue
intensities.

5
Histogram Processing Cont…
4. If a color is dominant in the image, its histogram will have higher peaks
compared to the others.
Types
❑ Histogram processing is a fundamental technique in image enhancement that
modifies the intensity distribution of an image to improve its quality.
❑ The two most common types of histogram processing are Histogram
Equalization and Histogram Matching (Histogram Specification) .

Histogram Equalization

Concept and Purpose (Enhancing Contrast)


❖ Histogram equalization is a technique used to improve the contrast of an image
by redistributing the intensity values more evenly across the entire range. This
helps in enhancing details, particularly in images where the contrast is low due
to poor lighting conditions or overexposure.
❖ The key idea behind histogram equalization is to transform the original
intensity distribution into a uniform distribution, spreading out pixel values to
utilize the entire dynamic range (0 to 255 for an 8-bit image).

6
Histogram Processing Cont…
Mathematical Equation for Histogram Equalization
Let an image have L possible intensity levels, ranging from 0 to L-1. The
transformation function used for histogram equalization is:

7
Histogram Processing Cont…
Step-by-Step Explanation of the Process
1. Compute the histogram : Count the number of pixels for each intensity value.
2. Normalize the histogram : Divide each pixel count by the total number of
pixels to obtain the probability distribution.
3. Compute the cumulative distribution function (CDF) : The CDF gives the
cumulative sum of the normalized histogram.
4. Apply the transformation function : Map the original intensity values to new
values based on the CDF.
5. Generate the new image : Replace each pixel in the original image with its new
intensity value.

8
Histogram Processing Cont…
2. Histogram Matching (Histogram Specification)
Purpose of Histogram Matching
❑ Histogram matching, also called histogram specification , is used when we want
an image to have a specific histogram shape instead of simply equalizing it.
❑ Unlike histogram equalization, which enhances contrast without control over
the final intensity distribution, histogram matching allows us to impose a
desired intensity distribution on the image.
❑ This is useful in applications where consistent brightness and contrast across
multiple images are needed, such as medical imaging, remote sensing, and
image forensics.
Steps Involved in Histogram Matching
1. Compute the histogram of the input image (same as in histogram
equalization).
2. Compute the cumulative distribution function (CDF) of the input image .
3. Obtain the histogram of the target image (the reference histogram).
4. Compute the CDF of the target image .
5. Find the mapping function : Match intensity values from the input image to the
closest values in the target histogram based on the CDFs.
6. Apply the transformation : Replace each pixel in the input image with its
corresponding mapped intensity value
9
Histogram Processing Cont…

10
Histogram Processing Cont…
Applications of Histogram Processing
1) Medical Image Enhancement : Medical images such as X-rays, CT scans, and MRI
scans often suffer from poor contrast, making it difficult for doctors to identify
abnormalities. Histogram processing techniques like Histogram Equalization (HE) help
enhance these images by improving visibility.
Examples:
• X-ray Enhancement: Enhancing contrast in X-ray images to detect fractures, tumors, or
infections.
• MRI & CT Scan Processing: Improving the clarity of soft tissues in MRI scans for
accurate diagnosis.
• Retinal Image Processing: Enhancing retinal scans to detect diseases like diabetic
retinopathy and glaucoma.

2) Satellite Image Processing: Satellite images captured by remote sensing devices


often have low contrast due to atmospheric conditions, sensor limitations, or
environmental factors. Histogram processing techniques improve the quality of these
images for better analysis.
Examples:
• Land Cover Classification: Enhancing contrast to distinguish between forests, water
bodies, urban areas, and agricultural land.
• Weather Monitoring: Enhancing satellite images for better visualization of cloud
patterns and storm formations.
• Disaster Management: Improving visibility in flood-affected or earthquake-hit areas to
aid rescue and relief operations.

11
Thank You

12

You might also like