\documentclass[12pt]{article} 

\topmargin=0.0in 
\textheight=8.5in 

\begin{document} 

\noindent Math 155: Instructor: Luminita Vese. Teaching Assistant: Jacob Moorman. 

\bigbreak 

\noindent {\bf Homework $\#$ 1}. Due on Wednesday, January 17, 2018 

\medbreak 

\noindent{\bf [1]} Write an algorithm (pseudocode) capable of reducing the number of gray levels in an image from 256 to 2, in integer powers of 2.  The desired number of gray levels needs to be a variable input to your code. 

\medbreak 

\noindent{\bf [2]} (a) Give a continuous function for implementing the contrast stretching 
transformation shown in Fig. 3.2(a). In addition to $k$, your function must 
include a parameter, $E$, for controlling the slope of the function as it 
transitions from low to high gray-level values. Your function should be normalized (between 0 and 1 or 0 and 255). 

\ \ \ \ \ \ (b) Sketch (plot) a family of transformations function of $E$, for a fixed 
value $k=L/2$, where $L$ is the number of gray levels in the image. Include the
transformation that will output a binary image. 

\medbreak 

\noindent{\bf [3] } Suppose that a digital image is subjected to histogram equalization. Show
that a second pass of histogram equalization will produce exactly the same 
result as the first pass. 

\medbreak 

\noindent{\bf [4]} (a) Write a computer program for computing the histogram of an image. 

\ \ \ \ \ \ (b) Implement the histogram equalization technique discussed in the class and 
in Section 3.3.1 of the textbook. 

\ \ \ \ \ (c) Download Fig. 3.8(a) and perform histogram equalization on it (the MRI of a
fractured human spine). 

As a minimum, your project solution should include the original image, a plot of its histogram, a plot of the histogram-equalization transformation function, the enhanced image, and a plot of its histogram. Use this information to explain why the resulting image was enhanced as it was.

\end{document} 
