title: Apply median filter manually with opencv, differences with medianBlur function
body: <p>When I apply median filter like this:</p>
  
  <pre><code>Mat medianFilter;
  medianBlur(histEqu, medianFilter, 3);
  </code></pre>
  
  <p>I would expect the same results that if I apply median filter like:</p>
  
  <pre><code>Mat manualMedianFiler;
      float factor = 1 / 9.0;
      Mat kernelMedian = (Mat_&lt;float&gt;(3, 3) &lt;&lt;
          factor, factor, factor,
          factor, factor, factor,
          factor, factor, factor);
      filter2D(histEqu, manualMedianFiler, CV_8U, kernelMedian, Point(-1,-1), 0, 4);
  </code></pre>
  
  <p>The resultant matrix are similar, but they are not equal. 
  Am I doing something wrong? Which is the correct way to apply median filter?</p>