CIS 4930.006/CIS 6930.013: Computational Methods for Imaging and Vision Homework #4




Rate this product

1 1D and 2D Convolutions

(a) Write your own Matlab function to implement 1D discrete convolution, between two vectors:
• Use it to compute the convolution between the following two vectors:
h =


, and f =


• Verify the output of your result by computing the h ? f by hand.

(b) In this question, you will compute the convolution between an image of your choice, and the
Gaussian filter. The PSF for the Gaussian filter is:
H =

1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1


• For an image of your choice (please keep it PG!), load the image (i.e., read it in as a matrix), on
Matlab you can use the function: ‘imread( )’.
• Convolve that image with the matrix H.
• Display the result of your discrete convolution.
• Comment on the difference between the result and the original image.

2 Digital Holography

Holography is a 3D imaging technique, in the sense that it allows recreate the 3D scene (optically or
digitally) from a single intensity measurement. In this problem, we will explore the general idea of
in-line (Gabor) holography and understand the unique feature about holography from the linear system

A schematic of the in-line holography is shown in Fig. 2. To record a hologram, a coherent light source
(e.g. laser) is needed to illuminate the 3D scene. The hologram (the intensity image captured by the
camera) is the result from the interference between the unperturbed illumination (reference beam) and
the light scattered from the object.

The formation of the hologram from a 2D object can be approximated using the following linear shift
invariant (LSI) model:
gout(x, y) = gin(x, y; z) ? h(x, y; z), (1)
where ? denotes the 2D convolution (i.e. over (x, y)), gout(x, y) is the output term of interest contained
in the hologram, gin(x, y; z) is the object function, and h(x, y; z) is the point spread function (PSF),
determined by the free-space propagation and diffraction theory, which has the following form,
h(x, y; z) = 1
jλz e
2z , (2)

and the corresponding transfer function,
H(fx, fy; z) = F{h(x, y; z)} = e
, (3)
where k = 2π/λ is the wavenumber, λ is the wavelength of illumination, (x, y) denote the lateral
coordinates and z denotes the axial direction (along which the light propagates) and (fx, fy) denote the
spatial frequency coordinates, according to the following Fourier transform relation

H(fx, fy; z) = Z +∞
Z +∞
h(x, y; z)e
−j2π(fxx+fyy) dxdy, (4)
note that we have used the substitutions (or change of variables) ωx = 2πfx and ωy = 2πfy in the usual
definition of the Fourier transform we saw in class.

Digital holographic reconstruction: Forward problem In Homework #3, the task was to obtain the
forward model for the digital holographic system. The aim of this part of HW #4 will be to solve the
resulting inverse problem, to recover the original object given measurements o2.mat.

Digital holographic reconstruction: Inverse Write Matlab scripts to complete the following questions.
Submit both your Matlab scripts as well as the output results. The object, ‘f2’ located at z1 = 50mm is
given in the mat-file o2.mat. Use the following parameters throughout this problem for forming the
hologram: λ = 0.5µm, N = 1000, and ∆ = δ = 5µm. Consider the object o2 is present.

(a) Simulate the hologram using the discrete forward model (y = Ax) derived from Homework #3.
(If you didn’t manage that part, the solution has been posted and you can use the accompanying
(b) Next, we will consider holographic reconstruction using the same parameters as in (e).
• What is the condition number of the imaging matrix A?

(c) Finally, we will investigate the effect of Gaussian noise on reconstruction accuracy. Gaussian noise
is commonly encountered in imaging, and is used to model random phenomena due to unmodelled
hardware imperfections. The fundamental assumption is that the noise is independent of the
Figure 1: Digital holography schematic.

measured intensity. The simplest case is the white Gaussian noise (WGN), which assumes the mean
as the noise-free image Inoisefree, and the same variance nstd across all pixels.
The noisy image under WGN, Inoisy, can be generated using the following Matlab script:
Inoisy = normrnd(Inoisefree, nstd, Ny, Nx);
where Ny, Nx are the dimensions of the image along vertical and horizontal directions.

Consider white Gaussian noise (WGN) with nstd = 0 + 0j (i.e. noise-free), 0.1 + 0.1j, 0.5 + 0.5j:
• What is the direct deconvolution result?
• What is the result from the least square solution?
• What is the optimal Tikhonov deconvolved result?
• Comment on what you have observed by comparing the three results. Why?

(Optional for Extra credit: 3D Digital Holography)

Consider the 3D holographic imaging problem.
The formation of the hologram from an extended scene can be approximated using the following linear
gout(x, y) = Z
gin(x, y; zl) ? h(x, y; zl)dzl (5)
where ? denotes the 2D convolution in (x, y), gin(x, y; zl) is the object function at the distance zl
(d) Construct the forward models in both operator and matrix forms. Assume that the discretization
of the object space is performed on the standard basis with lateral spacing δx = δy = δ, and axial
spacing δz.

(e) Is the system shift invariant? If so, plot the system transfer function. If not, plot the singular values
of the system.
(f) Find the image space, object space, range, null space, and adjoint of the system. Does the inverse
(g) Write a Matlab/Python script for the forward model in part (e).