Due Monday, Jan. 24 (in class)

In this assignment you will create a reconstruction of an image which reflects the spatial resolution conveyed by parvo- and magno-cellular retinal gangion cells, assuming they act roughly as linear spatial filters. The dendritic field diameters of these cells increase with eccentricity roughly according to the following relation:

Parvo diameter ~ .01*whereE

Magno diameter ~ .03*E

A useful tool for doing this simulation is the Laplacian pyramid, which essentially provides a convenient way to produce a multi-resolution representation of an image, without loss. If you have engineering inclinations of any kind I highly recommend reading the full paper:

Burt PJ, Adelson EH (1983) The Laplacian pyramid as a compact image code.You can proceed with this assignment though without knowing how it works in detail (although it is really a very simple and elegant idea - among the top 10 papers I have ever read). You will use the Laplacian pyramid first to construct a multi-resolution representation of an image. Then you will window out the center portion of each level of the pyramid to simulate how resolution falls off with eccentricity in the retina. Finally, you will reconstruct the image from the windowed pyramid. The result will be an image that reflects the image content conveyed by retinal gangion cells which (hypothetically) scale their summation zones as described above.IEEE Transactions on Communications,31, 532-540.

First, you must download the Matlab scripts and some example images from the following URL:

Just grab the whole directoryhttp://redwood.ucdavis.edu/bruno/npb261b/lab1/

Theim=double(imread('einstein.jpg'));

You should see a 256 x 256 pixel rendition of the most famous scientist of the 20th century.imagesc(im), axis image

colormap gray

Now, build a Laplacian pyramid from this image and display the pyramid as follows:

This will build a pyramid composed of four levels. You will see that the different levels of the pyramid contain different amounts of spatial detail, proceeding from coarse to fine (left to right in the display). The leftmost image forms the top of the pyramid. It contains a compact rendition of the original image that has been lowpass filtered and downsampled to 32 x 32 samples. The next level contains the additional detail needed to expand it to 64 x 64. The next level after that contains the additional detail needed for 128 x 128, and so on. Moving up or down a level of the pyramid decreases or increases, respectively, the level of resolution by a factor of two. To reconstruct an image from the pyramid, you first expand the top level of the pyramid, then add it to the next level of detail, then expand this and add to the next level, etc. until you get to the bottom of the pyramid. At this point you will have the original image back. You can use the functionpyr=buildpyr(im,4);

showpyr(pyr)

You can see whatimh=reconpyr(pyr);

Now, to create an image that depicts what is represented by the retina we will not want a full reconstruction because we know that the retina is throwing away alot of information via summation and subsampling by the ganglion cells. We can simulate this process by windowing each level of the pyramid as follows:

Display the windowed pyramid usingpyrw=windowpyr(pyr);

Based on the information above, you should be able to convince yourself that the diameter of the region of spatial summation used to create the blur is increasing linearly with eccentricity (in a roughly piecewise manner) according toimh=reconpyr(pyrw);

imagesc(imh), axis image

Now, how do we make it so that the diameter of the summation zone follows the relations above for the diameters of parvo- and magno-cellular dendritic arbors? First, you need to figure out the viewing distance for which each pixel subtends .01 degrees. Then, for simulating the parvo-cellular lattice you will need to set the diameter of the window so that the constant of proportionality in the relation between

But for the einstein image the window now subtends the entire image already at the bottom level of the pyramid, so we won't see the effect of resolution falling off with eccentricity. We need a bigger image. For this, trypyrw=windowpyr(pyr,100);

Now do the same thing for the magno-cellular lattice.imwrite(uint8(imh),'logpicture-parvo.jpg','Quality',100)

You should turn in a lab write-up that includes the following:

- A print out of the filtered image for both parvo- and magno-cellular lattices, along with the window size you used for simulating the magno-cellular lattice.
- The viewing distance you used and how you calculated it.
- Your observations. For example, can you tell that the image content in the periphery is blurred when you fixate the center of the image? If so, what factors do you suppose have not been properly taken into account?