Method and apparatus for detecting bounded regions of images, and method and apparatus for sorting articles and detecting flaws
15 claims: 15 independent, 0 dependent
- 1Procédé pour détecter une région délimitée d'une image, consistant à explorer l'image par un balayage de trame pour produire un signal indiquant l'intensité de l'image en une multiplicité de points d'image, caractérisé en ce qu'il consiste à comparer l'intensité de l'image en chacun desdits points d'image avec celle d'un point voisin dans chacune de deux directions au moins, pour en tirer des valeurs de différence positives et négatives, à étiqueter les points d'image comme correspondant à l'un parmi plusieurs types de limites de région toutes les fois que la valeur absolue de ladite valeur de différence positive ou négative dépasse une valeur de seuil prédéterminée, ledit type de limite étant déterminé selon la direction respective et selon que la valeur de différence respective est positive ou négative, à étiqueter d'autres points d'image selon qu'ils se situent ou non dans un nombre prédéterminé de points d'image à partir d'une limite de région, de telle manière que des limites entre des éléments d'image voisins le long d'une ligne de balayage donnent lieu à l'étiquetage d'éléments d'image voisins successifs le long de cette lige de balayage et que des limites entre des éléments d'image voisons sur des lignes de balayages voisines donnent lieu à l'étiquetage de points sur des lignes de balayage successives voisines, et à décaler dans le temps, dans des mesures différentes, des signaux associés auxdits types différents de limites de région, de manière à superposer les signaux qui correspondent à des points d'image étiquetés comme n'étant pas situés à plus dudit nombre prédéterminé de points d'image à partir d'une limite de région, uniquement pour une région située en totalité à l'intérieur d'une region délimitée de l'image. 1. Verfahren zur Erkennung eines bestimmten Bereichs eines Bildes, wobei das Bild über eine Rasterabtastung abgetastet wird, um ein Signal zu erzeugen das, die Intensität des Bildes an einer Vielzahl von Bildpunkten anzeigt, gekennzeichnet durch Vergleich der Intensität des Bildes an jedem der Bildpunkte mit der eines benachbarten Punktes in jeder von wenigstens zwei Richtungen, um davon positive und negative Differenzwerte abzuleiten, durch Kenntlichmachung der Bildpunkte wie entsprechend einem einer Vielzahl von Typen von Bereichsgrenzen, jedesmal wenn der absolute Wert des positiven oder negativen Differenzwertes einen vorbestimmten Schwellenwert übersteigt, wobei der Typ der Grenze bestimmt wird entsprechend der jeweiligen Richtung und jenachdem ob der jeweilige Differenzwert positiv oder negativ ist, durch Kenntlichmachung weiterer Bildpunkte demgemäß, ob sie in einer vorbestimmten Anzahl von Bildpunkten von einer Bereichsgrenze liegen oder nicht derart, daß Grenzen zwischen benachbarten Bildelementen längs einer Abtastlinie eine Kenntlichmachung aufeinanderfolgender benachbarter Bildelemente längs der Abtastlinie verursachen, und daß Grenzen zwischen benachbarten Bildelementen auf benachbarten Abtastlinien eine Kenntlichmachung von Punkten auf benachbarten aufeinanderfolgenden Abtastlinien verursachen, und durch Zeitverschiebungssignale, die verbunden sind mit dem verschiedenen Typen von Bereichsgrenzen durch verschiedene Werte, um jene Signale entsprechend Bildpunkten zu überlagern, die kenntlichgemacht sind als nicht mehr zu sein als die vorbestimmte Anzahl von Bildpunkten von einer Bereichsgrenze nur für einen Bereich, des vollständig innerhalb ein bestimmten Bereichs des Bildes liegt. 1. method of detecting a bounded region of an image, which method comprises scanning the image via a raster scan to produce a signal indicative of image intensity at a plurality of picture points, characterised by comparing the image intensity at each of the said picture points with that of a neighbouring point in each of at least two directions to derive therefrom positive and negative difference values, labelling the picture points as corresponding to one of a plurality of types of region boundaries whenever the absolute value of the said positive or negative difference value exceeds a predetermined threshold value, the said type of boundary being determined according to the respective direction and whether the respective difference value is positive or negative, labelling further picture points according to whether or not they lie within a predetermined number of picture points from a region boundary such that boundaries between neighbouring picture elements along a scan line give rise to labelling of successive neighbouring picture elements along the said scan line, and boundaries between neighbouring picture elements on neighbouring scan lines give rise to labelling of points on neighbouring successive scan lines, and time-shifting signals associated with the said different types of region boundaries by different amounts to superimpose those signals corresponding to picture points labelled as being no more than the said predetermined number of picture points from a region boundary only for a region lying wholly within a bounded region of the image.
- 2A method of sorting articles, which method comprises forming an image of a plurality of the articles, detecting bounded regions within the image by a method as claimed in Claim 1, and routing the articles differently according to whether or not they generate a bounded region on the image. 2. Procédé pour trier des articles, consistant à former une image d'une multiplicité des articles, à détecter des régions délimitées dans l'image par un procédé selon la revendication 1, et à acheminer les articles différemment selon qu'ils génèrent ou non une région délimitée sur l'image. 2. Verfahren zum Sortieren von Gegenständen;gekennzeichnet, durch Ausbilden eines Bildes einer Vielzahl von Gegenständen, durch Erkennen bestimmter Bereiche innerhalb des Bildes durch eine Verfahren nach Anspruch 1, und durch unterschiedliches Fördern der Gegenstände, je nachdem ob sie einen bestimmten Bereich auf dem Bild erzeugen oder nicht.
- 3A method of detecting a flaw in an area of sheet material which method includes a method of detecting a bounded area as defined in Claim 1. 3. Procédé pour détecter un défaut dans une zone d'un matériau en feuille, comprenant un procédé de détection d'une zone délimitée selon la revendication. 3. Verfahren zum Erkennen einer Fehlerstelle in einer Fläche eines flächigen Materials, gemäß einem Verfahren zur Erkennung einer bestimmten Fläche nach Anspruch 1.
- 4Apparatus for detecting a bounded region of an image, which apparatus comprises means (120) for scanning the image via a raster scan to produce a signal indicative of image intensity at a plurality of picture points, characterised in that there is provided means (116, 118) for comparing the image intensity at each of the said picture points with that of a neighbouring point in each of at least two directions to derive therefrom a positive or negative difference value, means (66, 68, 74, 76) for labelling the picture points as corresponding to one of a plurality of types of region boundaries whenever the absolute value of the said positive or negative difference value exceeds a predetermined threshold value, the said type of boundary being determined according to the respective direction, and whether the respective difference value is positive or negative, means (126, 128) for labelling further picture points according to whether or not they lie within a predetermined number of picture points from a region boundary, such that boundaries between neighbouring picture elements along a scan line give rise to labelling of successive neighbouring picture elements along the said scan line and boundaries between neighbouring picture elements on neighbouring scan lines give rise to labelling of points on neighbouring successive scan lines, and means (142, 144) for time-shifting signals associated with the said different types of region boundaries by. different amounts to superimpose those signals corresponding to picture points labelled as being no more than the said predetermined number of picture points from a region boundary only for a region lying wholly within a bounded region of the image. 4. Dispositif pour la détection d'une région délimitée d'une image, comprenant des moyens (120) pour explorer l'image par un balayage de trame pour produire un signal représentatif de l'intensité d'image en une multiplicité de points d'image, caractérisé en ce qu'il est prévu des moyens (116, 118) pour comparer l'intensité de l'image en chacun desdits points d'image avec celle d'un point voisin dans chacune de deux directions au moins, pour entirer des valeurs de différence positives et négatives, des moyens (66, 68, 74, 76) pour étiqueter les points d'image comme correspondant à l'un parmi plusieurs types de limites de région toutes les fois que la valeur absolue de ladite valeur de différence positive ou négative dépasse une valeur de seuil prédéterminée, ledit type de limite étant déterminé selon la direction respective et selon que la valeur de différence respective est positive ou négative, des moyens (126, 128) pour étiqueter d'autres points d'image selon qu'ils se situent ou non dans un nombre prédéterminé de points d'image à partir d'une limite de région, de telle manière que des limites entre des éléments d'image voisins le long d'une ligne de balayage donnent lieu à l'étiquetage d'éléments d'image voisins successifs le long de cette lige de balayage et que des limites entre des éléments d'image voisins sur des lignes de balayage voisines donnent lieu à l'étiquetage de points sur des lignes de balayage successives voisines, et des moyens (142, 144) pour décaler dans le temps, dans des mesures différentes, des signaux associées auxdits types différents de limites de région, de manière à superposer les signaux qui correspondent à des points d'image étiquetés comme n'étant pas situés à plus dudit nombre prédéterminé de points d'image à partir d'une limite de région, uniquement pour une région située en totalité à l'intérieur d'une region délimitée de l'image. 4. Vorrichtung zur Erkennung eines bestimmten Bereichs eines Bildes, mit einer Einrichtung (120) zum Abtasten eines Bildes über eine Rasterabtastung, um ein Signal zu erzeugen, welches die Intensität des Bildes an einer Vielzahl von Bildpunkten anzeigt, gekennzeichnet durch eine Einrichtung (116,118) zum Vergleichen der Bildintensität an jedem der Bildpunkte mit der eines benachbarten Punktes in jeder von wenigstens zwei Richtungen, um davon einen positiven oder negativen Differenzwert anzuleiten, durch eine Einrichtung (66, 68, 74, 76) zur Kenntlichmachung der Bildpunkte, wie entsprechend einem einer Vielzahl von Typen von Bereichsgrenzen, jedesmal wenn der absolute Wert des positiven oder negativen Differenzwertes einen vorbestimmten Schwellenwert übersteigt, wobei der Typ des Grenze bestimmt wird entsprechend der jeweiligen Richtung und jenachdem ob der jeweilige Differenzwert positiv oder negativ ist, durch eine Einrichtung (126,128) zur Kenntlichmachung weiterer Bildpunkte demgemäß, ob sie innerhalb einer vorbestimmten Anzahl von Bildpunkten von einer Bereichsgrenze liegen oder nicht derart, daß Grenzen zwischen benachbarten Bildelementen längs einer Abtastlinie eine Kenntlichmachung von nah aufeinanderfolgenden benachbarten Bildelementen längs der Abtastlinie verursachen, und daß Grenzen zwischen benachbarten Bildelementen auf benachbarten Abtastlinien eine Kenntlichmachung von Punkten auf benachbarten aufeinanderfolgenden Abtastlinien verursachen, und durch eine Einrichtung (142, 144) für Zeitverschiebungssignale, die mit den verschiedenen Arten von Bereichsgrenzen verbunden sind durch verschiedene Beträge, um diejenigen Signaie entsprechend den Bildpunkten zu überlagern, die kenntlichgemacht sind als nicht mehr zu sein als die vorbestimmte Anzahl von Bildpunkten von einer Bereichsgrenze nur für einen Bereich, der vollständig innerhalb eines bestimmten Bereichs des Bildes liegt.
- 5Apparatus as claimed in Claim 4, wherein the comparing means (116, 118) includes a delay element (62, 70) for delaying a signal for a period corresponding to an integral number of picture points, and a subtractor (64, 72) for comparing the delayed signal with a non-delayed signal. 5. Dispositif selon la revendication 4, dans lequel les moyens de comparaison (116, 118) comprennent un élément à retard (62, 70) pour retarder un signal pendant une période correspondant à un nombre entier de points d'image et un soustracteur (64, 72) pour comparer le signal retardé avec un signal non retardé. 5. Vorrichtung nach Anspruch 4, dadurch gekennzeichnet, daß die Vergleichseinrichtung (116, 118) ein Verzögerungselement (62, 70) zum Verzögern eines Signals für einen Zeitraum aufweist, der einer integralen Anzahl von Bildpunkten entspricht, und daß ein Subtrahierglied (64, 72) zum Vergleichen des verzögerten Signals mit einem nicht verzögerten Signal vorgesehen ist.
- 6Apparatus as claimed in Claim 4 or Claim 5, wherein the comparing means (116, 118) is arranged to compare alternate points in the vertical and horizontal directions of the raster scan. 6. Dispositif selon la revendication 4 ou 5, dans lequel les moyens de comparaison (116,118) sont agencés de manière à comparer des points alternants dans les directions verticale et horizontale du balayage de trame. 6. Vorrichtung nach Anspruch 4 oder 5, dadurch gekennzeichnet, daß die Vergleichseinrichtung (116, 118) vorgesehen ist, um abwechselnd Punkte in der vertikalen und horizontalen Richtung der Rasterabtastung zu vergleichen.
- 7Apparatus as claimed in any one of Claims 4 to 6, wherein the means (126) for labelling further picture points includes a register (82) for holding the value of the desired predetermined number, and a counter (80) for decrementing the value of the register over the desired number of picture points. 7. Dispositif selon l'une quelconque des revendications 4 à 6, dans lequel les moyens (126) pour étiqueter d'autres points d'image comprennent un registre (82) pour mémoriser la valeur du nombre prédéterminé voulu, et un compteur (80) pour faire régresser la valeur du registre du nombre désiré de points d'image. 7. Vorrichtung nach einem der Ansprüche 4 bis 6, dadurch gekennzeichnet, daß die Einrichtung (126) zur Kenntlichmachung weiterer Bildpunkte ein Register (82) aufweist zum Halten der Werte der gewünschten vorbestimmten Anzahl, und daß ein Zählwerk (80) vorgesehen ist zum schrittweisen Verringern des Wertes des Registers über die gewünschte Anzahl der Bildpunkte.
- 8Apparatus as claimed in any one of Claims 4 to 7, wherein the time-shifting means (144) is arranged to time shiftthe respective signals by an amount approximately corresponding to the time difference on the raster scan between the said predetermined number of picture points. 8. Dispositif selon l'une quelconque des revendications 4 à 7, dans lequel les moyens de décalage dans le temps (144) sont agencés de façon à décaler dans le temps les signaux respectifs dans une mesure correspondant approximativement à la différence de temps, sur le balayage de trame, entre ledit nombre prédéterminé de points d'image. 8. Vorrichtung nach einem der Ansprüche 4 bis 7, dadurch gekennzeichnet, daß die Zeitverschiebungseinrichtung (144) vorgesehen ist zum Verschieben der Zeit des jeweiligen Signals um einen Betrag, der etwa der Zeitdifferenz auf der Rasterabtastung zwischen der vorbestimmten Anzahl der Bildpunkte entspricht.
- 9Apparatus as claimed in any one of Claims 4 to 8, including a computer programmed and arranged to allocate to each of an array of storage locations a value corresponding to the intensity of the signal image at a point on the image, and wherein the means for deriving difference values is arranged to derive difference values between values stored in locations of the said image corresponding to neighbouring points of the image. 9. Dispositif selon l'une quelconque des revendications 4 à 8, comprenant un ordinateur programmé et agencé de manière à assigner à chaque emplacement d'un réseau d'emplacements de mémoire une valeur correspondant à l'intensité du signal d'image en un point sur l'image, et dans lequel les moyens pour tirer des valeurs de différence sont agencés de manière à tirer des valeurs de différence entre les valeurs mémorisées dans des emplacements de l'image correspondant à des points voisins de l'image. 9. Vorrichtung nach einem der Ansprüche 4 bis 8, gekennzeichnet, durch einen Computer, der programmiert und vorgesehen ist, um jeder einer Reihe von Speicherstellen einen Wert entsprechend der Intensität des Signalbildes an einen Punkt auf dem Bild zuzuweisen, wobei die Einrichtung zur Herleitung von Differenzwerten angeordnet ist, um Differenzwerte zwischen Werten, die an Stellen des Bildes entsprechend benachbarten Punkten des Bildes gespeichert sind, abzuleiten.
- 10Apparatus as claimed in any one of Claims 4 to 9, wherein the predetermined number of picture points is from 5 to 10. 10. Dispositif selon l'une quelconque des revendications 4 à 9, dans lequel le nombre prédéterminé de points d'image est compris entre 5 et 10. 10. Vorrichtung nach einem der Ansprüche 4 bis 9, dadurch gekennzeichnet, daß die vorbestimmte Anzahl von Bildpunkten 5 bis 10 ist.
- 11Apparatus as claimed in Claim 10, wherein the predetermined number of picture points is 7. 11. Dispositif selon la revendication 10, dans lequel le nombre prédéterminé de points d'image est de 7. 11. Vorrichtung nach Anspruch 10, dadurch gekennzeichnet, daß die vorbestimmte Anzahl von Bildpunkten 7 ist.
- 12Apparatus as claimed in any one of the preceding Claims 4 to 11, including means for selectively varying the said predetermined number of picture points, and the period of time- shift applied. 12. Dispositif selon l'une quelconque des revendications 4 à 11, comprenant des moyens pour faire varier sélectivement le nombre prédéterminé de points d'image et la durée du décalage dans le temps appliqué. 12. Vorrichtung nach einem der vorhergehenden Ansprüche 4 bis 11, gekennzeichnet durch eine Einrichtung zur selektiven Veränderung der vorbestimmten Anzahl von Bildpunkten und der Periode der verwendeten Zeitverschiebung.
- 13Article sorting apparatus comprising conveying means (10) for conveying through an inspection region articles having predominantly a first value of surface reflectivity but bearing occasional surface features having a second value of reflectivity which is substantially different from the first value, means for illuminating each article in the inspection region, sensing means (26) responsive to reflected radiation reflected from the articles for scanning the inspection region to derive an image signal, and apparatus as claimed in any one of Claims 4 to 12 for processing the image signal to detect the presence of and to indicate the location of a surface feature having the second value of reflectivity whenever such feature lies, as viewed by the sensing means, wholly within an area having the first value of reflectivity, and deflection means (20) responsive to such detection and indication of location to cause the article bearing such feature to be routed differently from the other articles. 13. Dispositif de tri d'articles, comprenant des moyens transporteurs (10) pour transporter à travers une région d'inspection des articles ayant, de façon prédominante, un coefficient de réflexion superficielle d'une première valeur, mais portant des particularités de surface occasion- nettes ayant un coefficient de réflexion superficiel d'une seconde valeur qui est nettement différente de la première valeur, des moyens pour éclairer chaque article dans la région d'inspection, des moyens détecteurs (26) réagissant au rayonnement réfléchi par les articles pour explorer la région d'inspection et en dériver un signal d'image, et un dispositif selon l'une quelconque des revendications 4 à 12 pour traiter le signal d'image afin de détecter la présence d'une particularité de surface ayant la seconde valeur de coefficient de réflexion et d'en indiquer l'emplacement toutes les fois qu'une telle particularité, vue par les moyens détecteurs, se trouve complètement dans une zone ayant la première valeur de coefficient de réflexion, et des moyens de déviation (20) qui regissent à cette détection et cette indication d'emplacement pour faire en sorte que l'article qui porte une telle particularité soit acheminé différemment des autres articles. 13. Vorrichtung zum Sortieren von Gegenständen, mit einer Fördereinrichtung (10) zum Fördern von Gegenständen durch einen Überprüfungsbereich, die vorwiegend einen ersten Wert eines Oberflächenreflexionsvermögen aufweisen, die aber gelegentlich Oberflächeneigenschaften aufweisen, die einen zweiten Wert eines Reflektionsvermögens zeigen, welcher wesentlich verschieden ist von dem ersten Wert, mit einer Einrichtung zur Beleuchtung jedes Gegenstandes im Überprüfungsbereich, mit einer Abtasteinrichtung (26), die auf reflektierte Strahlung anspricht, die von den Gegenständen reflektiert wird, zum Abtasten des Überprüfungsbereiches zum Ableiten eines Bildsignals, und mit einer Vorrichtung nach einem der Ansprüche 4 bis 12 zum Verarbeiten des Bildsignales, um die Anwesenheit und die Lage eines Oberflächenmerkmals zu erkennen und anzuzeigen, das den zweiten Wert des Reflektionsvermögens aufweist, sooft ein derartiges Merkmal, gesehen von der Abtasteinrichtung, völlig innerhalb eines Bereichs liegt, der den ersten Wert des Reflektionsvermögens aufweist, und mit einer Ablenkeinrichtung (20) die auf eine derartige Erkennung und ein Anzeigen auf die Lage anspricht, um zu bewirken, daß der Gegenstand, der dieses merkmal aufweist, verschieden von den anderen Gegenständen gefördert wird.
- 14Apparatus as claimed in Claim 13 for sorting rounded articles such as potatoes, wherein the conveying means comprises a roller table formed of a plurality of rotatable rollers (12), connected together for rotation and translational movement in the inspection area. 14. Dispositif selon la revendication 13 pour trier des articles de forme arrondie tels que des pommes de terre, dans lequel les moyens transporteurs comprennent une table à rouleuax formée d'une multiplicité de rouleaux rotatifs (12) unis entre eux de manière à effectuer un mouvement de rotation et de translation dans la zone d'inspection. 14. Vorrichtung nach Anspruch 13, zum Sortieren runder Gegenstände wir beispielsweise Kartoffeln, dadurch gekennzeichnet, daß die Fördereinrichtung einen Rollentisch aufweist, der aus einer Vielzahl von drehbaren Rollen (12) besteht, die miteinander verbunden sind für eine Rotations- und Tranlationsbewegung in dem Überprüfungsbereich.
- 15Apparatus as claimed in Claim 13 or Claim 14, wherein the deflector means comprises an array of deflector devices (20) arranged across the path of the conveyor means downstream of the inspection area, and drive means for driving selected deflector devices, the selection of deflector devices actuated being controlled in dependence upon a first co-ordinate of a location in the scanned area and the timing of operation of the deflector devices being controlled in dependence upon a second co-ordinate of a location in the scanned area. 15. Dispositif selon la revendication 13 ou 14, dans lequel les moyens de déviation comprennent une série de dispositifs de déviation (20) disposés en travers du trajet des moyens transporteurs en aval de la zone d'inspection, et des moyens de commande pour commander des dispositifs de déviation selectionnés, la sélection des dispositifs de déviation actionnés étant effectuée en fonction d'une première coordonnée d'un emplacement dans la zone explorée et le temps d'actionnement des dispositifs de déviation étant déterminé en fonction d'une seconde coordonnée d'un emplacement dans la zone explorée. 15. Vorrichtung nach Anspruch 13 oder 14, dadurch gekennzeichnet, daß die Ablenkeinrichtung eine Reihe von Ablenkelementen (20) aufweist, die über den Weg der Fördereinrichtung hinter dem Überprüfungsbereich angeordnet sind, und daß eine Antriebseinrichtung zum Antreiben ausgewählter Ablenkelemente vorgesehen ist, wobei die Auswahl der betätigten Ablenkelemente gesteuert wird in Abhängigkeit von einer ersten Koordinate einer Stelle im abgetasteten Bereich und der Zeitpunkt der Betätigung der Ablenkelemente gesteuert wird in Abhängigkeit von einer zweiten Koordinate einer Stelle in der abgetasteten Fläche.
Independent claims15
90 paragraphs, as filed
The invention relates in one aspect to a method and apparatus for processing image data to detect the presence of bounded regions therein. The image processing method is particularly suitable for use in the article sorting and may also be useful for detecting flaws in sheet material such as laminated plastics, or, for example in paintwork.
Thus the invention relates in a further aspect to an apparatus and a method for the sorting of articles in which the sorting is carried out in dependence on the presence of a surface feature of the article having a value of reflectivity substantially different from a reference value. This aspect of the invention has particular but not exclusive application to the inspection of root vegetables during processing, for example newly- peeled potatoes.
It is particularly important that sub-standard potatoes, particularly those displaying large black spots, should be excluded from further processing operations such as chipping or canning subsequent to peeling. The inspection procedure now commonly employed relies on operators picking out defective potatoes by hand as they pass along an inspection table. Such a procedure is difficult and inefficient however since potatoes newly peeled by a steam process are hot and slippery. In GB-A-2038031 the present Applicant has proposed a semi-automatic inspection procedure in which in one form the inspection area of a conveyor is viewed by means of a television camera and an operator indicates the coordinates of a defective potato in a T.V. monitor picture by touching the screen with a light pen. The contact position is sensed and the information is used to determine the time of arrival of the defective potato at the end of the conveyor. It can then be arranged that a selection device will operate to divert the path of the defective potato from the main stream when it reaches the end of the conveyor. Such selection devices for example in the form of an array of pneumatically deflectable fingers each independently controlling a small part of the width of the conveyor are well known.
A number of methods and apparatus have been described for detecting blemishes and the like in articles, for example in US-A-4122951, and EP-A-18861 (equivalent to US-A-4327375).
According to US-A-4327375 articles are passed through an inspection region, and different actions are taken in respect of the articles in accordance with whether or not blemishes are detected. Such action is however taken simply on the basis of the intensity of the signal detected from the articles. Thus, it is impossible to deal with wide variations in absolute intensity. Furthermore, the method employed makes it difficult or impossible to distinguish between a flaw on one of the articles, and the background against which the articles are viewed, when these have a similar level of reflectance, unless the product is "singulated" that is to say, only one is examined at a time.
Similarly, according to EP-A-18861 decisions as to whether or not a defect exists are taken based on absolute signal intensity, and the system is therefore unable to deal with the wide variations in absolute intensity.
In accordance with a first aspect of the invention there is provided a method of detecting a bounded region of an image, which method comprises scanning the image via a raster scan to produce a signal indicative of image intensity at a plurality of picture points, characterised by comparing the image intensity at each of the said picture points with that of a neighbouring point in each of at least two directions to derive therefrom positive and negative difference values, labelling the picture points as corresponding to one of a plurality of types of region boundaries whenever the absolute value of the said positive or negative difference value exceeds a predetermined threshold value, the said type of boundary being determined according to the respective direction and whether the respective difference value is positive or negative, labelling further picture points according to whether or not they lie within a predetermined number of picture points from a region boundary such that boundaries between neighbouring picture elements along a scan line give rise to labelling of successive neighbouring picture elements along the said scan line, and boundaries between neighbouring picture elements on neighbouring scan lines give rise to labelling of points on neighbouring successive scan lines, and time-shifting signals associated with the said different types of region boundaries by different amounts to superimpose those signals corresponding to picture points labelled as being no more than the said predetermined number of picture points from a region boundary only for a region lying wholly within a bounded region of the image.
In accordance with a further aspect of the invention, there is provided a method of sorting articles, which method comprises forming an image of a plurality of the articles, detecting bounded regions within the image by a method as described above, and routing the articles differently, according to whether or not they generate a bounded region on the image.
In accordance with a further aspect of the invention there is provided apparatus for detecting a bounded region of an image, which apparatus comprises means for scanning the image via a raster scan to produce a signal indicative of image intensity at a plurality of picture points, characterised in that there is provided means for comparing the image intensity at each of the said picture points with that of a neighbouring point in each of at least two directions to derive therefrom a positive or negative difference value, means for labelling the picture points as corresponding to one of a plurality of region boundaries whenever the absolute value of the said positive or negative difference value exceeds a predetermined threshold value, the said type of boundary being determined according to the respective direction, and whether the respective difference value is positive or negative, means for labelling further picture points according to whether or not they lie within a predetermined number of picture points from a region boundary, such that boundaries between neighbouring picture elements along a scan line give rise to labelling of successive neighbouring picture elements along the said scan line and boundaries between neighbouring picture elements on neighbouring scan lines give rise to labelling of points on neighbouring successive scan lines, and means for time-shifting signals associated with the said different types of region boundaries by different amounts to superimpose those signals corresponding to picture points labelled as being no more than the said predetermined number of picture points from a region boundary only for a region lying wholly within a bounded region of the image.
According to the invention, picture points of the image are labelled as corresponding to a boundary between first and second regions when the local difference value between neighbouring picture points is greater than a specified threshold.
The invention is particularly suitable for use where boundaries between regions are reasonably sharply defined.
In accordance with a preferred embodiment of the invention there is provided article sorting apparatus comprising conveying means for conveying through an inspection region articles having predominantly a first value of surface reflectivity but bearing occasional surface features having a second value of reflectivity which is substantially different from the first value, means for illuminating each article in the inspection region, sensing means responsive to reflected radiation reflected from the articles for scanning the inspection region to derive an image signal, and apparatus as described above for processing the image signal to detect the presence of and to indicate the location of a surface feature having the second value of reflectivity whenever such feature lies, as viewed by the sensing means, wholly within an area having a first value of reflectivity, and deflection means responsive to such detection and indication of location to cause the article bearing such features to be routed differently from the other articles.
The apparatus preferably includes a delay element, for delaying a signal for a period corresponding to an integral number of picture points, and a substractor, for comparing the delayed with the non-delayed signal.
The means for processing the image signal may include storage means for storing digitally the value of the signal for each of an array of points and means for deriving difference values between neighbouring points in a plurality of directions to determine the presence of a closed boundary between an outer area corresponding to the first value of reflectivity and an inner area corresponding to the second value of reflectivity.
The term "neighbouring points" as used herein is intended to include not only adjacent points in any particular direction but also points spaced from the point of interest by, for example one or two picture points in the direction of interest. Difference values derived from every alternate point have been found to produce effective boundary determinations.
The means for processing the image signal may further include means for reallocating difference values representing the closed boundary to points within the boundary to produce by superimposition a localised area of enhanced value and means for determining the location of the area of enhanced value.
The means for processing the image signal may further include means for deleting from the storage means all difference values below a predetermined threshold value such that the area of enhanced value is substantially isolated.
The processing means used in the apparatus according to the invention conveniently is formed by electronic circuitry, which may be specialised circuitry constructed for the purpose, or may consist of a micro-processor or other general purpose computer programmed to carry out the various functions set out in the preceding paragraphs, and in the remainder of the specification. In this connection it is to be appreciated that where, for example, the processing means comprises a microprocessor, it is usual that many parts of the microprocessor will be utilised at various times in operation to carry out more than one function required in accordance with the invention. Thus it is not necessarily the case that any particular function required in accordance with the invention is allocated to any particular operating means within a computer, but rather that there should merely be provided appropriate means for carrying out the function, and at other times that means may carry out other functions.
It will be apparent that when a desired feature has been located within the scanning area, and thence within the inspection region, the article bearing such feature may be tracked along the conveying means by deriving a speed dependent signal (e.g. from the conveying means drive mechanism) so that the deflection means may be operated at the appropriate instant.
The scanning pattern may consist of a conventional television type of raster, and may be directed along the direction of movement so that the position of the article in the width of the conveyor may be derived from the frame timing of the pattern. In the direction of movement the position of the article may be identified by reference to the interception of the line scan by regularly occurring structural features on the conveying means. Alternatively the raster scan may be perpendicular to the direction of movement, in which case these are reversed.
The sensing means may be a television camera which may be operated under continuous lighting if the conveying means proceeds in a stepwise or batch inspection manner. If the conveying means provides .continuous movement strobe illumination synchronised with the frame frequency may be advantageous in certain circumstances, the imaging signal being extracted only in one frame in each sequence of three or four frames.
Where the articles are rounded articles such as potatoes, the conveying means preferably comprises a roller table over which the articles are conveyed in the inspection area. A roller table is a conveyoer formed of a plurality of rotatable elongate members, known as rollers, connected together by, for example, side chains to form an endless array in which the rollers are spaced apart with their axes parallel and transverse to the direction of translational movement. Articles are conveyed in transversely extending rows supported by adjacent pairs of rollers. The rollers are rotated over at least part of the endless conveyor path in order to rotate the articles conveyed thereon to evenly distribute the articles on the conveyor and to sequentially present the whole surface of the articles for inspection. The rollers and the spacers between them may be such as to be sensed by the sensing means as having a reflectivity close to the second value.
In the inspection of peeled potatoes the feature to be searched for is a blackened area on the otherwise white surface for which purpose the rollers and background are preferably also black. The rollers may be marked to provide a video reference to their position and therefore to the probable position of potatoes between the rollers whereby signals purporting to relate to the presence of a potato in a different position may be rejected. Preferably however, a video reference signal for controlling the timing of the operation of the deflection means is produced by the mechanism moving the roller bed.
Preferably the speed of the conveying means for potatoes is so controlled with respect to the rate of loading that the rollers are sufficiently occupied to prevent a potato which has been identified as defective from moving across the width of the roller away from its determined location. Such movement would cause the selection mechanism to be operated incorrectly.
The deflection means may comprise a bank of fingers arranged to occupy the whole width of the conveying means and at a level such that articles leaving the conveyor must pass or be deflected by one or more of the fingers. Appropriate fingers are operable independently or in groups in response to signals from the image signal processing means and from the conveying means to select for direction in a predetermined path an article previously identified in the inspection region.
It is particu.1arly preferred that an output of the processing means is arranged to actuate the deflector means in dependence upon first and second co-ordinate signals representative of first and second orthogonal co-ordinates of a location in the scanned area, the orthogonal co-ordinates being arranged with the first co-ordinate in a direction corresponding to a direction across the path of travel of the conveyor means at the inspection area and with the second co-ordinate in a direction corresponding to a direction aligned along the path of travel of the conveyor means at the inspection area. It is further preferred' that the deflector means comprises an array of deflector devices arranged across the path of the conveyor means downstream of the inspection area, and drive means for driving selected deflector devices, the selection of deflector devices actuated being controlled in dependence upon the said first co-ordinate signals and the timing of operation of the deflector devices being controlled in dependence upon the said second co-ordinate signals.
The deflector means may comprise fingers for deflecting articles falling from the conveyor means, the fingers being actuable between two or more positions so as to direct the falling articles onto different conveyor belts or other receptacles. In the case of potatoes or other root vegetables or bulbs, the said fingers can be of a kind well known in themselves for separating produce from soils and stones using, for example, x-ray beams to distinguish the difference. Usually the deflector means will be located downstream of the inspection area, and in such cases the signals controlling actuation of the deflector means will be processed in control means in order to compensate for the time delay for the articles to pass from the indicated transient positions in the inspection area to the deflector means.
However it is to be appreciated that the deflector means may constitute means for deflecting selected, or unselected articles at substantially the same time that the articles are selected. In such case of course no time delay needs to be introduced which is related to the speed of conveying. One method of achieving such deflection is for example to provide beneath the conveyor means a bank of ejector rods which can be triggered to project upwardly through apertures in the conveyor means to strike, for example, unwanted articles and to propel such articles clear of the conveyor means. Such arrangements have previously been used in connection with sorting of potatoes from stones, where unwanted stones have been ejected in this manner. It is to be understood that the term deflector means includes not only means for deflecting articles through differing angles during travel of the articles, but also includes means for removing articles entirely from a conveying path, and indeed includes any means for effecting sorting of objects in response to the signals generated by the processing means.
An embodiment of the invention will now be described by way of example with reference to the accompaning drawings in which:- <ul id="ul0001" list-style="none"><li>Figure 1 represents in plan view a roller table for the inspection of potatoes;</li><li>Figure 2 represents schematically article sorting apparatus embodying the invention and incorporating the table of Figure 1;</li><li>- Figures 3(a), 3(b), 3(c) and Figure 4 illustrate aspects of the method of image processing according to the invention;</li><li>Figures 5 to 8 represent in outline form successive steps in the processing of a static image;</li><li>Figure 9 is a schematic circuit diagram of image processing apparatus according to the invention;</li><li>Figures 9(a) 9(b) and 10 represent schematically various points of Figure 9 in more detail; and</li><li>Figure 11 represents schematically various stages in bringing the spread edges into register.</li></ul>
In order to assist in the putting into effect of the present invention, reference is made to the following documents which disclose various known techniques of relevance to the present invention.
In our published Patent Specifications GB-A-2038031 and GB-A-2042717, there are descibed various items of hardware such as a roller table, and various techniques for operating such hardware such as methods of operating a bank of deflecting devices. In a published book entitled Digital Picture Processing by Rosenfeld and Kak, published by Academic Press, New York 1976, there is described for example at pages 274 to 369 a technique for signal processing which is related to the processing technique to be described herein.
Referring now to Figure 1, a conveyor 10 seen in plan view comprises a table formed of rollers 12 which in known manner are carried round a loop path by a transport mechanism such as a chain (not shown). The path includes an inspection region generally indicated as an area enclosed by a broken line 14 through which the rollers 12 are considered as moving from left to right. The rollers are also caused to rotate at least during their passage through the inspection region. Peeled potatoes 16, 18 are shown as having been conveyed to the inspection region from a loading position (not shown) at the extreme left-hand end of the roller table. The diameter of the rollers and the gap between them is arranged so that a potato within the acceptable range of size will travel for the whole length of the conveyor between a single pair of rollers and will usually lie between the centre lines of those rollers. Thus contact between the potatoes in adjacent gaps is unlikely and the time of travel of a potato along the conveyor is exactly indicated by the speed of the conveyor.
The further operation of the system is indicated in the diagrammatic side view of the conveyor in Figure 2. At the right-hand end of the conveyor, that is at the end of the loop, potatoes fall off the rollers 12 onto a bank of fingers 20 which can be positioned pneumatically either to deflect the good quality potatoes into an ACCEPT bin 22 or to allow those identified during inspection as being defective to fall into a REJECT bin 24.
The inspection region 14 is observed by means of a T.V. camera 26 by reflection from a plane mirror 28 mounted above the conveyor 10. The camera circuits provide a video output signal on a line 30 and a scan synchronising signal on a line 32 for processing in a computer comprising units 34 to 42. Data on the location of defective potatoes is held in memory 42 for co-ordination with a conveyor speed signal from a pick-up point 44 to provide an output signal to a finger control unit 46.
The direction of line scan in camera 26 may be along or perpendicular to the direction of motion of the roller table, that is at right angles or parallel to the rollers themselves. The former orientation enables the position of a potato across the width of the roller table to be determined as a proportion of a frame scan period which is much larger than a line scan period and therefore easier to measure. The rollers may then themselves provide indicia of position longitudinally. For this purpose, each roller may be coated with black plastics material or otherwise darkened to provide good contrast with the whiteness of the potato, and one end of each roller (indicated at 50 in Figure 1) may be whitened. Positional reference signals may therefore be obtained at the beginning of each frame and sensed in the synchronisation signal by a "roller detect" unit 36 of the computer. Similar signals marking a transition from black to white will generally indicate the presence of a potato. Such signals can be monitored for validity by reference to the roller positional signals since a potato must almost certainly lie between the centre lines of adjacent rollers as indicated at 52 in Figure 1.
In a preferred arrangement, however, the scan direction is perpendicular to the direction of motion, and positional reference signals are derived directly from the mechanism moving the roller bed.
A verified signal is then accepted by a "potato detect" unit 38 (strictly speaking a boundary or edge detection unit, in the embodiment hereinafter described). Confirmation of the presence of an edge means that any immediately subsequent transition from white to black may represent a defect in the potato. This is not immediately certain however since the scan line may have crossed a narrow segment of a potato and a next black signal may again represent background. This event does not lead to a false output signal because the part of the computer indicated by a "black spot detect" unit 40 is programmed to compare the image data at a matrix of picture points. As will be explained later a defect signal is only produced at the output of unit 40 if the black area detected is completely bounded by white and consequently must then be within a potato. Each of the units 36, 38, 40 operates with reference to timing signals derived by a timing unit 34 from the camera synchronising signal pulse generator 34'.
Illumination of the conveyor, by means which are not shown in the drawing, requires the characteristics of the T.V. camera to be considered.
If a T.V. camera is used to reproduced images of moving objects, their motion is bound to obscure detail, whatever the type of camera used. This is duetothefactthatanyT.V. camera has an effective exposure of 40 ms over which it integrates light falling on its sensitive target. Some cameras, such as vidicons, introduce further degradation owing to an inherently slow time response in the chemical comprising the target.
These factors have not been found significant in practice, but if necessary in any particular application, a mechanical shutter or strobe lights synchronised to the T.V. frame scan may be provided. The latter method is favoured, as it enables the very high light intensity required to be achieved easily at low energy cost and does not require mechanical systems.
Tests have shown that a strobe light can be used to obtain a distortion-free picture of moving objects from a vidicon camera tube provided the picture rate required is somewhat less than normal T.V. frame rates, say 1 in 3 or 1 in 4 normal frames. Only the frame following the strobe flash would be used by the detector, while the effects of lag will have died away before the next. Given the relatively slow speed of the roller table it is found that reduced frame rates of this kind are tolerable.
In addition, it has been found that some reduction in image blurring can be achieved if the rollers rotate in the direction shown by arrow 11, such that the motion of the side of the potatoes facing the camera caused by the rotation of the potato if offset to the overall direction of movement of the potato on the moving rollers.
The signal processing procedure will first be illustrated for simplicity by results obtained from a static image. For this purpose the successive transformations of the original data which are held in the computer store have been read out to a display and photographed. It will be appreciated howeverthatthe method and apparatus for signal processing described herein are applicable to a real time inspection system in which it is unnecessary ever to produce a visual image. The problem of detecting black defect spots will first be considered in principle.
The problem is one of pattern recognition subject to particular restrictions. For example, the spots to be detected have widely variable shapes and sizes, so that a technique which performs a template comparison is unsuitable. A further complication is the presence of the black background of the roller table and the consequent need to distinguish between genuine black spots and gaps between potatoes; such a task is straightforward for the human observer, but much less so for a machine.
The method of detecting flawed potatoes which has been developed utilises an image processing method which detects any dark area bounded on all sides by lighter material. The possible problem of spots lying on the edge of a potato as seen by the camera, where they do not appear to have closed boundaries, disappears when it is recalled that during the passage through the inspection region the potatoes are moving and rotated about their long axes by rotation of the rollers. A spot should therefore be completely visible at least once during its passage pastthefield of view of the camera. The image processing method itself has perfectly general applicability to the detection of bounded regions of an image, at least when such regions have a relatively sharp edge.
The simplest algorithm to locate those picture elements ('pels') which lie within a dark spot is to search in each direction from each spotfor a darker to lighter amplitude transition and to label those elements which are surrounded on all sides by such a transition. The range over which the search for a dark/light boundary extends governs the maximum diameter spot which can be detected. Figure 3(a) illustrates the principle. Elements 0 are dark, elements 1 are light (neglecting for the moment that the input picture actually has a wide contrast range or grey scale). Although the search should proceed in all directions, the horizontal and vertical axes are the most convenient in practice, because of the picture storage format. If the rule is applied to any element in Figure 3(a), and that element is labelled if a dark-light transition is found within 7 elements in the direction of the search, then all the zeros are correctly identified.
It will be realised that making the search process two-dimensional ensures that the small black areas lying between potatoes (both horizontally and vertically) will not be detected as spots, as they do not constitute a closed curve with transitions within the search distance in both dimensions. There is a possibility of error, however, as is illustrated by a pattern such as that in Figure 3(b). A diagonal band of zeros (black elements) whilst not a closed black area, would be detected as such by searches within two picture elements in the horizontal and vertical directions. This risk of error could be eliminated by extending the search to 45 degress to the major axes, but for practical purposes, this has not been found to be necessary.
If the size of the spot is increased as the search distance remains constant, then the number of elements which satisfy the rule falls until a single element, or group of elements, remain at the centre of the area. In general, to give some indication of the presence of a spot with a search distance of N pels, the maximum spot dimensions are (2N-1) pels in both X and Y directions. Between (2N-1) and N pels, the detected area of the spot is less than its actual area. For spots less than N pels in both dimensions, the shape is not affected, all elements lying within it being detected.
The search distances in the X and Y dimensions do not need to be the same: for example, in another application of the principle, it may be necessary to bias the system against particular shapes. Thus, if the search distance is small horizontally and large vertically, the detector will be biased in favour of patterns which are thin horizontally and extended vertically, but will not detect the same patterns rotated through 90 degrees.
The concept of searching for the transitions which surround a black spot has been explained as an aid to the understanding of the process. It is, however, very slow because of the computer time necessary for all the various comparisons required in processing each pel. A method will now be described which is less 'intelligent', but produces the same results in a way which (in the present example) is more efficient in its use of computer time.
The input picture is a sequence of picture element amplitudes stored in a file as if taken from consecutive columns which run from left to right across the picture. Thus, if there are 100 pels in a column, elements 50 and 150 were horizontally adjacent in the original picture. Element 151 in the file was situated one element to the right of the one element below element 50. The need to work in two dimensions makes the workspace-storage needs of the processing programmes considerable. The range of interest vertically can extend to the full height of the column, as the storage of (say) only 100 pels is required. To obtain the same degree of freedom horizontally requires storage of the whole picture at once, which even if it is as small as 100 by 100 pels, is still excessive. In the software which has been developed, a system of rotating column stores has been used: an area of storage capable of holding around 10 columns of the picture at once is reserved in memory. If the search process is to extend over 10 elements horizontally in the picture, then the first 10 columns of data are read consecutively into the storage area. The eleventh column (when required) goes into the space occupied by the first, the twelfth to the second, and so on. This gives continuous access to the most recent and the nine previously read-in columns of data. It is a simple matter for the software to keep track of any column of interest.
Practical spot-detection is a two stage process; first edges, in horizontal and vertical directions, are identified. Then the map of the edges which results is 'smeared' or spread in a particular way such that the portions denoting edges are expanded, and overlapping smeared regions enable the spots to be located.
The result from the first stage of the process is a version of the picture (in identical storage format to the original) where each element value has been replaced by a 4 bit byte each bit of which indicates whether a particular type of edge was detected as being present at that element.
In the source picture two differences from the current element are calculated: from that above it in the current column and from that to its left in the previous column. Each result is compared with two thresholds. If the vertical difference is greater than a positive threshold, the presence of a dark to light transition downwards is indicated (the lower edge of a black spot, for example). If the difference is less than a negative threshold the dark and light positions are reversed. Similar possibilities arise from horizontal comparisons. These comparisons enable four different edge types to be identified, shown as the upper row of Figure 3(c). Identification of just these four edge types has proved sufficient for reasonably reliable spot detection in practice. The lower row of Figure 3(c) includes four corresponding cases for diagonal edges. The diagonals are represented at 45° but may occur with a wide range of orientation which is only broadly identified by horizontal and vertical differencing. When the dark or light level remains constant the absence of an edge is indicated by a result of zero for each bit. The presence of an edge results in a corresponding bit of the four bit byte being set.
Techniques similar to the second stage spreading process are familiar in pattern recognition work, where they are used frequently to bridge gaps in otherwise continuous areas of binary pictures. Here the technique is somewhat different, in that the desire is to locate regions of the picture where edges of a particular kind lie close together.
In order to do this, when a bit is set in a given byte indicating the presence of a particular edge type, the spreading process sets the corresponding bit for each of a predetermined number of picture point storage locations in a chosen direction to thereby label those picture points as corresponding to region boundaries. In order to locate black spots on a white background, the edge spreading directions must be as follows: <ul id="ul0002" list-style="none"><li>(i) Horizontal Edges (Left to Right) <ul id="ul0003" list-style="none"><li>a. White to Black: spread to the Right</li><li>b. Black to White: spread to the Left</li></ul></li><li>(ii) Vertical Edges (Downwards) <ul id="ul0004" list-style="none"><li>a. White to Black: - spread Downwards</li><li>b. Black to White: spread Upwards</li></ul></li></ul>
It will be realised that the conditions which would be obtained at a black spot on a white background will result in a region of overlap which indicates the original position of the spot. The region is easy to identify by examining the 4 bit bytes for each element after the spreading, and locating those which consist of all binary 'ones'.
The spreading process is applied independently to each of the four bits of the edge-data byte for each pel. The simplest to consider is the vertical white to black transition which has to be extended downwards. The process is illustrated by the flow-chart of Figure 4. For each element where there is a '1' (i.e. an edge of the current type of interest), a variable X is set to the constant value N which defines the required extent of the spreading in picture elements. If the next element is not '1' and the variable is greater than zero, the variable is decremented by 1, otherwise it is left at zero. While the variable is greater than zero, the process output is a logic '1', indicating an extended edge.
In the horizontal direction, the technique is similar, but is complicated by the need to maintain an array for the 'X' variables of the flow chart, one for each row of elements.
In the particular program used spreading always works from top to bottom and left to right. To obtain the effect of upward or leftward spreading, signals from different regions of the array are combined.
The steps in the processing of the original image may be seen from Figure 5 to 8 which are printed from photographs.
Figure 5 shows an original picture digitised then read back from the disk to the frame store for display. Its dimensions are 256 elements horizontally (as the signal from the camera had a bandwidth of 5.5 MHz, the sampling rate was 11 MHz) by 200 lines vertically. The two interlaced fields making up the picture are identical, which leads to a rather coarse structure in the vertical direction, since the effective vertical spatial sampling rate is then too low.
The lighting of the potatoes on their rollers was from fluorescent tubes well to the sides of the camera, with their axes at right angles to the rollers to avoid reflections. White spots have been placed on the rollers to demonstrate that the system does respond only to black-on-white defects.
Figure 6 is the output of the first stage detection process, and shows the raw threshold edge information. The thresholds were set at ±20 quantum levels out of the possible range of ±255. The picture simply reproduces the coded edges as different grey levels. The various levels are allocated as follows: <tables id="tabl0001" num="0001"><img file="EP0058028B1_D0001.tif" /></tables>
Figure 7 is the output of the spreading process. It can be seen that the edges of black spots tend to be spread towards each other while white spot edges extend away from the centre of the spot.
In Figure 8 those elements which lie within a region of overlap of all four extended edges are identified by setting them to peak white on the T.V. display. The information could equally be used to specify addresses of the elements which lie within a black spot.
In order to achieve the sequence of operation described above, the applicant has devised a set of computer programs in accordance with the principles set forth above, which can take raw digitised T.V. pictures and process them to obtain indications of the positions of dark defects on white potatoes. The algorithm is general in that it can detect other types of feature in a picture with only slight modification.
The applicant also devised a system using similar general methods but embodied in hardware, which is suitable for real time use. An overall schematic diagram of the system is shown in Figure 9. A video signal is produced by a camera 120 operating on a conventional raster scan system, converted to eight-bit digital form via analogue-to-digital converter 12, is received at an input 60 and is processed separately in respect of the two axes.
An edge detection unit, shown in more detail in Figure 9(a), includes horizontal edge detection module 116, and a vertical edge detection module 118. The horizontal edge detection module 116 includes a delay unit 62 in which the input signal is delayed by a time representing one picture element, before being compared with the direct input in a subtraction unit 64. The difference signal may be positive or negative and is compared with a predetermined threshold level from computer-loaded threshold registers 66b, and 68b in a respective comparator 66a/66b. This results in a logic '1' output from comparator 66a at point 110 for a horizontal black-to-white transition and a logic '1' output from comparator 68a for a horizontal white-to-black transition.
In the vertical edge detector 118, the single element delay unit 62 of horizontal edge detector is replaced by a delay unit 70 in which the input signal is delayed by a time representing one line before being compared with the direct input in a subtraction unit 72. This can be done by reading the current signal into a 512 elementx8 bit shift register, the data from which is read during a scanning of the subsequent line. Otherwise the vertical edge detection 118 is identical with horizontal edge detector 116. The difference signal is compared with a predetermined threshold level in a comparator 74a if positive or a comparator 76a if negative. A logic '1' output from comparator 74a represents a black-to-white vertical transition and an output logic '1' from comparator 76a represents a white-to-black vertical transition.
It will be appreciated that the horizontal edge detection unit, in comparing successive horizontal picture points, in fact will detect vertical edges in a T.V. picture as seen, and similarly the vertical edge detection unit will detect horizontal edges.
Thus the presence of one of the four types of horizontal and vertical transition illustrated in Figure 3(c) is indicated by an output at a respective one of four output points 110,111,112, 113.
The pulses obtained at the four outputs 110 to 113 are synchronised by re-timing units 124 and 125, using an 11 MHz clock signal 119 and are then fed to horizontal edge expansion modules 126 and 127 and vertical edge expansion modules 128 and 129 respectively. AND gates 114 and 115 serve to "clean up" the wave form obtained. A single horizontal edge expansion module 126 is illustrated in Figure 9(b), the other (127) being identical. The functioning of the module is as follows. When a logic '1' arrives from the re-timing unit via AND gate 114, a down-counter 80 is loaded with a constant from a computer-fed register 82 which controls the expansion distance. The counter 80 counts down at the system sample rate. While its outputs are greater than zero as detected by a digital comparator 84 the output at point 130 of the spreader module is at logic '1' indicative of the continued presence of an edge. When zero is reached the clock input to the counter 80 is inhibited via AND gate 86, and a logic '0' output at point 130 results until counter 80 is re-set by a new input from re-timing unit 125.
Vertical spreading module 128 and 129, are likewise identical with each other, one being illustrated on a larger scale in Figure 10. The same principle (outlined in the flow chart of Figure 4) is used, of pre-setting a counter, when an edge is detected, to the desired number of elements over which the spread is to extend, then decrementing the counter at element rate. The extended edge is thus present while the counter output is non-zero. Since vertically adjacent picture elements are displaced in time by one TV line period (64 micro seconds), and if there are taken to be 512 elements in the active part of a line, it is in principle necessary to provide 512 separate counters. This can be achieved in practice by holding the states of a notional bank of 512 counters in a 512 element recirculating shift register. Figure 10 illustrates one hardware solution, which is capable of increasing the apparent height of a vertical edge to a maximum of 15 lines.
A 4-bit subtractor 90 receives two inputs A and B and outputs the difference (A-B) to a 4-bit 512 element shift register 92. Input A is received from a data selector 94 which responds to the presence of a signal at input 96 indicating the detection of a vertical edge by the circuit of Figure 9(a). When that signal is present, selector 94 causes input A to be equal to the constant N which is derived from computer-loaded register 98 and indicates the number of picture elements over which the desired spread is to extend. In the absence of a current edge detection signal at the input 96, selector 94 switches the output from shift register 92 to provide input A. When the output from register 92 is non-zero, the desired spreading for the picture element concerned has not been completed. The value of input A is tested by an OR gate 100. When input A is greater than zero, the output from OR gate 100 is a logic '1' which appears at an output 132 as a spread instruction signal and also sets the value of input B. For input A=N, and therefore input B=<sub>1</sub>, the output from subtractor 90 is (N-1) which is loaded into register 92 on the next 11 MHz clock pulse to appear at an input 104. If the edge is present on one line only, the value (N-1) appears at input A after 512 clock periods, there being no new edge detection signal. The spread instruction again appears at output 132 and the decremented value (N-2) is entered in register 92. It will be clear that the process is repetitive until spreading over the desired N elements is completed.
Thus to summarise, a 4-bit subtractor 90 which calculates (A-B) takes as input A either the constant, N, indicating the desired spread, if an edge is detected by previously described hardware, or if not, the output from a 4-bit 512 element shift register. If input A to the subtractor 90 is greater than zero (detected by the OR gate 100) the least significant bit of input B is set to logic '1', the remaining bits being permanently zero. Thus, the counter output is (N-1), which is loaded into the shift register by the next 11 MHz clock pulse. Assuming the edge is present on one line only, after 512 clock periods, (N-1) appears at input A, and (N-2) at the output and so on. A '1' at the OR gate output for any picture element indicates that a vertical edge, either original or extended, has been detected.
When the count for a particular element falls to zero, the OR gate output goes to logic '0', and the subtractor output is also zero, a state that then persists until an edge is found. The outputs from the vertical edge detector modules appear at outputs 132 and 133, and these outputs, together with horizontal edge outputs 130 and 131 are synchronised by re-timing unit 140.
Because the above described system operates in real time, and comparisons with neighbouring picture points are effected only via time delays, the process of spreading a detected edge represents the labelling as edges of picture elements which are displaced from the element at which the data originated. Since the desire is to produce an indication of points which are labelled as boundary regions by each of the spreading modules 126 to 129, it is now necessary to bring the associated edges into register. This is carried out by means of signal delay modules 142, 144, 146, the effect of which is illustrated in Figure 11. Different stages are shown in diagrams (a), (b), (c) and (d).
Figure 11 (a) shows the idealised spreader output for a rectangular black area on a white background (i.e. as would be obtained by direct combination of outputs 130 to 133). In delay module 144 the retimed output 131 corresponding to a white-to-black transition is delayed by delay unit 141 by an amount corresponding to the horizontal spreading distance. Similarly in delay module 162, a white-to-black vertical boundary is delayed by an amount corresponding to the vertical spreading distance. In each case the delayed signal is combined with the non-delayed signal for that direction by an AND gate 160, 161. The effect which would be achieved by the notional combination of the outputs at points 167 and 168 is illustrated in figure 11(b).
Further time delays to bring all four edges in to register are provided by delay module 146. Delay Unit 151 delays the combined horizontal edge signal 147 by an amount corresponding to the vertical spreading distance. The effect (i.e. the notional effect of the combination of output 149 of unit 151 and output 148 of AND gate 161 is illustrated in Figure 11(c). Delay unit 154 delays the combined vertical edge signal 148 by an amount corresponding to the horizontal spreading distance to achieve the final result, as iIIus" trated in Figure 11(d). The centre of the detected black area is indicated by the region where all four components overlap. The position of the black area is shifted from the original but the original position may be simply derived from knowlege of the time delays.
Additionally, it is to be appreciated that the extent of the delays needed for registration need not be set equal to spreading distances. For example, if the delays are made greater than the spreading distances, the system can be made to discriminate against blemishes smaller than a certain size. In practice, all parameters are made capable of independent control.
Although in the foregoing description reference is made to difference signals between adjacent lines, because of the interlacing in the raster scan system, this represents alternative lives in the image as seen. It has been found furthermore that calculating differences between alternate rather than adjacent picture points in the horizontal direction gives rise to improved results.
As mentioned above one method of providing timing signals to provide an indication of position along the length of the roller table is to provide markings on the rollers for synchronisation of the raster scan.
In a preferred method, however, a timing signal is generated directly from the movement of the roller table. In a further preferred embodiment the spot detection system is arranged so as to operate only in the periods of the line scan corresponding to the same timing signal generated by movement of the roller bed referred to as the "roller function", may be used both to time this operation of the spot detection system and to provide an indication of positions along the roller table. If displayed on a picture monitor, the roller function would appear as a series of horizontal stripes on the screen, the stripes lying over the roller gaps and tracking their motion. The information on roller position may be provided by a pair of toothed discs attached to the main roller drive shaft which produce electrical outputs via photoelectric sensors. The first disc gives one pulse per roller passage, the second sixteen.
The roller function itself is generated by a pair of 'down' counters, constituting a digital multivibrator. The counters are preset to the desired number of television scan lines for the active and inactive (mark and space) durations respectively.
The first counter is decremented once per TV line, and the active part of the roller function cycle is obtained while its outputs are non-zero. When its count reaches zero, the second counter is enabled and proceeds to decrement towards zero in the same way. When its outputs reach zero both counters are reloaded and the cycle repeats itself, hence the designation of the system as a 'digital multivibrator'.
The tracking action is obtained by delaying the start of the first counting cycle of the first counter by means of a third counter. This is loaded once per field from an accumulator. The accumulator is incremented by a preset amount by the 16 pulse/ roller control signal, while it is reset to zero by the 1 pulse/roller component.
Since there are provided means for generating 16 pulses per roller, it is convenient if the number of television lines per roller pitch is an integral multiple of 16, say 3, giving 48. Thus, in the practical implementation of the defect detector the accumulator increment is 3, the'active' part of the roller function cycle is 22 TV lines, while the inactive part is 48-22=<sub>26</sub>. As the active picture area used by the system contains approximately 287 lines per field, the number of roller pitches seen by the camera is adjusted to 287/48=5.979 or 6 in practice. This gives adequate coverage of the width of the roller table, since the actual roller pitch is 3.25 inches (8.25 cm), giving the distance along the table seen by the camera as 3.25x6=<sub>19</sub>.5 inches (49.5 cm). The television aspect ratio is 4:3, so the equivalent width seen is 19.5x4/3=<sub>26</sub> inches (66 cm): the actual table width is 25 inches (63.5 cm).
An automatic selection system has been described with particular reference to the detection of black spots in potatoes but the possibility of application will be apparent in the detection either of flaws or of desirable features particularly features having fairly sharply defined boundaries in any context in which image analysis is desired. The term illumination has been used since in general visible light will be used but clearly the use of any other radiation such as infrared, ultra violet, radiation may be used.
Whilst it is generally advantageous to operate an automatic inspection system with a continuously moving conveyor the benefit of the defect analysis procedure may of course be obtained with a batch or stop-start means for presenting articles for selection. The image processing method and apparatus may be used for examining a single article, sheet material, or other form of substance, for examining paintwork or the like of articles such as automobile, or for any other purposes in which spot detection is desired.
12 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12
6 members in 4 offices
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 8102752 | United Kingdom | A | |
| 8102752 | United Kingdom | – | |
| 8102752 | – | – | – |
| GB19810002752 | – | – | – |
Members6
| Document | Office | Kind | |
|---|---|---|---|
| EP0058028A2 | European Patent Office (EPO) | A2 | |
| EP0058028A3 | European Patent Office (EPO) | A3 | |
| US4493420A | United States of America | A | |
| EP0058028B1This record | European Patent Office (EPO) | B1 | |
| AT27925T | Austria | T | |
| DE3276621D1 | Germany | D1 |
31 legal events, as 3 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Se: european patent has lapsedLapsedEUG | EUG | EP | |
| Notification of lapseLapsedST | ST | FR | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Nl: lapsed or anulled due to non-payment of the annual feeLapsedNLV4 | NLV4 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Be: lapsedLapsedBERE | BERE | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Patent ceasedCeasedPL | PL | CH | |
| Fr: translation filedET | ET | EP | |
| Corresponds to:REF | REF | EP | |
| Designated contracting statesAK | AK | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Corresponds to:REF | REF | EP | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| It: translation for a ep patent filedITF | ITF | EP | |
| It: translation for a ep patent filedITF | ITF | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Designated contracting statesAK | AK | EP | |
| Search report despatchedORIGINAL CODE: 0009013PUAL | PUAL | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 0058028
- Publication, DOCDB
- 0058028
- Publication, EPODOC
- EP0058028
- Application
- 82300488
- Application, DOCDB
- 82300488
- Application, EPODOC
- EP19820300488
Titles3
- English
- Method and apparatus for detecting bounded regions of images, and method and apparatus for sorting articles and detecting flaws
- German
- Verfahren und Vorrichtung zur Erkennung bestimmter Bereiche von Bildern und Verfahren und Vorrichtung zum Sortieren von Gegenständen und zum Erkennen von Fehlerstellen
- French
- Procédé et dispositif pour détecter des régions déterminées d'images et procédé et dispositif pour trier des articles et détecter des défauts
Classification
- CPC, 7
- G01N21/88
- B07C5/3422
- G06T7/0004
- G06T2207/30124
- G06T2207/30128
- G06T2207/30156
- Y10S209/939
- IPC, 3
- B07C5 342
- G01N21 89
- G06T5 40
Designated states11
- Contracting states, 11
- Austria
- Belgium
- Switzerland
- Germany
- France
- United Kingdom
- Italy
- Liechtenstein
- Luxembourg
- Netherlands (Kingdom of the)
- Sweden
