Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DUAL SENSITIVITY BROWSER FOR SORTING MACHINES
Document Type and Number:
WIPO Patent Application WO/2012/004550
Kind Code:
A1
Abstract:
Inspection apparatus comprises a feed system for delivering a stream of articles to an imaging zone (6). A camera (10) generates image data from the stream at the imaging zone for processing by a computer (12). The computer (12) comprises a pattern recognition system for identifying defects, and for ranking identified defects. The computer (12) is coupled to a graphical user interface to display such areas as thumbnails on the interface. The thumbnails are displayed in a space defined by at least two related defect criteria. Each thumbnail is located on a locus defined by the severity of the respective defect, and its displayed position on the locus is determined by a rule. The locus will normally trace the points in the space at which the thumbnail is classified as a defect.

Inventors:
HAMID GABRIEL (GB)
Application Number:
PCT/GB2011/000883
Publication Date:
January 12, 2012
Filing Date:
June 13, 2011
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
BUHLER SORTEX LTD (GB)
HAMID GABRIEL (GB)
International Classes:
B07C5/342; B07C5/36; G06Q10/00
Domestic Patent References:
WO1998018574A11998-05-07
WO2011007118A12011-01-20
WO2011007117A12011-01-20
WO2004024350A12004-03-25
Foreign References:
DE4417015A11995-11-16
US20050273720A12005-12-08
DE4419461A11995-12-07
US20040032979A12004-02-19
EP0838274A21998-04-29
GB0912388A2009-07-16
GB0912390A2009-07-16
EP0645727A21995-03-29
US3636513A1972-01-18
US3638188A1972-01-25
US7424146B22008-09-09
US20050273720A12005-12-08
GB2452164A2009-02-25
US7298870B22007-11-20
GB0912390A2009-07-16
Other References:
M. JONES, J. REHG, IEEE COMPUTER SOCIETY CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION, vol. 1, 1999, pages 1 - 280
Attorney, Agent or Firm:
HITCHCOCK, Esmond Antony (90 Long Acre, London WC2E 9RA, GB)
Download PDF:
Claims:
CLAIMS

1. Inspection apparatus comprising a feed system for delivering a stream of articles to an imaging zone; a camera for generating image data from a said stream at the imaging zone; and a computer for processing image data from the camera, which computer comprises a pattern recognition system for identifying defects in areas from the image data and for ranking identified defects; and wherein the computer is coupled to a graphical user interface to display said areas as thumbnails on the interface in a space defined by at least two related defect criteria, each thumbnail being located on a locus which traces the points in the space at which the thumbnail is classified as a defect, and its displayed position on the locus being determined by a rule.

2. Apparatus according to Claim 1 wherein the graphical user interface is adapted to display thresholds in each of said criteria.

3. Apparatus according to Claim 2 wherein the rule locates each thumbnail at the point on the locus at which the sum of the distances from the threshold levels is maximum with the point further from a selected threshold being chosen if said sum is the same at more than one point.

4. Apparatus according to Claim 2 wherein the rule locates each thumbnail at the point on the locus at which the distance from a chosen point in the space is a maximum.

5. Apparatus according to Claim 4 wherein the chosen point is the intersection of the lines defining the thresholds.

6. Apparatus according to Claim 2 wherein the rule locates each thumbnail at the point on the locus at which the distances from the thresholds satisfy a chosen formula.

7. Apparatus according to any preceding Claim wherein the pattern recognition system identifies defects only in said at least two related defect criteria.

8. Apparatus according to any of Claims 1 to 6 wherein the pattern recognition system identifies defects in at least two related criteria and another unrelated defect criterion.

9. A sorting machine including apparatus according to any preceding

Claim.

Description:
DUAL SENSITIVITY BROWSER FOR SORTING MACHINES

This invention relates to optical sorting machines, particularly for sorting bulk foodstuffs such as grain, rice, nuts, pulses, fruit and vegetables. Examples of such apparatus are described in International Patent Specification No. WO98/018574 and European Patent Specification No. 0 838 274, the disclosures whereof are hereby incorporated by reference. In machines of this type a stream of particles to be sorted is delivered in free flight to a sorting zone where articles to be removed are rejected by blasts of gas, normally air, from ejectors disposed adjacent the flight path. In such machines the required throughput is normally determined by the production rates elsewhere in a processing plant. Normally though, the required throughput is high, and measured in tonnes per hour.

Reference is also directed to our British Patent Application Nos: 0912388.6 and 0912390.2, and International Patent Publication Nos. WO2011/007118 and WO2011/0071 17, the disclosure whereof is incorporated by reference. The present invention is a development of the disclosure in Publication No: WO2011/007117.

