title: Bicubic interpolation artifacts (image upscale)
body: <p>I am using a bicubic interpolation algorithm in order to upscale an height map, and I am noticing some artifacts around the pixels boundaries.
  However, these artifacts don't seem to appear when I use a simple cubic interpolation (spline).</p>
  
  <p>Could it be because the bicubic interpolation doesn't guarantee the second derivative to be continuous, unlike the cubic spline ?
  If so, is there known algorithms that have a continuous second derivative ?
  Otherwise, is there a way to deal with these artifacts ?</p>
  
  <p>Linear interpolation (shows the pixels boundaries):
  <img src="https://i.stack.imgur.com/orTcZ.jpg" alt="Linear interpolation"></p>
  
  <p>Bicubic interpolation (artifacts visible at pixels boundaries):
  <img src="https://i.stack.imgur.com/KrAr5.jpg" alt="Bicubic interpolation"></p>
  
  <p>Cubic interpolation (no noticeable artifacts):
  <img src="https://i.stack.imgur.com/WZHJb.jpg" alt="enter image description here"></p>
  
  <p>I tried several bicubic formulas, which gave me the same results. Here are some examples:</p>
  
  <ul>
  <li><a href="http://paulbourke.net/miscellaneous/interpolation" rel="noreferrer">http://paulbourke.net/miscellaneous/interpolation</a></li>
  <li><a href="http://www.paulinternet.nl/?page=bicubic" rel="noreferrer">http://www.paulinternet.nl/?page=bicubic</a></li>
  </ul>
  
  <hr>
  
  <p>Edit:
  I made some searches and found that B-Spline have a continuous C2 (also suggested by Bharat). I implemented it and it looks fine, even if it's an approximation and not an interpolation (it doesn't go through the samples).</p>
  
  <p>B-spline (approximation):
  <img src="https://i.stack.imgur.com/eEaZv.jpg" alt="b-spline"></p>