CSCE 5683 - Homework 2
Due Date - 09/30/2010
1. Problem Statement:
The primary goal of this assignment is to gain experience
with intensity transformations and histogram based image
processing operations. Your specific tasks are listed below:
- Write a function that reads an input image in, calculates
the min and max intensities in that image, and prompts the user
for parameters to window the image to a specified
intensity range. Then call the image.Window() method to perform
windowing. Write the resulting image to a jpg file.
- Write a second function that reads an input image in,
and calculates the intensity histogram using the image.Histogram
method. Using this information, calculate the range of intensities
[low..high] such that 5% of the image is < low, and 5% of the
image is > high. Using this information call image.Window() and
save the resulting image to a jpg file.
- In order to do local histogram operations, we need a way to
calculate the intensity histogram for a specified range of
pixel values from (x1,y1) to (x2,y2). Write your own Histogram
function with the range information above, and use this function to
calculate four histograms for a input image (top-left, top-right,
bottom-left, and bottom-right). If you output these values into
ascii files, you should be able to import them into a speadsheet
to display them. How are they similar/different?
- Finally write a third windowing function that calls your
new Histogram function four times, and performs histogram-based
windowing four times to enhance the four sub-images separately
(top-left, top-right, bottom-left, and bottom-right). Save the
output image to a jpg file. How does this image look compared
to your previous windowing output?
The formulas for the image processing operations are in
the text book and the online notes. Remember to loop over
the "output pixels" when performing your operations.
Also remember to perform float/int conversions properly
and do array bounds checking or your program may crash.
My standard advice is to develop your code incrementally so you
always have something that compiles and runs, even if it is not complete.
Test your program to check that it operates correctly for all of
the requirements listed above and save a variety of output images
for your report. Also check for the error handling capabilities
of the code.
When you have completed your program, write a short report
describing what the objectives were, what you did, and the
status of the program. Does it work properly for all test cases?
Are there any known problems?
6. Project Submission:
Print a copy of your report and programs and hand them into your
instructor during class or in the department office. Include a title page
which has your name and uaid.