function gradient = getGradient()


gray4minus2rgb = imread('gray4-2.jpeg', 'jpeg');
gray4minus1rgb = imread('gray4-1.jpeg', 'jpeg');
gray4plus1rgb = imread('gray4+1.jpeg', 'jpeg');
gray4plus2rgb = imread('gray4+2.jpeg', 'jpeg');

gray4minus2gray = rgb2gray(gray4minus2rgb);
gray4minus1gray = rgb2gray(gray4minus1rgb);
gray4plus1gray = rgb2gray(gray4plus1rgb);
gray4plus2gray = rgb2gray(gray4plus2rgb);

gray4minus2sample = gray4minus2gray(200:280, 280:360);
gray4minus1sample = gray4minus1gray(200:280, 280:360);
gray4plus1sample = gray4plus1gray(200:280, 280:360);
gray4plus2sample = gray4plus2gray(200:280, 280:360);

avPixelgray4minus2 = sum(sum(gray4minus2sample))/6400;
avPixelgray4minus1 = sum(sum(gray4minus1sample))/6400;
avPixelgray4plus1 = sum(sum(gray4plus1sample))/6400;
avPixelgray4plus2 = sum(sum(gray4plus2sample))/6400;
gradient = (avPixelgray4plus1 - avPixelgray4minus1)/2 + (avPixelgray4plus2 - avPixelgray4plus1)/2;