Food producers use optical sorting machines to remove defects from the product stream so that the sorted product meets an agreed grade or quality standard, whilst maximising the total production yield. The quality standard usually specifies individual maximum levels of contamination for different types of defects. For example, in sorting rice the defects might be insect-damaged peck-grains, chalky grains and yellow grains, with maximum levels for these three contaminants, say: < 0.1% peck, < 1% chalky and < 0.2% yellow. Hence, in order to optimise the total yield the operator aims to set-up the sorting apparatus so that the sorted rice has concentrations of these contaminants just below the maximum permissible levels. As used herein, the term "defect" should be understood to include blemishes on articles being sorted and whole articles which are unsatisfactory for this or another reason, and includes foreign material or extraneous product.

Optical sorting machines identify defects in the product being sorted by using known techniques for continuously creating images of product in the stream at an imaging zone; and instructing the ejectors in accordance with defects identified in the images. Usually, each sorting criterion is targeted at a different type of defect. However, a specific sorting criterion may detect another type of defect, either because an article has more than one type of defect or because the sorting criteria are not wholly independent. For example, a sorting criterion for rice, designed to detect peck- grains may also identify some chalky and some yellow grains for removal. Furthermore, even though a particular criterion will typically identify the majority of one type of defect, it will also incorrectly classify some good product as defect. As the sensitivity of the sorting criterion is increased, more defects are removed. However, this is likely also to increase the proportion of good product that is removed.

Another factor that results in the unintentional removal of good product from the product stream is the density of the product in stream. At a reasonable throughput, a defective item is commonly surrounded by good product, and the action of the ejector does not achieve a perfect separation. In other words, when aiming at a defect acceptable articles are removed with the defective article. This can be the case even if the size of the ejector nozzle is smaller than the size of the articles being sorted. In order to ensure a defective article is rejected, the size of the gas blast, or the area of its intersection with the product stream, is extended to account for uncertainties in both the position and velocity of the defective article. This area can be extended by firing multiple ejectors simultaneously and/or extending the duration of the gas blast. The ejectors are normally disposed in an array extending laterally across one side of the product stream, so the area of intersection of the gas with the stream in such an arrangement is extended laterally by firing multiple ejectors, and longitudinally by extending the duration of the gas blast.

The above issues make it hard for an operator to optimise the setup of an individual sorting apparatus. It is not always clear which sorting criterion or criteria to adjust and if so, which parameters to alter and by how much, or whether to adjust the size of the area of intersection of gas blast with the product stream. The present invention seeks to facilitate such operation.

In the field of Computer Vision, it is a well-known technique to "back-project" the output of a Pattern Recognition System onto the original image data. For example, European Patent Specification No: 0645727 A2, incorporated by reference, describes an apparatus for highlighting (back-projecting) the areas in an x-ray image that have been identified by a computer-aided diagnostic system as suspected abnormalities.

It is also well-known within the field of Computer Vision, that a simple yet effective technique to fine-tune a pattern recognition system is to provide the operator with visual feedback of this back-projected data whilst one or more parameters of the pattern recognition system are adjusted; for example "Skin-Tool" described in the paper by M. Jones and J. Rehg in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1999, Volume 1, pages 1-280, incorporated by reference.

A pattern recognition system typically includes a feature extractor for extracting information, and a classifier for processing such information according to a given criterion. Such systems are described in US Patent Nos: 3,636,513 and 3,638,188, incorporated by reference. In a pattern recognition system the term "feature space" is used to define an abstract space in which a pattern sample is represented as a point in n-dimensional space. The number of dimensions is determined by the number of features under consideration.

In many industrial inspection and sorting tasks, there is often more than one type of defect. A well-known technique to aid the operator to fine-tune the identification of defects in such a case, is to display the images of the detected defects arranged in groups according to type, for example US 7,424,146, incorporated by reference, describes a graphical user interface which enables the operator to change one or more parameters and displays the subsequent change to the membership of the different groups.

In many sorting applications the required throughput is a given, and the tradeoff is between quality and yield. US Patent Application 2005/0273720 A1 , incorporated by reference, describes a utility for storing image data from a batch of production and enabling the operator to see what would be the effect of varying one or more parameters of the pattern recognition system in terms of the characteristics of defects identified (i.e. quality control) and the number of items rejected (i.e. yield).

In the field of food sorting machinery, British Patent Specification No: 2,452, 164A and US Patent No: 7,298,870, incorporated by reference, describe a graphical user interface for adjusting the thresholds of one or more sorting criteria whilst the operator views a display of a stored image, highlighting the position of the detected defects combined with the contour of the defective grain, and highlighting which ejectors fire at the grain.

The invention of Publication No: WO2011/0071 17 referred to above is directed at inspection apparatus that can be part of a sorting machine of the kind described above, or be used separately in the analysis of a product stream. The apparatus comprises a feed system for delivering a stream of articles to an imaging zone, and a camera for generating image data at the imaging zone. A computer processes image data from the camera. The computer comprises a pattern recognition system for identifying defects in areas from the image data and for ranking identified defects, the system being programmed to operate according to multiple defect criteria. The computer is coupled to a graphical user interface to display the areas from the image data as sub-images or thumbnails on the interface and arranged according to rank of the identified defects in the areas in each of at least two defect criteria. The areas from the generated image data will normally be defined around each identified defect with the defect central therein. These areas, or thumbnails, can overlap.

