Method of and apparatus for inspecting a transparent or translucent article such as a bottle

Abstract: For inspecting a transparent or translucent article especially a bottle to determine the presence or absence of a defect, particularly of a check, light is irradiated upon an inspection area of a bottle (1) being rotated or moved by drive means (5) and reflected light is photographed through an inspection table (3) by means of a two-dimensional camera (9) which includes solid-state image pickup elements. Picture element data for a first frame are fetched at a first point of time from the camera (9) and stored into a memory, and then picture element data for a second frame are fetched at a second point of time after a fixed interval of time after the first point of time. Then, differences of the picture element data for the second frame from the picture element data for the first frame from the memory are taken and binary digitized with reference to a predetermined brightness threshold level, the number of those of the differences which have one of two binary values is counted, and this number is compared with a predetermined number to accurately determine the presence or absence of a defect. The apparatus includes a light projector (6), a CCD camera (9), a camera controller and processing unit (14) and electronic means (see Fig. 1) for processing the camera data so as to make the counts and comparisons.

Description: This invention relates to a method of and an apparatus for inspecting a bottle or the like using an optical device, to determine the presence or absence of a defect by electronic processing. Various methods are known of optically inspecting a bottle or the like to determine the presence or absence of a defect such as, for example, a split called a check or a foreign article such as a stone or the like which may appear at or mixed in a bottom or body portion of the bottle. An example of such methods was disclosed in 1983 in, JP-B2-58-58020. According to this method, light is irradiated in an inverted conical ring shape upon a circumferential side wall of a bottle for inspection from above from a light projecting section such that it may be introduced toward a bottom face of the bottle so as to reach a corner material portion of the bottom through the material of the side wall of the bottle, and reflected light which is reflected, where there is a split in the corner material portion, from such split is introduced into a single photoelectric transducer element to detect such split. With this method, however, the optical system is complicated in construction, and besides, since reflected light is detected only by means of the single photoelectric transducer element, if the angle of light reflected from a check is only a little different from a specified angular range, such reflected light will not be introduced into the photoelectric transducer element, and consequently, the presence or absence of a defect cannot be detected accurately. Further, various design patterns are commonly formed on the bottom faces of bottles, and the amount of reflected light varies to a great extent depending upon such design pattern. Accordingly, it is impossible to detect a check of a bottle only from a variation in amount of light when the bottle has a design pattern thereon. Another example of such conventional methods was disclosed in 1986 in JP-A-61-107144, wherein a bottle is carried to an inspection position in the neighborhood of a one-dimensional image sensor, and while the bottle is being rotated around an axis thereof with the axis thereof held in parallel to a longitudinal direction of the image sensor, it is illuminated such that an image of transmission light through the bottle is formed on the image sensor. The image sensor is scanned so as to obtain a set of signals, and such scanning is repeated during rotation of the bottle so as to successively obtain a plurality of sets of signals. Two sets of signals obtained at a first rotational position of the bottle and a second rotational position of the bottle after rotation of the bottle from the first rotational position are compared with each other, and the presence or absence of a defect is determined in accordance with the result of such comparison. With this method, the accuracy in detection is somewhat higher than that of the method of JP-B2-58-58020 described above. However, while employment of a one-dimensional image sensor is more advantageous in regard to resolution than employment of a two-dimensional, image sensor, a high degree of accuracy cannot be ensured for detection of a check of a bottle using a one-dimensional image sensor since the direction of reflected light from a check of a bottle is changed to a great extent by rotation of the bottle and since such check is various in shape, and also since disturbance light from other than such check is much received by the one-dimensional image sensor due to rotation of the bottle. Accordingly, the latter method cannot cope efficiently with checks of bottles having various shapes. There are further known, see US-A-3,777,169, US-A-3,830,969, and GB-A-2 057 124 methods and apparatus for inspecting objects by digitally recording images of the object at intervals of time and comparing the stored images to detect differences between the images. Such methods serve to detect foreign bodies in moving liquids or to detect changes in cracks in a test piece. It is an object of the present invention to provide a method of and an apparatus for inspecting a bottle or the like by which presence or absence of a defect, particularly of a check, can be determined with a high degree of accuracy. In accordance with the invention, this is achieved by the features of Claims 1 and 3. In case the object for inspection is, for example, a bottle and has a check as a defect, since the direction of reflected light from the check is instantaneously changed to a great extent by rotation or movement of the bottle, even if picture element data originating from such reflected light are fetched at a certain point T1 of time from the two-dimensional camera as a picture element at a certain position, picture element data originating from reflected light of the check are not fetched at another point T2 of time after the predetermined interval of time. On the other hand, since disturbance light from any location other than the check is reflected almost in the same direction also after some rotation or movement of the object, picture element data are fetched at both of the points T1 and T2 of time. Accordingly, if differences are taken between picture element data for one frame fetched from the two-dimensional camera at the point T 1 of time and picture element data for another frame fetched at the point T 2 of time after the predetermined interval of time after the point T 1 of time, then picture element data of high brightness values originating from reflected light from the check remain, but picture element data originating from disturbance light from any other portion than the check are cancelled. Thus, such differences are subsequently binary digitized or divided into two groups of white and black with reference to a predetermined brightness threshold level, and the number of those picture elements having those of the differences which have one of two binary values is counted. Then, when the count number is greater than the predetermined number, it is determined that there is a defect in the object. Consequently, presence or absence of a check which makes a defect can be detected with a high degree of accuracy. If the speed of rotation or movement of the object changes, then also the direction of reflected light from such check is changed and the amount of incidence light to the two-dimensional camera is changed. Accordingly, preferably the fixed interval of time between frames at which picture element data are to be fetched and the brightness threshold level for binary digitization are adjusted in response to the speed of the object for inspection in order to improve the accuracy in detection. Consequently, when data for each one frame from the two-dimensional camera are to be fetched at a high speed, the number of frames to be thinned out is adjusted in response to the speed of rotation or movement of the object. Preferably, the number of those of the differences which have one of two binary values is counted for each of a plurality of window areas included in a photographing area of the two-dimensional camera in order to except such picture elements originating from a design pattern formed on the object for inspection. The two-dimensional camera can thus detect presence or absence of a defect of the object for inspection with a high degree of accuracy for the plurality of locations of the object without detecting a design pattern or the like as a defect in error. According to another aspect of the present invention, there is provided an apparatus for inspecting an object for inspection such as a bottle or the like being rotated or moved at a predetermined speed by a handling machine to detect a defect of the object, which comprises a light projector for irradiating light upon an inspection area of an object for inspection being rotated or moved, a two-dimensional CCD (charge-coupled device) camera for photographing reflected light from the object only for a fixed area, a camera controller for successively fetching picture element data produced from the two-dimensional CCD camera for each one frame after each predetermined interval of time and storing the thus fetched picture element data therein, a difference calculating section for calculating differences between the picture element data thus fetched for different frames, a binary digitizing section for binary digitizing the thus calculated differences with reference to a predetermined brightness threshold level, a counter for counting the number of those of the differences which have one of two binary values, and a main controller for adjusting the predetermined interval of time for the camera controller and the predetermined bright threshold level for the binary digitizing section in response to a speed signal from the handling machine representative of a speed of the object and for counting the number of those of the differences which have one of two binary values and comparing the count number with a predetermined number to determine presence or absence of a defect in the object for inspection. With the apparatus, presence or absence of a defect in an object for inspection can be detected with a high degree of accuracy with a minimized influence of disturbance light. The apparatus may further comprise means for causing the counter to count a number of those of the differences which have one of two binary values only for one or ones of a plurality of window areas included in a photographing area of the two-dimensional CCD camera which is or are designated by the main controller. Preferably, the apparatus further comprises a monitoring display apparatus for reproducing and displaying thereon data for a frame fetched by the camera controller so that setting for inspection can be performed appropriately and readily while a condition of a defect is being observed. The above objects, features and advantages of the present invention will become apparent from the following description taken in conjunction with the accompanying drawings, wherein; FIG. 1 is a block diagram of a defect detecting apparatus to which the present invention is applied; FIG. 2 is a diagrammatic representation illustrating a defect detecting method according to the present invention; FIG. 3 is a plan view showing a relationship between a bottle and an inspection window in a detecting operation in the method illustrated in FIG. 2; FIG. 4 is a diagrammatic view illustrating a picture image for one frame of a two-dimensional CCD camera and analog waveforms in brightness level obtained along a certain line of the picture image; and FIGS. 5(A), 5(B) and 5(C) are flow charts illustrating operation of the defect detecting apparatus of FIG. 1. Referring first to FIG. 2, there is illustrated a defect detecting method to which the present invention is applied. A transparent or translucent bottle 1 which is an object for inspection is transported along a guide rail 2 to an inspection window 4 (FIG. 3) formed in a table 3. At the position of the inspection window 4, light is irradiated from a light projector 6 upon the bottle 1 while the bottle 1 is being rotated at a fixed speed by a drive disk 5. The light projector 6 is connected to a halogen light source 8 by way of an optical fiber 7 and projects light from the halogen light source 8 in a little obliquely downward direction toward a bottom portion of the bottle 1. Below the inspection window 4, a two-dimensional CCD camera 9 is installed such that an optical axis thereof makes a predetermined angle with respect to an optical axis of the light projector 6. The two-dimensional CCD camera 9 photographs, through the inspection window 4 of the table 3, a portion of the bottom of the bottle 1 illuminated with light from the light projector 6. Referring now to FIG. 4, there is shown, in a rectangular screen, a picture image for one frame photographed by the two-dimensional CCD camera 9 at a point T 1 of time. In the arrangement shown in FIG. 2, the two-dimensional CCD camera 9 photographs only part of the bottom of the bottle 1, and a white picture image 10 originates from reflected light from a check formed in a circumferential edge portion of the bottom of the bottle 1 and is high in brightness. Another small white picture image 11 originates from disturbance light from some portion other than the check (for example, reflected light from a portion of the table 3). A plurality of regularly spaced black picture images 12 originate from projected portions which may be provided on the bottom of the bottle 1 in order to indicate a model number and so forth of the bottle 1 in a code system. Another black picture image 13 originates from a design pattern provided on the bottom face of the bottle 1. Since the direction of reflected light from the check is instantaneously changed to a great extent if the bottle 1 is rotated only a little as described hereinabove, the picture image 10 originating from the check moves, at another point T 2 of time after a short predetermined interval of time after the point T 1 of time mentioned hereinabove, to a great extent as indicated by a broken line in the photographing screen of the two-dimensional CCD camera 9 while the picture image 11 originating from disturbance light from any other portion than the check little moves. Referring back to FIG. 2, a picture image processing unit 14 is connected to the two-dimensional CCD camera 9. Picture element data produced from the camera 9 are accepted by the picture element processing unit 14 for each one frame and stored into a memory(not shown)of the picture element processing unit 14. The picture element data thus stored in the memory are thereafter processed as hereinafter described. A monitoring television set 15 in the form of a cathode ray tube is connected to the picture image processing unit 14 so that a picture image accepted into the picture image processing unit 14 can be displayed at any time on the television set 15. The picture image processing unit 14 has a general construction as shown in FIG. 1. Referring to FIG. 1, a large number of picture element data for one frame obtained from the two-dimensional CCD camera 9 are inputted to a camera controller 16 for each one frame. Thus, picture element data are successively inputted to the camera controller 16, for example, for a total of 115 frames for one full rotation of the bottle 1 at a time interval of a fixed short time t and stored into a memory not shown therein. Picture element data for one frame designated by a main controller 19 are outputted from the camera controller 16 and stored once into a buffer memory 17, and differences of different picture element data for a next designated one frame which are inputted after an interval of time of t x k after the certain point of time are calculated at a difference calculating section 18. It is to be noted that k is a thinning out value and is set in such a manner as hereinafter described by the main controller 19 which has a CPU (central processing unit) not shown therein. Here, the reason why differences between picture image data for two frames obtained at different times different by t x k are calculated is that it is intended to extract only such picture image 10 as shown in FIG. 4 which originates from a check of a bottle. In particular, referring to FIG. 4, a picture element output of the two-dimensional CCD camera 9 is taken in the form of an analog waveform along a straight line A-A of the rectangular photographing screen at different rotational positions of the bottle 1 and is shown in waveform diagram in a corresponding relationship with the picture image below the photographing screen. Thus, at the point T 1 of time at which the picture image 10 originating from the check is at a full line position, the waveform presents a high level or peak only at a portion thereof which corresponds to the picture image 11 originating from disturbance light. On the other hand, at the point T 2 of time after the interval of time t x k after then, the picture image 11 originating from disturbance light moves little, but the picture image 10 originating from the check has been moved to and is now at a broken line position, and consequently, the analog waveform then exhibits high levels or peaks at a portion thereof which corresponds to the picture image 11 originating from disturbance light and another portion which corresponds to the picture image 10 originating from the check. Thus, if a difference between the brightness values at the point T 1 of time and the point T 2 of time is taken, then the peak at the portion corresponding to the picture image 10 originating from the check remains, but the other peak at the portion corresponding to the picture image 11 originating from disturbance light is cancelled. The reason why differences are taken between picture image data for two frames obtained at different times different by the interval of time t x k is that, when the bottle 1 is rotated at a very high speed, such calculation of differences between each successive ones of the total of 115 frames for one full rotation of the bottle 1 may not be performed, and in order to eliminate such a possible circumstance, different frames different more than one frame distance are selected for such calculation of differences. The value of the thinning out value k is thus determined in response to a speed of rotation of the bottle 1 such that, while the speed of rotation of the bottle 1 rises, the interval of time t x k may not be varied significantly. Referring back to FIG. 1, the differences in picture element data calculated at the difference calculating section 18 are then binary digitized for each picture element by a binary digitizing section 20 with reference to a certain level of brightness or threshold level. In other words, a certain brightness level is determined as a reference or threshold level, and picture element data are divided into two groups of white and black such that, if the picture element data are equal to or higher than the certain brightness threshold level, then they are determined as white (1 in binary digital value), but if they are lower than the predetermined brightness threshold level, then they are determined as black (0 in binary digital value). Such binary digitization is performed successively for all of picture elements for one frame. Further, the level H serving as the reference level for binary digitization is automatically adjusted in response to a speed of rotation of the bottle 1 by the main controller 19. The reason is that, when the speed of rotation of the bottle 1 is high, the amount of incidence light to the two-dimensional CCD camera for photographing one frame and hence output levels of individual solid-state image pickup elements are low correspondingly. Since the picture image 10 originating from the check can be regarded as an aggregate of picture elements having higher brightness values than the reference brightness level for binary digitization and likely appears at any of particular locations of the rectangular photographing screen of FIG. 4 due to the fact that such check likely appears at any of particular locations of the bottom or body of a bottle, the rectangular photographing screen of FIG. 4 is divided into first to n-th window areas W 1 , W 2 , ... and W n where the picture image 10 of a check is apt to appear, and a number of those of picture elements which are determined as white by binary digitization (defect picture elements) is counted individually for each of the window areas W 1 , W 2 , ... and W n . Thus, it can be presumed that, if the number of such defect picture elements in a window area is greater than a predetermined value, then a check is present in the window area. Thus, data representative positions of individual picture elements in a window area are stored into a window memory 21 in accordance with an instruction from the main controller 19, and only those of binary data of white from the binary digitizing section 20 which belong to the window area pass through a gate circuit 22 and are thus counted by a counter 23. Consequently, such count value of the counter 23 represents a number of defect picture elements in the window area, and in case the count value is higher than a fixed level, the main controller 19 determines that there is a check in the bottle 1 and outputs, by way of an interface 24, an excluding signal to the handling machine 30 to exclude such defective bottle 1 from the transporting line. The main controller 19 further controls an inspection result display unit 25 to display a number of such defective bottles, a defective location and so forth thereon. Picture element data for each one frame fetched into the camera controller 16 are stored in digital amount into a display memory 26 in a predetermined period set by the main controller 19 and are then converted into a video signal by a digital/video signal converting section 27 so that they are reproduced by and displayed on the monitoring television set 15. Initial set values and so forth necessary for inspection are inputted in prior to the main controller 19 by way of an interface 29 from a keyboard 28 while a reproduced image on the television set 15 is being observed by an operator. An inspection timing signal, a bottle presence signal representing that a bottle is present at a predetermined inspection position, a speed signal representing a speed of rotation of such bottle and so forth are inputted from a handling machine 30 to the main controller 19. The thinning out value k and the reference level H for binary digitization described above are adjusted in accordance with the thus inputted speed signal. As already known, the handling machine 30 performs various operations including transporting a bottle 1 and rotating the bottle 1 at the inspection position by means of the drive disk 5 as described above. Alternatively, a speed of rotation of the bottle 1 may be measured by counting a number of inspection timing signals received by the main controller 19 for a unit period of time. Operation of the main controller 19 is illustrated in FIGS. 5(A) to 5(C). Referring first to FIG. 5(A) in which a main routine is shown, various initializing operations are executed first at step 50, and then at step 51, such thinning out value k and reference level H for binary digitization as described above are set in accordance with a speed signal from the handling machine 30 or a speed measured from inspection timing signals. Then at step 52, a first subroutine shown in FIG. 5(B) is executed, and then at step 53, conditions of input keys of the keyboard 28 are checked, whereafter the control sequence returns to step 51. When the first subroutine shown in FIG. 5(B) is entered, it is judged first at step 55 whether or not there is an inspection timing signal, and if there is no inspection timing signal, then conditions of the input keys of the keyboard 28 are checked at step 56, whereafter the control sequence returns to step 55 to repeat a similar sequence of operations. On the contrary if there is an inspection timing signal at step 55, then the control sequence advances to step 57, at which counting of a counter for measuring an inspection time is started, and then to step 58, at which it is judged whether or not there is a bottle presence signal, in short, whether or not a bottle 1 is present at the inspection position. Then, if a bottle 1 is present, then all rejection flags are reset at step 64, and then a skip flag is set at step 65. The skip flag is provided so that picture element data for a first one frame received at first from the camera controller 16 shown in FIG. 1 may be stored into the buffer memory 17. Thus, the skip flag is set in the first control cycle. Subsequently, a second subroutine shown in FIG. 5(C) is executed. Referring now to FIG. 5(C), after the second subroutine shown is entered, it is judged first at step 72 whether or not the skip flag is in a set state. Since the skip flag is in a set state in the first control cycle, the control sequence advances to step 77, at which the counter 23 of FIG. 1 is reset, and then to step 78, at which the skip flag is reset, whereafter the control sequence returns to the first subroutine of FIG. 5(B). Since the skip flag is in a reset state at step 72 in the second or succeeding control cycle, the control sequence now advances to step 73, at which a number of defect picture elements in the first window area W 1 is counted by the counter 23 as described hereinabove, and then to step 74, at which the count value is compared with a fixed excluding level set for the first window area W 1 . Then, a judgment for allowance or rejection for the window area W 1 is made at step 75 in accordance with a result of such comparison. In case the judgment is rejection, a rejection flag is set for the window area W 1 at step 76, but in the case of allowance, the control sequence advances to a step for the second window area W 2 skipping the step 76. Then, similar operations to those at steps 73 to 76 are repeated to the last n-th window area W n , and after completion of such judgment, the control sequence returns to the first subroutine of FIG. 5(B) by way of the steps 77 and 78 described above. After the control sequence returns to the first subroutine of FIG. 5(B), presence or absence of an inspection timing signal is determined at step 67, and if there is an inspection timing signal, then conditions of the input keys are checked at step 68, whereafter the control sequence returns to step 67. If there is no inspection timing signal at step 67, then the main controller 19 checks all of the rejection flags for the windows W 1 to W n and determines, when all of the rejection flags are not in a set state, that the bottle 1 is allowable, but determines, when at least one of the rejection flags is in a set state, that a check is present at a corresponding window and accordingly the bottle 1 is to be rejected. Then, a result of the determination is outputted to the handling machine 30 at step 70. In particular, when the determination at step 69 is rejection, the main controller 19 outputs, by way of the interface 24, an excluding signal to the handling machine 30 to exclude such defective bottle 1 from the transporting line. Then, the inspection time measuring counter is stopped at step 61, and then the thinning out number k and the reference level H for binary digitization are newly set at step 62, whereafter the control sequence returns to the main routine of FIG. 5(A). In case there is no bottle presence signal at step 58, presence or absence of an inspection timing signal is determined at step 59, and if there is an inspection timing signal, then conditions of the input keys of the keyboard 28 are checked at step 60, whereafter the control sequence returns to step 58, but on the contrary if there is no inspection timing signal, then the inspection time measuring counter is stopped at step 61 as described hereinabove, whereafter the control sequence returns to the main routine of FIG. 5(A) by way of the step 62. It is to be noted that, while presence or absence of a check at a bottom portion of a bottle 1 is detected while the bottle 1 is being rotated in the embodiment described above, otherwise presence or absence of a check at any portion other than such bottom portion can be inspected. Further, it is also possible to inspect a bottle 1 while the bottle 1 is being moved, for example, along a horizontal path. Further, presence or absence not only of a check but also of a white foreign article can be inspected. Furthermore, the object for inspection is not limited to a bottle, and the present invention can be applied also to inspection of a glass, a transparent or translucent plastic vessel and other articles.

