EE440 - Introduction To Digital Imaging Systems Lab. 3: Hints
EE440 - Introduction To Digital Imaging Systems Lab. 3: Hints
Lab. 3
In this lab assignment, you have two low-quality images (3_1.jpg, 3_2.jpg) that you want
to enhance.
You will be examining the following three general histogram-based enhancement
algorithms:
a. Linear stretching (30%);
b. Histogram equalization (30%);
c. Histogram specification (40%).
For each image and each method, please submit the original and the new image after
processing. For original and new image, please also include their histogram and cdf plots
for you to get a better understanding of whats going on with these processing in regard
with the image histogram. Compare the effects of these methods. For each image, please
comment on the effects and pick up one method that you think works best for that image.
Hints:
1. You need to implement your own functions for linear stretching, histogram
equalization and specification. But you may use these commands to help you: rgb2hsv,
hsv2rgb, subplot,imshow, cumsum, imhist
2. You may want to convert the image to HSV first before doing any operations;
specifically, you want to process the V channel (value, i.e., intensity) only. After the V
channel is altered, you want to combine it with original H and S channel and convert
back to RGB.
3. For histogram equalization, compute pdf and cdf first and then use the cdf as the
transform function. You can use imhist to help you get the image histogram and then use
cumsum to get the cdf from histogram, but please DONT use histeq to directly perform
histogram equalization / specification.
4. For histogram specification, you may specify any histogram to get the best result. Note
that if you specify the target histogram as a uniform distribution, youre doing histogram
equalization. You can also try normal distribution as the specified histogram to get the
transform function and see how the result turns out. Use normpdf to generate a normally
distributed sequence in MATLAB. Please type help normpdf to see how to use this
function to generate a desired normally distributed histogram. Remember usually we
want a histogram that has 256 bins