COLOUR INSPECTION SYSTEM

Abstract: The disclosure relates to a colour inspection method and apparatus, and to a method of control of a video camera for the acquisition of a colour image under varying image capture conditions. A video camera (1) has a red, green and blue output (RGB) and is provided with a controllable iris aperture, a controllable overall RGB signal gain, independently controllable RGB signal channel gains, and a controllable RGB signal channel balance. The controllable parameters are controlled by a control unit (3) in the form of a personal computer having an image capture board (4). The personal computer generates signals from an image signal received from the video camera, the signals being used to correct the controllable parameters to improve camera image capture performance. The disclosure finds application in quality control systems, for example for controlling the paint colour of products on a production line.

Description: COLOUR INSPECTION SYSTEM Technical Field The present invention relates to the field of colour inspection and particularly, although not exclusively, to a method of control of a video camera for the acquisition of colour image data under varying image capture conditions. Background Art In on-line manufacturing processes, for ink printed articles such as beverage cans, there is a problem of checking the colour consistency of the ink printing. In particular, there are problems in colour inspection, in capturing a colour image of a moving object on a production line; defining the areas of an article in which the colour is to be monitored, given the complex printed designs on the articles; and transforming a colour image signal into a uniform colour space and efficiently processing the colour image signal in the colour space. Disclosure of the Invention An aim of the present invention is to provide a method and apparatus for effective non-contact colour monitoring of two or three dimensioned objects. Another aim is to provide colour recognition and monitoring of colours on a multi coloured article. According to one aspect of the present invention there is provided a method for controlling a video camera in a colour inspection apparatus for inspecting the colour of an object, the method comprising the steps of: capturing an image of the object and producing an image signal therefrom; deriving from the image signal one or more error signals relating to a colour error; and controlling a set of controllable parameters of the camera in accordance with the colour error signals, such as to correct the colour error in the captured image. Specific methods of the present invention may have an advantage over conventional colorimeters or spectrophoto eters, on which the object, on which colour is to be recognised must be presented in a flat state in contact with a measuring aperture of the instrument. This is inconvenient for products with curved surfaces eg. beverage cans. The controllable parameters of the camera may include iris aperture setting; overall electronic gain of the image signals; electronic gain of the individual Red, Green or Blue components of the image signal; balance between the magnitudes of the Red, Green and Blue components of the image signal. Preferably, the iris aperture and/or electronic gain of the camera are controlled so as to avoid saturation of the image signal. Preferably, a red, green and blue signal component from a region of a captured image signal corresponding to a known colour object is obtained and the iris aperture and/or overall electronic gain of the camera are controlled in accordance with a colour error signal derived from said red, green or blue signals of the region, such that saturation of said red, green or blue signals is avoided. Preferably, the iris aperture and/or overall electronic gain of the camera are adjusted to achieve signals in accordance with the formula: R, G or B signal = F x known R, G or B value where F is a value less than unity. Preferably, an imbalance between signals of a red channel, a green channel or a blue channel is rectified by controlling the electronic gain of each of the red or blue channels in accordance with a red channel or blue channel control signal corresponding to an image of an object colour of a predetermined red, green and blue balance. Preferably, variations in successive red channel, green channel or blue channel signals corresponding to successive images of a same object are corrected by control of the iris aperture, overall electronic gain, the gain of each individual red, green or blue channel, or by control of the gain of a processed image signal processed in accordance with a computer program. Preferably, said control is made in accordance with an image signal, or a component of an image signal, corresponding to a standard object of unvarying reflectance. Preferably, said signal corresponding to a standard object is controlled so as to be constant. Preferably, said control is made in accordance with a signal derived from a portion of an image corresponding to a calibration object of unvarying reflectance. Preferably, said image is a separate calibration image. Preferably, the light intensity response of the video camera is characterised by: (i) capturing an image or images of an object or objects of known reflectance; (ii) for each object, determining an output voltage of an image signal; and (iii) determining a characterising parameters γ (Gamma) k (Intercept) and a (Multiplier) from the output voltage data of step (ii) and the known reflectances of the objects in step (i). The resolution of the captured image may be selected by controlling the iris aperture and/or overall electronic gain of the video camera. The resolution of the captured image may be selected by selectively controlling the resolution of an analogue to digital converter for images of different reflectance values. Thus, specific methods according to the present invention may provide that a commercial video camera may be used as a colour measuring instrument, by controlling the camera to provide accurate and precise data capture under varying image conditions. The invention includes an apparatus for inspecting the colours of an object, the apparatus comprising: a video camera for producing an image signal corresponding to the object; a means for deriving from the image signal and to derive from the image signal one or more error signals. a control means for controlling a set of controllable parameters of the camera; wherein the control means is arranged to control the camera in accordance with the colour error signals produced by the inspection means. Preferably, the control means are arranged to control the iris aperture of the camera, and/or the overall electronic gain of the camera, and/or the electronic gain of an individual red, green or blue channel of the camera. Preferably, the recognition means is arranged to identify a red, green and blue signal from a region of a captured image signal corresponding to a known colour object, and the control means is arranged to control the iris aperture and/or overall electronic gain of the camera having regard to said red, green or blue signals of the region, such that saturation of said red, green or blue signals is avoided. Preferably, the control means are arranged to control the iris aperture and/or overall electronic gain of the camera in accordance with the formula: R, G or B signal = F x known R, G or B value where F is a value less than unity. Preferably, a resolution of a captured image is selected by selectively controlling the resolution of an analogue to digital converter for images of different reflectance values. According to a second aspect of the present invention, there is provided a colour inspection method, for recognising the colours of a product, and deciding whether each colour is acceptable, the method comprising the steps of: capturing an image of the product on a video camera and producing an image signal; recognising a colour of the product and generating a colour error signal in accordance with an error between the recognised colour and a reference colour; controlling the video camera to optimise the image capture of the camera; using intensity independent chromaticity metrics to measure surface colour in three dimensional matte objects; and using a uniform colour space to decide whether each colour is an acceptable match to the reference colour. The invention includes a colour recognition and control apparatus, for recognising a colour of a product, and a decision apparatus for assessing the acceptability of the colour. Preferably, the colour recognition apparatus comprises: a video camera for capturing an image of the product; a colour recognition means for recognising a colour of the product and for generating a colour error signal in accordance with a detected colour error of the product colour; a camera control means for controlling the video camera to optimise the image capture of the camera; and a means for computing the acceptability of the product colour. Preferably, the decision apparatus is capable of assessing the acceptability of the colour of the product. The decision apparatus may comprise an application specific integrated circuit, or may comprise a central processing unit of a computer, eg. a personal computer. Commercial video cameras are designed for the capture of images such that scenes may be reproduced to a standard acceptable to the human eye. The human vision system is capable of interpolation and interpretation, and is tolerant of errors in the accuracy of colour reproduction. Specific methods and embodiments according to the present invention may enable correction or compensation of the errors occurring in the colour reproduction characteristics of various models of commercially available video cameras. The embodiments and methods of the present invention may enable interface to a conventional commercially available video camera in order to automatically apply a correction and compensation appropriate to the image captured by the video camera, to reduce the errors occurring in the colour reproduction characteristics of the video cameras. Description of the Drawings For a better understanding of the invention, and to show how embodiments of the same may be carried into effect, reference will now be made, by way of example, to the accompanying diagrammatic drawings, in which: Figure 1 shows in schematic form a first colour recognition apparatus according to a first specific embodiment of the present invention; Figure 2 shows in schematic form, a second colour inspection apparatus according to a second specific embodiment of the present invention. Best modes of Carrying and the Invention Referring to figure 1 of the accompanying drawings, there is shown a first apparatus according to a first specific embodiment of the present invention. The first colour recognition apparatus comprises an interface unit for interfacing to a conventional commercially available video camera 1 having a red, green, blue output (RGB output) and having a controllable iris aperture, a controllable overall RGB signal channel gain, independently controllable RGB signal channel gains, and a controllable RGB signal channel balance. The interface comprises an RS232C bus 2 to enable remote control of the camera; and a conventional commercially available personal computer 3 having a conventional commercially available image capture board 4. In accordance with a first specific method of the present invention, the computer is adapted for control of the camera via the RS232C databus, by means of a dedicated application program. The dedicated application program may form part of a larger computer program, or may be run in conjunction with other applications programs. The conventional video camera has various shortcomings which has hitherto prevented the use of such commercially available video cameras for colour recognition for use, for example colour standardisation of products in manufacturing processes. The inventors have identified the shortcomings in a range of such commercially available video cameras as follows: . Red. Green. Blue (RGB) channel saturation: L RGB signal imbalance: 3 ^ RGB signal capture repeatability: 4Λ Non linearity: 5_. Poor resolution. The computer in the first colour recognition apparatus is adapted to control the conventional video camera via the RS232C databus to reduce the errors 1-5 above in a selected video camera by a method as follows: RGB saturation correction. Where an image contains small areas of relatively bright colour compared to the remainder of the image, saturation of one or more of the RGB video channels may occur. This may because the video cameras auto gain controls, or the auto iris controls respond to an average level of signal from the whole image, without taking into account any localised bright spots. According to the first specific method, a calibration object of known colour is included in the object, so as to appear at a predetermined place in the image captured by the camera. The camera iris aperture, and the overall electronic gain of the camera are adjusted by control from the computer such that the R,G and B signals from the predetermined image area are reduced below a set of predetermined known values. The predetermined known values are found as the RGB signals corresponding to an image of the calibration object of known colour. When the image is re-captured, after correction of the aperture and gain every colour present in the complete image may thereby be represented by an unsaturated R,G or B signal. The aperture and electronic gain of the camera are controlled to achieve signals in accordance with the equation. R, G or B signal = 0.8 x known R, G or B value. The iris aperture control is effected by making a slight adjustment and calculating the intensity gradient, and then using this to calculate the required aperture and then using this to calculate the required aperture adjustment. The iris aperture control is intensi ty gradient = <P resen t in tensi ty - previous intensi ty (present aperture - previ ous aperture a „p_,e„r„t,.,u,r,.e„ a ,d J .i,•us,,,.e„m_„e„n.- t,. = — in : tensi t ■?y- diffe 7 r-. ence m tenεi ty gradi en t where intensity gradient is the intensity gradient of one of the red, green and blue signals, present intensity is the present intensity of one of the said signals, previous intensity is the previous intensity of one of the said signals, aperture adjustment is the calculated iris adjustment which should be carried out, intensity difference is one of the intensity difference of the said signals to the target one. RGB imbalance correction. If any particular hue predominates an image captured by the camera, for example if small patches of a different colour are set against a blue background, then a conventional camera may produce an unbalanced R,G or B signal. The cameras auto balance control tends to compensate the actual overall blueness in the image by reducing the gain on the blue channel relative to the red and green channels. In certain cameras, particularly tube cameras, the signals corresponding to the small patches of colour in the image may be contaminated by the signals corresponding to parts of the image which contain large neighbouring areas of background colour, with the result that the red, green and blue values are unbalanced by a blue value which is relatively high. In the tube camera, the effect of a relatively large blue signal value may counteract the effect of the reduced gain on the blue channel caused by operation of the auto balance control, so that there may be partial cancelling of the first error caused by the auto balance control, and the second error of the relatively high blue value. According to the first method, any RGB imbalance is rectified by including in every image a calibration colour of known balance, and by arranging that the R,G and B signals corresponding to the area of image containing the known balance calibration colour are in correct proportion relative to each other. This is achieved by controlling the electronic gain of the individual RGB channels, or by controlling the balance control of the camera, or by correction of the balance via program control. For example, via the individual gain control, the balance could be adjusted by making a small change to the R channel gain and calculating the gain gradient, and then by using this to make the required adjustment to the gain of the R channel. A similar technique would be carried out with the B channel gain. The individual gain control is: For red channel R gain gradient= present R - previous R Present R gam - previous R gam R gain adjustment = tar ? e t R ~ Presen t R R gam gradient where target R = calibra tion R x Present G Calibra tion G For blue channel B D g „a-, ,• -, = p — —resen t : B - p —revi : ous B — present B gam - previous B gam B D g „a,i,■n., adj-,-,u,s,-t * -m,-,e«n, rt- = targ - —et : B - p ≤—r —esent B B ga gradi ent where target B = calibra tion B x — preseΩ t G — calibra tion G RGB capture repeatability. An image captured by a conventional video camera may result in RGB signals which vary from RGB signals resulting from the image recaptured on a different occasion. Thus, there is a repeatability problem in RGB signal recapture. This may arise from various different causes including variations of camera temperature, changing source light intensity, changed aperture gain or balance settings of the camera. According to the first method, an object of unvarying reflectance is included in the image, or is captured in a separate calibration image. The camera is adjusted via computer control, to ensure that the signals relating to the standard object, match a predetermined calibrated level. This is achieved by computer controlling the camera aperture, the overall electronic gain of the camera, the gains of the individual channels of the camera and by software correction of the gain. Light intensity linearity correction. The camera may vary in linearity of response to light intensity according to the following equation. response = a(intensity) 1/7 +k where a and k are constants. When = 1 , the relation between output and intensity is linear. However, generally 7 is not unity for most video cameras, and the rate of change of RGB signal output with intensity is greater at low intensity values than for high intensity values. It is generally unclear from a camera manufacturers data what the 7 value for a particular camera is. According to the first method, values for 7, k and a for a particular camera are established by capturing an image of a series of objects of known reflectance, and finding a least squares fit to the characteristic of output voltage and reflectance. The output signals are thus corrected so that they are proportional to reflectance and pass through the origin. According to the first method, the video camera may be characterised such that the camera can be used for accurate measurement of the reflectance of any object. Resolution at low intensities Where a video camera with a near unity 7 is used for image capture, the analogue to digital converters (ADC's) of the image capture board of the computer may give quantisation errors which are significant at low camera light intensity levels. According to the first method, the image is recaptured using a gain of say +9dB or + 18dB, in order to provide improved resolution at low intensity values. The signals from the recaptured image are corrected for 7 (Gamma) and k (Intercept) as described above, and then scaled back to their OdB equivalent according to the formula: signal OdB equivalent = (signal a t 9 dB )/2 . 82 for +9dB gain recapture, or for + 18dB gain recapture according to the formula: signal OdB equi val ent = (signal a t 18dB )/7 . 94 Alternatively, according to the first method, an analogue to digital convenor of higher resolution may be used to process images or parts of images at low intensity values. By low intensity values, is meant the intensity values at which the human eye is most sensitive to changes in light intensity. Referring to figure 2 of the accompanying drawings, there is shown a second embodiment colour recognition apparatus, used to monitor a colour of a product 100 of a production line 101. The second embodiment comprises a conventional video camera 10 controlled via an RS232C data link 1 1 from an RS232C interface 12 contained in a camera control unit 13; the camera control unit 13 also contains an application specific integrated circuit (ASIC) 14 for performing adjustments to the camera aperture, overall electronic gain, gain of the individual RGB channels, and electronic balance control of the camera; a decision making control apparatus 15, which receives a signal from the ASIC 14, a computer, eg. a personal computer 15 for receiving signals concerning the overall gain, individual channel gain, balance, and aperture values of the camera 10 from the ASIC 14, and for outputting a pass/fail decision depending upon whether the computer 15 determines that the signals emanating from the camera 10 and ASIC 14 are within preset acceptable levels, the preset acceptable levels relating to the maximum colour difference acceptable for a predetermined colour. The second apparatus is operated according to a second method, the second method being substantially similar to the first method. However, the second apparatus may have an advantage that the functions of RGB saturation correction, RGB imbalance correction, RGB capture repeatability correction, RGB signal linearity and intercept correction and RGB resolution correction are automatically carried out by the ASIC 14, instead of by a suitably programmed PC, allowing a faster response time and faster correction times by use of the ASIC, and thereby allowing a faster rate of image processing and camera correction. To ensure a high data rate interface between the camera and the ASIC, the camera may be modified to interface directly with the ASIC which may be provided as integral part of the camera. The second embodiment may be particularly suitable for use on a production line where colour monitoring of individual objects passing along the production line is required. In either of the first or second methods above, the computer applies an appropriate colour theory for identifying the colour of the object, from the image received by the camera. An appropriate colour theory may include a colour transformation of the RGB signal based upon a logarithmic function, for example, a colour transformation based on a logarithmic colour space L L a L b L ; where L L is the panchromatic luminance metric, and a L and b L are the two chromaticity coordinates, or any other colour transformation yielding intensity - independent chromaticity coordinates. This is particularly important for the inspection of three dimensional matte objects, enabling surface colour to be distinguished in spite of shadow effects. It may also include a colour transformation lending to a uniform colour space, designed to enable acceptability decisions to be made in accordance with human perception of colour difference. Such uniform colour spaces include C.I.E. 1976 L * a * b * and L * u * v * equations, and may be found in R. Macdonald (Ed) "Colour Physics for Industry"; Society of Dyers and Colourists, 1987. In a modified version of the second embodiment, acceptability decision calculations, eg. for colour space transformations, may be performed by the ASIC. Embodimcnts of the present invention may enable a conventional video camera to measure the colour of a three dimensional object, without contact to the object and whilst leaving the object in situ on a production line. Further, specific embodiments and methods of the present invention may enable measurement of colour from a multicoloured object. By providing colour acceptability decision at an early stage in the production process,, excessive waste is avoided and production costs reduced. Further, specific embodiments and methods according to the present invention are not restricted to static objects, but may enable colour recognition of moving objects. The reader's attention is directed to all papers and documents which are filed concurrently with or previous to this specification in connection with this application and which are open to public inspection with this specification, and the contents of all such papers and documents are incorporated herein by reference. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and/or all of the steps of any method or process so disclosed, may be combined in any combination, except combinations where at least some of such features and/or steps are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features. The invention is not restricted to the details of the foregoing embodiment(s). The invention extends to any novel one, or any novel combination, of the features disclosed in this specification (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed.

Claims: CLAIMS 1. A method for controlling a video camera in a colour inspection apparatus for inspecting the colour of an object, the method comprising the steps of: capturing an image of the object and producing an image signal therefrom; deriving from the image signal one or more error signals relating to a colour error; and controlling a set of controllable parameters of the camera in accordance with the colour error signals, such as to correct the colour error in the captured image or in the image signal produced therefrom. 2. A method according to claim 1 characterised in that the controllable parameters of the camera comprise any one or more of the following: iris aperture setting; overall electronic gain of the image signals; electronic gain of individual Red, Green or Blue components of the image signal; balance between magnitudes of the Red, Green and Blue components of the image signal. 3. A method according to claim 2, characterised in that the iris aperture setting and/or electronic gain of the camera are controlled so as to avoid saturation of the image signal. 4. A method according to claim 2 or 3, characterised in that a red, green and blue signal component of the image signal from a region of a captured image corresponding to a known colour object is obtained; and the iris aperture and/or overall electronic gain of the camera are controlled in accordance with a colour error signal derived from said red, green or blue signals of the region, such that saturation of said red, green or blue signals is avoided. 5. A method according to any one of claims 2 to 4 characterised in that the iris aperture and/or overall electronic gain of the camera are adjusted to achieve signals in accordance with the formula: R, G or B signal value = F x known R, G or B value where F is a value less than unity. 6. A method according to any one of claims 2 to 5 characterised in that an imbalance between signals of a red channel, a green channel or a blue channel is rectified by controlling the electronic gain of each of the red or blue channels in accordance with a red channel or blue channel control signal corresponding to an image of an object of a colour having a predetermined red, green and blue balance. 7. A method according to any one of claims 2 to 6, characterised in that variations in successive red channel, green channel or blue channel signals corresponding to successive images of a same object are corrected by control of the iris aperture, overall electronic gain of the image signal channel, the gain of each individual red, green or blue channel, or by control of the gain of a processed image signal processed in accordance with a computer program. 8. A method according to claim 7 characterised in that said control is made in accordance with an image signal, or a component of an image signal, corresponding to a standard object of unvarying reflectance. 9. A method according to claim 8 characterised in that said signal corresponding to a standard object is controlled so as to be constant. 10. A method according to claim 7,8 or 9 characterised in that said control is made in accordance with a signal derived from a portion of an image corresponding to a calibration object of unvarying reflectance. 11. A method according to claim 10 characterised in that said image comprises a calibration image. 12. A method according to any one of the preceding claims in which a light intensity response of the video camera is characterised by: (i) capturing an image or images of an object or objects of known reflectance; (ii) for each object, determining an output voltage of an image signal; and (iii) determining characterising parameters 7 (Gamma), K (Intercept), and a (Multiplier) from the output voltage data of step (ii) and the known reflectances of the objects in step (i). 13. A method according to claim 12, characterised in that a resolution of the captured image is selected by controlling an iris aperture and/or overall electronic gain of the video camera. 14. A method according to claim 13 characterised in that the resolution of the captured image may be selected by selectively controlling the resolution of an analogue to digital converter for images of different reflectance values. 15. An apparatus for inspecting the colours of an object, the apparatus comprising: a video camera for producing an image signal corresponding to the object; a means for deriving from the image signal and to derive from the image signal one or more error signals relating to a colour error; and a control means for controlling a set of controllable parameters of the camera; wherein the control means is arranged to control the camera in accordance with the colour error signals. 16. An apparatus according to claim 15 characterised in that the control means are arranged to control an iris aperture of the camera, and/or an overall electronic gain of the camera, and/or an electronic gain of an individual red, green or blue channel of the camera. 17. An apparatus according to claim 16, characterised by comprising a recognition means arranged to identify a red, green and blue signal from a region of a captured image signal corresponding to a known colour object, and the control means being arranged to control the iris aperture and/or overall electronic gain of the camera having regard to said red, green or blue signals of the region, such that saturation of said red, green or blue signals is avoided. 18. An apparatus according to any one of claims 15 to 17, characterised in that the control means are arranged to control the iris aperture and/or overall electronic gain of the camera in accordance with the formula: R, G or B signal value = F x known R, G or B value where F is a value less than unity. 19. An apparatus according to any one of claims 15 to 18 characterised in that a resolution of a captured image is selected by selectively controlling the resolution of an analogue to digital converter for images of different reflectance values. 20. A colour inspection method, for recognising the colours of a product, and deciding whether each colour is acceptable, the method comprising the steps of: capturing an image of the product on a video camera and producing an image signal; recognising a colour of the product and generating a colour error signal in accordance with an error between the recognised colour and a reference colour; controlling the video camera to optimise the image capture of the camera; using intensity independent chromaticity metrics to measure surface colour in three dimensional matte objects; and using a uniform colour space to decide whether each colour is an acceptable match to the reference colour. 21. A colour inspection apparatus, for recognising a colour of a product, and assessing the acceptability of the colour, the apparatus comprising: a video camera for capturing an image of the product; a colour recognition means for recognising a colour of the product and for generating a colour error signal in accordance with a detected colour error of the product colour; and a camera control means for controlling the video camera to optimise the image capture of the camera: and a means for computing the acceptability of the product colour. 22. A colour inspection apparatus according to claim 21 characterised in that said camera control means comprises an application specific integrated circuit incorporated as an integral component of the video camera. 23. A colour inspection apparatus according to claim 21 or 22 characterised in that said decision apparatus comprises an application specific integrated circuit. 24. A colour inspection apparatus according to claim 21 or 22 characterised in that said decision apparatus comprises a central processing unit of a computer. 25. A method of controlling a video camera substantially as herein described. 26. A colour inspection apparatus substantially as herein described.

Inventors: CONNOLLY CHRISTINE, LEUNG TIN WAH WILLIAM, CONNOLLY, CHRISTINE, LEUNG, TIN WAH, WILLIAM
Applicants: CONNOLLY CHRISTINE, LEUNG TIN WAH WILLIAM, UNIV HUDDERSFIELD, CONNOLLY, CHRISTINE, LEUNG, TIN WAH, WILLIAM, THE UNIVERSITY OF HUDDERSFIELD
Application year: 1995
Main classification: G01J3
IPC codes: G01J1, G01J3