In one embodiment of the above apparatus the pattern recognition system comprises a feature extractor for extracting information from the image data, and a classifier for interpreting such information. Such a system can be used when one of the defect criteria is the shape or size and the thumbnail with a defect according to shape includes a silhouette of the respective defect or article.

The computer is normally programmed with a sensitivity level defining a qualifying ranking or threshold in each criterion, and to display said images in sequence with the qualifying rankings at the same level in the display. Normally the thumbnail derived from an article exhibiting defects in more than one criterion is displayed only in the sequence in which its rank is lower than it is in the at least one other criterion relative to its qualifying ranking, At least one of the sensitivity levels is preferably variable.

As does the apparatus of our earlier Application No: 0912390.2 referred to above, apparatus of the present invention comprises a feed system for delivering a stream of articles to an imaging zone; a camera for generating image data from the stream at the imaging zone; and a computer for processing image data from the camera. The computer comprises a pattern recognition system for identifying defects, and for ranking identified defects. The computer is coupled to a graphical user interface to display such areas as thumbnails on the interface. According to the present invention however, the thumbnails are displayed in a space defined by at least two related defect criteria. Each thumbnail is located on a locus defined by the severity of the respective defect, and its displayed position on the locus is determined by a rule. The locus will normally trace the points in the space at which the thumbnail is classified as a defect.

The space in which the thumbnails are displayed is an abstract space in which the axes are the parameters of the defect criteria that an operator can adjust via sensitivity levels. The locus traces the points in the space at which the respective thumbnail is classified as a defect if the qualifying rankings were to be set to intersect at that point. This space is referred to herein as the "sensitivity space". If the defect criteria are unrelated, such as features extracted by a feature extractor, the locus traces out a rectangular region. An obvious choice for the rule is to select the point on the locus that the thumbnail would be represented in the corresponding feature space.

The term "related defect criteria" refers to two or more criteria in which alteration of the threshold value of one criterion determines the rank of the defect according to the other criterion or criteria. Good examples of related criteria are defect size and intensity. A discolouration defect will typically vary in intensity over its extent, and its ranking in defect size will depend upon the qualifying level in intensity. This means that the thumbnail for an individual discolouration defect can be displayed on a two- dimensional matrix at different points depending upon its ranking in either criterion. Hence a representative thumbnail can be placed at different positions on a locus in the matrix of sensitivity space in which intensity is plotted against defect size. This can be extended to a three or more dimensional matrix if additional criteria, whether or not related, are considered. It will be appreciated that respective loci are created by ranking each defect according to each criteria at different sensitivity levels. If the defect criteria are related then the locus is not constrained to a rectangular region. The choice of the rule is not so obvious.

The rule applied in the use of apparatus of the invention is normally preset, and can be selected according to the function the apparatus is to perform. A simple way of arranging the thumbnails according to severity is to select the position on the locus at which the sum of the distances from that point to the respective qualifying ranking for each criterion is maximum. If there is more than one point on the locus at which that maximum sum is reached, then one of the criteria can be given priority so that it is the point on the locus at which the sum is maximum and the distance from the chosen threshold is greater. Another rule might be that the chosen point is that on the locus which is most distant from a chosen point in the matrix, which point might be the intersection of the lines defining the qualifying rankings or thresholds. More complex rules can of course be used to select the point at which a respective thumbnail is displayed, but normally this will be based on distances from the qualifying rankings or other levels satisfying a chosen formula.

Apparatus of the invention can of course take account of defects ranked according to independent criteria, and display thumbnails representing such defect areas. Again though, the operator can set priorities, and if an identified defect is ranked for display according to an unrelated criterion as well as according to related criteria, the operator can stipulate which ranking is displayed. The computer may be programmed to display the thumbnails representing defects in a multi-dimensional matrix in which the respective defect criteria are defined along different axes. The most simple form of such a matrix is two-dimensional as noted above, and a qualifying or threshold ranking sensitivity may be specified for each defect criterion. These threshold rankings can define clear, normally orthogonal boundaries within which thumbnails exhibiting qualifying defects will be displayed.

It will be appreciated that the two-dimensional matrix concept can be readily extended to three or more dimensions. By appropriate selection of axes and whether ascending or descending, the respective thresholds can define zones within which thumbnails bearing defects exceeding the defect criteria thresholds will be confined.

Apparatus according to the invention may be operated in such a way that the display on the graphical user interface includes thumbnails that do not exhibit defects. This can be accomplished by adjusting the sensitivity levels such that every article in the stream effectively constitutes or bears a defect. Apparatus in which the computer is programmed with sensitivity levels defining qualifying rankings may also be operated in such a way that the display on the interface shows only thumbnails with defects ranked below the qualifying rankings.

The present invention also includes modifications of the apparatus described above adapted to inspect webs of material for blemishes or other features perceptible by the camera. The feed system would of course be different, and the pattern recognition system adapted to identify defects on the web for display in thumbnails on the graphical user interface.

