SYSTEM AND METHOD FOR CLASSIFYING ACCORDING TO TONAL VARIATIONS.
This invention relates to machine sensing systems and a method therefor, and more particularly to a method of in process inspection of a decorative tone of a workpiece such as a ceramic tile.
One known process for manufacturing ceramic tiles from raw materials requires ceramic particulates of different grain sizes and binding agents to be provided in a given proportion one relative to another. These materials are then mixed together and moulded into various shapes of tile product. The shaped tiles are then fired in a kiln to produce the finished tile. The decorative pattern of the tile may be formed by the random mixture of the ceramic particulates different grain sizes and colour where the amounts of the particulates are in a given proportion. Because of the natural variations in the raw materials and the mixing process, there may be some variation in the overall colour and pattern in one tile relative to the next. Therefore, it is advantageous for the manufacturer to ensure a consistency of tile product, to inspect the finished tile for a quality referred to as its "tone".
The tone of a tile surface is a subjective judgement related to the overall colour and granule distribution of the tile surface. In the case of the tile user (such as a building contractor) who lays tiles on a floor and/or wall, it is usual for these tiles on the wall or floor should have the same tone. Otherwise, odd tiles which have a different tone can spoil a uniform effect of a wall or floor. Accordingly, during manufacture of a tile the manufacturer inspects the finished tiles and those tiles of a similar tone are grouped together so that they can be packed into boxes marked with the designation of that particular tone.
It should be noted that this is not the case for all types of tile. For example, some producers of "stonalizzate" tiles prefer to control the distribution of tones in a given box, rather than filling the entire box with the same tone, hi either case, an objective measure of the tone is required.
Furthermore, once it is known that a given tile recipe tends to produce tiles in certain known tones, such information can be used by the tile manufacturer to produce tiles of a given tone. This is particularly advantageous for fulfilling repeat orders for customers who require tiles to match an existing floor or wall. However, sorting is known to be effected manually and relies entirely on the vision of the person making a selection of the tiles.
Traditionally, colour quality is manually assessed by visual comparison of a product sample against a reference object, with the associated problems of subjectivity and variability in human performance. Colour perception is a subjective emanation of the neurology of the eye and brain, and is far from understood. For controlling colour in a production process it is important to establish an objective measure of colour differences from a given standard. To acquire raw data about the surface, a spectrometer will accurately determine the average spectral power distribution over a small area. However, for purposes of on line quality control, large surfaces of product or material must be examined as it is processed. A convenient method of acquiring colour information at high speeds over large areas is to use a CCD camera that provides R, G and B outputs. Multispectral sensors are appearing that provide a full color spectrum for each point in the image, although the current approach to processing such images is simply to adapt standard monochrome algorithms.
US Patent 5 809 165 discloses the use of colour imagery for inspecting the image of a tile. However, it is also known to carry out the inspection of the image using monochrome image information only, that is, statistical features of the monochrome image.
When colour images are examined by a technique called principal value decomposition it has been observed that the principal image axis describes granularity and other textural structure in the image together with the average colour which is in effect a weighted monochrome image. A secondary axis has the maximum deviation from the average colour, and in this sense contains the colour information. There is also a third minor axis which usually corresponds to random noise in the image. The ratio of
the variances along the principal, secondary and minor axes is typically 4000:300:40 grey levels squared, suggesting strongly that it is the principal, weighted greyscale, axis that is by far the most important.
There are also signal-to-noise considerations to be made with colour imaging.
Colour linescan cameras are significantly more noisy than the best greyscale cameras, which use time-delay integration (TDI) methods to improve their signal-to-noise ratio enormously. Colour TDI cameras have not appeared commercially in volume yet. It can be argued that the signal-to-noise ratio can be improved enormously when averaging over a large number of pixels as is done with the TDI camera. However, the variance of the pixel values in the image cannot be improved so vastly in this way.
This can best be illustrated using an example. TDI cameras average approximately 100 times. For every pixel, the camera samples the same footprint of the object and the signal-to-noise ratio is thereby improved by a factor of 10 (the square root of the number of samples). After the image has been produced by the camera, if we were to take the average grey level of the whole image, the signal-to-noise ratio may be improved by a factor of 1000 in the case where there are 1000 x 1000 pixels in the image. Hence, the variance will be improved only by the original factor of 10.
Thus, the signal-to-noise ratio of the average value of grey levels and the variance can be improved using a TDI camera. Conventionally, for cameras other than TDI cameras, the variance will always deteriorate in the presence of noise.
The characteristics of the surface illumination also play a crucial role in colour imaging. Greyscale image inspection systems require the intensity of the light source to be stable with time. Colour systems require both the intensity and the spectral distribution to be stable. If the spectral distribution of the illumination changes, the colour of the observed surface will seem to change. This effect is known as metamerism, and its consequences are well known in the retail industry, where for example, a pair of garments that appear to match well under the artificial fluorescent illumination of the high-street store, appear to have different colours in natural daylight.
This problem gave rise to a method of evaluating fluorescent lighting known as the Colour Rendering Index (CRI). Natural daylight has a maximum CRI of 100. Fluorescent tubes are available that can give CRIs approaching the maximum, by using carefully matched phosphors. However, fluorescent tubes have spectra consisting of a series of peaks or spikes, while natural light has a continuous spectrum. Even tubes with a CRI of 100 do not produce the equivalent of natural daylight. Furthermore, the characteristics of the illumination used in a machine vision system will change with time as the light source degrades. There is a great deal of ongoing research at present into colour constancy techniques that are intended to restore the correct colour. Although human vision performs colour constancy very well, there is no machine vision algorithm that is comparable. Recent research (Funt et al., 1998) has shown that there is no known colour constancy algorithm that can perform well enough for the object recognition.
In practice, a ceramic tile inspection system typically looks for textural variations as well as variations in tone. Colour change is a gradual process that projects on to the greyscale image: a change in colour tends to correlate with a change in grey level. Theoretically certain changes in colour can occur that are indistinguishable in the greyscale image, however in practical application this is extremely rare. In all other cases a change in colour always correlates with a change in grey level.
Therefore, although at first sight it appears that colour imaging ought to give a significant advantage over monochrome, this is not in practice the case. Monochrome systems have higher signal-to-noise ratios, illumination that is easier to control and require far less memory and computational power. For practical purposes this means that a well designed monochrome machine vision inspection system is faster, more reliable and more cost effective than its colour counterpart.
An automated image inspection system should allow rapid set-up and training procedures, ideally in a 'teach by showing' mode. Direct pixel comparison between a reference image and the sample under inspection is often impractical due to the need for precise positioning and registration, and because the materials may have naturally
occurring random patterns. The technique must also be rapid enough for real-time operation. In this context, real time means the processing of a 2k by 2k pixel image area, with 24-bit colour resolution (3x8-bits) in a time period of 500 ms. Its measure must be tolerant of the factory environment, of inaccurate placement and registration of the sample tile, of progressive changes in the illumination intensity and spectrum as the light source degrades, and of small changes in the magnification factor of the camera lens.
An automated system that attempted to mimic the traditional method of visual differencing would require a high registration accuracy between the reference image and each of the samples. The principle would not be applicable at all where the product has a naturally occurring random pattern. Commercial systems for on-line automated visual inspection are becoming available. Such systems operate on the color histogram, which is a statistical summary of colour distribution and is not critically sensitive to object translation, rotation, magnification, occlusion or changes in view angle.
For practical purposes however to implement an effective metric a large amount of data is required which is unmanageable in real time and it was necessary to devise an adequate feature extraction mechanism with an acceptable dimensionality.
The present invention is not limited to TDI monochrome systems. Aspects of the invention may, instead, include a non-tdi colour system. In such cases, additional analysis is required to reduce the effects of noise. The analysis uses principal value decomposition (PND) to represent a sample image on a principle, a secondary and a minor axis. As discussed below in further detail, the effects of noise in the principal and secondary axes can be reduced using the representation of the minor axis.
According to a first aspect of the present invention there is provided a method of classifying workpieces according to their tonal variations, said method comprising capturing an electronic image of a workpiece, analysing said electronic image to derive a histogram of tonal variations in the image, and deriving a numerical representation of
the tonal variations in said workpieces by use of an algorithm operative upon statistics derived from said histogram.
In one embodiment in accordance with the present invention there may be provided a method of inspecting the surface tone of a workpiece, comprising moving the workpiece by moving means past a workstation, capturing the electrical image utilising image retaining means mounted on the workstation, storing the image of the workpiece in a control processor and utilising the control processor to compute the equation
255 r=∑ (z + l)Λ2*E|Y|Λ2. ι'=0 so as to determine the textone feature T of the workpiece, P representing the probability of occurrence, and comparing the resulting workpiece textone with a predetermined stored textone so as to determine the similarities between textones and thereby ensure the workpiece is directed to a specific collection point in which all workpieces with the same substantially identical textones are collected.
In another embodiment in accordance with the present invention the method requires detecting the presence of the workpiece prior to collection of the electrical image by the image retaining means.
The method preferably comprises computing the mean and variance features of a region of interest of the workpiece and utilising the results to assist in computing the textone feature of the region of interest.
In an alternative embodiment a histogram may be generated. Conveniently the histogram is indexed from 0 to 255.
A further embodiment may require passing the image data signals to a digital high-pass filter.
In yet a further embodiment the method can comprise computing, for each picture element (pixel) of the region of interest, a convolution of that region surrounding the pixel with a given mask matrix. Conveniently, the convolution may give a numerical result in the range -255 to 255.
An embodiment in accordance with the present invention may include computing of an estimator of the histogram.
A method in accordance with the present invention may comprise locating the appropriate estimator by computing a second moment of the probability distribution corresponding to the histogram.
In another embodiment in accordance with the present invention the method requires estimating the probability of occurrence P[i] for each element by dividing H[i] by the total histogram mass M, where M is computed by
Preferably, the probability of occurrence of pixels occurs at locations of zero brightness gradient.
Embodiments of the method of the invention may include examining the image using principal value decomposition, preferably to represent the image on a principal, a secondary and a minor axis.
Preferably, a histogram is generated of each of said axes.
More preferably, embodiments of the present invention include deconvolving the histogram of the principal and/or secondary axis with the histogram of the minor axis.
An embodiment according to the present invention may include generating a histogram of the relative hue in the image.
More particularly, the method may include generating a description of the colour at a point in the image by the following triplet:
Jret = (y - )
Hrel = = tan-] (^^) -
where Ireι, Hrel and Sreι represent intensity, hue and saturation, respectively, relative to the principal axes.
Preferably, the embodiments of the method include generating a distance measure between a set of reference histograms and a set of histograms obtained from the workpiece to classify workpieces of a particular textone or range of textones.
More preferably, the measure is formed by taking the RMS difference between the set of reference histograms and the set of histograms of the workpiece.
Embodiments of the method of the invention may also include creating parameter thresholds defining a set of workpieces of a common type comprising repeating the method according to the first aspect of the invention for each of a sample set of workpieces and setting upper and lower parameter bands from the numerical representation so derived.
According to a second aspect of the present invention there is provided a machine sensing system comprising capturing means for obtaining an electronic image of a workpiece, analysing means for analysing said electronic image to derive a histogram of tonal variations in the image, and means for deriving a numerical
representation of the tonal variations in said workpiece by use of an algorithm operative upon probabilities.
In one embodiment in accordance with the present invention there may be provided a machine sensing system, comprising means for moving a workpiece past a work station, image retaining means mounted on the workstation for capturing an electrical image of the workpiece, control processor means for storing the electrical image of the workpiece and for computing the equation
255
T = ∑ (i + l)A2*P\i]Λ2.
(=0 so as to determine the textone feature T of the workpiece, P representing the probability of occurrence, and comparator means for comparing the workpiece textone with a predetermined stored textone so as to determine similarities between textones and thereby ensure the workpieces are directed to a specific collection point in which workpieces having substantially identical textones are collected.
In another embodiment in accordance with the present invention the system comprises detecting means for detecting the presence of a workpiece in the field of view of the image retaining means.
Preferably, there may be provided computing means in the central processor for computing the mean and variance features of a region of interest of the workpiece and utilising the results to assist in computing the textone feature of the region of interest.
Conveniently, means are provided for generating a histogram which may be indexed from 0 to 255.
In an alternative embodiment in accordance with the present invention there is provided a digital high-pass filter through which image data signals are arranged to pass.
Means may be provided for computing each picture element of the region of interest, a convolution of a region surrounding the pixel with a given mask matrix. Conveniently, the convolution gives a numerical result in the range -255 to 255.
Means may also be provided for computing an estimator of the histogram.
An appropriate estimator can be located by computing a second moment of the probability distribution corresponding to the histogram.
Furthermore, means can be provided for estimating the probability of occurrence P[i] for each element by dividing H[i] by the total histogram mass M, where M is computed by
255
M = ∑H[i\ .
(=0
Embodiments of the system of the invention may include means for examining the image using principal value decomposition, and preferably further including means for representing the image on a principal, a secondary and a minor axis.
Means for generating a histogram of each of said axes may be provided.
More preferably, embodiments of the present invention may include means for deconvolving the histogram of the principal and/or secondary axis with the histogram of the minor axis.
An embodiment according to the present invention may include means for generating a histogram of the relative hue in the image.
More particularly, the system may include means for generating a description of the colour at a point in the image by the following triplet:
Irei = (y - y)
Hrel = δ = tm ^-) w - w
where Ireι, Hrel and Sreι represent intensity, hue and saturation, respectively, relative to the principal axes.
Preferably, the embodiments of the system include generating a distance measure between a set of reference histograms and a set of histograms obtained from the workpiece to classify workpieces of a particular textone or range of textones.
In more preferred embodiments, the measure is formed by taking the RMS difference between the set of reference histograms and the set of histograms of the workpiece.
Embodiments of the system of the invention may also include means for creating parameter thresholds defining a set of workpieces of a common type comprising the system according to the second aspect of the invention and means for setting upper and lower parameter bands from the numerical representation so derived.
According to a third aspect of the present invention there is provided an apparatus for inspecting tonal variations in a workpiece, comprising capturing means for capturing an electronic image of a workpiece, analysing means for analysing said electronic image to derive a histogram of tonal variations in the image, and deriving means for deriving a numerical representation of the tonal variations in said workpiece by use of an algorithm operative upon probabilities derived from said histogram.
In a further embodiment there is provided an apparatus for inspecting the surface tone of a workpiece, comprising means for moving a workpiece past a work station, image retaining means mounted on the workstation for creating an electrical
image of the workpiece, control processor means for storing the electrical image of the workpiece and for computing the equation
so as to determine the textone feature T of the workpiece, P representing the probability of occurrence, and comparator means for comparing the workpiece textone with a predetermined stored textone so as to determine similarities between textones and thereby ensure the workpiece is directed to a specific collection point in which all workpieces of the same substantially identical textones are collected.
Embodiments of the apparatus of the invention may include means for examining the image using principal value decomposition, and preferably further including means for representing the image on a principal, a secondary and a minor axis.
Means for generating a histogram of each of said axes may be provided.
More preferably, embodiments of the present invention may include means for deconvolving the histogram of the principal and/or secondary axis with the histogram of the minor axis.
An embodiment according to the present invention may include means for generating a histogram of the relative hue in the image.
More particularly, the apparatus may include means for generating a description of the colour at a point in the image by the following triplet:
Jrei = (y - y)
Hrel = δ = ta - ^-^-) w -w
where I
rel, H
reι and S
reι represent intensity, hue and saturation, respectively, relative to the principal axes.
Preferably, the embodiments of the apparatus include generating a distance measure between a set of reference histograms and a set of histograms obtained from the workpiece to classify workpieces of a particular textone or range of textones.
In more preferred embodiments, the measure is formed by taking the RMS difference between the set of reference histograms and the set of histograms of the workpiece.
Embodiments of the apparatus of the invention may also include means for creating parameter thresholds defining a set of workpieces of a common type comprising the apparatus according to the third aspect of the invention and means for setting upper and lower parameter bands from the numerical representation so derived.
Embodiments in accordance with the present invention will now be described by way of example with reference to the accompanying drawings, in which: Figure 1 is a diagrammatic side elevational view of an apparatus in accordance with the present invention;
Figure 2 is a diagrammatic flow diagram for use in the computation of a text and feature;
Figure 3 illustrates a typical mask matrix defining a high pass filter; Figure 4 illustrates use of an alternative relative HIS (Hue Saturation Intensity) coordinate system in accordance with the present invention;
Figure 5 illustrates polar plots of hue against saturation conventionally, and relative to the principal axes;
Figure 6 and 7 show histograms corresponding to the relative axes of the polar plots of Figure 5; and
Figures 8 and 9 show 2-dimensional plots corresponding to Figures 6 and 7.
Referring to the drawings, Figure 1 shows a machine sensing apparatus 1 for use in a machine sensing system. The apparatus comprises an elongate conveyor belt 2 on which a rectangular workpiece 3, such as a ceramic tile, is conveyed from one end 4 of the conveyor belt to an opposite end 5 at which is located a shaft encoder 6 for controlling the speed at which the conveyor belt moves.
A support gantry 7 supports a camera 8 above and spaced from the conveyor belt 2. A sensor 9 is also supported by the support gantry 7 above and spaced from the conveyor belt 2 to allow at least one ceramic tile on the conveyor belt to pass beneath the sensor.
The shaft encoder 6, camera 8 and sensor 9 are all arranged to generate electrical digital signals which are fed to a control processor 10. Each of these devices are electrically connected to the central processor by standard electrical circuit connections which are not shown to more clearly illustrate the invention.
When a workpiece 3 is moved from one end 4 towards opposite end 5 of the conveyor belt 2, the presence of the workpiece is detected initially by the sensor 9 when the workpiece 3 enters the field of the viewing range of the camera 8.
The workpiece 3 continues to move through the field of view of the camera 8 and the control processor 10 instructs the camera to acquire an image of the workpiece. The camera 8 operates to achieve such image and sends the image data to the control processor 10 where that image is stored in the memory of the control processor 10.
Three features of a rectangular portion of the image bounded by the tile edges are obtained using algorithms stored in the control processor 10.
The three features are utilised by the control processor 10 to determine the tone of the surface of the workpiece in a manner which approximates human judgement. The control processor generates a tone decision signal which is then transmitted to a standard ancillary sorting apparatus (not shown) so that the workpiece under
investigation is directed to a particular one of several workpiece bins where all workpieces having the same tone are collected.
The image boundary of the workpiece stored in the memory of the control processor is represented in Figure 2 by the reference number 20 and the image of interest is presented by the boundary line 24.
The image 20 comprises a rectangular array of integers in a range 0 to 255 representing the brightness of the image. Each integer is known more commonly as a "pixel". The three features of the image which are obtained by the control processor 10 are (a) the mean value, (b) the variance of tone, and (c) the textone of the rectangular portion 22 of the workpiece image defined by the external edges of the workpiece. Such rectangular portion 22 is referred to as "the region of interest", but in reality the region of interest is inset from the edges of the workpiece by 3% of the external workpiece dimensions, as shown by the rectangular line 24 in Figure 2, so that unpredictable reflectance effects from the edges of the workpiece are avoided.
The mean 26 and variance 28 of the region of interest are obtained using techniques which are well known to any competent practitioner versed in image processing techniques.
However, the textone 30 is obtained differently as follows:
Initially there is provided a graphical representation of the light frequency distribution utilizing abutting rectangles in which (a) the width of each rectangle is equal to that of each category and (b) the height is proportional to the frequency in each interval so that each rectangle represents its class frequency. That is, a histogram is produced which is indexed from 0 to 255 (i.e. across the range of resolution of that brightness, hue, saturation or derived parameter) over the region of interest of the workpiece image. It will be clear to those skilled in the art that embodiments of the invention may equally be applied to other levels of resolution.
A digital high-pass filter, such as that illustrated in Figure 3, is applied to each pixel of the region of interest so that a convolution of a region surrounding the pixel with a given mask matrix can be computed by the control processor as illustrated at 32 in Figure 2. This convolution gives a numerical result in the range -255 to 255. The absolute value of this result is taken and the frequency of this result is tabulated in a histogram, as illustrated at 34 in the flow diagram of Figure 2.
Therefore, once each pixel of the region of interest has been processed in the same manner the final result will be a histogram describing the frequency of the occurrence of the absolute value of the high pass filtered pixels.
The characteristics of the high pass filter are determined by the values of said mask matrix, and are illustrated in Figure 3.
Next, an estimator in the form of a probability distribution 36 of the histogram is obtained. Since the histogram of the high-pass-filter image describes an exponential distribution, the appropriate estimator is obtained by computing the second moment 38 of the probability distribution 36 corresponding to the histogram. Each element of the probability distribution P[i] can be adequately estimated by dividing H(i) by the total mass of the total histogram mass M, where M is calculated as:-
255
M = ∑H[i] ι'=0
Given probability of occurrence P, the second moment T is defined by the equation
255 r = ∑ (t + l)Λ2*P[t]Λ2. ι=0
In the second of these two equations the value T defines the textone feature and the appearance in the equation of the value (i + 1) is because P[0] describes the probability of the occurrence of pixels at locations of zero brightness gradient. Such information is significant and is therefore taken into account by a non-zero coefficient
when index i = 0. A suitable computer program is preferably used to compute the equation. Thus, the textone feature T may be seen as the second moment of the histogram of the high pass filtered image and provides both textual and tonal information.
The system may also be used for some aspects of surface defect detection (i.e. out of plane colours due to spots of glaze on the tile, spots due to impurities or contaminants, smears, stains or non-uniformities in the colour). However, this approach may not be directly based on the histograms. It may be more advantageous to project the red, green and blue planes of the colour image onto their principal components and use the secondary (and perhaps tertiary) images to search for defects.
The mean 26, variance 28 and textone 30 features are used to model the tone of the workpiece 3. This is used in several possible embodiments.
A first embodiment measures the features of two standard reference samples of different tones, called master tiles. These features are stored in the control processor 10. At a subsequent time during production, the control processor compares the features measured from each workpiece with the stored features using a simple Euclidian distance metric. The tone of the workpiece is assigned from the tone of the master tile it most closely resembles according to the distance metric.
A second embodiment measures the features of tiles being produced and computes a trend of the feature values. Measurements that are significantly deviant from the trend (say more than 2.5 standard deviations) are assigned to an alternative tone class.
A colour and multispectral quality control metric for planar objects has been developed, based on a set of 1 -dimensional histograms obtained using principal value decomposition. A known good standard object (or set of such standards) must be available, the histograms of which are compared with those of the sample under inspection, hi a sense, the use of reference and sample histograms is a generalised form
of visual comparison that operates on the colour histogram rather than in the spatial domain. Histograms are insensitive to changes in rotation, translation and (to some extent) scaling of the object under inspection. Histograms are a statistical summary of the distribution of colours in an image, and are therefore also insensitive to any inherent randomness in spatial patterns. This is an enormous advantage when evaluating the colour quality of objects consisting of naturally occurring substances such as ceramics, stone or organic material.
The availability of a standard object considerably restricts the problem domain - it is only required to obtain the degree of difference between the sample and reference histograms. Using the average grey levels of each spectral channel of the standard object, the histograms of the object under test can be easily preprocessed in order to normalise for any degradation in the light source during the working life of the inspection equipment. The existence of reference objects also means that it is possible to have an off-line training phase, where the time to train the system is not of critical importance. Real-time implementation is straightforward due to the relatively low numerical effort required to produce the sample histograms and to compare them with the reference.
The advantage of principal value decomposition is that it optimises the use of information permitting an n-dimensional multispectral histogram to be reduced in dimensionality to n, 1- dimensional histograms. Execution time for the comparison is not affected by the complexity of the design; the more intricate the design, the more applicable the method becomes. Principal value decomposition forces the bulk of the information into a major component or axis, which can be shown to be guaranteed to have the largest variance of all possible axes. The minor axes tend to contain random noise only. The histogram of the minor axis is therefore the histogram of the noise component of the original image. A further advantage of the histogram based approach, together with principal value decomposition, is that random noise due to thermal, electrical and other effects can be reduced by deconvolution with the noise histogram.
It was shown that the 1-d histograms generated in practice are theoretically composed of an idealised noise-free histogram, convolved with the histogram of the noise component. It was observed that principal value decomposition concentrates the noise into the minor component. The minor histogram therefore conveniently tends to describe the noise histogram only. Given a histogram of a noisy image and the histogram of the noise component, it is theoretically possible to carry out the inverse process of deconvolution, resulting in the extraction of the noise-free histogram. In practice much detail can be enhanced, provided that the deconvolution is performed over a limited bandwidth.
A distance measure may be formed by taking the RMS difference between a set of reference histograms, and a set of histograms obtained from incoming sample images, all referred to the principal axes of the reference image. An analytic model of a gaussian multispectral data space and its consequent metrics has been derived. The model shows that the minor axis gives the largest metric magnitude of all axes. This is noteworthy because the standard approach to principal component analysis is to ignore the more minor axes. However for the purposes of quality control, the minor axis is effectively a null channel, and is therefore particularly sensitive. In tests on commercially produced ceramic tiles, the method has been demonstrated to be able to distinguish between tiles of different grades and to some extent between different tiles of the same grade, using a standard CCD (charge coupled device) colour camera.
The model was compared against experimental results for optical transmission via cyan, magenta and yellow bandpass filters. There was broad agreement between the predicted and actual results, including the case of cyan filtering where ev cya">ew cyan. The numerical magnitudes of the predicted measures are 23-30% higher than those observed in practice, probably because the volumes of the model are concentrated in the form of a gaussian, where in reality the space is filled in a less orderly fashion. This is confirmed by the shapes of the real 1 -dimensional histograms obtained. The exceptional case of cyan filtering is predicted by the gaussian model, indicating that it is not a spurious effect of the actual 3-d histogram obtained in practice.
The behaviour of the metric in the presence of noise was explored theoretically and a comparison made with the practical case. In the theoretical approximation and practical observations, the effect of noise reduces as the sample histogram approaches the reference. This is because gaussian noise on the original spectral channels is mapped via the distance metric function into a distorted profile. In the examples given, the distance function is dominated by a decaying exponential as the sample approaches the reference, and the noise therefore takes the profile of a skewed gaussian.
The model was used to investigate the sensitivity of the multispectral metric as the image changes. A simplified case was chosen where the reference and sample images had a variation in their red component. The model indicates that the sensitivity of the metric is at its greatest when the characteristics of the sample image are at their closest to those of the reference image. If the sample image is grossly different to the reference, the magnitude of the metric is high, but the sensitivity is image dependent. In these cases, there may be regions in the sample image characteristics where the metric sensitivity is zero. Signal to noise ratio is maximised in these regions, although small relative changes in the sample will not be detected.
These conditions would occur in practice when the reference and sample tiles are of different designs, for example. The metric would clearly indicate that there is a gross difference, but would not reliably show subtle changes in the sample tile because the reference would be inappropriate. Under the more realistic conditions where the sample tile is of a different instance or grade of the same design as the sample, the metric is at its most sensitive. In a practical system it is straightforward to store the histograms of a range of references, and automatically to switch between them, depending on the set of gross magnitudes of the error values, which would imply the type of sample tile.
Thus, it is possible to use the deconvolved histograms in the usual manner to form a multispectral distance metric. This appears to reduce the effect of noise on the error metric considerably. Points that are ordinarily separated by noise tend to cluster
more closely together, whilst points that correspond to differences due to the actual surface under inspection maintain their separation.
The RMS measure of the differences between two sets of histograms may be used but, in practice, it is advantageous to extract statistics directly from the histogram of the object under test and compare these to reference statistics obtained during training, rather than directly measuring the difference between the histograms themselves.
A further application of principal value decomposition was to enable the specification of a set of ideal optical filter characteristics that maximise the information extracted from a surface. The characteristics are obtained from the principal components of a set of spectra. Although these components have positive and negative components, these can be separated and recombined after detection, by standard electronics. The PND histograms can therefore be produced in real time directly from this output.
Generating the filter characteristics requires large (say, 1024x1024) co variance matrices. Although these are only used to specify the optical filters and are then discarded, a moderately large amount of numerical processing is required if standard principal component analysis is employed. An alternative approach to generating the first few components is described that considerably reduces the amount of calculation.
It is useful to have information about the direction of the colour change as well as its magnitude. The histograms are rich in information and this includes directional information. A sensitive description of the colour at a point in the image can be obtained by the following triplet:
Jrei = (y - y)
y-y Hrel = δ = ^ ( =-) w - w
This is a colour coordinate system that is relative to the principal axes. The information content is optimised because v and w are selected in order to maximise the variance of the data along these orthogonal axes.
The significance of (Ireι, δ, Srei) can be compared with the standard (/, θ, S). The grey line (/axis) of HIS consists of the line linking black to white, along which r = g = b. In the case of relative HIS, the Ireι axis is a vector in r, g, b space, representing the principal component:
u = en r + e12 g - e13 b
where ey's are the eigenvector coefficients of the principal value transformation matrix.
Lei = (y-y) is therefore a biased form of the grey line, optimally weighted to the average colour of the image.
Hreι~ δ is the hue angle as defined by the principal axes. It is not directly related to the hue angle #in standard HSI coordinates. A change in δ generally represents a change in θ, S and (to a lesser extent) I.
S,e/is the distance in terms of the principal axes of a given r, g, b triplet, and the y axis. Sreι is therefore the relative saturation with respect to the y axis.
It is readily possible to transform from (Ireι, δ, Sreι) to (/, θ, S) to represent the direction of the colour change in the standard format.
The range of the absolute hue angle in the HIS system is restricted to the angle subtended on the grey line by the r, g, b cluster, which may be small. However, in the case of (Ireι, δ, Srei), the range of the relative hue angle is always -π to -he. The Ireι axis therefore has a higher dynamic range than the / axis.
For a colour space that lies slightly off the grey line, the dynamic range of Sreι may be less than that of S. The reason for this can be seen from Figure 4. Because the v and w axes are orthogonal to the principal axis, the relative saturation is likely to have a higher symmetry than the absolute saturation. Another way of interpreting this is to say that the v and w axes are always oriented such that the maximum value of Sreι is minimised. The m and n axes used for the standard HIS representation slice through the data space at an arbitrary angel. The section through the data space is therefore likely to be elliptical, whereas the section cut by the v and w axes is likely to be more circular. Thus, data is transformed into a representation facilitating identification of more subtle outlier data, such as due to impurities on the tile surface that give rise to discolorations or coloured spots.
Figure 5 is a set of plots (in polar coordinates) of corresponding (Ireι, δ, Sreι) and (I, θ, S) for typical values of r, g, b found in commercial tile products (the upper plot is based on conventional hue and saturation and the lower plot is the same data using relative hue and saturation). The r, g, b triplets are clustered closely together, and this is indicated in the (I, θ, S) values which are also close together. However, the (Ireι, δ, Srei values show large changes in relative hue, δ, indicating that the advantage of (Ireι, δ, Srei) compared to (I, θ, S) is that the method is much more sensitive to small changes in colour because there is greater separation between the points.
The HSI and PND histograms of a particular coloured tile are shown in Figures 6 and 7, respectively. It can be seen that the dynamic ranges of the relative measures are much greater than that of the absolute HSI measures. Figure 8 shows a 2- dimensional plot of the histogram of the M and Ν axes of HSI (corresponding to the standard representation of colour). A similarly displayed histogram based on the N and W axes is shown in Figure 9. There are five local maxima present in the NW plot, corresponding to the four colours present in the image, and a spike due to the presence of saturation at maximum white. The linear feature between the main cluster and the spike correspond to various unsaturated (uncoloured) levels of grey.
The features are difficult to distinguish in the MN plot, which also has a chequerboard-pattern artefact due to the non-linear characteristics of the frame store. This artefact is not seen in the VW plot (although it is still present), in part because the HSI-based transform occupies a smaller region than the PND-based transform and is therefore plotted at greater resolution, and in part because the PND transform tends to smooth the data more successfully then the transformation to HSI axes. In geometrical terms, the PND-based VW histogram is projected on to an optimum plane that maximises the spread of its constituent clusters. If required, the PVD projection is therefore optimised for colour segmentation using classical pattern recognition algorithms.
For images where the minor PND axis describes noise, the implication is that the colour histogram is essentially planar. PVD is guaranteed to find any plane in which the histogram lies, however the HSI axes (or any other transform) is fixed as the plane changes, and the result is therefore arbitrary. For planar histograms, the minor axis contains no useful information and can therefore be discarded. In this case the two major axes can be plotted if required. Along the U axis there are two 'arms' which, when projected on to the N axis tend to be smoothed out. However, after deconvolution, the bimodal projection can be restored.
A colour and multispectral quality control metric could be based on 2- dimensional histograms in an analogous way to the 1 -dimensional metrics described earlier. It is clear that more detail is likely to be available in the 2-dimensional projection than a 1 -dimensional projection. However the 2-dimensional case requires significantly greater memory and processing time (the square of the 1 -dimensional case). In a practical quality control system there is therefore a tradeoff between quality resolution, speed and memory requirement. In practice it was found that the 1- dimensional method was able to distinguish between tiles of different grades.
Therefore, there has been disclosed herein a method and apparatus in accordance with the present invention in which the control processor is a stand alone, or also in which the control processor is connected to a supervisory controller.
Although particularly suited to determining the tone grading of ceramic tiles, the method of the present invention can be applied to determining the tone grading of other flat materials such as wood, metal, plastics, composites and glasses, wherein the workpiece is transported past the apparatus on a conveyor belt.
Though the invention has been shown and described with respect to exemplary embodiments thereof, various other changes, omissions and additions in the form and detail thereof may be made therein without departing from the scope of the invention.