title: Calculate offset/skew/rotation of similar images in C++
body: <p>I have multiple images taken simultaneously pointing at the same direction from the same starting location. However, there is still a slight offset because these cameras were not in the <strong>exact</strong> same place when the picture was taking. I'm looking for a way to calculate the optimal translation/shear/skew/rotation needed to apply to match one image to another so that they overlay (almost) perfectly. </p>
  
  <p>The images are in a .raw format which I am reading in 16 bits at a time.</p>
  
  <p>I have been suggested (by my employer who is not a programmer [I'm an intern btw]) to take a portion of the source image (not at the edges) and brute-force search for a same-sized portion with a high correlation in data values. I'm hoping there is a less-wasteful algorithm.</p>