0% found this document useful (0 votes)
10 views1 page

DIP Assignment 3

The document outlines a lab assignment to implement histogram equalization on a grayscale image using Python without inbuilt histogram functions. It details a modular approach requiring functions for loading images, computing histograms, PDFs, CDFs, transformation mappings, and applying histogram equalization. Additionally, it includes tasks for displaying results and comparing manual and inbuilt methods of histogram equalization.
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)
10 views1 page

DIP Assignment 3

The document outlines a lab assignment to implement histogram equalization on a grayscale image using Python without inbuilt histogram functions. It details a modular approach requiring functions for loading images, computing histograms, PDFs, CDFs, transformation mappings, and applying histogram equalization. Additionally, it includes tasks for displaying results and comparing manual and inbuilt methods of histogram equalization.
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

Lab Assignment

Histogram Equalization of a Grayscale Image

You are required to write a Python program that performs histogram equalization on a given grayscale
image without using any inbuilt histogram functions. The implementation should follow a modular
approach where each step is implemented in a separate function.
Complete the following tasks:
1. Load and Display Input Image
2. Compute Histogram
 Write a function to compute the frequency of occurrence for each pixel intensity level
manually by iterating through pixels.
 Display the original image histogram using Matplotlib.
3. Compute PDF (Probability Distribution Function)
 Write a function to compute the PDF and display it.
4. Compute CDF (Cumulative Distribution Function)
 Write a function to compute the CDF from the above PDF and display it.
5. Generate Transformation Mapping
 Write a function to generate the mapping from original intensity to new equalized intensity
and display the intensity mapping.
6. Apply Histogram Equalization
 Write a function to apply the transformation to all pixels of the input image to obtain the
equalized image.
 Display the original and equalized image side by side.
7. Compute and Display Equalized Histogram
 Compute the histogram of the equalized image manually.
 Display the original and equalized histogram.
8. Apply histogram equalization using inbuilt function and compare the resulting image and histogram
with the manually equalized image and its histogram.

You might also like