VISUAL INSPECTION APPARATUS

Abstract: An automatic visual inspection apparatus has two linescan cameras (2 and 3). The cameras are positioned so that one views light specularly reflected by the surface of an object to be inspected, while the other views light diffusely reflected by the surface. The object is moved past the cameras so that the surface is scanned. The image signals from the cameras are acquired and processed by an imaging system (5). The locations of edges of the object in the images are detected, and the edge location data produced is used to control and modify the operation of the defect detection processing.

Description: VISUAL INSPECTION APPARATUS TECHNICAL FIELD This invention relates to an automatic visual inspection apparatus. BACKGROUND A range of defects can occur on manufactured products such as metal strip and ceramic tiles. These include surface defects, like dirt on the surface, edge defects such as damaged edge and dimensional defects such as poor planarity. Currently most visual inspection of such products is carried out by human inspectors viewing the products directly. Apparatus to assist or automate such inspection can reduce labour costs and provide a more objective, consistent level of inspection. Systems that use imaging devices and image processors, generally referred to as machine vision systems, have been designed for a number of inspection tasks. It is generally recognised that scanning systems - systems using imaging devices such as linescan cameras or 'flying-spot' laser scanners - give better results for high performance surface inspection than do systems using area cameras. Most scanning systems are used for the inspection of continuous strip and web products such as steel strip, paper web and plastic film. On the other hand most machine vision systems for the inspection of discrete parts have used area cameras. This difference in the image acquisition technologies for the different tasks is due to both technical and commercial factors. Existing systems for the inspection of discrete parts have significant limitations in their ability to detect a wide range of surface defects under production line conditions. The present invention addresses issues relating to illumination, image acquisition and image processing in order to provide an automatic visual inspection system for discrete objects that seeks to overcome the limitations of existing systems. The invention is particularly directed towards the inspection of flat, rectangular objects such as ceramic tiles. TECHNICAL FEATURES According to the present invention there is provided automatic visual inspection apparatus comprising a linescan camera positioned so as to view light that has been specularly reflected by the surface of a discrete object being inspected when the apparatus is in use, a second linescan camera positioned so as to view light that has been diffusely reflected by the surface of such an object, one or more light sources positioned so as to provide illumination for the two linescan cameras, conveyor means arranged to convey such an object so that the lines of view of the two said linescan cameras pass across the surface of the object, location means connected to receive image-defining signals from at least one of said two linescan cameras to provide location-defining signals indicative of the location of such an object as it is conveyed along by the said conveyor means, and defect detection means connected to receive image-defining signals from the said two linescan cameras, and also to receive location-defining signals from the said location means, to process the said image-def ning signals in a manner controlled by the said location-defining signals. Preferably, the location means are edge-location means which serve to provide edge-defining signals indicative of the location of at least one transverse edge of such an object. This apparatus can advantageously be used to inspect an object for surface defects. Certain surface defects ( specular defects ) are topological in nature, that is tney are distortions of the surface, such as a crater. These defects change the direction of specular reflection, so that at the defect light from the light source is no longer specularly reflected towards the camera that, on a good quality surface, views specularly reflected light (the specular camera). The image-def ning signal from the specular camera, therefore, indicates a low light intensity at the position corresponding to the defect and the signal can be processed to detect the defect. At the position of other surface defects (diffuse defects), there may be no distortion of the surface or change in the surface texture. At these defects the direction and intensity of specularly reflected light is not affected, and the defects cannot be detected in the signal from the specular camera. However a defect of this kind, such as a dark stain on a white surface, may absorb more light than the surrounding area, and so decrease the intensity of diffuse reflection at that position. Th s is indicated in the signal from the second camera (the diffuse camera), and can be detected by processing the image-defining signal from that camera. The image-defining signal outputs of the two cameras are advantageously connected to an imaging system in order to detect defects and/or measure dimensional characteristics. For surface defect inspection the imaging system may be configured or programmed to process the signals from the two cameras to detect specular surface defects, diffuse surface defects, and surface defects which affect the intensity of both specularly and diffusely reflected light. Generally only the parts of the image that correspond to the surface of the discrete objects are processed, as otherwise the edges of the objects, and/or the gaps between the objects as they are transferred past the cameras, can be detected as defects. For many types of objects it is also desirable to divide the surface of the object into a number of separate zones, for image processing purposes, corresponding to areas of the object's surface having a different form, texture or colour. Different or modified defect detection processing is then carried out on each zone in order to achieve consistent and effective defect detection. For wall tiles, for instance, the parts of the image area corresponding to cushion edges (the curved regions of the surface of the tile adjacent to the edges) may need to be processed in a different way to the flat central part of the surface of the tile. In general, however, the locations and orientations in the images of the perimeter of the object's surface and of any image processing zones on its surface are not constant from object to object, due to variations in the position, orientation and transfer speed of the objects, and also due to variations in the size and shape of the objects themselves . Processing steps that are specific to discrete objects are therefore desirable, as follows: After acquisition of the images by the imaging system the image from each camera is processed by edge-location means in order to detect the position of at least one transverse edge. The detection is typically by thresholding all or part of the image to form a binary image and locating the transitions from black to white or white to black. If the object is rectangular and just one edge is located by the edge-location means then the positions of the other three edges are either assumed to be constant from object to object, or are calculated from the position of the transverse edge that has been located. Preferably, however, all four edges of a rectangular object are located by the edge-location means, so that the position of the perimeter is fully determined. The perimeters of each processing zone in the image, if required, are then calculated from the perimeter. The edge-defining signals, and the processing zone defining signals if required, are passed to the defect detection means in order to control the parts of the image that are processed to detect defects. Suitable image processing algorithms for defect detection will be apparent to one familiar with this technology. In one approach the image is convolved to achieve spatial filtering prior to thresholding. An alternative algorithm is to subtract a 'golden template' - a stored image of a good quality surface - from the acquired image and then threshold to detect differences between the acquired and template images. The relative response of each of the two cameras to a defect can be used to supplement other feature information, such as defect size and shape, extracted by the imaging system from the camera signals, in order to classify the defects by type. The illumination for the cameras can advantageously be provided by a single substantially linear light source. The lamp, the specular linescan camera and the object are so positioned that the specular linescan camera views the specular reflection of the linear light source in the surface of the object. This can be done for an object with a surface that is substantially planar by positioning the light source so that it is substantially coplanar with the line of view on the surface of the specular linescan camera, and so that it is spaced apart from the specular linescan camera angularly about said line of view, and the angle between the surface at the line of view and the imaginary plane which includes the substantially linear light source and the imaginary line is substantially equal to the angle between the surface at the imaginary line and the plane of view of the specular linescan camera. In addition to this the diffuse linescan camera is positioned so that it views light from the same light source that is diffusely reflected by the surface of the object. Typically the linear light source is a fluorescent lamp powered by a high-frequency ballast or control unit. Image acquisition, processing and analysis can be simplified by positioning the two linescan cameras relative to the object so that they view substantially the same imaginary line across the surface of the object. If this is done the acquisition of image data can be controlled by a single signal, which could be the image signal from one of the linescan cameras or from a separate detector such as a photocell . The two linescan cameras advantageously have CCD (Charge Coupled Device) solid-state sensors. The cameras can have a sensor with a single line of sensitive sites or, if higher light sensitivity is required, a TDI (Time Delay Integration) type sensor, with multiple lines, can be used. While it is possible to implement the imaging system with purpose-built electronics, that is 'in hardware', it is preferable to carry out the image processing with a digital image processor that is programmed to implement the desired algorithm, that is 'in software'. As well as detecting defects the apparatus can be configured to measure dimensional characteristics of the object, including planarity. The imaging system finds the coordinates, in the fields of view of each of the two linescan cameras, of the same points on the object, and these coordinates are analysed using stereoscopic vision techniques in order to calculate the dimensional characteristics. To carry out dimensional measurement the object may be moved relative to the cameras in a controlled manner, so that its position during each scan of the cameras is known. This can be done by moving the object at a known, constant linear speed and deriving the position from the time and speed. As the object is moved in this manner the signals from the two cameras may be acquired by the imaging system. The imaging system may be configured or programmed to find pairs of co-ordinates, in each camera image, of known reference points such as corners of the object or marks on its surface. Each pair of co-ordinates for a point comprises a distance along an image line, and the position of the object along its direction of movement that corresponds to that image line. These co-ordinates and the data defining the planes of view of the cameras can then be used to calculate the three- dimensional co-ordinates of the reference points, using conventional co-ordinate transformation techniques. In turn the required dimensions, such as length, width and planarity can be calculated from the three-dimensional co-ordinates of the reference points. The dimensions can then be compared to target figures, and if a dimension is outside an acceptable range a fail or reject decision is made for this object. For dimensional inspection it is desirable that the imaging system has available data indicating the positions of the field of view planes of the two cameras. This information can be found by viewing one or more objects, with known dimensions or patterns, at known positions relative to the cameras. This set-up process can be considered to be a calibration of the system for dimensional measurement. The apparatus is well suited to inspecting rectangular, substantially planar objects. To do so the objects are successively moved by the conveyor means in a direction parallel to the plane of the objects, so that the lines viewed by the two linescan cameras scan across the surface of the objects. Examples of such rectangular, substantially planar objects are wall, floor or ceiling tiles. These products can have a wide range of defect types. Some defects, typically those caused by marks or stains below the glaze surface, are diffuse defects. Other defects, often formed during the glazing process, take the form of blobs on or depressions in the glaze surface, and therefore act as specular defects. EXAMPLE An example of apparatus embodying the present invention, configured for automatic inspection of glazed ceramic wall tiles, will now be described with reference to the accompanying drawings in which: Figure 1 is a part perspective, part diagrammatic view of the general arrangement of a tile being inspected, the linescan cameras, and the connections to the imaging system; and Figure 2 is a functional block diagram illustrating the main steps in the image acquisition and processing. In Figure 1 the tile 1 is translated by a conveyor mechanism along a direction parallel to its centre line H-I. The specular linescan camera 2 views line A-B across the tile 1. The optical centre of the lens of the camera 2 is at C. The central axis of the camera's view, C-D, is perpendicular to the line A-B and intersects the plane of the surface of the tile at D, which is on the centre line H- I of the tile 1. The diffuse linescan camera 3 also views line A-B, and the optical centre of its lens is at E. The central axis, E-D, of the camera's view is also perpendicular to the line A-B and also intersects the plane of the surface of the tile 1 at D. While it is not essential that the planes of the fields of view of the two cameras intersect at a line precisely in the plane of the tile surface, as is shown in Figure 1, the analysis of the images from the cameras and the calculation of dimensions is greatly facilitated if this is so. Both point C and point E are in the plane that is perpendicular to the plane of the surface of the tile and also passes through the centre line of the tile H-I. A linear light source 4 is mounted so that its central axis F-G is parallel to the viewed line A-B. The said perpendicular plane through H-I intersects axis F-G at point J. The ray of light from the lamp travelling along path J-D has an angle of incidence to the tile of T. After specular reflection by the tile surface the light ray travels along path D-C, with an angle of reflection also equal to T, and arrives at the specular camera 2. Similarly light rays from the lamp travelling in directions F-A and G-B are also both specularly reflected towards the specular camera along paths A-C and B-C respectively. When the surface of the tile is flat and smooth, therefore, the specular camera 2 sees a specular reflection of the light source 4 right along the line A-B. Under these circumstances, however, the diffuse camera 3 sees only diffusely reflected light. The tile is moved past the cameras, which repeatedly scan, so that the whole of the top surface is viewed by the cameras. The image processor acquires and processes the signals from the cameras and detects specular surface defects using the signal from the specular camera, and diffuse defects using the signal from the diffuse camera, as has previously been described. Basic dimensional inspection is carried out, also as previously described. When the corners K, L, and N of the tile are used as reference points and their three- dimensional co-ordinates found then the width, length, rectangularity and degree of twist of the tile can be calculated. With the use of additional reference points further dimensional properties, such as the degree of bowing and other indicators of planarity, can also be checked. Figure 2 shows a functional block diagram illustrating the stages in the image acquisition and processing. Each of the two cameras, 2 and 3, has a CCD sensor chip, 6 and 7, that produces analogue signals indicating the amount of light that has fallen on each sensitive site of the sensor during the integration time for that scan line. The analogue signals are converted to digital form by an analogue-to-digital converter, 8 and 9, and the digital signals are transmitted to the imaging system 5 over serial or parallel data links. The input stage 10 of the imaging system 5 directs the image data to the appropriate part of the test image memory 11. The test image is processed by the edge detector 12 to detect the edges of the tile and calculate the perimeters of the processing zones of the tile - the four cushion edge regions and the flat face region. These results are then used by the defect detector 13 to set the image processing zones. Each image processing zone is convolved using an appropriate convolution kernel, and the resultant image regions are thresholded and analysed to find defects and measure their size and severity. The defect data is then passed to the classifier 14 where a decision on the quality category of the tile is made. Typically each tile is classified as either first, second or reject quality. If the tile is decorated with a printed pattern then an additional image processing step is needed for the best results to be obtained. The appearance of the correctly printed tile in the image is learned by passing one or more reference tiles through the system to acquire reference images which are stored, during inspection, in the reference image memory 15. These tiles are effectively used to train the system. When a tile is inspected the test image and reference image are compared by a comparator 16 and the difference image is analysed to detect defects, either of the decoration or of the surface. As with the defect detector, the operation of the comparator is controlled by the edge-defining outputs of the edge detector 12, in order to ensure that the test and reference images overlay each other before they are compared. The comparator not only registers the two patterns relative to each other, but also, if necessary, stretches or compresses either the test or reference image to compensate for differences between the conveyor speeds when the two images were acquired. This technique can be applied to both screen-printed decoration, where the printed pattern is in substantially the same position on each tile, and to roller-printed tiles on which the position of the printed pattern is shifted in one direction between tiles. In the latter case it is necessary to build up from a number of training tiles a composite reference image corresponding to the pattern of the circumferential surface of the printing roller, and then identify which part of this reference image matches the image of the test tile before comparing these two images. If both basic defect detection processing and also comparison processing are used to inspect a decorated tile then the defect results from both parts of the processing are used by the classifier 14 to make an appropriate classification decision for each tile inspected.

