title: Laplacian Filter Formula
body: <p>I tried Laplacian filter method but i think I did somethings wrong with its formula.</p>
  
  <p><br>My original matrix (f)</p>
  
  <pre><code>  a b
  a 1 2
  b 3 4 
  </code></pre>
  
  <p>New matrix (g) by padding old matrix and replicating the origial one for using 3x3 filter mask</p>
  
  <pre><code>  a b c d e f
  a 1 2 1 2 1 2
  b 3 4 3 4 3 4
  c 1 2 1 2 1 2
  d 3 4 3 4 3 4
  e 1 2 1 2 1 2
  f 3 4 3 4 3 4
  </code></pre>
  
  <p>The filter (m)</p>
  
  <pre><code>  a  b  c
  a 0  1  0
  b 1 -4  1
  c 0  1  0
  </code></pre>
  
  <p>Then I start at [c,c] in the new matrix. What I did in the calculation was
  <br>g(c,c) = g (c,c) + -1* (m(a,a)*g(b,b) + m(a,b)*g(b,c) + m(a,c)*g(b,d) + m(b,a)*g(c,b) + m(b,b)*g(c,c) + m(b,c)*g(c,d) + m(c,a)*g(d,b) + m(c,b)*g(d,c) + m(c,c)*g(d,d));</p>
  
  <p><br> After performing the filter on g(c,c) , g(c,d) , g(d,c) , g (d,d), I crop the matrix as filtered these filter point to the new matrix, but the result look really weird. (not like in the book). I tried doing it in matlab by myself.<br>
  <br>Can someday help me with this? Thank you very much</p>