In apparatus according to the invention the computer will normally generate and process image data from the stream of articles without creating a visible image. However, the computer can also be coupled to the or another graphical user interface to generate such a visible image.

Apparatus according to the invention can be adapted to perform as a sorting machine by including a sorting zone downstream of the imaging zone, and ejectors at the sorting zone for selectively ejecting articles from the stream, typically by discharging gas (normally air) in pulses. The defect criteria are sorting criteria; and the computer is adapted to process image data from the camera and instruct the ejectors according to the sorting criteria.

In sorting apparatus using the present invention the pattern recognition system typically comprises a colour classifier for identifying pixels corresponding to potential defects in a said stream of articles and a spatial filter for determining whether the identified potential defect pixels warrant ejection of a respective article. Potential defects and potential defect pixels that warrant ejection of respective articles can be highlighted separately on the displayed image. The above and other features and advantages of the present invention will be apparent from the following description of the apparatus particularly described in our British Application No: 0912390.2, and an illustration of how it can be adapted according to the present invention. Reference will be made to the accompanying schematic drawings. In the drawings:

Figure 1 is a side view of an optical sorting machine of the kind disclosed in our International Patent Specification No: WO2004/024350;

Figure 2 illustrates details of the computer processing operation;

Figure 3 shows details of a particular pattern recognition system;

Figure 4 shows a portion of the graphical user interface illustrating two areas of intersection of a gas pulse with the product stream;

Figure 5 illustrates a display image of a product stream as it is shown by the graphical user interface;

Figure 6 illustrates a gallery of patches extracted from the display image of Figure 5;

Figure 7 shows a rearrangement of thumbnails from the stream image relative to a single sorting criterion;

Figure 8 shows a rearrangement of thumbnails from the same stream image as Figure 7, but extended to include a second sorting criterion;

Figure 9 lists the ranking of defects in a range of thumbnails from a stream image according to two different sorting criteria;

Figures 10a and 10b illustrate how alteration of sensitivity alters the overall ranking of a defect;

Figure 11 illustrates how thumbnails can be ranked according to the shape of an article therein;

Figure 12 illustrates two overlapping thumbnails;

Figure 13 illustrates a thumbnail with an additional severe defect shown;

Figure 14 illustrates a two-dimensional matrix with defect criteria corresponding to intensity of discolouration of a defect, and deformity of a product piece under inspection; and Figure 15 is a two-dimensional matrix showing defect criteria according to intensity of discolouration, and defect area.

As shown in Figure 1 , optical apparatus of the kind to which this invention relates has a feed mechanism comprising an infeed hopper assembly 2 and chute 4 for delivering a stream of articles to be sorted through an imaging zone 6 to a sorting zone 8. Line-scan cameras 10 generate image data from the imaging zone which passes to a computer 12 coupled to a graphical user interface 14. The computer 12 processes the image data to identify articles in the product stream to be removed, and so instructs an array 16 of ejectors to discharge pulses of air at the stream to deflect selected articles from the stream to a reject hopper 18. Product remaining in the stream continues into accept hopper 20. This manner of rejecting poor quality articles from a product stream is well known in the food processing industry. The line-scan cameras can be either visible or infra-red, ultra violet, X-ray, monochromatic or polychromatic.

The criterion or criteria that determine whether an article in the product stream bearing a particular defect is to be removed can be one or more of several alternatives, four of which are size, shape, spot and colour. The operator can control the performance of the apparatus by altering the defect parameters of the sorting criteria. The aim of the present invention is to provide the operator with useful guidance as to what such adjustments can or should be made.

Figure 2 illustrates some details of the computer 12 in Figure 1. It includes a memory 22, a processor 24 and a system controller 26. The processor 24 includes a pattern recognition system 29, and is adapted to apply a set of sorting criteria to image data received from the camera 10, for the purpose of detecting the location of defects. The processor also includes a selector 28 for generating the appropriate ejector data, and instructing the ejectors 16. The pattern recognition system 29 and the selector 28 operate according to defect parameters and ejection parameters respectively. These parameters are set by the system controller 26. Data generated at each stage of the processor 24 is passed to the system controller 26. In turn, the system controller 26 passes data to and from the graphical user interface 14. The operator of the apparatus can make adjustments to the defect parameters and the ejection parameters at the graphical user interface 14. The operator makes these adjustments in response to information provided at the graphical user interface 14.

The identification of defects according to a sorting criterion is implemented in two basic stages, namely a feature extractor and a classifier. The performance of each sorting criterion is governed by a number of defect parameters, one of which is usually a sensitivity parameter. Sensitivity is typically expressed as a percentage where 0% corresponds to little or no defects and 100% corresponds to many or all defects detected. Both the feature extractor and the classifier may have defect parameters, and the sensitivity parameter may be associated with either the feature extractor or the classifier. The feature extractor computes a feature-based representation of the image data. The classifier identifies the defects from this feature data.

