.pg 5.3 2-D grey level vision: the GM chip spotter Silhouette vision, while simple, is not very useful. It requires reasonable lighting, and the interior of the image of objects offers no information. Grey level images, in which each pixel's value is a grey level typically in the range 0-15 or 0-255 rather than merely 0 or 1, carry vastly more information. Methods of processing such images are described in [5]; they are correspondingly more sophisticated than those for silhouettes. This section describes one practical application, the General Motors 'chip spotter'. It has various idiosyncratic features, but then most practical vision systems do! .ti 4 This particular vision system was devised for the task of automatically inspecting integrated circuit chips mounted on a heat sink. The inspection has two purposes - the first is to detect chips with certain mechanical manufacturing faults so that they can be rejected rapidly, the second is to find the orientation of the chip on the heat sink so that automatic test equipment can be correctly lowered onto it. The chip and heat sink forms part of the high energy ignition system on all General Motors cars. .nf Heat Sink IC chip Weld cup .fi The weld cup is used to attach the heat sink to the ignition assembly, so it is important that the chip is not too close to it. If it were then the chip would almost certainly be damaged by the welding. Besides this, there are various other problems that the vision system must detect: .nf a) a missing chip! b) a chip too near the edge of the heat sink c) a chip that is broken or has a missing edge (this can happen because the chip is made using a laser scriber; it could fail to inscribe an edge properly) d) a chip tilted too much with respect to the edges of the heat sink, so that the automatic tester cannot be lowered onto it .fi The camera used is of a solid state diode array type, producing a 50x50 square image with grey levels in the range 0-15. Such a camera has the virtues of being cheap, reliable, fast and causing very little distortion. .ti 4 The essential steps are .nf a) align the heat sink with the camera so that the area in the image is where the chip ought to be b) obtain a 50x50 image of the area c) apply a gradient direction operator and form a histogram of the directions to obtain a rough idea of the orientation of the chip d) reject the chip if the angle is too great e) locate possible corners by using a small local template and then actually find the corners by using a global template f) reject the chip if any corner is missing g) look for missing or broken edges by checking for uniform intensity across the chip edges .fi The gradient operator used in step (c) is O'Gorman's; it uses the values in the eight pixels around each one: .nf A B C If Dx = (C + 2F + I) - (A + 2D + G) D E F and Dy = (A + 2B + C) - (G + 2H + I) G H I then the 'direction' at E is arctan(Dy/Dx) suitably adjusted by a multiple of 90 degrees to bring it into the range -45 < 'direction' < 45 degrees. .fi These 'direction' values for every pixel are collected into a histogram, with each value being weighted by the 'edge strength' (viz. |Dx| + |Dy|) of the pixel, so that the dominant direction can be determined. This trick does not work in general; it works in this case only because most of the interior detail of the chip that appears in the image is parallel to one edge of the chip. This ensures that a dominant direction exists and that it is the direction of the edge of the chip. .ti 4 Possible corners are found using a 'local corner template' rotated to the angle just found. The template is L-shaped; the values are chosen because they happen to work well enough, rather than for any good theoretical reason: .nf 1 2 2 1 2 -1 -2 -3 2 -2 1 -3 .fi The value of each pixel under the template is multiplied by the value of the corresponding template element, and the results summed to obtain a local template value (LTV) for that point. For a uniform field the LTV is 0 (since the template values sum to 0), and for a perfect corner matching the template the LTV is a multiple of 22. By this means a set of points which might be corners is found. Knowing the orientation and size of the chip, it is possible to predict where the other three corners are if the bottom left one (say) is known. Thus for each possible corner, a global template value (GTV) is found by adding the LTV of that point and of the three other points where the corners would be if the first one was the bottom left corner. The point that has the largest GTV is taken to be the genuine bottom left corner! .ti 4 Knowing where the corners are implies knowing where the chip edges should be. The contrast across each edge point is computed; if it is small, it is assumed to be because the edge is damaged, and so the chip is rejected. If all appears well, the chip together witht information about its orientation on the heat sink is passed along to the automatic tester.