Computational Vision
U. Minn. Psy 5036

Assignment #2
Linear systems, neural systems & edge detection

Initialization

Off[General::spell1];
SetOptions[ListDensityPlot, Mesh -> False, AspectRatio -> Automatic, 
        PlotRange -> All];
SetOptions[ListPlot3D, Mesh -> False, AspectRatio -> Automatic, 
        PlotRange -> All];

You don't have to use the shift operator below. But you may find it or some other version useful.

shift[mat_, dx_] := RotateRight[mat, {dx, dx}];

Goals: Learn: 
	1) how to use convolution for spatial filtering
	2) how to use the Fast Fourier Transform for spatial filtering
	3) how to extract edges from the outputs of model V1 simple cells

In Assignment 1 you learned how to model the performance of an ideal detector that had an exact template for a signal and which received images that were either noise or were signal plus noise. The noise pixel intensities were Gaussian, and the pixels intensities were picked independently of each other. Noise with indepedent pixel intensities is called "white noise".
The ideal observer takes the dot product of the input image with the template and uses this as a decision variable. This operation is used to model the spike discharge of simple cell neurons in the mammalian visual cortex. The spike discharge rate would correspond to the decision variable.
In Assignment 2, you will build an edge detector based on a model of simple cells. You will combine the dot product model of a linear visual neuron to spatially filter an input image. You will do this in two ways, and the results should be very similar: convolution, and through the Fast Fourier Transform. 
You will use the filtered images (one from the convolution method and one from the FFT method) to mark edges.

Your input image will look like this:

Your ultimate product should mark the edges, and could look something like this:

Your input image: "grapes" is a 64*64 array

Initializing the cells below load the matrix grapes with the image intensity values.

