1 function Gravit = Gravitat(Gray_image)
\r
2 % finds out forces acting on pixels from other pixels
\r
3 [Rows, Cols] = size(Gray_image);
\r
4 Gray_image = double(Gray_image);
\r
6 % creating the filter
\r
10 Filter(i, j) = exp(-abs(Wind-i) - abs(Wind-j));
\r
13 Filter(Wind, Wind) = 0;
\r
15 Gravit = zeros(size(Gray_image(Wind:Rows-Wind+1, Wind:Cols-Wind+1)));
\r
18 Gravit = Gravit + Filter(i, j) * ...
\r
19 exp(-abs(Gray_image(Wind:Rows-Wind+1, Wind:Cols-Wind+1) - ...
\r
20 Gray_image(i:Rows-Wind+1+i-Wind, j:Cols-Wind+1+j-Wind)));
\r