This too can be performed using any conventional boundary tracking vision tool, such as those commercially available in the marketplace or disclosed in Ballard et al, supra, at Chapter 4.
This step is performed using an angle finding vision tool of the type commercially available from the assignee hereof (Cognex Corporation).