title: opencv blur() vs. fspecial('average')
body: <p>my filterSize =2</p>
  
  <pre><code>   h = fspecial('average', filterSize);
     imageData = imfilter(imageData, h, 'replicate');
  </code></pre>
  
  <p>meaning my kernel is 1/4 1/4 and so on..</p>
  
  <p>I'm using </p>
  
  <pre><code>cv::blur(dst, dst,cv::Size(filterSize,filterSize));
  </code></pre>
  
  <p>so I should get the same results.
  however the openCV results has a duplicated line, probably due to circular or some other sort of padding for the matrix.<br>
  line 0 and line 1 are the same.</p>
  
  <p>can you suggest for it to be without that line </p>
  
  <p>openCV results:</p>
  
  <pre><code>  0.027027026, 0.027027026, 0.022727273, 0.018427517, 0.017199017, 0.017813267, 
    0.027027026, 0.027027026, 0.022727273, 0.018427517, 0.017199017, 0.017813267,
    0.02948403, 0.02948403, 0.027641278, 0.028255528, 0.03194103, 0.03194103,
    0.054054055, 0.054054055, 0.055896807, 0.064496316, 0.077395573, 0.079852581,
    0.11240786, 0.11240786, 0.11855037, 0.13513513, 0.14864865, 0.1566339,
    0.16646191, 0.16646191, 0.17383292, 0.18611793, 0.18673219, 0.19471744,
    0.18243243, 0.18243243, 0.19471744, 0.19594595, 0.18796068, 0.1928747,
  </code></pre>
  
  <p>Matlab results:</p>
  
  <pre><code>0.0270270   0.022727    0.018427    0.017199    0.017813  0.0251842
  0.029484    0.027641    0.028255    0.031941    0.031941  0.0350122
  0.0540540   0.055896    0.064496    0.077395    0.079852  0.0847665
  0.1124078   0.118550    0.135135    0.148648    0.156633  0.1683046
  0.1664619   0.173832    0.186117    0.186732    0.194717  0.2057739
  0.1824324   0.194717    0.195945    0.187960    0.192874  0.1947174
  </code></pre>