Computers ind. Engug Voi.15, Nos 1-4, pp.355-3599 1988 Printed in Great Britain. All rights reserved 0360=8352/88 $3.00+0.00 Copyright e 1988 Pergamon Press plc AUTOMATED INSPECTION OF GENERAL SHAPES C.M. Klein, J.A. Ventura, and C.A. Chang Department of Industrial Engineering 113 Electrical Engineering Bldg. University of Missouri-Columbia Columbia, Missouri 65211 ABSTRACT The demand to minimize the' number of defects along with the increasing availability of computerized vision systems has made the on-line inspection of all production parts a feasible option in modern manufacturing systems. Vision systems enable noncontact, and thus, nondestructive measurements. An image of the production part is electronically obtained and stored in digital form in a computer. In most cases, the image is then processed to identify the local edges of the object. At a higher image processing level, information on local edges is used to obtain the boundaries of the object. Measurements on the computationally obtained boundary can then be performed mathematically, allowing tests to verify the shape and dimensions of the production part. It is the purpose of this paper to investigate and present methods for the determination of shapes and the use of this information for on-line quality inspection. INTRODUCTION Although image processing and performing measurements in the edge image by computerized vision systems ere technologically possible, statistically powerful and computationally efficient methods for automated quality control are required to make automated vision inspection systems cost-effectlve in modern manufacturing environments. An electronically obtained image consists of an array of picture elements or pixels. In a black and white image, each pixel assumes a value of zero or one. The resolution of an image is directly related to the pixel size. The smaller the pixel size, the larger the number of pixels required to obtain an image of an object. Once an array of plxels is obtained, the image is processed to identify the boundaries of the object. Measurements on the boundaries can then be performed mathematically, allowing tests to verify the shape and dimensions of the production part. It is the purpose of this paper to present several different methods for determining if a general shape is within quality assurance levels. These methods are designed to work quickly and efficiently so that it is possible to use them in an on-llne automated inspection scenario. The methods will be divided into two categories; one for general regular polygonal shapes in the original space and one for general shapes in a transformed space. INSPECTION IN THE ORIGINAL SPACE Several different methods for determining if a polygonal shape in 2-dimensions is within a pre-specified tolerance range will be con- sidered. Assume that the tolerance is given with respect to some parameter end is of the form a ± b; a the parameter, b the tolerance. If a given figure that is inspected falls within this range, it is acceptable, otherwise it is considered defective and can be reinspected by hand or sent for rework or scrapping. In order to determine if a figure is within specifications through computer vision, two methods will be considered. i) Inspection of the piece in the original space without the use of standard curve-fitting techniques, 2) Least squares approximation One problem of concern that will not be addressed here, is that of the sampling method and the sample sizes. Chang et. al. [I] showed that for roundness inspection systematic sampling seems to work best. Whether that is true for general figures is not known. However, it is believed that a random sampling method would produce the best results. For the sake of simplicity consider the figure under consideration to be a square. However, the techniques that will be described are easily extended to any regular polygon. Assume that the vision system has the capability of finding an edge and that the best approximate for a straight llne based on plxel information can be found. The methods to be outlined have an advantage in that the orienta- tion of the piece is not important. However, it is assumed that the vision system is based on a cartesian plane such that the left-most column of pixels on the screen is the y-axis and the bottom most row of pixels is the x-axls, and the standard (original) figure has the axes as two of its sldes,(see figure i). 355