title: What interpolation does Davinci Resolve use for curves?
body: <p>I try to write python scripts for recovering a fine-tuned curve I draw in Davinci Resolve software. The curve in Davinci looks like below:
  <a href="https://i.stack.imgur.com/4Aa0m.png" rel="nofollow noreferrer">Curve for Y-channel contrast enhancement</a></p>
  <p>There are four anchors, coordinates of which are [0.0, 0.0], [0.12, 0.10], [0.26, 0.28], [1.0, 1.0], not accurate but never mind. I suppose that the curve is generated by cubic B-spline, so I wrote codes in python:</p>
  <pre><code>import numpy as np
  import pylab as pl
  from scipy import interpolate
  def test_davince_bspline():
  pt_x = np.array([0.0, 0.12, 0.26, 1.0])
  pt_y = np.array([0.0, 0.10, 0.28, 1.0])
  begin = 0.0 
  end = 1.0
  x_new = np.linspace(begin, end, 1023)
  l, r = [(1, 0.0)], [(1, 0.0)]
  bspl = interpolate.make_interp_spline(pt_x, pt_y, bc_type=(l,r))
  print(bspl.k)
  print(bspl.t)
  y_new = bspl(x_new).T
  pl.plot(pt_x * 1023, pt_y * 1023, 'o', label = u'anchor')
  pl.plot(x_new * 1023, y_new * 1023, label=u'B-spline')
  pl.plot(x_new * 1023, x_new * 1023, label=u'y=x')
  pl.legend()
  pl.grid(True)
  pl.show()
  
  if __name__ == '__main__':
  # test_interpolate()
  test_davince_bspline()
  </code></pre>
  <p>And python console give me a similar curve like that:
  <a href="https://i.stack.imgur.com/vMLHi.png" rel="nofollow noreferrer">Bspline curve I plotted in python using the codes above</a></p>
  <p>What I cannot accept is the segment connecting [0.26, 0.28] and [1.0, 1.0], which is quite different from Davinci's.</p>
  <p>So what interpolation curve does Davinci use, not the cubic B-spline? Or did I configure wrong parameters for B-spline?</p>