Abstract:
The condition of an article e.g. a multihead tool array is compared after having been subjected to some operation with its previous condition e.g. before and after a drilling or other operation of the tool array by forming an image, e.g. a video image, of the article before the operation and automatically comparing it with a second such image formed after the operation. Known image enhancement techniques can be used, and statistical techniques used in data processing equipment to detect significant differences between the images.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to methods and apparatus for comparing the condition of an article at different times. 
     In many industrial applications, it is important to know that the condition of an article after having been subjected to some operation is unchanged. An example is a drill bit or a multihead tool array where the or a drill or other tool might become damaged during a drilling operation and it is important that the damage be discovered and the machine stopped before proceeding to the next operation. The problem is aggravated by the fact that different tools or tool arrays might be used in succession. 
     BRIEF DESCRIPTION OF THE INVENTION 
     The invention provides a solution to this problem. 
     The invention comprises a method for comparing the condition of an article at different times comprising forming an image of the article at a first time, forming another image of the article at a second time and comparing the two images automatically to detect significant differences. 
     The images may be formed electronically, and may be video images. 
     The first image is preferably digitised and processed in various ways both to enhance it and to identify areas of interest. Image enhancement is effected by any one or more of a variety of known techniques. For example, improved signal-to-noise ratio is achievable by combining information from multiple frames of a video image. A digitised video image may be enhanced by histogram modification techniques, image smoothing may be achieved by filtering out low frequency noise, and the image may be sharpened by known image sharpening algorithms. 
     Image segmentation, to identify areas of interest, may be effected by point-dependent or region-dependent techniques. 
     Edges or areas of interest may be detected in a video image by a suitable algorithm and weights may be assigned to individual pixels of the image according to the probability of their representing areas of interest. In this way, a database is formed from the first image which is then used to compute the probability that the second image is not significantly different from the first image. 
     In practice, a multiple tool array will be imaged by a video camera and all or as many as required of the operations above referred to will be effected on the image. During this time, the multiple tool array will be used to perform whatever function is required on a workpiece. Then the multiple tool array is returned to the position in which it was first imaged and a second video image made. This is compared to the first image using the database evaluated during the time the tool array was performing its operation. This comparison can be carried out very rapidly, and, if no significant change is detected, the machine stepped on to its next operation. This may, of course, be a repetition of the first operation, or, more usually, it will be a different operation using a different tool array. If a significant change is detected between the before-and-after images, the machine may be stopped and an alarm raised or an automatic tool changing operation effected. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Embodiments of methods and apparatus for comparing the condition of articles at different times according to the invention will now be described with reference to the accompanying drawings, in which: 
     FIG. 1 is a diagrammatic illustration of a system for detecting broken tools in multiple tool arrays, 
     FIG. 2 is a flow chart showing the operation of the system illustrated in FIG. 1. 
     FIG. 3(a) is a histogram of grey levels in an image, 
     FIG. 3(b) is a graph of a transformation function, and 
     FIG. 3(c) is an equalized histogram made by operation on the histogram of FIG. 3(a) with the transformation function of FIG. 3(b), and 
     FIG. 4 is a diagram illustrating grey-level segmentation by histogram thresholding. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The system illustrated in FIG. 1 comprises a video camera 11 aimed at a multiple tool head 12 having a plurality of different drill bits and taps 13 when the head is in an inspection position just prior to performing an operation on a workpiece 14. 
     The tool head 12 is one of several such heads, all different, which are required to perform successive operations on the workpiece. 
     The camera 11 is so positioned that no one of the tools obscures another from the camera&#39;s view. More than one camera can be used, of course, where a single camera cannot be so positioned. 
     The procedure is illustrated by the flow diagram of FIG. 2. At step 0, the arrangement is initialized by selecting appropriate operating modes for the equipment--this of course may be built-in as a single operational mode or preset as system defaults so that initialization is effected simply by switching the system on. 
     Eight image frames formed by the video camera 11 are captured at step 1 and averaged in a real time data capture arrangement 15, in which the grey levels of the individual pixels of the image are stored in RAM locations that map on to the image. The eight frames are averaged at step 2 to improve signal to noise level. The resolution of the system will be selected according to the requirements of the application--looking at a large area containing a number of fine tools will clearly require better resolution than looking at a small area containing relatively large tools. It may be provided that different resolutions can be defined in the same system ranging from an image size of 1024×512 at the highest resolution to a size of 256×256 at the low resolution end. 
     The signal to noise improved image resulting from the averaging process is then further processed in a computer 16. 
     Step 3, carried out in the computer, involves forming a histogram of the grey levels in the image. The histogram is then equalized by operating on the grey level frequencies with a transformation function so as to obtain an equalized histogram with a more uniform distribution of grey levels. FIG. 3 shows (graph (a)) an original histogram, a transformation function (graph (b)) and the equalized histogram (graph (c)). From the equalized histogram is formed a new histogram with two distinct grey level regions, one corresponding to the grey levels of tools and one corresponding to the grey level of the background. This facilitates discrimination between tool and background regions of the image. FIG. 4 shows such a processed histogram and illustrated further the technique of histogram thresholding in which the histogram, typical of an image of grey objects against a dark background, is divided by a threshold grey level T into objects levels O and background levels B. 
     A new digital image, in which the grey levels of the individual pixels have been modified by the transformation function aforementioned and whatever algorithm was used to operate on the equalized histogram, is then scanned to ascertain the positions of edges, which is to say positions in the image where the grey level changes from O to B. A new image is created at this stage in which only two grey levels L O  and L B  are present, by redefining the grey level of each pixel to be L O  or L B  according as the pixel belongs to the range O of object levels or the range B of background levels. 
     The grey level segmented image is sharpened by differentiation techniques to detect edges and so, at step 4, to identify those pixels of the image belonging to the tools 13. 
     At step 5, a statistical measure is computed which assigns weights to pixels according as the pixels are on the edges of the tools or inside the tools, and according as the tools are large or small. Pixels in large tools are given a low weight, since it is assumed that large tools will break relatively infrequently as compared to small tools. Pixels on the edges of tools are given a low weight since a difference detected between the &#34;before&#34; and &#34;after&#34; images might signify only that the tool is differently orientated or that it has picked up some swarf. The object of this last processing step on the &#34;before&#34; image is to reduce the amount of data that has to be dealt with at the comparison stage. 
     The next step in the operation, then, is to capture the image after the tool head 12 has performed its operation in the workpiece 14. The tool head 12 is for this returned to the inspection position. The image thus captured is checked against the data from step 5 at step 7. If there is no mismatch, it is assumed that no tool has broken, and the process returns to step 1 ready for the next operation. Otherwise it is assumed breakage occurred, and the machinery may be stopped and/or an alarm raised. 
     The next operation might use the same tool head or it might use a different tool head. In either event a new image is made at step 1. 
     The image processing techniques outlined above could of course be replaced or supplemented by other techniques known in the art of image processing. 
     The invention is not of course limited to the inspection of tools or arrays of tools. Essentially, any object or succession of objects which might be similar or different can be inspected at different times to detect significant changes, the determination of what is significant being built in to the image processing technique by assigning appropriate weights to the pixels of interest in the ordinarily captured image. 
     The invention enables inspection to take place automatically and very rapidly. The bulk of the image processing is effected while the article being inspected is doing whatever it is that gives rise to the need for an &#34;after&#34; inspection--drilling, for example, in the case of drills. Capture of the &#34;after&#34; image and the comparison with the reduced data set is effected extremely rapidly using modern computer techniques, and this is of course important in such operations as automated drilling and tapping of workpieces in that no undue delay is introduced between one operation and the next.