grapes = {
{0.0314, 0.0902, 0.2510, 0.3059, 0.3608, 0.4157, 0.3373, 0.2392, 0.2392, 
0.1373, 0.0235, 0.1412, 0.2784, 0.2392, 0.2824, 0.3765, 0.5373, 0.6353, 
0.5765, 0.5843, 0.6667, 0.6863, 0.6902, 0.5961, 0.3882, 0.2549, 0.1765, 
0.3176, 0.4784, 0.5647, 0.6235, 0.6510, 0.5804, 0.5765, 0.5922, 0.5451, 
0.4118, 0.3373, 0.2941, 0.2824, 0.5216, 0.6039, 0.6235, 0.6745, 0.6980, 
0.7216, 0.6902, 0.6902, 0.7216, 0.7922, 0.8196, 0.6863, 0.6667, 0.3216, 
0.1333, 0.3608, 0.4510, 0.5176, 0.6196, 0.6431, 0.6471, 0.6314, 0.6431, 
0.6706},
{0.0588, 0.0510, 0.2196, 0.3961, 0.4549, 0.5137, 0.5216, 0.4745, 0.4000, 
0.2392, 0.0471, 0.1333, 0.1569, 0.1804, 0.3451, 0.4353, 0.5137, 0.5686, 
0.5647, 0.6353, 0.6588, 0.6824, 0.6745, 0.6392, 0.5255, 0.3137, 0.1765, 
0.3333, 0.4980, 0.5373, 0.6118, 0.6471, 0.6196, 0.5804, 0.5922, 0.5176, 
0.4157, 0.3216, 0.2588, 0.4275, 0.5608, 0.6118, 0.6431, 0.6863, 0.7216, 
0.7333, 0.7451, 0.7333, 0.7451, 0.8196, 0.8039, 0.6863, 0.6745, 0.3647, 
0.0235, 0.3059, 0.4078, 0.5176, 0.5686, 0.5529, 0.6392, 0.6706, 0.6706, 
0.6627},
{0.1294, 0.0745, 0.2235, 0.4000, 0.5137, 0.5686, 0.6235, 0.6118, 0.5255, 
0.3216, 0.1020, 0.0627, 0.0588, 0.2275, 0.3725, 0.3882, 0.4863, 0.5412, 
0.5804, 0.6431, 0.6588, 0.6471, 0.6549, 0.6314, 0.6078, 0.4000, 0.1608, 
0.2706, 0.3922, 0.4980, 0.6039, 0.6275, 0.6196, 0.6196, 0.5922, 0.5255, 
0.4039, 0.2784, 0.3255, 0.5333, 0.5529, 0.6157, 0.6549, 0.6980, 0.7059, 
0.7294, 0.7333, 0.7216, 0.7373, 0.7569, 0.7451, 0.6902, 0.6784, 0.3686, 
0.0000, 0.1137, 0.3333, 0.4314, 0.4510, 0.5137, 0.5882, 0.6431, 0.6588, 
0.6196},
{0.2549, 0.1686, 0.2431, 0.4118, 0.4784, 0.5725, 0.5882, 0.5569, 0.5451, 
0.4039, 0.1765, 0.0078, 0.0392, 0.1804, 0.3373, 0.3608, 0.4078, 0.4824, 
0.5569, 0.5804, 0.6078, 0.6078, 0.5725, 0.4941, 0.5333, 0.5725, 0.5961, 
0.6314, 0.6275, 0.6039, 0.5333, 0.5255, 0.5137, 0.5529, 0.5529, 0.4667, 
0.3529, 0.2392, 0.4353, 0.5608, 0.5647, 0.5961, 0.6549, 0.7176, 0.6980, 
0.7020, 0.7216, 0.7412, 0.7294, 0.7176, 0.7137, 0.6784, 0.6902, 0.3333, 
0.0000, 0.0196, 0.0824, 0.2706, 0.3608, 0.4353, 0.5412, 0.6039, 0.5725, 
0.4980},
{0.2941, 0.2000, 0.2549, 0.4235, 0.4431, 0.4667, 0.5098, 0.4941, 0.4353, 
0.3961, 0.2941, 0.2157, 0.3412, 0.4196, 0.4588, 0.4039, 0.3412, 0.4157, 
0.4863, 0.5255, 0.5137, 0.5098, 0.4431, 0.5333, 0.6667, 0.6863, 0.7098, 
0.7373, 0.7490, 0.7569, 0.6941, 0.4824, 0.4706, 0.5059, 0.4824, 0.3686, 
0.2784, 0.2392, 0.5137, 0.5490, 0.5882, 0.6078, 0.6510, 0.6784, 0.7098, 
0.7176, 0.7294, 0.7333, 0.7098, 0.7020, 0.7098, 0.6706, 0.6863, 0.2000, 
0.0000, 0.0392, 0.0275, 0.0314, 0.1216, 0.2314, 0.3255, 0.3922, 0.4392, 
0.4980},
{0.2039, 0.1529, 0.2588, 0.3608, 0.3882, 0.4039, 0.3922, 0.3608, 0.3098, 
0.3765, 0.5373, 0.6549, 0.6824, 0.6706, 0.6706, 0.6588, 0.5686, 0.4118, 
0.3765, 0.4471, 0.4314, 0.3882, 0.5059, 0.7059, 0.6941, 0.7020, 0.7176, 
0.6824, 0.7176, 0.7333, 0.7255, 0.6275, 0.4627, 0.4706, 0.4078, 0.3373, 
0.2235, 0.2941, 0.5961, 0.5725, 0.6078, 0.6275, 0.6510, 0.6784, 0.7059, 
0.7059, 0.7333, 0.7137, 0.6902, 0.7137, 0.7137, 0.6824, 0.6431, 0.2588, 
0.0941, 0.0510, 0.0314, 0.0431, 0.0353, 0.0431, 0.0627, 0.3843, 0.6431, 
0.7098},
{0.2314, 0.1686, 0.2745, 0.3373, 0.3412, 0.3294, 0.2980, 0.2235, 0.3725, 
0.5725, 0.5804, 0.5961, 0.6353, 0.6745, 0.7098, 0.7098, 0.7608, 0.6784, 
0.3725, 0.3333, 0.3294, 0.3608, 0.6627, 0.6941, 0.7059, 0.7176, 0.7294, 
0.7176, 0.7176, 0.7412, 0.7294, 0.7176, 0.5765, 0.4353, 0.4039, 0.3176, 
0.1922, 0.3373, 0.6157, 0.5765, 0.6000, 0.6235, 0.6588, 0.6902, 0.7216, 
0.7333, 0.7294, 0.7176, 0.7137, 0.7137, 0.7137, 0.7137, 0.5412, 0.3373, 
0.3333, 0.2588, 0.1686, 0.0588, 0.0588, 0.0353, 0.3059, 0.6510, 0.6588, 
0.7137},
{0.2039, 0.1961, 0.2863, 0.3176, 0.2980, 0.2549, 0.1922, 0.2392, 0.5686, 
0.6078, 0.6549, 0.6667, 0.6824, 0.7137, 0.7137, 0.7137, 0.7020, 0.7490, 
0.6078, 0.2745, 0.2314, 0.4510, 0.7176, 0.6941, 0.7412, 0.7529, 0.7529, 
0.7961, 0.8039, 0.7804, 0.7569, 0.7294, 0.6510, 0.4275, 0.3804, 0.2706, 
0.1373, 0.3765, 0.5725, 0.5451, 0.5922, 0.6039, 0.6471, 0.6706, 0.6980, 
0.7176, 0.7216, 0.7255, 0.7176, 0.7020, 0.7137, 0.6863, 0.4078, 0.3137, 
0.3412, 0.3490, 0.3490, 0.2431, 0.0863, 0.1412, 0.5451, 0.6000, 0.6353, 
0.7098},
{0.1059, 0.1647, 0.2549, 0.2667, 0.2706, 0.2157, 0.1490, 0.4078, 0.6157, 
0.6471, 0.6980, 0.7098, 0.7059, 0.7294, 0.7529, 0.7451, 0.7176, 0.7216, 
0.7098, 0.3608, 0.1490, 0.5412, 0.7451, 0.7255, 0.7922, 0.7882, 0.7608, 
0.8157, 0.8863, 0.9059, 0.8275, 0.7451, 0.6745, 0.4235, 0.3294, 0.2196, 
0.1059, 0.3412, 0.4980, 0.4745, 0.5647, 0.5843, 0.6314, 0.6588, 0.6863, 
0.6902, 0.7098, 0.7294, 0.7294, 0.7098, 0.7137, 0.5412, 0.3569, 0.3529, 
0.3451, 0.3255, 0.3451, 0.3176, 0.2039, 0.3176, 0.5333, 0.5569, 0.6902, 
0.7490},
{0.2078, 0.1922, 0.1647, 0.2039, 0.2314, 0.2078, 0.1529, 0.4784, 0.6235, 
0.6745, 0.7529, 0.7176, 0.7529, 0.7804, 0.8235, 0.8235, 0.7765, 0.7373, 
0.7373, 0.4941, 0.1216, 0.5686, 0.7569, 0.7333, 0.7529, 0.7490, 0.7490, 
0.7608, 0.7922, 0.8510, 0.8235, 0.7412, 0.6902, 0.3647, 0.2392, 0.2039, 
0.0745, 0.2549, 0.4471, 0.4196, 0.5255, 0.5765, 0.6275, 0.6510, 0.6627, 
0.6824, 0.7098, 0.7255, 0.7137, 0.7255, 0.6235, 0.5373, 0.5098, 0.4588, 
0.4627, 0.3922, 0.3373, 0.3098, 0.2510, 0.4078, 0.4706, 0.5608, 0.7059, 
0.7529},
{0.3451, 0.3451, 0.2392, 0.1490, 0.1961, 0.1608, 0.1843, 0.5137, 0.6196, 
0.6824, 0.7608, 0.7843, 0.7922, 0.7647, 0.8392, 0.9059, 0.8824, 0.7882, 
0.7451, 0.6118, 0.1843, 0.5412, 0.7412, 0.7373, 0.7373, 0.7333, 0.7412, 
0.7451, 0.7451, 0.7451, 0.7529, 0.7725, 0.6863, 0.1961, 0.0824, 0.0706, 
0.0275, 0.1176, 0.3765, 0.4275, 0.4706, 0.5529, 0.6235, 0.6510, 0.6706, 
0.6980, 0.7255, 0.7373, 0.6824, 0.5804, 0.5529, 0.6863, 0.6353, 0.5647, 
0.6235, 0.5961, 0.4196, 0.3294, 0.2706, 0.4314, 0.5333, 0.5294, 0.6353, 
0.7373},
{0.3765, 0.3490, 0.3569, 0.2275, 0.1451, 0.1608, 0.2275, 0.5451, 0.6078, 
0.6902, 0.7451, 0.7725, 0.7647, 0.7529, 0.7765, 0.8667, 0.8902, 0.8000, 
0.7725, 0.6471, 0.2196, 0.4824, 0.7294, 0.7294, 0.7373, 0.7333, 0.7294, 
0.7333, 0.7373, 0.7333, 0.7176, 0.7725, 0.6196, 0.0824, 0.0431, 0.0353, 
0.0314, 0.0314, 0.2392, 0.4000, 0.4745, 0.5451, 0.5922, 0.6275, 0.6588, 
0.6549, 0.6549, 0.6196, 0.5137, 0.5216, 0.5804, 0.6000, 0.5922, 0.6588, 
0.7529, 0.7412, 0.5647, 0.3529, 0.2863, 0.4118, 0.5882, 0.5333, 0.6235, 
0.7098},
{0.5059, 0.4078, 0.3608, 0.3412, 0.1882, 0.1333, 0.2431, 0.5686, 0.6275, 
0.6941, 0.7412, 0.7529, 0.7569, 0.7647, 0.7725, 0.7843, 0.7882, 0.7922, 
0.7882, 0.6353, 0.1686, 0.4078, 0.6667, 0.7255, 0.7294, 0.7255, 0.7294, 
0.7255, 0.7333, 0.7333, 0.6941, 0.7294, 0.4784, 0.0235, 0.0667, 0.0706, 
0.0353, 0.1255, 0.1804, 0.2078, 0.2627, 0.3725, 0.4706, 0.5216, 0.5765, 
0.5725, 0.4431, 0.3961, 0.4627, 0.5216, 0.5725, 0.5059, 0.4941, 0.6471, 
0.7843, 0.7490, 0.6392, 0.4039, 0.3098, 0.3490, 0.5765, 0.5804, 0.6549, 
0.7020},
{0.6549, 0.5569, 0.4196, 0.3725, 0.3020, 0.1490, 0.1020, 0.5412, 0.6510, 
0.6902, 0.7412, 0.7294, 0.7255, 0.7490, 0.7647, 0.7765, 0.7686, 0.7608, 
0.7843, 0.5961, 0.1098, 0.3412, 0.5961, 0.7059, 0.7216, 0.7137, 0.7216, 
0.7255, 0.7333, 0.7490, 0.7255, 0.6863, 0.2706, 0.0039, 0.0549, 0.0824, 
0.0784, 0.0745, 0.0431, 0.0784, 0.3059, 0.5412, 0.6353, 0.6784, 0.7059, 
0.7333, 0.7490, 0.7412, 0.7137, 0.6118, 0.5373, 0.4824, 0.4784, 0.5137, 
0.6510, 0.7216, 0.6980, 0.4902, 0.3255, 0.2784, 0.4353, 0.6392, 0.6431, 
0.6588},
{0.7216, 0.6902, 0.5255, 0.4275, 0.3412, 0.2627, 0.0784, 0.3961, 0.6549, 
0.6745, 0.7294, 0.7255, 0.7176, 0.7373, 0.7373, 0.7804, 0.7804, 0.7490, 
0.8118, 0.4784, 0.0196, 0.2902, 0.5098, 0.6471, 0.6784, 0.6784, 0.7098, 
0.7176, 0.7373, 0.7255, 0.6745, 0.4824, 0.1961, 0.1804, 0.0980, 0.0588, 
0.1373, 0.0471, 0.1412, 0.5569, 0.7255, 0.7647, 0.7529, 0.7333, 0.7490, 
0.7608, 0.7608, 0.7725, 0.7843, 0.7804, 0.7451, 0.6196, 0.5137, 0.5176, 
0.5843, 0.6471, 0.7020, 0.5922, 0.3882, 0.3059, 0.2431, 0.4314, 0.6235, 
0.6706},
{0.7255, 0.7451, 0.6824, 0.5451, 0.3725, 0.3020, 0.1882, 0.2510, 0.6431, 
0.6824, 0.6941, 0.7176, 0.7333, 0.7255, 0.7255, 0.7647, 0.7922, 0.7608, 
0.8000, 0.3137, 0.1176, 0.2510, 0.4549, 0.6196, 0.6431, 0.6549, 0.6667, 
0.7020, 0.7020, 0.6588, 0.5882, 0.3137, 0.1647, 0.1176, 0.0431, 0.0235, 
0.1176, 0.1333, 0.4196, 0.6196, 0.6588, 0.7333, 0.7529, 0.7333, 0.7490, 
0.7569, 0.7765, 0.7882, 0.7843, 0.7804, 0.7725, 0.7647, 0.7137, 0.5922, 
0.5373, 0.5608, 0.5961, 0.6000, 0.5412, 0.3529, 0.2235, 0.1569, 0.2314, 
0.4275},
{0.7373, 0.7490, 0.7373, 0.6627, 0.4588, 0.3216, 0.2549, 0.1804, 0.4980, 
0.6549, 0.6471, 0.7059, 0.7137, 0.7412, 0.7608, 0.7804, 0.7725, 0.8275, 
0.5843, 0.1804, 0.2118, 0.2353, 0.4000, 0.6000, 0.6196, 0.6314, 0.6431, 
0.7098, 0.7333, 0.7373, 0.4431, 0.0588, 0.0196, 0.0157, 0.0275, 0.0275, 
0.0196, 0.1804, 0.4392, 0.5255, 0.6588, 0.7098, 0.7451, 0.7451, 0.7529, 
0.7608, 0.7725, 0.7804, 0.7961, 0.8118, 0.7804, 0.7451, 0.7529, 0.7569, 
0.6118, 0.4549, 0.4863, 0.4471, 0.4039, 0.2980, 0.2157, 0.1569, 0.0667, 
0.0706},
{0.7922, 0.7647, 0.7529, 0.7451, 0.6392, 0.4353, 0.2980, 0.2078, 0.2157, 
0.5647, 0.6353, 0.6549, 0.6980, 0.7490, 0.7804, 0.7765, 0.8353, 0.6667, 
0.2314, 0.2392, 0.3059, 0.3373, 0.3451, 0.4549, 0.5647, 0.6314, 0.6745, 
0.7098, 0.7020, 0.4392, 0.0824, 0.0196, 0.0314, 0.0275, 0.0275, 0.0314, 
0.0706, 0.2235, 0.4000, 0.5529, 0.6667, 0.6863, 0.7216, 0.7529, 0.7608, 
0.7608, 0.7725, 0.7922, 0.8078, 0.8039, 0.7725, 0.7686, 0.7882, 0.7686, 
0.7373, 0.5176, 0.3765, 0.3765, 0.3098, 0.2471, 0.1843, 0.0941, 0.0863, 
0.1216},
{0.6706, 0.7843, 0.7765, 0.7686, 0.7098, 0.5882, 0.4000, 0.2784, 0.1412, 
0.1765, 0.5294, 0.6588, 0.6863, 0.7020, 0.7804, 0.7922, 0.5412, 0.2275, 
0.2235, 0.3059, 0.3686, 0.4706, 0.5412, 0.5569, 0.5765, 0.6039, 0.6431, 
0.6824, 0.6000, 0.2471, 0.0118, 0.0314, 0.0353, 0.0235, 0.0235, 0.0353, 
0.1020, 0.3137, 0.4157, 0.5451, 0.6667, 0.6706, 0.6980, 0.7451, 0.7725, 
0.7961, 0.8000, 0.7922, 0.7961, 0.8118, 0.8196, 0.8157, 0.8353, 0.8078, 
0.7647, 0.6471, 0.3333, 0.2824, 0.2392, 0.1725, 0.1176, 0.0706, 0.0745, 
0.1098},
{0.1059, 0.4941, 0.7686, 0.7647, 0.7686, 0.6980, 0.5882, 0.4196, 0.2549, 
0.0627, 0.0353, 0.2314, 0.4863, 0.5451, 0.3843, 0.1765, 0.0353, 0.2314, 
0.3059, 0.3647, 0.4667, 0.6078, 0.7216, 0.7569, 0.7961, 0.8078, 0.8039, 
0.8118, 0.7922, 0.7647, 0.4745, 0.0353, 0.0196, 0.0314, 0.0275, 0.0471, 
0.0902, 0.3412, 0.4510, 0.4980, 0.6039, 0.6353, 0.6941, 0.7333, 0.7608, 
0.8196, 0.8510, 0.8353, 0.8039, 0.8000, 0.8431, 0.8902, 0.9059, 0.8392, 
0.7451, 0.7059, 0.3490, 0.2157, 0.1804, 0.1098, 0.0863, 0.0941, 0.0902, 
0.1333},
{0.1608, 0.1804, 0.6667, 0.7569, 0.7569, 0.7529, 0.7137, 0.5529, 0.3725, 
0.0745, 0.1843, 0.4471, 0.6471, 0.6941, 0.5451, 0.3882, 0.1765, 0.2471, 
0.3569, 0.4353, 0.5843, 0.7020, 0.7647, 0.7922, 0.8353, 0.8392, 0.8588, 
0.8549, 0.8431, 0.8235, 0.8392, 0.4902, 0.0157, 0.0275, 0.0314, 0.0353, 
0.0941, 0.2941, 0.4627, 0.4863, 0.5569, 0.6196, 0.6902, 0.7137, 0.7333, 
0.7569, 0.8118, 0.8353, 0.8314, 0.7961, 0.8039, 0.8745, 0.9020, 0.8118, 
0.7255, 0.7098, 0.2824, 0.1137, 0.0980, 0.0824, 0.0902, 0.1412, 0.1490, 
0.2706},
{0.3373, 0.1765, 0.4863, 0.7137, 0.7216, 0.7412, 0.6784, 0.5412, 0.2706, 
0.3843, 0.8078, 0.8824, 0.8627, 0.8745, 0.9216, 0.9529, 0.8588, 0.5294, 
0.3843, 0.5373, 0.6784, 0.7608, 0.7882, 0.7922, 0.8039, 0.8039, 0.8314, 
0.8588, 0.8549, 0.8392, 0.8039, 0.8078, 0.3529, 0.0000, 0.0392, 0.0314, 
0.0392, 0.1843, 0.4431, 0.4667, 0.5294, 0.5882, 0.6588, 0.6902, 0.7059, 
0.7255, 0.7647, 0.8039, 0.8000, 0.7843, 0.7765, 0.8039, 0.8235, 0.7490, 
0.7098, 0.6235, 0.1059, 0.0196, 0.0588, 0.0980, 0.1255, 0.1647, 0.2235, 
0.4706},
{0.4510, 0.1922, 0.4000, 0.7098, 0.6824, 0.6235, 0.4902, 0.2745, 0.4039, 
0.7765, 0.7686, 0.7725, 0.8196, 0.8235, 0.8235, 0.8353, 0.8510, 0.8667, 
0.6235, 0.5529, 0.7020, 0.7804, 0.8039, 0.8118, 0.8078, 0.8196, 0.8275, 
0.8431, 0.8627, 0.8510, 0.8275, 0.7451, 0.6196, 0.0667, 0.0275, 0.0392, 
0.0353, 0.0392, 0.2784, 0.4706, 0.4863, 0.5765, 0.6431, 0.6706, 0.6941, 
0.7176, 0.7412, 0.7647, 0.7686, 0.7608, 0.7608, 0.7569, 0.7569, 0.7137, 
0.7176, 0.4549, 0.0157, 0.0471, 0.0706, 0.1137, 0.2039, 0.4627, 0.3255, 
0.4902},
{0.5255, 0.2706, 0.3804, 0.6588, 0.5765, 0.4627, 0.2275, 0.2980, 0.6824, 
0.7608, 0.7922, 0.7922, 0.8039, 0.8314, 0.8784, 0.8745, 0.8196, 0.8078, 
0.8314, 0.6039, 0.6667, 0.7686, 0.8039, 0.8431, 0.8275, 0.8118, 0.8314, 
0.8471, 0.8627, 0.8510, 0.8314, 0.7529, 0.6980, 0.2157, 0.0000, 0.0392, 
0.0314, 0.0235, 0.0471, 0.2667, 0.3922, 0.4980, 0.5961, 0.6471, 0.6784, 
0.7059, 0.7333, 0.7373, 0.7451, 0.7412, 0.7294, 0.7294, 0.7176, 0.7176, 
0.6353, 0.1647, 0.0196, 0.0471, 0.0824, 0.1333, 0.2941, 0.6588, 0.4157, 
0.3804},
{0.4431, 0.2706, 0.3333, 0.5059, 0.3725, 0.1529, 0.1569, 0.5922, 0.6902, 
0.7373, 0.8000, 0.8275, 0.8314, 0.8549, 0.8627, 0.9216, 0.9216, 0.8275, 
0.8314, 0.6118, 0.6078, 0.7529, 0.7804, 0.8118, 0.8353, 0.8118, 0.8078, 
0.8392, 0.8627, 0.8588, 0.8314, 0.7843, 0.7216, 0.3373, 0.0078, 0.0392, 
0.0314, 0.0314, 0.0275, 0.0353, 0.2078, 0.4039, 0.5412, 0.6118, 0.6510, 
0.6824, 0.7020, 0.7098, 0.7216, 0.7176, 0.6941, 0.6863, 0.7098, 0.6667, 
0.2706, 0.0157, 0.0471, 0.0431, 0.0824, 0.1451, 0.2980, 0.3647, 0.2863, 
0.3686},
{0.2902, 0.2706, 0.2902, 0.1804, 0.1137, 0.0314, 0.3529, 0.6471, 0.6667, 
0.7059, 0.7725, 0.8431, 0.8392, 0.8275, 0.8353, 0.9098, 0.9608, 0.8627, 
0.8392, 0.6157, 0.5098, 0.7176, 0.7451, 0.7608, 0.8000, 0.8196, 0.8000, 
0.8039, 0.8275, 0.8392, 0.7882, 0.7176, 0.6863, 0.3608, 0.0275, 0.0275, 
0.0392, 0.0510, 0.0706, 0.1059, 0.0941, 0.1294, 0.2980, 0.5059, 0.6157, 
0.6510, 0.6588, 0.6784, 0.6824, 0.7098, 0.7098, 0.6980, 0.5529, 0.2157, 
0.0157, 0.0471, 0.0471, 0.0471, 0.0667, 0.1412, 0.2471, 0.2627, 0.2784, 
0.3059},
{0.3882, 0.4157, 0.3686, 0.2196, 0.1294, 0.0863, 0.3765, 0.6118, 0.6706, 
0.7255, 0.7765, 0.8314, 0.8314, 0.8118, 0.8431, 0.8510, 0.8902, 0.8392, 
0.8471, 0.5569, 0.3686, 0.6588, 0.7333, 0.7647, 0.7804, 0.7961, 0.7922, 
0.7804, 0.7882, 0.7961, 0.7529, 0.6549, 0.6235, 0.2314, 0.0392, 0.1098, 
0.0863, 0.0902, 0.1373, 0.1176, 0.1412, 0.1451, 0.1216, 0.1294, 0.3137, 
0.4784, 0.5804, 0.6510, 0.6510, 0.6000, 0.4784, 0.2980, 0.0784, 0.0118, 
0.0431, 0.0431, 0.0471, 0.0549, 0.0706, 0.1137, 0.1686, 0.2039, 0.2000, 
0.2196},
{0.6235, 0.5020, 0.4314, 0.3176, 0.2000, 0.2471, 0.3490, 0.3765, 0.4118, 
0.5255, 0.7020, 0.7882, 0.7843, 0.7843, 0.7961, 0.8196, 0.8353, 0.8039, 
0.8431, 0.3843, 0.1216, 0.5373, 0.6980, 0.7529, 0.7647, 0.7725, 0.7608, 
0.7608, 0.7608, 0.7333, 0.6745, 0.6275, 0.4471, 0.0863, 0.1804, 0.2549, 
0.1412, 0.1647, 0.2588, 0.3725, 0.3608, 0.2902, 0.2745, 0.1294, 0.0275, 
0.0549, 0.1176, 0.1843, 0.1725, 0.1020, 0.0275, 0.0000, 0.0314, 0.0510, 
0.0431, 0.0431, 0.0549, 0.0627, 0.0745, 0.0902, 0.1098, 0.1059, 0.1882, 
0.2353},
{0.4588, 0.2824, 0.3647, 0.2588, 0.1843, 0.2078, 0.2314, 0.2471, 0.3255, 
0.3529, 0.4314, 0.7020, 0.7843, 0.7804, 0.7922, 0.7922, 0.8000, 0.7961, 
0.7922, 0.2078, 0.0000, 0.2588, 0.6392, 0.7294, 0.7294, 0.7843, 0.7412, 
0.7059, 0.7020, 0.6784, 0.6196, 0.4706, 0.1804, 0.1176, 0.2627, 0.2078, 
0.1765, 0.3059, 0.3843, 0.4039, 0.4118, 0.4510, 0.4510, 0.3412, 0.0980, 
0.0627, 0.0314, 0.0196, 0.0196, 0.0235, 0.0471, 0.0510, 0.0471, 0.0471, 
0.0471, 0.0510, 0.0627, 0.0627, 0.0627, 0.0902, 0.1098, 0.0902, 0.1294, 
0.1451},
{0.1843, 0.2706, 0.2667, 0.2078, 0.2706, 0.3294, 0.3725, 0.3843, 0.3490, 
0.2902, 0.3373, 0.4706, 0.7490, 0.7725, 0.7765, 0.7765, 0.7569, 0.8235, 
0.5569, 0.0353, 0.0471, 0.0235, 0.2588, 0.6471, 0.7333, 0.7294, 0.6784, 
0.6549, 0.6667, 0.6078, 0.3922, 0.1608, 0.1020, 0.1922, 0.2196, 0.1882, 
0.2353, 0.3961, 0.4039, 0.5529, 0.6314, 0.7529, 0.6667, 0.5294, 0.1922, 
0.0706, 0.0745, 0.0706, 0.0549, 0.0471, 0.0471, 0.0471, 0.0471, 0.0471, 
0.0510, 0.0588, 0.0745, 0.0941, 0.1608, 0.2000, 0.1922, 0.1608, 0.1765, 
0.3804},
{0.2157, 0.2627, 0.3569, 0.4000, 0.5098, 0.5647, 0.5804, 0.6824, 0.7804, 
0.6863, 0.4353, 0.2784, 0.6235, 0.7804, 0.7569, 0.7882, 0.8039, 0.6392, 
0.1412, 0.0392, 0.0549, 0.0431, 0.0118, 0.1725, 0.4902, 0.6078, 0.6392, 
0.5804, 0.4510, 0.2392, 0.1255, 0.0941, 0.1020, 0.1765, 0.2196, 0.1882, 
0.2745, 0.5765, 0.4824, 0.5569, 0.8196, 0.8314, 0.7255, 0.5490, 0.3059, 
0.1059, 0.0980, 0.0745, 0.0549, 0.0471, 0.0471, 0.0471, 0.0471, 0.0471, 
0.0510, 0.0627, 0.0706, 0.1569, 0.3961, 0.4039, 0.3137, 0.2667, 0.3725, 
0.4392},
{0.2588, 0.3686, 0.4431, 0.5451, 0.6980, 0.6549, 0.5843, 0.6510, 0.8235, 
0.8588, 0.6196, 0.2980, 0.4314, 0.7294, 0.7059, 0.6667, 0.4078, 0.0980, 
0.0549, 0.0706, 0.0471, 0.0471, 0.0588, 0.0588, 0.0588, 0.1333, 0.1843, 
0.1451, 0.0667, 0.0706, 0.1176, 0.1020, 0.0863, 0.1647, 0.2039, 0.1922, 
0.2549, 0.3569, 0.3765, 0.3569, 0.5569, 0.7569, 0.6941, 0.4667, 0.3529, 
0.1098, 0.0863, 0.0745, 0.0784, 0.0588, 0.0510, 0.0510, 0.0510, 0.0510, 
0.0510, 0.0588, 0.0627, 0.1176, 0.2902, 0.2471, 0.2000, 0.2392, 0.2745, 
0.2235},
{0.3098, 0.5059, 0.5529, 0.5922, 0.6549, 0.5922, 0.5451, 0.5569, 0.6314, 
0.6941, 0.5922, 0.3647, 0.2627, 0.3373, 0.2275, 0.1255, 0.0314, 0.0784, 
0.0824, 0.0627, 0.0549, 0.0706, 0.1059, 0.1451, 0.1294, 0.0902, 0.0627, 
0.0471, 0.0510, 0.0667, 0.0784, 0.0784, 0.0824, 0.1451, 0.2000, 0.2353, 
0.2745, 0.2392, 0.2706, 0.3647, 0.4196, 0.5961, 0.6392, 0.4627, 0.3255, 
0.1216, 0.0784, 0.0667, 0.0784, 0.0549, 0.0471, 0.0510, 0.0510, 0.0510, 
0.0510, 0.0510, 0.0549, 0.0824, 0.1412, 0.1451, 0.1412, 0.1725, 0.1686, 
0.1373},
{0.3882, 0.5176, 0.5529, 0.5294, 0.5216, 0.4941, 0.5882, 0.6078, 0.6157, 
0.5843, 0.5333, 0.4235, 0.1765, 0.0549, 0.0667, 0.0627, 0.0824, 0.1098, 
0.0824, 0.0627, 0.0549, 0.0784, 0.1647, 0.2235, 0.3098, 0.3843, 0.2471, 
0.1137, 0.0627, 0.0510, 0.0510, 0.0627, 0.0902, 0.1529, 0.2000, 0.2314, 
0.2549, 0.2353, 0.2824, 0.2706, 0.3373, 0.3961, 0.4549, 0.3961, 0.3098, 
0.1373, 0.0510, 0.0627, 0.0667, 0.0510, 0.0510, 0.0510, 0.0510, 0.0549, 
0.0627, 0.0824, 0.0745, 0.0627, 0.0863, 0.0980, 0.0863, 0.0863, 0.0863, 
0.0980},
{0.3765, 0.4510, 0.4588, 0.5020, 0.6078, 0.6510, 0.7412, 0.7569, 0.6784, 
0.5176, 0.3961, 0.3137, 0.1804, 0.0667, 0.1020, 0.0745, 0.0667, 0.0549, 
0.0706, 0.0588, 0.0549, 0.0549, 0.1412, 0.2941, 0.4118, 0.5412, 0.5490, 
0.2980, 0.0863, 0.0627, 0.0510, 0.0431, 0.1059, 0.1804, 0.1882, 0.2235, 
0.2353, 0.2392, 0.2235, 0.2196, 0.2510, 0.2235, 0.3882, 0.4118, 0.3294, 
0.1294, 0.0471, 0.0588, 0.0510, 0.0510, 0.0510, 0.0588, 0.0627, 0.0667, 
0.0824, 0.1098, 0.1765, 0.1098, 0.0667, 0.0706, 0.0667, 0.0667, 0.0667, 
0.0863},
{0.3765, 0.3961, 0.4157, 0.5059, 0.6510, 0.6667, 0.7176, 0.7686, 0.6863, 
0.5255, 0.2863, 0.3412, 0.3020, 0.3176, 0.3333, 0.3098, 0.2510, 0.1608, 
0.0784, 0.0667, 0.0588, 0.0471, 0.1137, 0.3333, 0.4157, 0.5294, 0.7137, 
0.6392, 0.3490, 0.1059, 0.0510, 0.0471, 0.0902, 0.1490, 0.1843, 0.2039, 
0.2039, 0.1843, 0.1882, 0.2039, 0.2431, 0.2431, 0.2667, 0.3373, 0.2353, 
0.1137, 0.0510, 0.0549, 0.0667, 0.0549, 0.0627, 0.0588, 0.0745, 0.0667, 
0.0941, 0.2314, 0.2118, 0.1686, 0.1490, 0.0510, 0.0549, 0.0588, 0.0588, 
0.0706},
{0.2824, 0.3922, 0.4627, 0.5412, 0.5843, 0.5804, 0.7059, 0.7059, 0.5647, 
0.3961, 0.3176, 0.3216, 0.4039, 0.5098, 0.5529, 0.5569, 0.5137, 0.4353, 
0.2902, 0.1412, 0.0627, 0.0588, 0.1255, 0.3059, 0.3569, 0.4745, 0.6000, 
0.7529, 0.6627, 0.2667, 0.0588, 0.0588, 0.0784, 0.1294, 0.1843, 0.2078, 
0.1686, 0.1490, 0.2039, 0.2196, 0.2118, 0.2667, 0.2078, 0.2941, 0.2235, 
0.1020, 0.0549, 0.0510, 0.0549, 0.0588, 0.0667, 0.0667, 0.0706, 0.1216, 
0.1686, 0.2275, 0.2157, 0.1608, 0.0980, 0.0667, 0.0471, 0.0510, 0.0627, 
0.0824},
{0.1961, 0.3098, 0.4471, 0.4980, 0.4784, 0.4980, 0.6078, 0.5216, 0.4235, 
0.3412, 0.2314, 0.2275, 0.5098, 0.5647, 0.6314, 0.6549, 0.6706, 0.5765, 
0.3804, 0.2157, 0.0824, 0.0745, 0.1216, 0.2157, 0.2196, 0.3373, 0.4392, 
0.5804, 0.6549, 0.4941, 0.1765, 0.0510, 0.0627, 0.1098, 0.1451, 0.1451, 
0.1451, 0.1490, 0.2235, 0.2196, 0.1373, 0.2039, 0.1843, 0.2275, 0.2078, 
0.0627, 0.0510, 0.0549, 0.0510, 0.0549, 0.0627, 0.0667, 0.0941, 0.1686, 
0.2941, 0.5804, 0.7333, 0.4784, 0.0902, 0.0627, 0.0510, 0.0588, 0.0902, 
0.1255},
{0.2314, 0.3098, 0.4353, 0.3843, 0.4078, 0.4745, 0.4039, 0.3843, 0.3294, 
0.3412, 0.2588, 0.3843, 0.6471, 0.6118, 0.6667, 0.7373, 0.7608, 0.6706, 
0.4431, 0.2745, 0.1255, 0.0784, 0.1020, 0.1098, 0.1529, 0.1765, 0.2667, 
0.3804, 0.4706, 0.4588, 0.2745, 0.0902, 0.0510, 0.0863, 0.1333, 0.1294, 
0.1098, 0.1373, 0.1608, 0.1569, 0.1569, 0.1490, 0.2000, 0.2039, 0.0941, 
0.0471, 0.0510, 0.0549, 0.0549, 0.0588, 0.0588, 0.0588, 0.2588, 0.4157, 
0.3137, 0.6118, 0.8667, 0.5647, 0.1529, 0.0588, 0.0549, 0.0706, 0.1176, 
0.1490},
{0.2863, 0.3490, 0.3490, 0.3059, 0.3725, 0.3608, 0.2941, 0.2902, 0.3490, 
0.4000, 0.4039, 0.4980, 0.6431, 0.7255, 0.7490, 0.7725, 0.8039, 0.7843, 
0.5725, 0.3373, 0.1804, 0.0745, 0.0863, 0.0902, 0.1098, 0.1412, 0.1961, 
0.3020, 0.3020, 0.2863, 0.2078, 0.1255, 0.0588, 0.0510, 0.0902, 0.1098, 
0.1098, 0.1098, 0.0902, 0.1373, 0.2039, 0.2039, 0.2588, 0.1765, 0.0745, 
0.0471, 0.0549, 0.0549, 0.0549, 0.0549, 0.0627, 0.0784, 0.2627, 0.3137, 
0.1961, 0.2902, 0.5216, 0.5412, 0.1765, 0.0510, 0.0510, 0.0824, 0.1176, 
0.1059},
{0.2627, 0.2863, 0.3137, 0.3216, 0.2745, 0.2196, 0.3020, 0.4314, 0.4902, 
0.5176, 0.5020, 0.4941, 0.4627, 0.5725, 0.7804, 0.7961, 0.8078, 0.8118, 
0.7255, 0.4784, 0.2784, 0.1098, 0.0706, 0.0824, 0.1098, 0.1451, 0.1922, 
0.1804, 0.2235, 0.2667, 0.1294, 0.0824, 0.0706, 0.0784, 0.1216, 0.1451, 
0.1529, 0.1490, 0.1098, 0.1216, 0.1490, 0.1490, 0.1176, 0.0745, 0.1333, 
0.2000, 0.1059, 0.0706, 0.0549, 0.0588, 0.0627, 0.0784, 0.0745, 0.0941, 
0.1451, 0.2118, 0.2706, 0.2392, 0.0941, 0.0588, 0.0510, 0.0784, 0.0941, 
0.1333},
{0.1608, 0.2039, 0.2392, 0.2353, 0.2941, 0.4392, 0.5725, 0.5843, 0.5020, 
0.5373, 0.5255, 0.4980, 0.4667, 0.4196, 0.6078, 0.8353, 0.8039, 0.8078, 
0.7176, 0.4745, 0.3098, 0.1490, 0.0667, 0.0745, 0.1255, 0.2039, 0.1490, 
0.1294, 0.1294, 0.1176, 0.0784, 0.0863, 0.1451, 0.1216, 0.1137, 0.1294, 
0.1176, 0.1765, 0.1608, 0.1490, 0.1255, 0.0745, 0.0824, 0.1137, 0.2510, 
0.3529, 0.2392, 0.1569, 0.0824, 0.0549, 0.0667, 0.0667, 0.0824, 0.1098, 
0.1098, 0.1176, 0.1059, 0.0745, 0.0706, 0.0549, 0.0510, 0.0784, 0.0784, 
0.1333},
{0.0745, 0.1725, 0.2824, 0.3882, 0.4706, 0.5529, 0.6157, 0.5961, 0.4784, 
0.6157, 0.7255, 0.7608, 0.6745, 0.5059, 0.4745, 0.7020, 0.7529, 0.6627, 
0.5765, 0.4392, 0.3098, 0.1294, 0.0549, 0.0784, 0.0941, 0.1490, 0.1412, 
0.0863, 0.0706, 0.0706, 0.0784, 0.1020, 0.1098, 0.1020, 0.1216, 0.1490, 
0.1451, 0.1608, 0.2392, 0.2627, 0.2078, 0.1725, 0.1176, 0.2196, 0.3333, 
0.3608, 0.4706, 0.4039, 0.1843, 0.0627, 0.0549, 0.0549, 0.0627, 0.0784, 
0.0706, 0.0627, 0.0627, 0.0824, 0.0667, 0.0549, 0.0549, 0.0706, 0.0863, 
0.0980},
{0.1647, 0.2549, 0.3216, 0.4039, 0.4784, 0.6392, 0.6824, 0.7333, 0.7529, 
0.8196, 0.8745, 0.8941, 0.8667, 0.6902, 0.4902, 0.5020, 0.6275, 0.5725, 
0.5216, 0.4235, 0.2745, 0.0824, 0.0471, 0.0588, 0.0745, 0.1059, 0.0980, 
0.0627, 0.0706, 0.0667, 0.0745, 0.0745, 0.0902, 0.1137, 0.1255, 0.1216, 
0.1333, 0.1569, 0.2157, 0.2627, 0.3059, 0.2588, 0.1451, 0.2549, 0.4863, 
0.6000, 0.6980, 0.6588, 0.2510, 0.0706, 0.0549, 0.0549, 0.0667, 0.0667, 
0.0588, 0.0549, 0.0627, 0.0706, 0.0588, 0.0471, 0.0510, 0.0706, 0.0863, 
0.0902},
{0.2275, 0.3255, 0.4039, 0.4314, 0.5765, 0.7529, 0.8314, 0.8235, 0.8353, 
0.8275, 0.8118, 0.8353, 0.8627, 0.7843, 0.5804, 0.4863, 0.5804, 0.5255, 
0.4510, 0.3725, 0.1686, 0.0549, 0.0706, 0.0588, 0.0627, 0.0706, 0.0863, 
0.0824, 0.0706, 0.0745, 0.0784, 0.0824, 0.0980, 0.1059, 0.1176, 0.1137, 
0.1098, 0.1294, 0.2000, 0.2824, 0.2863, 0.2863, 0.2196, 0.2275, 0.4588, 
0.7333, 0.8157, 0.6549, 0.2314, 0.0902, 0.0588, 0.0706, 0.0706, 0.0667, 
0.0627, 0.0510, 0.0510, 0.0510, 0.0471, 0.0549, 0.0549, 0.0745, 0.0980, 
0.0902},
{0.3686, 0.4353, 0.5059, 0.6078, 0.7412, 0.7725, 0.6863, 0.6118, 0.7294, 
0.7922, 0.7333, 0.7255, 0.7804, 0.6196, 0.4824, 0.4510, 0.4667, 0.4235, 
0.3412, 0.1961, 0.0745, 0.0824, 0.0824, 0.0745, 0.0784, 0.0745, 0.0784, 
0.0784, 0.0745, 0.0863, 0.0863, 0.0863, 0.1020, 0.0980, 0.1176, 0.1569, 
0.1529, 0.2078, 0.3294, 0.3804, 0.3373, 0.3765, 0.3412, 0.2667, 0.3451, 
0.4431, 0.6314, 0.4824, 0.1882, 0.0941, 0.0627, 0.0706, 0.0706, 0.0549, 
0.0549, 0.0510, 0.0510, 0.0784, 0.0902, 0.0706, 0.0706, 0.0784, 0.0980, 
0.1020},
{0.4588, 0.5765, 0.6275, 0.7961, 0.7686, 0.7059, 0.5961, 0.6863, 0.8000, 
0.7804, 0.6275, 0.5412, 0.4863, 0.4510, 0.4039, 0.3569, 0.3294, 0.2353, 
0.1255, 0.0627, 0.0745, 0.0902, 0.0980, 0.1098, 0.1255, 0.0824, 0.0549, 
0.0627, 0.0863, 0.1020, 0.0902, 0.0863, 0.0902, 0.1137, 0.1608, 0.2235, 
0.2392, 0.3373, 0.6549, 0.7647, 0.7451, 0.5216, 0.3294, 0.2157, 0.2353, 
0.2941, 0.3765, 0.2588, 0.1137, 0.0902, 0.0745, 0.0745, 0.0627, 0.0588, 
0.0627, 0.0549, 0.0706, 0.0863, 0.1098, 0.0745, 0.0706, 0.0784, 0.0824, 
0.0667},
{0.5647, 0.7098, 0.7451, 0.6863, 0.6667, 0.6980, 0.6667, 0.7333, 0.6902, 
0.5647, 0.4980, 0.4196, 0.3647, 0.3882, 0.3412, 0.1686, 0.1098, 0.0745, 
0.0392, 0.0706, 0.0784, 0.1020, 0.1333, 0.1529, 0.1608, 0.2941, 0.4510, 
0.3490, 0.1765, 0.1059, 0.0863, 0.0784, 0.0941, 0.1255, 0.2078, 0.5216, 
0.5961, 0.4275, 0.6196, 0.8392, 0.8510, 0.6902, 0.3529, 0.1725, 0.1765, 
0.1569, 0.1725, 0.1529, 0.1098, 0.1137, 0.1216, 0.1255, 0.1725, 0.2157, 
0.0980, 0.0588, 0.0627, 0.0549, 0.0863, 0.1059, 0.0980, 0.1529, 0.1059, 
0.1020},
{0.4667, 0.5373, 0.5961, 0.6314, 0.7176, 0.6353, 0.6235, 0.6196, 0.5373, 
0.5490, 0.4902, 0.4824, 0.4392, 0.3294, 0.2235, 0.1137, 0.0471, 0.1216, 
0.2314, 0.0588, 0.0784, 0.1020, 0.1843, 0.2588, 0.3294, 0.4196, 0.5294, 
0.4000, 0.1882, 0.1451, 0.0941, 0.0824, 0.0824, 0.1137, 0.1608, 0.4667, 
0.5176, 0.4314, 0.4863, 0.7020, 0.6980, 0.5725, 0.2863, 0.1569, 0.1216, 
0.1137, 0.1216, 0.1294, 0.1294, 0.1608, 0.2039, 0.2314, 0.2941, 0.2118, 
0.0863, 0.0627, 0.0510, 0.0745, 0.1255, 0.1922, 0.4431, 0.4863, 0.2824, 
0.2275},
{0.4353, 0.4549, 0.4824, 0.6078, 0.7765, 0.6980, 0.5765, 0.5451, 0.5961, 
0.6392, 0.5333, 0.4588, 0.3882, 0.4510, 0.2275, 0.1490, 0.0824, 0.1216, 
0.4863, 0.1255, 0.0667, 0.0941, 0.1608, 0.3569, 0.3922, 0.2667, 0.1098, 
0.1412, 0.1804, 0.1843, 0.1725, 0.1412, 0.0941, 0.0824, 0.1176, 0.2039, 
0.2824, 0.3882, 0.5059, 0.5961, 0.5843, 0.4196, 0.2431, 0.1294, 0.1176, 
0.1176, 0.1255, 0.1647, 0.1804, 0.2588, 0.2863, 0.2824, 0.2510, 0.1647, 
0.0980, 0.0667, 0.0549, 0.0941, 0.3765, 0.3529, 0.5137, 0.7922, 0.5020, 
0.2353},
{0.4275, 0.4314, 0.4275, 0.5490, 0.7020, 0.7490, 0.6902, 0.6314, 0.5725, 
0.4824, 0.3216, 0.4275, 0.7490, 0.7608, 0.3647, 0.1098, 0.0863, 0.2392, 
0.5333, 0.1333, 0.0549, 0.0902, 0.1020, 0.1922, 0.2431, 0.1608, 0.1490, 
0.1961, 0.2392, 0.3451, 0.2941, 0.2314, 0.1608, 0.1137, 0.1020, 0.1725, 
0.2196, 0.3373, 0.5098, 0.5373, 0.4275, 0.3333, 0.2000, 0.0941, 0.1176, 
0.1490, 0.2039, 0.1725, 0.2431, 0.3176, 0.3216, 0.2902, 0.2627, 0.1843, 
0.1176, 0.0784, 0.0549, 0.0902, 0.2275, 0.2431, 0.2039, 0.4353, 0.4314, 
0.1725},
{0.3333, 0.3176, 0.3176, 0.4078, 0.5059, 0.5333, 0.6588, 0.6353, 0.4353, 
0.3529, 0.4392, 0.6275, 0.5922, 0.3647, 0.2000, 0.0941, 0.1098, 0.1647, 
0.2039, 0.0784, 0.0706, 0.0941, 0.0863, 0.0941, 0.1216, 0.1804, 0.1922, 
0.2353, 0.3294, 0.3804, 0.4314, 0.4941, 0.3137, 0.1725, 0.1412, 0.1059, 
0.1412, 0.1686, 0.2667, 0.3333, 0.2392, 0.1961, 0.1059, 0.1098, 0.1490, 
0.1608, 0.1569, 0.2118, 0.2510, 0.3098, 0.3020, 0.2667, 0.2353, 0.1725, 
0.1176, 0.0784, 0.0667, 0.0745, 0.1294, 0.1843, 0.1137, 0.1333, 0.1765, 
0.1098},
{0.2980, 0.3333, 0.4000, 0.4392, 0.4275, 0.4235, 0.4824, 0.4078, 0.2706, 
0.2392, 0.3569, 0.3451, 0.2549, 0.1569, 0.1451, 0.0863, 0.1725, 0.1333, 
0.0235, 0.0588, 0.0549, 0.0627, 0.0706, 0.1176, 0.1373, 0.1843, 0.3647, 
0.4510, 0.3804, 0.6118, 0.7451, 0.8235, 0.6275, 0.2000, 0.1176, 0.0902, 
0.1098, 0.1098, 0.1412, 0.1608, 0.1922, 0.1137, 0.0784, 0.1098, 0.1137, 
0.0941, 0.1490, 0.1843, 0.2235, 0.2627, 0.2627, 0.2353, 0.1686, 0.1098, 
0.0745, 0.0667, 0.0706, 0.0667, 0.1137, 0.1647, 0.0941, 0.0824, 0.0941, 
0.0745},
{0.3961, 0.3765, 0.3647, 0.3725, 0.3216, 0.2588, 0.1961, 0.1098, 0.1137, 
0.1255, 0.1059, 0.1373, 0.2000, 0.1922, 0.1333, 0.1098, 0.0902, 0.0745, 
0.0627, 0.0745, 0.0824, 0.0784, 0.0941, 0.1451, 0.1608, 0.2118, 0.4510, 
0.6784, 0.4784, 0.5725, 0.8431, 0.8706, 0.7686, 0.3608, 0.1176, 0.0902, 
0.1059, 0.1490, 0.1961, 0.1765, 0.2392, 0.1843, 0.0745, 0.0706, 0.0588, 
0.0627, 0.1216, 0.1765, 0.2353, 0.2118, 0.2235, 0.2118, 0.1255, 0.0824, 
0.0902, 0.0745, 0.0549, 0.0706, 0.0588, 0.0471, 0.0588, 0.0549, 0.0588, 
0.0627},
{0.3020, 0.2627, 0.1843, 0.1176, 0.0824, 0.0549, 0.0667, 0.0863, 0.0824, 
0.0980, 0.1451, 0.2196, 0.2824, 0.2588, 0.2431, 0.2627, 0.1490, 0.1098, 
0.0941, 0.1255, 0.1176, 0.0980, 0.1059, 0.1216, 0.1961, 0.3137, 0.3490, 
0.4039, 0.3922, 0.3725, 0.5882, 0.8431, 0.7608, 0.4627, 0.1412, 0.0902, 
0.1098, 0.1412, 0.1843, 0.2353, 0.2353, 0.2157, 0.1412, 0.0510, 0.0588, 
0.0627, 0.0667, 0.1137, 0.1647, 0.1529, 0.1608, 0.1333, 0.0863, 0.0784, 
0.0706, 0.0549, 0.0353, 0.0392, 0.0549, 0.0549, 0.0510, 0.0510, 0.0471, 
0.0431},
{0.3020, 0.2431, 0.2118, 0.1686, 0.1451, 0.1373, 0.0824, 0.0784, 0.0745, 
0.1216, 0.2549, 0.3294, 0.3529, 0.4863, 0.5490, 0.4941, 0.2824, 0.1647, 
0.1216, 0.1216, 0.1176, 0.1255, 0.0980, 0.1647, 0.2784, 0.3647, 0.3294, 
0.2588, 0.3020, 0.3216, 0.4157, 0.5294, 0.5843, 0.3451, 0.1294, 0.1216, 
0.1333, 0.1373, 0.1608, 0.2588, 0.2902, 0.2510, 0.2824, 0.0980, 0.0588, 
0.0784, 0.0902, 0.0784, 0.0824, 0.0902, 0.0667, 0.0627, 0.0549, 0.0431, 
0.0353, 0.0353, 0.0353, 0.0314, 0.0314, 0.0353, 0.0353, 0.0353, 0.0353, 
0.0353},
{0.3882, 0.3373, 0.3176, 0.3020, 0.2314, 0.2157, 0.1373, 0.0627, 0.0706, 
0.1647, 0.4314, 0.5961, 0.5373, 0.5922, 0.7922, 0.7255, 0.5255, 0.3020, 
0.1490, 0.1176, 0.1098, 0.1333, 0.1176, 0.1961, 0.2784, 0.3686, 0.3176, 
0.2784, 0.2667, 0.2980, 0.3020, 0.3333, 0.2902, 0.1216, 0.1137, 0.1647, 
0.2118, 0.4392, 0.6275, 0.5333, 0.3294, 0.2510, 0.3569, 0.1843, 0.0549, 
0.0902, 0.1216, 0.4784, 0.4588, 0.1647, 0.0745, 0.0549, 0.0431, 0.0392, 
0.0353, 0.0353, 0.0314, 0.0314, 0.0314, 0.0314, 0.0314, 0.0314, 0.0314, 
0.0314},
{0.5961, 0.5255, 0.4431, 0.3725, 0.3020, 0.2196, 0.1451, 0.0902, 0.0863, 
0.1608, 0.3647, 0.4902, 0.4627, 0.4353, 0.5608, 0.8235, 0.8980, 0.6980, 
0.2078, 0.1333, 0.1098, 0.1098, 0.1255, 0.2078, 0.2784, 0.3216, 0.2745, 
0.2745, 0.2627, 0.2549, 0.2588, 0.2510, 0.1569, 0.1176, 0.1098, 0.1647, 
0.3137, 0.5098, 0.6824, 0.8392, 0.6667, 0.2902, 0.2235, 0.2275, 0.0863, 
0.1216, 0.1647, 0.4824, 0.6980, 0.2353, 0.0784, 0.0549, 0.0471, 0.0392, 
0.0353, 0.0314, 0.0314, 0.0275, 0.0275, 0.0275, 0.0275, 0.0275, 0.0275, 
0.0275},
{0.7765, 0.7804, 0.7373, 0.6784, 0.5686, 0.3529, 0.1843, 0.1059, 0.0902, 
0.1216, 0.2196, 0.3098, 0.3294, 0.3333, 0.3451, 0.5059, 0.7922, 0.9373, 
0.5725, 0.1961, 0.1451, 0.0745, 0.0902, 0.1804, 0.2588, 0.2745, 0.2431, 
0.2235, 0.2275, 0.2118, 0.1804, 0.1569, 0.1843, 0.1608, 0.0863, 0.2431, 
0.4118, 0.3373, 0.3373, 0.4784, 0.7059, 0.4784, 0.2275, 0.2941, 0.1059, 
0.1529, 0.1922, 0.3686, 0.4588, 0.2000, 0.0824, 0.0549, 0.0471, 0.0392, 
0.0314, 0.0275, 0.0275, 0.0275, 0.0275, 0.0235, 0.0235, 0.0235, 0.0235, 
0.0235},
{0.8078, 0.8863, 0.9373, 0.9373, 0.8392, 0.5020, 0.2157, 0.1176, 0.0745, 
0.0980, 0.1569, 0.2431, 0.3059, 0.3255, 0.3922, 0.4314, 0.5569, 0.8078, 
0.8941, 0.4902, 0.1490, 0.0824, 0.0824, 0.1176, 0.1804, 0.2000, 0.1922, 
0.1804, 0.1765, 0.1843, 0.1529, 0.1059, 0.1490, 0.2235, 0.1490, 0.3608, 
0.4471, 0.3961, 0.3569, 0.3882, 0.4980, 0.4196, 0.2471, 0.2157, 0.1059, 
0.1922, 0.2549, 0.3255, 0.3451, 0.2706, 0.1137, 0.0510, 0.0471, 0.0353, 
0.0314, 0.0275, 0.0275, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 
0.0235},
{0.5725, 0.6706, 0.8039, 0.8627, 0.8627, 0.6941, 0.3608, 0.1608, 0.0745, 
0.0784, 0.1176, 0.2000, 0.2941, 0.3529, 0.4000, 0.4392, 0.5098, 0.6275, 
0.8118, 0.8118, 0.3098, 0.0784, 0.0784, 0.1020, 0.1490, 0.1608, 0.1490, 
0.1412, 0.1294, 0.1765, 0.1529, 0.0980, 0.1216, 0.2157, 0.1608, 0.3020, 
0.4471, 0.4745, 0.4863, 0.4784, 0.4392, 0.2745, 0.2196, 0.1882, 0.1255, 
0.2039, 0.2392, 0.2510, 0.2902, 0.2706, 0.1059, 0.0510, 0.0471, 0.0353, 
0.0314, 0.0275, 0.0275, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 
0.0235},
{0.3294, 0.4588, 0.5608, 0.6392, 0.6196, 0.5176, 0.4196, 0.2235, 0.0784, 
0.0627, 0.1255, 0.1922, 0.2431, 0.3059, 0.3882, 0.4157, 0.4471, 0.5216, 
0.5922, 0.7255, 0.4667, 0.1176, 0.0706, 0.0824, 0.1176, 0.1176, 0.1294, 
0.1961, 0.2157, 0.1412, 0.0980, 0.0863, 0.1176, 0.1608, 0.1059, 0.1686, 
0.3451, 0.3961, 0.4431, 0.4588, 0.3294, 0.2157, 0.2510, 0.1451, 0.1451, 
0.1725, 0.2196, 0.3059, 0.3020, 0.1647, 0.0627, 0.0549, 0.0471, 0.0314, 
0.0314, 0.0275, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 
0.0235},
{0.1882, 0.3373, 0.3765, 0.3176, 0.4157, 0.4745, 0.3804, 0.2706, 0.1020, 
0.0784, 0.1255, 0.2196, 0.1804, 0.2667, 0.3647, 0.4000, 0.4078, 0.4510, 
0.4431, 0.4353, 0.3725, 0.1765, 0.0863, 0.0902, 0.1373, 0.1059, 0.0902, 
0.1725, 0.1882, 0.1451, 0.0902, 0.1020, 0.1294, 0.1020, 0.0980, 0.0980, 
0.1451, 0.2000, 0.2275, 0.1843, 0.1451, 0.1451, 0.0941, 0.0941, 0.1647, 
0.1725, 0.2706, 0.3647, 0.3961, 0.1373, 0.0510, 0.0745, 0.0392, 0.0314, 
0.0275, 0.0275, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 
0.0235},
{0.1608, 0.2039, 0.2353, 0.3529, 0.4039, 0.2824, 0.2353, 0.2627, 0.1176, 
0.1490, 0.1020, 0.2000, 0.1922, 0.1451, 0.2431, 0.3020, 0.3725, 0.3725, 
0.3294, 0.3373, 0.3333, 0.2039, 0.1373, 0.0863, 0.2039, 0.2235, 0.0745, 
0.0667, 0.0784, 0.1020, 0.0863, 0.1373, 0.1373, 0.0706, 0.1216, 0.1216, 
0.0784, 0.0941, 0.0863, 0.0980, 0.1765, 0.1333, 0.0824, 0.1020, 0.1451, 
0.1569, 0.2000, 0.2471, 0.4510, 0.2000, 0.0706, 0.1176, 0.0353, 0.0314, 
0.0275, 0.0275, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 0.0235, 
0.0235}};