Figure 3 illustrates a pattern recognition system using a colour sorting criterion. The image data passes to a colour classifier 30 which performs the initial extraction step and identifies whether each piece of image data or pixel belongs to a specified set of defect colours. The output from the colour classifier, called classified data, identifies which pixels correspond to potential defects. For monochromatic image data, the preferred colour classification is accomplished by applying a first threshold on the pixel intensity. The defect parameter that sets this threshold is the sensitivity of that sorting criterion. For polychromatic image data, the preferred colour classifier is a decision boundary in the multi-dimensional colour space. The defect parameter which controls the position of this decision boundary is the sensitivity for that sorting criterion.

The classified data passes to the spatial filter 32. The spatial filter filters the classified data according to size; ie, the number of classified pixels within a local neighbourhood on the image. The size of the spatial filter and the size of the local neighbourhood are defect parameters of the spatial filter. The output signal from this stage is the colour defect data that indicates which pixels correspond to defects. A spot sorting criterion is similar to a colour sorting criterion except that the size of the spatial filter is set to one pixel.

In size sorting of articles, the extracted feature is typically the area of an article and the classifier is a threshold on the size of the article. In this case, there is only one defect parameter; namely the sensitivity adjustment that determines the size threshold. The size sorting of articles relies upon the throughput of the product stream to be sufficiently low so that the individual articles can be seen separate from one another. In shape sorting, the feature extractor extracts shape features of an article or part of an article to form a shape feature vector. The classifier identifies each article or part of an article as either accept or defect on the basis of its shape feature vector. Both the feature extractor and the classifier may have many defect parameters. A sensitivity of the shape sorting criterion controls the position of the decision boundary of the classifier. The pattern recognition system 29 in the processor 24 may operate according to many separate sorting criteria generating different defect data for the selector 28. All the defect data is combined to generate instructions for the ejectors 16. A preferred means of combining the defect data is a simple OR device. In other words, if any sorting criterion decides a pixel corresponds to a defect, then the ejectors 16 must be instructed with regard to that pixel.

In generating instructions for the ejectors, the defect data is filtered and extended both laterally and in the direction of flow of the product stream. The preferred mechanism for extending the area of intersection of gas blasts from the ejectors is to include a first ejection parameter that provides an option for activating adjacent ejectors, and a second ejection parameter that specifies the duration of each gas blast from each ejector. This duration is normally defined in integral multiples of the time taken to capture one scan line of data from the camera.

The graphical user interface 14 displays an image of the product stream at the imaging zone. A section from such an image is shown in Figure 4 which, for ease of illustration, is of an arrangement in which there are twice as many pixels as ejectors. The preferred image resolution is normally much higher than the ejector resolution, for example by a multiplication factor of sixteen. The defect data is scaled down to the resolution of the ejectors. In the case illustrated, the resulting ejector data is a Boolean signal per ejector per scan line indicating the ejector state; on or off as indicated in the Figure as Ί" or "0". These will of course not appear in the displayed image.

During normal sorting, the instruction to an ejector is delayed to allow for the time taken for the selected article in a product stream to flow from the line of sight of camera 10 to the line of fire of the ejectors 16, and the time taken for the gas blast to reach the article from the ejector.

For fine tuning of the apparatus, the operator selects a diagnostic mode of operation. A snapshot image of a section of the product stream at the imaging zone is captured to the memory 22. The image is analysed in the same way as is the image data in normal running of the apparatus, but it is preferred to duplicate the respective hardware and software so that the normal sorting can continue while, the operator views the machine diagnostics and considers what might occur as a consequence of altering the ejection and defect parameters.

The graphical user interface 14 has four diagnostic facilities; a defect viewer; a "Rogues' Gallery"; a percentage reject estimation; and a defect browser. Using the defect viewer facility, the interface displays the image and highlights on the displayed image the areas of intersection of air pulses from the ejectors with the product stream, as illustrated in Figure 5. This is illustrated in Figure 4 in the two zones indicated. In zone 34 one ejector having a spread of two pixels is fired over a period comprising two scan lines. In zone 36 two zones each similar to zone 34 are adjacent with one ejector being fired for a period corresponding to two scan lines, with an adjacent ejector being activated for a similar period started halfway through the duration of the earlier fired ejector.

The defect viewer facility on the interface can indicate the pixels corresponding to both the classified data and the defect data. Where a number of different colour sorting criteria are used, this can be accomplished by highlighting the respective pixels with a distinctive colour. The preferred colour scheme is to use a different hue for each sorting criterion, with saturated colour for defect pixels and unsaturated colour (ie, paler) for the classified pixels. The defect viewer facility provides the option to switch between the pixels identified in each sorting criterion. The facility also provides for adjusting the respective defect parameters with the consequence that the image data stored in the memory is reanalysed, and the displayed image correspondingly altered. In this way, the operator can see the overall effect of any parameter change in a single snapshot image.