Claims: A method of inspecting an object such as a bottle or the like to detect defects in the object, comprising the steps of rotating or moving the object at a predetermined speed, irradiating light upon an inspection area of the object being rotated or moved, photographing light reflected from the inspection area of the object by means of a two-dimensional camera which includes solid-state image pickup elements, in order to provide a plurality of image frames representing relatively moved positions of said object, fetching picture element data for a first one of said frames at a first point of time from said two-dimensional camera and storing the data into a memory, fetching picture element data for a second one of said frames at a second point of time after a fixed interval of time after the first point of time, calculating differences of the picture element data for the second frame from the picture element data for the first frame from said memory, binary digitizing the differences with reference to a predetermined brightness threshold level, counting the number of those of the differences which have one of two binary values, and comparing the count number with a predetermined number, the method of irradiating said object with light and the said fixed interval being so selected that the relative movement between said two frames is significantly greater for a light image due to a said defect than for image light from the remainder of said inspection area, whereby the comparison of said count number and said predetermined number indicates the presence or absence of a defect in the object under inspection, wherein the fixed interval of time between frames at which picture element data are to be fetched is adjusted in response to the speed of the object for inspection, and wherein the brightness threshold level for binary digitization is adjusted in response to the speed of the object for inspection. A method as claimed in Claim 1, wherein the number of those of the differences which have one of two binary values is counted for each of a plurality of window areas included in a photographing area of said two-dimensional camera. An apparatus for inspecting an object such as a bottle or the like to detect a defect of the object, comprising a handling machine (5) for rotating or moving said object at a predetermined speed, a light projector (6) for irradiating light upon an inspection area of the object, a two-dimensional CCD camera (9) for photographing light reflected from only a predetermined inspection area of said object, a camera controller (16) for successively fetching picture element data produced from said two-dimensional CCD camera (9) at predetermined intervals of time to provide a plurality of image frames representing relatively moved positions of said object and storing the thus fetched picture element data therein, a difference calculating section (18) for calculating differences between the picture element data thus fetched for different frames, a binary digitizing section (20) for binary digitizing the thus calculated differences with reference to a predetermined brightness threshold level, a counter (23) for counting the number of differences which have one of two binary values, in order to provide a count number, and a main controller (19) for adjusting the predetermined intervals of time for said camera controller (16) and the predetermined bright threshold level for said binary digitizing section (20) in response to a speed signal from said handling machine (5) representative of the speed of the object and comparing the count number with a predetermined number, the arrangement of said light projector (6), said CCD camera (9) and said camera controller (16) being such that relative movement between said different frames is significantly greater for a light image due to a said defect than for image light from the remainder of said inspection area, whereby the comparison of said count number and said predetermined number indicates the presence or absence of a defect in the object under inspection. An apparatus as claimed in Claim 3, further comprising means (21) for causing said counter (23) to count a number of those of the differences which have one of two binary values only for one or ones of a plurality of window areas included in a photographing area of said two-dimensional CCD camera (9) which is or are designated by said main controller (19). An apparatus as claimed in Claim 3 or 4, further comprising a monitoring display apparatus (26, 27, 15) for reproducing and displaying thereon data for a frame fetched by said camera controller (16).

Inventors: GOMIBUCHI TADASHI, GOMIBUCHI, TADASHI
Applicants: TOYO GLASS CO LTD, TOYO GLASS COMPANY LIMITED
Application year: 1991
Main classification: G01N21
IPC codes: B07C5, G06T7, H04N7, G01N21