size = Dimensions[grapes][[1]];
hsize = size/2

ggrapes=ListDensityPlot[grapes,Mesh->False];

Problems

Use convolution to apply a discrete ∇2G lateral inhibitory filter to grapes image; 2) locate zero crossings in filtered image

Problem 1: Make a low-pass Gaussian filter

Generate a size x size matrix that represents a 2D low-pass Gaussian filter with standard deviation equal to 4/size. 
	Put the peak at {hsize+1,hsize+1}
	Call the array gaussfilter. (You will use this in the FFT problem)

Extract 13x13 kernel from the middle (the central "bump"). 
Call this matrix gausskernel. (You will use this in the convolution problem)

Problem 2: Make a laplacian filter

Generate a size x size array  that represents a discrete Laplacian operator.
Center the filter, so that -20 is at {33,33} (See hint below).
Call it laplacefilter. 

Big Hint: It is tricky to get a good approximation to a circularly symmetric operator on a discrete rectangular lattice. So I'll give you the specification: The center value should be -20, the left, right, above and below nearest neighbor values should be 4, and the diagonal elements should be 1.  Make sure that you define the matrix to be numerical (i.e. the numbers should be decimals, not integers).
 
 Extract the central 3 x 3 submatrix that represents a discrete Laplacian operator.
 Call it: laplacekernel. 
 (Consistent with the above hint, laplacekernel should be:{{1,4,1},{4,-20,4},{1,4,1}};

Problem 3: Make a  (∇^2)G operator

Use ListConvolve to make a (∇^2)G operator by convolving laplacekernel with gauskernel. Call the operator delsq.
 
A simple way to handle overhang is to do cyclic convolution.  Depending on how you handle the overhang (i.e. no overhangs), your resulting delsq should be an 11x11 matrix.

Problem 4: Use the (∇^2)G  operator in the space domain to the grapes image.

Use ListConvolve[] to produce a spatially filtered image of grapes. There are various ways of handling the overhang of the kernel with the image, such as by padding the original image. A simple way handle the overhang is cyclic convolution. This will preserve the original size of the array. Make sure that the resulting filtered image doesn't shift with respect to the original image.

Problem 5: Find the edges by marking the zero-crossings

Generate an image where 1 marks the location of a zero-crossing in your filtered image of grapes, and has zeros everywhere else. There are a number of ways of doing this, devise one. 
Then superimpose the zerocrossings image on the original grapes image. For example, a simple way to superimpose them is:

                       ListDensityPlot[zerocross + grapes, Mesh->False];
                       
 Your answer should look something like the plot shown at the top of this notebook.

Use the FFT to apply a discrete ∇2G lateral inhibitory filter to grapes image; 2) locate zero crossings in filtered image

Problem 6: Apply the (∇^2)G operator in the spatial frequency domain to the grapes image

Apply the (∇^2)G operator in the spatial frequency domain to the grapes image (also represented in the spatial frequency domain), and display the filtered result in the space domain. 

You can do the filtering operation as follows: Multiply the Fourier transforms of the gaussian filter, the Laplacian operator filter, and the image. (Use Fourier[ ] to take the Fourier transforms of each 64x64 matrix, and multiply them together). Then you need InverseFourier[ ] to produce the filtered image in the space domain.

One can think of the resulting image as a "neural image" representing the outputs of an array of ganglion off-center cells.

Use Chop[ ] on the output of the inverse transform to make sure there aren't any residual imaginary numbers. (ListDensityPlot will complain if there are.). Then make a density plot of the resulting filtered image in the space domain.

Problem 7:  Find the edges by marking the zero-crossings (using the filtered image produced using the FFT method)

Apply your earlier zero-crossing detector to generate an image where 1 marks the location of a zero-crossing in your filtered image of grapes, and has zeros everywhere else. Then, as before, superimpose the zerocrossings image on the original grapes image. E.g.
                       ListDensityPlot[zerocross + grapes, Mesh->False];
Again, make sure the edge map and the grapes image are in register.