title: 2D Registration of two shapes
body: <p>I am having a task to implement a way of registration of two 2D Shapes.
  The first shape is the source, meaning it will never change, and the target shape is the shape that must be always aligned/registered on the source shape. For both shapes I have the X,Y coordinates.</p>
  <p>In order to understand the problem, I'm adding a photo that explains it.</p>
  <p><a href="https://i.stack.imgur.com/zxINy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zxINy.png" alt="Blue is the Source Shape, Red is the Target Shape" /></a></p>
  <p>The Angle of the rotation of Red shape is unknown and cannot be for every random red shape the same. So I need an algorithm to find the best rotation in order to match the blue shape.</p>
  <p>Any ideas??
  I've read about ICP but does it work for 2D problems? Because I used an implementation but for the 2D data it never converged, but for 3D data I found was working perfectly.</p>
  <p>Thanks in advance,</p>