The defect viewer facility enables the operator to adjust the size of the area of intersection of the ejector blast with the product stream by adjusting the ejection parameters. The operator can very quickly see which sorting criteria have triggered which ejector blasts, and if the area boundary encompasses part of the displayed image that appears to be good product, then the operator knows which criterion or criteria needs or need adjustment. Similarly, if a highlighted classified pixel that suggests the presence of a defect is not within an area of intersection, then the operator knows that increasing the sensitivity of the respective sorting criterion should result in such defective articles being ejected.

As discussed below, defects can be ranked according to severity. The sorting machine can adjust the size of the area of intersection of the ejector blast according to the severity of a defect. This may be desirable to ensure the ejection of a severely defective article from the product stream. Any such variation will be identified in the displayed image. The size of the area of intersection can be directly related to the severity of the defect, and be determined automatically by the machine. The relationship may also be adjusted by the machine operator. In order to see the net effect on a large sample of product, the operator can repeat the capture and analysis of multiple images. The memory can store all images captured, and if desired these images can be of contiguous sections of the product stream enabling the operator to scroll along a section of the stream in the conduct of this analysis.

The second diagnostic facility provided on the graphical user interface is the "Rogues' Gallery". This is assembled by extracting from the stream image on the interface the intersection areas, and displaying them in a separate screen for inspection. For ease of identification and presentation, the boundary of each area is resolved into a square or rectangular patch, and each patch is then displayed. The manner in which a patch is defined is illustrated in Figure 6, which shows the respective areas from the representation of Figure 5 assembled within patches in a gallery. The edge of each connected region of homogeneous classified data is highlighted on each patch as shown in Figure 6. It will be appreciated that the gallery of Figure 6 can be extended to include patches from different and/or sequential images of product stream sections, and each patch can of course be labelled with the sorting criteria that has resulted in its selection. The gallery of patches provides a ready indication of the nature of defects being identified and again, useful information for the operator in controlling the sorting process.

It will be appreciated from the information that is being assembled that an estimation of the proportion of reject articles in a product stream based on a single one of or a plurality of stream images of the kind described above can be calculated. Data in the memory 22 can again be analysed to identify every pixel in the image as corresponding to either the presence or the absence of an article. This can be readily accomplished using known techniques from both monochromatic and polychromatic image data. The percentage of reject can then be estimated as the number of pixels that correspond to articles in areas of intersection of ejection gas with the product stream relative to the number of pixels that correspond to the totality of articles in the stream image. This estimation can of course be recalculated each time the operator makes an adjustment to either the defect or ejection parameters.

The fourth diagnostic facility provided by the graphical user interface is the defect browser. The defect browser extracts sub-images or thumbnails from image data stored in memory 22, and ranks each thumbnail according to a respective sorting criterion. The rank of a thumbnail is the lowest sensitivity of that sorting criterion at which it would be first rejected. That sensitivity can be obtained by sweeping over the range of sensitivities in turn for each sorting criterion, while all other defect parameters remain at the values set on the sorting machine. However, for some criteria such a sweep may not be necessary. It then arranges the thumbnails in rank order, The process is most simply understood when each extracted thumbnail encompasses one and only one article from the product stream, which is only feasible when the product throughput is relatively low. In those circumstances, individual articles can be identified and thumbnail images extracted from the image data, even though the thumbnails may not necessarily be square.

In most optical sorting machines the throughput is so high that it is not feasible to identify individual objects with accuracy. To accommodate this, in the defect browser facility in the apparatus described thumbnails all having the same size and shape are extracted by centering a thumbnail around each region of interest in the displayed image. The regions of interest can be detected by increasing the sensitivity of each sorting criterion in turn, and merging all the resulting defect data to form the regions of interest. We shall first consider the situation in which the thumbnails do not overlap.

Figure 7 illustrates the displayed image on the graphical user interface using the defect browser facility with the thumbnails arranged in accordance with just one sorting criterion; in this case spot sorting. This is presented in a single column divided into rows corresponding to a particular sensitivity setting for this criterion. In Figure 7 the thumbnails are displayed in groups according to the sensitivity at which they would be first rejected by the sorting criterion. Across the centre of the display is a bold horizontal line that marks the current setting for sensitivity. All the thumbnails below this line are notionally rejected, and all the thumbnails above the line are notionally accepted. The defect browser facility includes a control for adjusting this sensitivity setting. Such adjustment shifts the rows relative to this line. The interface is not large enough to show all the rows corresponding to all the available sensitivity settings, so provision is normally made to scroll for an extended or the entire range of settings.

