Machine vision has the potential to impact both quality and productivity significantly in computer integrated manufacturing due to its versatility, flexibility, and relative speed. Unfortunately, algorithm development has not kept pace with the advances in vision-hardware technology, particularly in the areas of analysis and decision making. The specific subject of this investigation is the development of a machine-vision algorithm for the dimensional checking, pose estimation, and overall shape verification of regular polygonal objects (e.g., surface-mounted electronic components and fastener heads). Algorithmically, the image boundary data is partitioned into n segments, and then a non-ordinary least squares technique is used to find the best fitting polygon. The algorithm is well-suited for online implementation in an automated environment due to its flexibility and demonstrated speed.