IOS 11 includes a document scanner and uses the internal class VNDetectRectanglesRequests
to find the four corners of a rectangle in an image.
That is the first step for further processing like warping the projected rectangle to get a straight image of the scanned document where all inner angles have 90°.
What is the algorithm used for that computer vision problem? First detect lines using Hough Transform and then detect corners using FAST? What strategy is used to make it fast and robust?