Rectification

The goal of the rectification stage is to warp regions of the scanned image into rectangles, so that the grooves look almost straight.  Tiny inaccuracies in the center location might result in slight curvature of the rectified grooves, and the wave extraction stage should be able to overcome this.

A typical region that is warped into a rectangle looks something like this:



The region never crosses a song separation, and it is also limited by the maximal file size allowed (a global parameter, set as 10Mbytes by default - this corresponds to about 100 grooves).  The rectified version looks something like this (not in scale):



If we zoom into a small interval of 10-20 grooves, we will see that the grooves aren't exactly straight.


.m files: get_track.m