Improve spine detection. Add page edge detection. Remove rotate-and-crop.
Use spine/edge for dewarping.
Move ST code into a different file. It will want to be a separate script.