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

Mlip Pa-1

The document provides instructions for a programming assignment on image enhancement techniques including contrast stretching, histogram equalization, adaptive histogram equalization (AHE), and clipped AHE. Students are asked to write Python functions to perform each technique on four images and analyze the results. For AHE, window sizes should be varied and the best results reported. For clipped AHE, built-in functions should be used with different parameters and the best results for each image presented along with the parameter details. Observations about each technique and comparisons between the images processed with different methods should be included in a final report.

Uploaded by

DR MAITHILI
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)
17 views1 page

Mlip Pa-1

The document provides instructions for a programming assignment on image enhancement techniques including contrast stretching, histogram equalization, adaptive histogram equalization (AHE), and clipped AHE. Students are asked to write Python functions to perform each technique on four images and analyze the results. For AHE, window sizes should be varied and the best results reported. For clipped AHE, built-in functions should be used with different parameters and the best results for each image presented along with the parameter details. Observations about each technique and comparisons between the images processed with different methods should be included in a final report.

Uploaded by

DR MAITHILI
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
You are on page 1/ 1

Machine Learning for Image Processing

Programming Assignment-1

Objective: The objective of this programming assignment is to provide hands-on practice to students
on contrast stretching, histogram equalization, Adaptive Histogram Equalization (AHE), and Clipped
AHE for image enhancement.

Note: Report results on all the given images for each problem. Write your own Python function for
computing the histogram of a given input image and use it in the following problems instead of the
built-in histogram function. Submit a report of the results along with your code.

1. Contrast Stretching: Write your own Python function to perform contrast stretching of an
image. Apply it on all four images. Clearly specify your inferences from these results.

2. Histogram Equalization (HE): Write your own Python function to perform global histogram
equalization of an image. Apply it on all four images. Clearly specify your inferences from these
results.

3. Adaptive Histogram Equalization (AHE): Write your own Python function to perform sliding
window adaptive (local) histogram equalization. For each of the four images, play with varying
window sizes, and only present results for that window size that looks visually better. Also,
make sure to mention the respective window sizes. Clearly specify your inferences from these
results.

Procedure for sliding window AHE algorithm:

a) Define a square window of appropriate size whose centre moves from pixel to pixel.
b) Compute local histogram for each window, and apply histogram equalization for the
central pixel.
c) The pixels at the borders can remain the same and thus no image padding is required.

4. Clipped AHE: Use Python built-in functions to perform clipped AHE for all four images.
Experiment with all parameters of the function, and present the visually best results for each
image along with the details of the respective parameters. Clearly specify your inferences from
these results.

You might also like