Claims: CLAIMS 1. An automatic visual inspection apparatus characterised by a first linescan camera (2) positioned so as to view light that has been specularly reflected by a surface of an discrete object (1), being inspected when the apparatus is in use, a second linescan camera (3) positioned so as to view light that has been diffusely reflected by the surface of the object (1) at least one light source (4) positioned so as to provide illumination for the first and second linescan cameras (2; 3), conveyor means arranged to convey the object so that the lines of view of the first and second linescan cameras pass across the surface of the object (1), location means arranged to receive image signals from at least one of the first and second linescan cameras to provide location- defining signals indicative of the location of the object as it is conveyed along by the said conveyor means, and defect detection means (13) responsive to image signals from the first and second linescan cameras and location-defining signals from the said location means, to process the image signals in a manner controlled by the location- defining signals. 2. An apparatus according to claim 1, in which the light source is a single substantially linear light source (4). 3. A apparatus according to claim 2, in which the linear light source (4) is a fluorescent tube powered by a high-frequency ballast. 4. An apparatus according to any preceding claim, in which the first and second linescan cameras (2, 3) view substantially the same imaginary line (A-B) across the surface of the object. 5. An apparatus according to any preceding claim, in which the location means and defect detection means are provided by a digital image processor (5). 6. An apparatus according to any preceding claim, in which the co-ordinates, in the fields of view of each of the first and second linescan cameras, of the same points on the object ( 1 ) are found from the image signals, and these co-ordinates are analysed using stereoscopic vision techniques in order to measure dimensional characteristics of the surface of the object, such as size and planarity. 7. An apparatus according to any preceding claim, for use in inspection of rectangular, substantially planar objects, in which the objects (1) are successively moved by the conveyor means in a direction parallel to the plane of the objects, so that the lines viewed by the first and second linescan cameras scan across the surface of the objects (1). 8. An apparatus according to claim 7, in which the rectangular, substantially planar objects are wall, floor or ceiling tiles. 9. A method of inspecting a discrete object, comprising arranging a linescan camera positioned so as to view light that has been specularly reflected by the surface of a discrete object being inspected when the apparatus is in use, a second linescan camera positioned so as to view light that has been diffusely reflected by the surface of such an object, one or more light sources positioned so as to provide illumination for the two linescan cameras, conveyor means arranged to convey such an object so that the lines of view of the two said linescan cameras pass across the surface of the object, location means connected to receive image-defining signals from at least one of said two linescan cameras to provide location-defining signals indicative of the location of such an object as it is conveyed along by the said conveyor means, and defect detection means connected to receive image-defining signals from the said two linescan cameras, and also to receive location-defining signals from the said location means, to process the said image-defining signals in a manner controlled by the said location-defining signals. 10. A method according to claim 9, in which the light source is a single substantially linear light source. 1 1. A method according to claim 10, in which the said linear light source is a fluorescent tube powered by a high-frequency ballast. 12. A method according to any of claims 9 to 1 1, in which the two said linescan cameras view substantially the same imaginary line across the surface of said object. 13. A method according to any of claims 9 to 12, in which the location means and defect detection means are provided by a digital image processor. 14. A method according to any of claims 9 to 13, in which the co-ordinates, in the fields of view of each of the two linescan cameras, of the same points on the object are found from the image-defining signals, and these co-ordinates are analysed using stereoscopic vision techniques in order to measure dimensional characteristics of the surface, such as size and planarity. 15. A method according to any of claims 9 to 14, for use in inspection of rectangular, substantially planar objects, in which objects are successively moved by the said conveyor means in a direction parallel to the plane of the objects, so that the lines viewed by the two linescan cameras scan across the surface of the objects. 16. A method according to claim 15, in which the rectangular, substantially planar objects are wall, floor or ceiling tiles.

Inventors: COULTHARD MARTIN, COULTHARD, MARTIN
Applicants: COULTHARD MARTIN, SURFACE INSPECTION LTD, COULTHARD, MARTIN, SURFACE INSPECTION LIMITED
Application year: 1997
Main classification: G01N21
IPC codes: G01N21