\documentclass[12pt]{article}
\topmargin=-0.15in
\textwidth=6.5in
\oddsidemargin=0.0in
\textheight=8.5in
\usepackage[dvips]{graphicx}
\DeclareGraphicsExtensions{ps,eps}
\begin{document}
\noindent {\bf Math 155}. Instructor: L. VESE. Teaching Assistant: S. LIU
\bigbreak
\noindent {\bf Homework $\#$ 4} \ \ {\bf Due on Friday, February 8}
\bigbreak
\noindent {\bf [1] } Show that the Laplacian operation $\nabla^2 f=\frac{\partial ^2f}{\partial x^2}+\frac{\partial ^2f}{\partial y^2}$ is isotropic (invariant under rotations, or rotationally invariant). You will need the following equations relating
coordinates after axis rotation by an angle $\theta$:
$$x=x'\cos\theta-y'\sin\theta$$
$$y=x'\sin\theta+y'\cos\theta$$
where $(x,y)$ are the unrotated and $(x',y')$ are the rotated coordinates.
\bigbreak
\noindent {\bf [2] }
(a) Show that the magnitude of the gradient $|\nabla f|=\sqrt{(\frac{\partial f}{\partial x})^2+(\frac{\partial f}{\partial y})^2}$ is an isotropic operation.
(b) Show that the isotropic property is lost in general if
the gradient magnitude is approximated by $|\nabla f|\approx |\frac{\partial f}{\partial x}|+|\frac{\partial f}{\partial y}|$.
\bigbreak
\noindent {\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
\noindent {\bf [4]} Recall that the finite differences formula $\frac{f(x+h)-f(x-h)}{2h}$ is a second order approximation for 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 a gradient map $g$ (or its ``image negative''; 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}