title: Implementing MeanshiftFilter to a image causing a discontinuous edge
body: <p>As the graph shows, I implemented 3 kinds of blurring to my source image.
  Gaussian &amp; Median blurs look OK, but the Meanshift result confused me.
  There are discontinuous areas on the right side.</p>
  
  <p><a href="https://i.stack.imgur.com/u93Tn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u93Tn.png" alt="3kindblur"></a></p>
  
  <p>My implemented code is 
  <code>pyrMeanShiftFiltering(src2, dst2, 5, 25, 3);</code>, and it's still the same after being modified to <code>pyrMeanShiftFiltering(src2, dst2, 2, 25, 3);</code>.</p>
  
  <p>So I think it's got nothing to do with Spatial Window Radius.</p>
  
  <p>Can anyone explain why this happened, and how to avoid it for me? </p>
  
  <p>Thanks a lot!</p>
  
  <p>========================================================</p>
  
  <p>8/13</p>
  
  <p>added code:</p>
  
  <pre><code>int border = 1;
  copyMakeBorder(src2, src2, border, border, border, border, BORDER_CONSTANT, 0);
  </code></pre>
  
  <p>Unfortunately, it's still the same..</p>
  
  <p><a href="https://i.stack.imgur.com/A7imI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A7imI.png" alt="border"></a></p>