Figure 8 illustrates the consequence of adding a second sorting criterion; in this case colour sorting. Each thumbnail is displayed in accordance with its ranking relative to the current sensitivity setting which is once again indicated as a bold horizontal line. Relative rank for a thumbnail within a sorting criterion is its rank relative to the current sensitivity of that criterion. A thumbnail is only displayed under one sorting criterion; namely, the criterion in which it has the lowest relative rank. As a consequence, many of the thumbnails shown in Figure 7 under the spot sorting criterion do not appear. The reason for this is that thumbnails that are at one relative ranking under the spot sorting criterion, are at a lower relative ranking according to the colour sorting criterion. Thumbnails which appeared in the column under spot sorting have been transferred to the column covering colour sorting because of their lower relative ranking. In the special case that the lowest relative rank is shared by two sorting criteria then a priority rule is applied; ie, one criterion takes precedence over the other.

Because apparatus of the invention uses pixel colour to identify defects in colour sorting it can be readily adapted to show the boundary or edge of such defects. This information can be of considerable value.

As can be seen from Figures 7 and 8, the "current" sensitivity level for spot sorting is set at "43" whereas for colour sorting, the sensitivity level is set at "70". As shown, a thumbnail with a ranking of 44 according to the spot sorting criterion, and a ranking of 68 according to the colour sorting criterion will appear only in the colour sorting column where its relative ranking is lower.

On the righthand side of the display as shown in Figures 7 and 8, a percentage reject estimation is indicated according to the sensitivity setting or settings specified. As can be seen, it increases from 3% to 7.7% as a consequence of adding the colour sorting criterion. It will of course also alter if the sensitivity settings are adjusted, and this provides further useful information for the operator in determining what adjustments are to be made. A percentage reject can be provided against each row, and thus for a range of different machine configurations. The apparatus may also include a facility enabling the operator to disable the analysis under one or more of the defect criteria. This enables the operator to focus on one defect criterion or different combinations of criteria, and observe the virtual effect of altering the sensitivity level in those situations.

If the operator alters either or both of the sensitivity levels, then this will provoke movement of thumbnails from one column to the other. This is illustrated in Figures 10A and 10B on the basis of eighteen thumbnails whose lowest sensitivities are set out in the table of Figure 9. In Figure 10A, the sensitivity levels are those shown in Figure 9 with the respective thumbnails in the spot sorting or colour sorting columns. What is seen on the screen of the interface is indicated in dotted outline. In Figure 10B, the sensitivity level for spot sorting is increased from 43 to 45. The spot sorting column is lowered so that the current sensitivities for spot and colour sorting remain horizontally aligned, and it will be seen that thumbnail "J" in the colour sorting column of Figure 10A, is now in the spot sorting column of Figure 10B. The reason for this is that its relative rank is lower according to the spot sorting criterion when the sensitivity level for that criterion is increased.

Thumbnails for classification using the defect browser facility can also be graded by size and shape. This can be of different importance for different types of product to be sorted. Typical types of sorting by size are area, length and width. Typical types of sorting by shape are curvature (such as sharp angles and concavities), aspect ratios and circularity. In the case of size or shape sorting, articles can be displayed by their silhouette so the borders of the thumbnails are unnecessary and not displayed on the graphical user interface. Figure 11 shows how two such criteria may be displayed on the graphical user interface.

For ease of explanation, the above description assumes that the computer processes the image data successively according to each of the defect criteria. However, in practice this will not be the case. Each identified defect will usually be processed individually on the basis of each of the defect criteria and ranked accordingly.

The above analysis is based on a situation in which thumbnails do not overlap. However, a thumbnail may contain more than one region of interest and therefore overlap with other thumbnails, as shown in Figure 12. It is possible then to proceed on the basis that each thumbnail represents an individual article, and proceed as indicated above. However, this can result in the same defect being displayed more than once on the interface. Furthermore, the most severe defect may be just in a comer of the thumbnail, as illustrated in Figure 13, with the consequence that the very part of the image that is triggering the identification of the thumbnail is not being clearly shown on the interface. In such a circumstance the thumbnail is not displayed on the basis that the severe defect will appear in another thumbnail.

The preferred method for handling overlapping thumbnails is to associate each thumbnail with the region of interest about which it is centred. The lowest sensitivity for each sorting criterion for that thumbnail is based on the detection of its associated region of interest as a defect. If a first thumbnail contains another region of interest then the thumbnail of this second region; the neighbouring thumbnail, is taken into consideration before displaying the first thumbnail. If the neighbouring thumbnail is associated with a region of interest that is a more severe defect than the region of interest of the first thumbnail, then the first thumbnail is not displayed on the interface. The graphical user interface does of course present an electronic image that can be analysed. It also allows for focusing on individual images on display using a "zoom" facility to enlarge such an individual image or group of adjacent images.

The defect browser enables an operator to see at a glance, which defects are detected for a whole range of sensitivity settings. The ranking of the groups of thumbnails makes it easier to see the underlying ranking of the defects from severe to marginal rejects, and from marginal accepts to good product. This ranking can be easily seen, as can the consequence of any alteration of the sensitivity levels. The simultaneous display of the percentage reject estimate also informs the operator of the expected yield.

