title: Barrel Distortion - Correcting image when expected/received control points are known
body: <p>I'm working with a mounted industrial CCD camera and I have no information about its parameters. When an image is taken programmatically over WinUSB, the result in figure 1 is received. What you will notice is that the gaps between the lines differ greatly in the image. This is not the case in the actual image.</p>
  <p>I have a technique for determining the location of the lines and have a list of pixel coordinates for where the lines must occur in a non-distorted image.</p>
  <p>So I have</p>
  <ul>
  <li>The pixel coordinate of the lines when the image is taken</li>
  <li>The pixel coordinates of where the lines should be</li>
  </ul>
  <p>What I need to do</p>
  <ul>
  <li>Use these values to apply to every subsequent image taken with the camera, so that
  each image is corrected.</li>
  </ul>
  <p>However, I am pretty stuck on exisiting techniques which follow this approach. I know many algorithms exist on the internet which either make use of lens parameters or a strength parameter, but these techniques aren't very suitable in my scenario. The parameters aren't known and adjusting a strength value by the eye is not accurate enough.</p>
  <p>Any pointers on techniques would be of great help; as I'm currently at a loss.</p>
  <hr />
  <p><img src="https://i.stack.imgur.com/DqMHW.png" alt="enter image description here" /></p>
  <h3>Figure 1. Distorted image taken by fixed location CCD camera</h3>
  <hr />