CS6640 - Project 1
Assigned Jan. 24, 2008
Due Feb. 7 (Just before midnight)
The purpose of this assignment is to familiarize you with matlab and
allow you to experiment with methods for improving the constrast
of an image.
Histogram Equalization
- Implement a matlab function
histogram(I, n, min, max)
that takes a 2D array (or image) I as input (8-bit unsigned integers)
and returns a 1D array of floats (length n) that give the relative frequency of
the occurance of greyscale values in each of the n bins that
equally (to within integer round off)
divide the range of (integer) values between min and max.
- Implement a matlab function
histoeq(I, n)
that takes a 2D array (or image) I as input (8-bit unsigned integers)
and returns a 2D array of the same type that has undergone histogram
equalization using n bins and has a range of outputs that spans
the entire range of the data type.
- Use this routine to transform and enhance the following images:
- Xinwei1
- Xinwei2
- Seeds
- Family
- Capitol
- Portal
- In addition, include in your discussion 2-3 of your own greyscale
images that you think would be interesting from the point of view of
this exercise.
- Discuss (briefly) why histogram
equalization is or is not effective for each image.
- Derive an algorithm that processes an image to return an image with a
histogram (pdf) that has at every grey level a value that is a linear
blend of the input histogram and a flat histogram. Implement a
matlab function
histoeq(I, n, alpha)
where alpha is a float between 0 and 1 and every bin is (in principle) equal to
. Thus, for a value of alpha = 0, the
output equals the input and for a value of 1 the output is the same as
histoeq(I, n,).
Show, mathematically (using
continuous greyscales) that your algorithm is correct. Experiment and
report results on some of the images listed above.
- Implement a matlab function
that returns the input image which has been transformed by adaptive
equalized histogram equalization using square neighborhoods (allowing
for boundaries). The function should be
AHE(I, n, windowsize)
You may use whichever algorithm you
choose. The windowsize is an optional parameter. If windowsize is left empty (set to -1) your routine should make a
reasonable choice of tile or window size based on the size of the
image, etc. Your routine may round off the given window size to some
number that fits into your algorithm (if necessary). Make sure that
your function is a sensibly efficient implementation of whatever
algorithm you choose.
- For the images given in 1 above (the samples given you
and the ones you bring in yourself) try adaptive histogram
equalization, with different values of window size.
- Discuss the time
it takes to run and its effectiveness for each image.
- Comment on and explain any artifacts.
Implement a version of Clipped LAHE (CLAHE). Explain your algorithm
in the report, and if you used ideas from any outside resources. The
clip value should be specified as an input parameter. The function
should be
CLAHE(I, n, cliplevel, windowsize)
Try your algorithm on a variety of images and compare against the
unclipped version. What values of clipping are effective and why?
- Write your project code in a single directory, called project1.
- Each individual function (including functions you define) should be a ``.m'' file, and your
functions should call one another as necessary.
- Your project report will be in the form of an html file called
index.html,
contained in that directory. All links from that file must be
relative and all other files necessary to read your report must be in
that directory (or subdirectories).
- You should use examples of images in your report. They should
be viewable in the browser when we open your html file.
- You will submit a single tar file created from from your project
directory with the unix command tar -czf project1.tgz./project1.
This document was generated using the
LaTeX2HTML translator Version 2002-2-1 (1.70)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 project1.tex
The translation was initiated by Ross Whitaker on 2008-01-26
Ross Whitaker
2008-01-26