The defect browser also enables an operator to fine tune defect parameters that are not sensitivity settings. Whilst adjusting a defect parameter for a sorting criterion, the membership of the groups within the respective column on the graphical user interface changes. The parameters can thus be fine tuned until the arrangement of the groups of thumbnails in the column agrees with the intuition of the operator for ordering the thumbnails by severity of defect.

The defect browser also enables an operator to focus the display only on product classified for rejection, and ranked by severity of defect. This can be accomplished by scrolling the screen or merely blocking all images above the sensitivity levels. The advantage of this is that operators are likely to be more concerned with articles being rejected and by which sorting criteria.

In the defect browser described above thumbnails are arranged and displayed in columns, as shown in Figures 7 and 8. In apparatus of the present invention, as shown in Figure 14, thumbnails are displayed in a two dimensional matrix with one defect criterion being plotted along each of the two orthogonal axes. In the matrix shown, the intensity of discolouration on a product is plotted on the Y axis; the degree of deformation or sharp edges on the product along the X axis. The Y axis is marked with two scales, the first scale corresponds to the sensitivity in percentage units. The second scale is the corresponding 8-bit greyscale threshold. The intensity criterion is a comparison of the form (intensity of the pixels < threshold, both in greyscale). Thus a thumbnail that is classified as a defect at a particular threshold value of intensity is also classified as a defect at all higher thresholds. The degree of deformity on the X axis is a similar "less than" type comparison (deformity < threshold). The axes thus locate thumbnails 40, 42 toward the origin with decreasing ranking according to either defect criterion. Sensitivity; ie, the degree of severity at which a defect is ranked, is measured positively from the origin along both axes. Thus, the higher the sensitivity the lower the severity of the defect required to rank a defect in the chosen category. As these defect criteria are unrelated, each thumbnail is located at a single point equivalent to the location that the thumbnail is represented in the corresponding "feature space" as defined above.

Figure 14 also shows the qualifying rankings for the two defect criteria; at sensitivity level 45 for intensity of discolouration along the Y axis, and at sensitivity level 22 for deformity along the X axis. The computer in apparatus of the invention can be programmed to display on the graphical user interface only thumbnails ranked below these thresholds, and thereby within the confines of the qualifying rankings indicated.

Figure 15 shows a matrix similar to that of Figure 14, but in this case the intensity of the discolouration is plotted against the area of discolouration or defect area on an individual product. The threshold sensitivity for discolouration is again set at 45; that for area at 40. A typical combination of defect criteria for detecting dark discoloured defects is to set an upper limit on the pixel intensity and a lower limit on the area of the defect in pixels. For example, the defect criteria might be set as (Intensity in Grayscale < 115) AND (Defect Area in Pixels > 60). To maintain the severity of defect increasing towards the origin it is convenient to define the sensitivity of the defect area in the reverse order to that of the defect area expressed in pixels. Figure 15 shows the case that a defect area sensitivity of 40% corresponds to a defect area of 60 pixels. The combination of the defect criteria can then be expressed as (Intensity < 4%) AND (Defect Area < 4%). [Note the reversal of the comparator.] As these two defect criteria are related, the sensitivity at which a defect is ranked is of critical importance. If the sensitivity at which the intensity of discolouration is ranked is lowered, then the area of the defect in pixels on the product is likely to decrease. Thus, for each individual defect, its ranking according to different sensitivities will place it at different points 46, 48 and 50 in the matrix, typically following a locus of the kind illustrated at 44. A simple method to construct the locus is to test whether the thumbnail is a defect at each point in sensitivity space which in Figure 15, is the entire space defined by the X and Y axes. A locus generated in this way traces out all the locations where the thumbnail is classified as a defect. A computationally more efficient method is to compute the rank in one criterion for each value of the other defect criterion. The locus generated in this way traces out locations where the thumbnail is classified as a defect and adjacent to a point where the thumbnail is classified as not defective. The displayed location of a thumbnail in the matrix will be determined by a rule preset in the machine. Such a rule will normally be based on distances within the matrix. One might be the distance at points on the locus from a point on the matrix such as the intersection of the qualifying rankings for the two criteria. Another might be the sum of the distances from points on the locus to the boundaries set by the qualifying rankings. Other formulae that such distances must satisfy can of course be used.

The information available from a matrix of the kind illustrated in Figure 15 is essentially similar to that available from the matrix of Figure 14, and can be used in the same way. It will be appreciated that the two matrices could be combined to form a matrix in three dimensions or more depending upon the number of criteria under which defects are to be ranked. Thus, whereas the apparatus of our earlier application referred to above displays thumbnails with defects according to unrelated criteria, apparatus according to the present invention can display defects ranked according to related criteria, with the operator being able to select which criteria to combine in a given matrix. The computer can of course be programmed merely to provide the information required from the matrix, such as proportions of product bearing different defects, without the need to actually display the matrix itself.

Using the diagnostic facilities provided in the apparatus described provides guidance as to how a sorting machine can be adjusted to control quality and/or yield. Once virtual adjustments have been analysed and approved, they can be applied to the operating machine. Any changes made can of course be monitored subsequently using these facilities.