A rectangular-to-quadrilateral transformation maps each pixel in a flat rectangular output to its corresponding location in a photographed quadrilateral. This reverses the direction suggested by perspective correction: the scan asks where every target pixel came from. section 4.4.1
The practical construction uses a unit square as an intermediate domain. Scaling maps the rectangle to that square; a four-point projective transformation then maps the square to the source image. Choosing square corners simplifies the large symbolic system into smaller successive solves. section 4.4.1
Scanning a photographed page
Given four image points corresponding to the corners of a rectangular page, map target pixels through the unit square and into the camera image to undo natural perspective. section 4.4.1
