\documentclass[12pt]{article} 

\topmargin=-0.15in
\textwidth=6.5in 
\oddsidemargin=0.0in 
\textheight=8.5in 

\usepackage[dvips]{graphicx}
\DeclareGraphicsExtensions{ps,eps}

\begin{document} 

{\bf Math 155}. Instructor: L. Vese. Teaching Assistant: Baichuan Yuan. 

\bigbreak 

\hline

\bigbreak 

$\bullet$ Midterm on Monday, February 13, 2017, 1.00-1.50pm (lecture room).

$\bullet$ Sections covered for the midterm: 2.3.4, 2.4.1-2.4.3, 
3.1, 3.2 (except bit-plane slicing), 3.3, 3.4, 3.5, 3.6. 

$\bullet$ Solutions to exercises marked with an asterisk are posted on the authors web-page, at 

http://www.imageprocessingplace.com/root$_{-}$files$_{-}$V3/problem$_{-}$solutions.htm

\bigbreak 

\hline

\bigbreak 

{\bf Homework $\#$ 4} \ \ {\bf Due on Friday, February 10}

\bigbreak 

{\bf [1]} The median, $\xi$, of a set of numbers is such that half the values 
in the set are less than or equal to $\xi$, and half are greater than or equal to $\xi$. For example, the 
median of the set of values $\{ 2,3,8,20, 21, 25, 31\}$ is 20.
Show that an operator applied to the set of images (matrices) of the same dimension, that computes the median, is nonlinear.

\bigbreak 

{\bf [2]} Write a computer program that will denoise an image using the 
3x3 median filter. Apply your algorithm to the X-Ray image of circuit board 
corrupted by salt-and-pepper noise (Fig3.37(a).jpg). You should turn in the details of the 
method, your computer program, the input and output images. Perform your 
calculations only for interior pixels, not for boundary pixels. Explain your result and compare it with the output obtained in the previous homework on the same image (using a linear average filter). 

\bigbreak 

{\bf [3]} (Composite Laplacian Mask). Write a computer program that implements the operation 
$g(x,y)=f(x,y)-\nabla^2 f(x,y)$, in the form of a spatial linear filter with 
a 3x3 mask. Give the form of the mask and apply the program to the image of the
North Pole of the moon (Fig3.40(a).jpg). You should turn in the details of the method, the computer program, the input and output images. Perform your 
calculations only for interior pixels, not for boundary pixels. 
Explain your result. 

\bigbreak

{\bf Optional Problem.} 
Recall that the finite differences formula $\frac{f(x+h)-f(x-h)}{2h}$ is a second order approximation of the first-order derivative $f'(x)$.  

(a) Using $h=1$, apply this formula to approximate the gradient map 
$$g(x,y)=|\nabla f|^2(x,y)=\Big(\frac{\partial f(x,y)}{\partial x}\Big)^2+\Big(\frac{\partial f(x,y)}{\partial y}\Big)^2.$$ 

(b) Download Fig5.26a and plot an image negative of its gradient map $g$ (edges will appear black, while homogenous regions will appear white; rescaling may be necessary). Explain the steps taken. Ignore the pixels on the boundary of the image for simplicity, when computing the discrete gradient. 


\end{document} 



