DEVICE FOR OPTICAL SHEET WRAPPING INSPECTION

Abstract: A device for checking sheet packaging, whereby all the defects of packaged articles or sheets are easily and highly accurately detected based on the density or color distribution of reflection and transmission images. Defects such as deformation, discoloration, foreign matters and contamination of an article (16) packaged with a sheet and the sheet are detected by forming a density distribution code image or color code distribution image or by executing inter-image calculation based on a reflection image, a transmission image, or density or color images thereof. The upper and lower light sources are simultaneously turned on to separately form a reflection image and a transmission image from the input image in order to enhance the checking efficiency. Furthermore, a reflector (17) is disposed under a packaging sheet to enhance image contrast and to improve checking efficiency and stability. Optimum conditions for the kind and position of the reflector are clarified.

Description: FIELD OF THE INVENTION The present invention generally relates to a sheet wrapping inspecting device which detects a mingled foreign substance, damage, and/or dirt of a tablet, which may occur during a sheet wrapping process for wrapping the tablet by checking an appearance thereof without contact thereto. More particularly, it relates to a sheet wrapping package inspecting device which observes both the reflected ray and transmitted ray through a TV camera. BACKGROUND OF THE INVENTION In this specification, the term "tablet inspection," unless otherwise specified, generally covers the inspection of a sheet wrapping which includes a tablet and its wrapping sheet, and detecting a foreign substance in a space of so-called pocket of the wrapping sheet where the tablet is placed. Also, the term "sheet wrapping package inspecting" is widely used to cover the inspection of a part of the object to be wrapped and its wrapping sheet, and a defect inspection for detecting a foreign substance contained in a space of so-called pocket of the wrapping sheet where the part of the object to be wrapped is placed. In addition, the whole object to be inspected, including the part of the object such as the tablet and its wrapping sheet, is simply referred to as a "wrapping sheet," which is distinguished from a "sheet portion (i.e., a sheet)," unless otherwise specified. A conventional tablet inspection, which is one of the important sheet wrapping package inspections, will be explained herein below. A portion to be subjected to the tablet inspection is roughly classified into a tablet, a sheet portion for wrapping the tablet, and a so-called pocket for carrying and holding the tablet therein. As for the tablet, checked by the inspection are a character and/or a symbol formed on the tablet, and a crack, split, fold, breakage, dirt, stain, and adhesive of the tablet. As for the sheet portion and the pocket, checked by the inspection are a stain and dirt thereof, a foreign substance, a broken piece of the tablet, a hair, and a fiber mingled during the wrapping process. It is also checked by the inspection whether or not a different tablet is mistakenly contained in the wrapping. On the other hand, prior to the present invention, two methods, a method called a reflection type and a method called a transmission type, have been considered separately as an individual method of the inspection. In the reflection type inspection method, a ray is emitted to a wrapping sheet from the upper side thereof, and the reflected ray is observed by a TV camera disposed above the wrapping sheet to detect a defect. In the transmission type method, a ray is emitted to the wrapping sheet from the lower side thereof, or the rear side thereof, and the transmitted ray is observed by a TV camera to detect a defect. According to the reflection type method, it is possible to check the shape of the tablet and detect a foreign substance on the tablet and/or a foreign substance mingled in the wrapping sheet. On the other hand, the transmission type method is utilized to detect a foreign substance mingled in the wrapping sheet and check the shape of the tablet. As mentioned above, two types of conventional tablet inspection methods, i.e., the reflection type method and the transmission type method, have been considered. However, these conventional methods have the following serious drawbacks. In the reflection method, many highlights are often captured at the pocket because of the multiple reflection effect, the specular reflection effect and the concave-reflector effect, and thus those highlights are detected as false defects. To escape from those phenomena, the pocket were excluded from the object to be inspected by taking a logical mask covering the region of the image corresponding the pocket on the image by detecting the pocket primarily. This causes serious problems in that not only the detection of the pocket is troublesome but also the inspection of the pocket cannot be performed due to the logical mask. Also, the surface of the sheet somewhat includes the element of the specular reflection, and the element sometimes appears as a highlight on the image. Although highlights appearing on the pocket and the sheet surface produce serious errors as false defects, there have not been any ways to distinguish and exclude such false defects. In the transmission method, the contrast of a thin foreign substance such as a hair becomes quite low on the transmitted ray image because of diffraction and some other reasons. This causes a serious omission in detecting defects. Further, it is not possible to distinguish whether a defect mingled in the sheet is a broken piece of the tablet or a foreign substance such as dust, although it is one of the most important issues of the inspection. As mentioned above, it has not been possible to distinguish and detect serious defects including all defects constantly by either method. Furthermore, even the combination of these methods could not detect every defects precisely across whole regions at all. The objective of the present invention is to provide the sheet wrapping package inspecting device that solves the above-mentioned problems and can easily and precisely detect all defects including defects in the pocket. Patent Abstract of Japan, JP-A-5 149 883 describes an inspection device for checking the direction of a tablet contained in a sheet, this device comprising a CCD camera on one side of the inspected tablet sheet, one light source arranged with respect to the sheet for light reflection and one light source on the opposite side of the sheet for light transmission. The reflected light information from other than the tablet sheet is corrected by the transmitted light. The different light sources can be used together or separately. The image output of the camera is arithmetically processed. Patent Abstract of Japan, JP-A-7 311 160 describes a sheet inspecting device which detects defects on a polarization film or on one or two films covering this polarization film. For that purpose there is one light source emitting visual light transmitted through the sheet material and detected by a first camera. For each covering sheet there is another light source emitting UV light rays which are each reflected on the respective side of the sheet material and this reflected rays are detected by a separate camera for each light source. The image data from two or three cameras are binarized and processed to associate found defects to each of the layers of the sheet material. DISCLOSURE OF THE INVENTION The sheet wrapping package inspecting device according to the present invention and features of preferred embodiments of it are described in the attached claims. The sheet wrapping inspecting device includes a light source and a two-dimensional sensor located above a wrapping sheet respectively, means for inputting a reflected ray image above the wrapping sheet and a light source located below the sheet wrapping and means for inputting a transmitted ray image. The device plots a plurality of several binary or multi-value images of the gained reflected ray image and transmitted ray image, creates density code distribution maps of those images, and thereafter detects defects such as a mingled foreign substance, a damage and/or dirt of a part of a whole object to be inspected, the wrapping sheet and the pocket according to the code distribution maps. In addition, also disclosed herein is a defect discrimination method in which a logical operation between images have been performed to discriminate a defect based on the logical operation results. In addition, the device detects a defect by dividing the inputted image into several regions according to the brightness distribution or the code distribution of the inputted image and thereafter giving a code of the neighboring region as an auxiliary code to the code value of each divided region. To prevent the omission of detecting a defect, the device is provided with a half-mirror or a reflection mirror that reflects at least five percent (%) of the incident light; the reflector is located right under the wrapping sheet. On the other hand, to enhance the inspection efficiency, the device includes: light means including light sources located above and below a wrapping sheet, the light sources having different color spectra, or light means including light sources located above and below the wrapping sheet and color filters located between the wrapping sheet and each light source, respectively, the color filters having different color spectra; and two-dimensional sensor located above the wrapping sheet, wherein a two dimension image is inputted while the light sources on both sides of the wrapping sheet are illuminated simultaneously, and the reflected ray image and the transmitted ray image are separated according to the color spectrum of each image because the color spectrum corresponds to that of each light source. Furthermore, the device separates the reflected ray image and the transmitted ray image by removing the common wavelength element of both the light sources by placing color filters that transmit the same wavelength as the transmittance wavelength spectrum. Also, as a method of detecting a defect without separating the reflected ray image and the transmitted ray image, the way of detecting defects by adjusting the ratio of the reflected ray and the transmitted ray with a dimmer, and inputting and multi-valuing images of such rays are applicable. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 shows the principle of detecting defects with two kinds of images according to an embodiment of the present invention; Fig. 2 is a plane view showing the structure of the wrapped tablet according to an object of the inspection of the present invention; Fig. 3 is a cross-sectional view of the pocket according to an object of the inspection of the present invention; Fig. 4 illustrates the species of the defects according to an object of the inspection of the present invention; Fig. 5 illustrates a schematic view of the tablet observed from above the tablet, and the brightness of each defect observed from an inputted image; Fig. 6 illustrates a transmitted ray image of the wrapping sheet illuminated by a light source located below the wrapping sheet and captured by a camera placed above the wrapping sheet according to the present inspection; Fig. 7 is an explanatory view showing a method for detecting an extremely thin defect and/or stain-like dirt; Fig. 8 is a code distribution map prepared by the coding method according to the present invention, wherein the reflected ray image and the transmitted ray image have been quantized into three and four gradations; Fig. 9 illustrates a diagram of the structure of the sheet wrapping package inspecting device according to the second embodiment of the present invention; Fig. 10 illustrates a diagram showing the characteristics of the wavelength regions of the optical transmissions when an overlap of the wavelength regions is allowed upon the inspection of the present invention; Fig. 11 illustrates a perspective view showing the allocation of the light source according to an embodiment; Fig. 12 illustrates the diagram and the chart of an embodiment according to the present invention in which colors have been used; Fig. 13 illustrates an embodiment showing the principle of heightening the color contrast; Fig. 14 illustrates a flow chart showing the determining procedure of the color of the reflector according to the resent invention. BEST EMBODIMENTS FOR EXECUTING THE INVENTION Embodiments of the present invention will be explained in detail as follows. Figs. 2 and 3 illustrate a plane view and a side cross-sectional view of a wrapped tablet which is an object to be inspected by the present invention, respectively. Generally, a plurality of wrapped tablets are placed in a row at an interval of from several millimeters to ten and several millimeters. For simplicity, Fig. 2 shows only one tablet T among wrapped tablets. Fig. 2 is a plane view of a tablet T in a pocket P. Meanwhile, Fig. 3 illustrates the cross-sectional views of the pocket P in which the tablet T is placed. In the wrapping process, one tablet T is placed on a concave spot of the sheet S, which is called the pocket P as shown in Fig. 3(a). Then, another sheet S is attached on the aforementioned sheet S as shown in Fig. 3 (b). Although the attached another sheet S is called as a seal and should be distinguished from the sheet S shown in Fig. 3 (a), both sheets are called "sheet," respectively and not specifically distinguished in this embodiment. The inspection regions shown in Figs. 3 (a) and 3 (b) are both called wrapping sheets. The inspection of the sheet wrapping package can be executed at either condition shown in Figs. 3(a) to 3(c). A camera may be placed above or below the wrapping sheet. In this embodiment, the camera is located above the wrapping sheets, and the wrapping sheets shown in Fig. 3 (b) is laid up side down as shown in Fig. 3(c). In the inspection method, the location of the camera and the direction of the wrapping sheets may be changed. Fig. 4 is an explanatory view showing the species of the defects that contain false defects in the pocket. In this embodiment, the tablet T is white. In Fig. 4, the reference letter F shows highlights caused by the multiple reflection and the concave reflector effect of the pocket, and highlights caused by the specular reflection of the sheet surface. These highlights appear very frequently around the pockets when applying normal illuminations. The reference letter J1 denotes a broken portion of the tablet, and the reference letter J2 denotes a split thereof. The reference letter G1 denotes a while colored defect such as a broken piece of the tablet adhered on it. However, those above-mentioned defects are often undetectable. However, when black edges are observed as outlines of the broken piece adhered to the tablet, the edges are detected as a black foreign substance. The. reference letter G2 denotes a mingled foreign substance such as a dust or dirt of the tablet. Cracks of the tablet, the outline pattern of the above-mentioned broken pieces of the tablet, can also be recognized as G2. The reference letter H1 denotes a white foreign substance such as a broken piece of the tablet which is one of the most important defects to be inspected. The reference letter H2 denotes a black foreign substance which is also an important defect to be inspected such as a dirt produced and/or a dust mingled during the wrapping process. The reference letter I denotes a long and an extremely thin and narrow foreign substance such as a piece of hair or fiber, which is one of the most important defects to be inspected. This foreign substance tends to be overlooked by a conventional inspection method utilizing a reflected ray image because of its low contrast. The foreign substance also tends to be overlooked by a conventional inspection method utilizing a transmitted ray because of a diffraction phenomena. The reference letter N denotes a dirt of the sheet. Although a heavy dirt can be detected as a foreign substance, a dirt whose color is close to that of the sheet often does not appear on the transmitted ray image similar to the defect I. The reference letter N represents this kind of defect distinguished from a defect which is easily be detected. Figs. 5 and 6 illustrate how the brightness of each defect is observed from an inputted image. Fig. 5 illustrates a schematic view of the tablet image observed from above the tablet. In this image, a bright part is shown as a white spot, while a dark part is shown as a black spot. The tablet T, highlights F, and white defects H1 are observed as white spots, but G2 is recognized asa black spots on the white background. As stated above, I and N tends to be overlooked in the reflected ray image because of the low contrasts, and they are hardly detected in the transmitted ray image because of the diffraction phenomena or the extremely small difference of transmittances. Countermeasures against the above-mentioned problems are explained as follows with reference to Fig. 7. In this invention, a half-mirror M is located under the wrapping sheet 1. Some part of the light which goes through the sheet portion is reflected by the half-mirror M and goes back as a reflected ray R. Where the thin defect I are present, since the reflected ray R does not go back, the portion of the image becomes darker than the other portion of the sheet. Thus, the contrast of the defect is strengthened. This enables a detection of the defect. Because of the high contrast, N and I are shown darker in Fig. 5. The experiment reveals that the reflectance of the half-mirror should be more than five per cent. A frosted glass that reflects light on its surface can also be applied as a half-mirror. Fig. 6 illustrates a transmitted ray image of the wrapping sheet illuminated by a light source located below the wrapping sheet and captured by a camera placed above the wrapping sheet. The tablet T, the defects H1 and H2 are observed in black. While the highlight F, the thin defects such as hairs and fibers represented by I often do not appear on the transmitted ray image. Fig. 1 is a diagram that explains how to detect defects from two image data shown in Figs. 5 and 6. Fig. 1 (a) illustrates a diagram showing defects, and Fig. 1 (b) is the chart ofthe code of each defect when expressing Fig. 1 (a) by codes. Three kinds of coding methods are described: two bit coding, neighboring coding, and four bit coding. Two bit coding expresses each corresponding pixel in Figs. 5 and 6 by a two bit code: a white pixel as (1) and a black pixel as (0). For example, the tablet T is coded as (1 0) since it is expressed (1) in the reflected ray image and (0) in the transmitted ray image. Similarly, the defect H2 is coded (0 0) because it is expressed (0) in both the images. Similarly, F is coded as (1 1), J1 and J2 as (0 1), G1 as (1 0), G2 as (0 0), H1 as (1 0), and I as (0 1). Although the code 0 1 of I and N are the same as the code 0 1 of the sheet portion S, codes of I and N are especially coded as (0' 1) since I and N can be distinguished from the sheet portion. Consulting with the two-bit code distribution map Fig. 1 (b), the existence of defects is recognized. However, J1 and J2 cannot always be defined as defects unless the image processing is performed to recognize the outline of the tablet according to the elementary information about the outline of the tablet. The current embodiment defines those defects by finding the chain of the edge direction. Neighboring coding is a code distribution map of the code of the neighboring region of each region. The area of each region is relatively small after the image undergoes the labeling processing. However, since J1 can be both (1 0) and (0 1), it is fixed to be (1 1). Four-bit coding is a distribution map of a code, which includes a neighboring code other than the code of each pixel. After dividing the code map into smaller regions, the specifications of each region such as the center of gravity, area, the shape and the specie are calculated and registered to the list of the defects. Also, positions and species of each defect are displayed with the specific color by allocating a color to each code. The present invention enables to easy and accurate detection of the position and classification of every defects by creating the code that represents the correlation of the density distribution of the reflected ray image and the transmitted ray image. When subjecting AND processing to the binary image of the reflected ray corresponding to Fig. 5 and the binary image of the transmitted ray corresponding to Fig. 6, the only region F, which is bright, is extracted on both images. Meanwhile, when AND processing is executed to the inversion of the reflected ray image, defects J1, J2, I, N and regions P and S that are usually dark in the reflected ray image but bright in the transmitted ray image, are extracted as bright regions. As a result, J1 and J2 can be distinguished because the region T becomes dark in this processed image. N and I can be distinguished by the contrast with S as stated above. When AND processing executed to the inversion of the transmitted ray image instead of the reflected ray image, defects G1 and H1, and the region T, which are usually bright in the reflected ray image but dark in the transmitted ray image, are extracted as bright areas. Since G1 is within the region T, a multi-valuing processing is needed to recognize G1, but defect H1 can be recognized because regions P and S are dark in that image. When AND processing is executed to the inversions of both the reflected ray image and transmitted ray image, only defects G2 and H2 are extracted as bright regions and can be recognized. Instead of AND processing, the combination of XOR, AND, and OR processing are also valid to recognize defects. For example, J1, J2, G1 and H1 can be recognized with the combination of AND and XOR processing, and G2 and H2 can be recognized with AND and NOT processing. However, since cases of applying those combinations are basically the same as that of the combination of the inversions and AND processing, detailed explanations are omitted. Fig. 8 illustrates the code distribution map when quantaizing the reflected ray image and the transmitted ray image into four and three gradations instead of the binarization of the first embodiment shown in Fig. 1. When the reflectance of the sheet is relatively high, the quantities of the light reflected by the pocket, the defects N and I are smaller than that of the sheet portion. Thus, the reflected ray image is converted into a four-gradation image according to the brightness of the tablet, the pocket, the sheet and the defect I. On the other hand, the transmitted ray image needs to be converted into a three gradation image according to the transmittance of the tablet, the pocket, and the sheet portion for the same reason. The code given to each region is the multi-bit of the reflected ray image and the transmitted ray image that are created by the same procedure as the embodiment shown in Fig. 1, while the code in each parenthesis is the multi-bit with a neighboring code. Thus, it is also possible to recognize defects even more minutely but with only multi-coding of the reflected ray image and the transmitted ray image. Fig. 9 illustrates the diagram of the sheet wrapping inspecting device according to another embodiment of the present invention that captures the reflected ray image and the transmitted ray image simultaneously as one combined image by taking a color filter. As shown in Fig. 9, the device is equipped with a light source 3 with a band-pass color filter 4 that only transmits the light at the frequency of green, a color camera 2, and a light source 5 with a band-pass color filter 6 that only transmits the light at the frequency of red. While the color camera 2, the light source 3, and the color filter 4 are located above the wrapping sheet 1, the light source 5 and the color filter 6 are located below the wrapping sheet 1. Also, a color separation circuit 7 is connected to the color camera 2 in order to separated the green element and the red element from the input signal. It is possible to extract the reflected ray image and the transmitted ray image by separating the color signal from the camera with the color separation circuit since the green element signal corresponds to the reflected ray image and the red element signal corresponds to the transmitted ray image; one original image actually contain elements of two images. The method of detecting defects of the current embodiment is the same as the method applied by the first embodiment shown in Fig. 1. The utilization of above-mentioned embodiment halves the time required for the inspection and simplifies the device because the color filter enables to input the reflected ray image and the transmitted ray image simultaneously on the same image. There is a risk of lowering actual transmittance when attempting to clear the overlap of the optical wavelength transmittance regions of the filters 4 and 6; the attempt also increases the total cost. Thus, somewhat allowance of the overlap is needed. Fig. 10 illustrates the frequency transmittance spectrum of the filters when the optical wavelength transmittance regions overlap each other. The optical wavelength transmission regions have a common wavelength region of both the filters. Since the wavelength region of the reflected ray image corresponds to the signal of the wavelength region of the illumination for the transmittance from which the common wavelength region is removed, a cheap color filter with high transmittance available on the market can be applicable. Although some explanations ofthe above-mentioned embodiments applied grated images with Figs. 1 to 8, those gained images should not necessarily be monochrome because it was to simplify the explanation. It is possible to detect defects and separate the components according to the density difference of the colors, or the grated images of the particular color or the color distribution of the particular color itself because components of the sheet wrapping, the dirt and the foreign substances such as other species of tablets or dusts have their own color specifications. The followings are the embodiment which positively utilizes characteristics of colors. Fig. 12 illustrates an embodiment which.utilizes characteristics of colors. The structure of the sheet wrapping is the same as the structure shown in Fig. 4. As shown in Fig. 12(a), the color of the sheet S and the pocket P are defined as red R, the tablet T as blue B, the white foreign substances G1 and H1 as white W, and the black foreign substances G2 and H2 as black D. Fig. 12 (b) shows the chart of the color of every part on both the reflected ray image and transmitted ray image. Colors are expressed by the RGB color system. In the reflected ray image, the split J2 and the broken portion J1 are expressed as (1 0 0), the highlight F as (1 1 1), the tablet T as (0 0 1), the foreign substances G1 and H1 as (1 1 1), the foreign substances G2 and H2 as (0 0 0), the thin hairs and fibers as (0 0 0), the dirt as (1 0 0), and the sheet S and the pocket P as (1 0 0). Although the color of thin hairs and fibers is provisionally defined as (0 0 0), it largely depends on the cause. In the transmitted ray image, the sheet, the pocket, the highlight and the dirt on the sheet are expressed as (1 0 0), and the others as (0 0 0). It is possible to express the colors by the six-bit codes, which are the combination of codes of the reflected ray image and the transmitted ray image. On the other hand, when only regions of red (R) of both the distribution maps of the reflected ray image and the transmitted ray image are picked, and undergo AND processing and inversion, only regions that are red such as the sheet S, the pocket P, the split J2, the broken portion J1, and the dirt N are extracted. When red (R) and blue (B) regions of the images are picked and the regions undergo AND processing and inversion, only foreign substances G1, G1, H1, H2 and I are extracted from the gained grated images. Also, when regions that contain elements of red R or blue B are picked and undergo OR processing and inversion, only black defects G2, H2 and I are extracted. As stated above, it is possible to recognize each part by creating color code distribution map according to the color distribution or picking the regions that contain one or more colors. However, if more than two regions whose colors are the same are in one image, it becomes extremely difficult to separate the color regions. More minute classification of the colors prevents the problem. As the methods of more minute classification, comparison and classification of the hues and the saturation, and the comparison of the difference of intensities are applicable. The combination of the classification of densities shown in Fig. 1 and the classification of colors shown in Fig. 12 are also practical. When applying the combination of both ways of above-mentioned classifications of the color and the density, the precision of the recognition remarkably progresses. In this specification, the terms "color analysis" and "color classification" include such combinations. When regarding the color of the source of the light shown in Fig. 12 (a) as blue B, intensities of the tablet T and white color of white foreign substances G1 and H1 are emphasized while intensities of the other regions are weakened in the captured image because the color distribution of the image depends on that of the light source. When the light source is green, color intensities of the parts other than white foreign substances are weakened. To choose the color of the light source best corresponding to the colors ofthe components, foreign substances and the dirt of the sheet is crucial to recognize each part by the intensities of the colors or the density distribution. In addition, other species of tablets whose colors are different from the object to be inspected can be recognized when comparing the relationship between the color of the light source and the captured image of the object to be inspected and the standard data. Standard data are the information of the relationship between the color of the light source and that of the captured image of the defectless sample sheet wrappings. The standard data must be recorded prior to the inspection. It is recommended not to fix the color of the source of the light in advance because the optimum color of the light source varies depending on the colors of the components of the sheet wrapping, the foreign substances, and the dirt. Thus, the color of the light source should be flexibly changeable. To gain the optimum color of the light source easily, an illumination unit consisting of several LEDs or miniature bulbs with a dimmer is required. The LEDs or bulbs emit at least one of three elements of the color such as R, G or B. Also, the dimmer should be able to adjust the electric current of each color of the light source independently. As another method, attaching a color filter to the light source is also applicable. By attaching different filters, the color can also be adjusted. It is possible to recognize the component parts of the sheets and the defects by the color difference in the captured image by just choosing the color reflector. When taking a color reflector such as a color half-mirror or a color reflecting mirror whose reflectance is at least five per cent, which is located under the sheet wrapping instead of the light source, the sheet wrapping is illuminated by the light of the color corresponding to the color of the reflector instead of the light source. Yet in this case, the only light that contains the elements of the color of the light emitted from the light source that overlap with elements of color of each part of the sheet wrapping is transmitted through the sheet wrappings and enter the reflector. Then, the only color elements that match the color elements of the reflector are reflected by the reflector, transmitted through the sheet wrappings, and captured by the two-dimensional sensor as an image. The above-mentioned embodiment will be explained with reference to Fig. 13. The color of each part of the sheet wrapping is the color shown in Fig. 12 (a), and each part contains the sub color element/s as well as the main color elements. Figs. 13 (a) and 13(b) show the histogram of each color element of the sheet color and the histogram about the tablet. Fig. 13(c) shows the histogram of each color element of the sheet color when a white reflector is placed below the sheet, the whole region becomes brighter by the reflection, but the ratio of the color elements does not change. On the other hand, histogram of the region of the tablet does not change from (b). In the case when the reflector is changed to a red one, there are little reflections of blue and green lights though the red light is strongly reflected. Relatively, only the element of red of the sheet is stressed while the intensity of the blue element, which is the same as the color of the tablet is lowered because the red light is fully reflected by the reflector and captured, but the only blue and green lights contained by the original light are reflected by the sheet and captured. As a result, the color contrast of the red color of the sheet and the blue color of the tablet becomes strikingly vivid as the histogram of Fig. 13 (d) shows the element of red is outstandingly stronger than the other elements. It seems to be problematic if the color of the tablet is also red. In such cases, the red of the tablet is relatively stressed by weakening the intensity of the red of the reflector if the color of the tablet is more dense than the sheet. By stressing the complementary color element green of the sheet while weakening the intensity of red of the sheet with a green reflector, a strong contrast between green of the sheet and red of the tablet can be obtained when the quantities of green of the tablet and the sheet are either small or the same. The method of stressing the color contrast is summarized as follows. To obtain a strong color contrast, it is recommended to heighten the reflectance of the reflector about the color of the sheet, or the color element that sheet contains more than the tablet, and to lower the reflectance of the color element that tablet contains more than the sheet as much as possible, as a result of the comparison between the density of each color element R, G, and B of the sheet and the tablet; to lower the reflectance, deducting the color element from the reflector is applicable. When the tablet and the sheet do not include the complementary color elements, or the quantities of such elements included are very close each other, more stressed color contrast can be obtained by combining other color elements, especially the complementary color elements as the reflector. This method is also applicable when each color element R, G and B of the color of the sheet is brighter than that of the tablet, by applying a white reflector that reflects every color element of the color. On the contrary, when each color element R, G and B of the color of the sheet is darker than that of the tablet, it is recommended to remove the reflector, or to choose a black reflector that does not reflect the light at all. As stated above, using a reflector that highly reflects the color elements which the transmitter such as the sheet more highly contain than the non-transmitter such as the tablet, or choosing a reflector that lowly reflects the color elements which the non-reflector more highly contain than the transmitter eases the classification of the regions according to the color analysis because the color contrast between the transmitter and the non-transmitter becomes stronger. On the current embodiment, the color elements are classified and explained by the RGB color system, but the RGB color system is not necessarily the only system because there are various kinds of color systems. Fig. 14 is the explanation of determining the color of the reflector corresponding to the current embodiment. In Fig. 14, the letter C stands for the color elements, while the letter S stands for the sheet, the letter T stands for the tablet, and the letter H stands for the complementary color. The combination of color elements is determined according to the procedure shown in Fig. 14, but each color element is processed separately. When the color of the sheet contains more quantity of the color elements of the color of the tablet (step 101), the color element of the sheet is further stressed (step 106). On the contrary, when the color of the sheet contains less quantity of the color element than the color of the tablet, the complementary color (step 102) is regarded and stressed (step 104), and the intensity of the color of the sheet is then deducted when Hs is close enough to Ht or Hs = Ht (step 103). When not regarding the complementary color or Hs is not equal to Ht, the color element of the sheet is directly deducted (step 105). The procedure needs to be repeated three times when the colors are classified by the RGB color system. Also, setting the judgment N as the preference can pass the step 102 . Sometimes many strong highlights and ghosts occur and appear in the captured image because of the specular reflection on the surface of the reflector such as a mirror or a color reflector (hereinafter simply referred to as "reflector"). Also, some parts of the camera, the surrounding atmosphere or/and the sheet wrapping is/are captured by the camera and appear/s in the image. It is recommended to process the surface of the reflector into the light-diffusing surface by putting fine unevenness as the countermeasure. Also, to decrease the shadings, the surface of the whole reflector should be concave because when the field of vision is broad, shadings appear very frequently. The reason of forming the surface of the reflector concave is to offset the Lambert's cosine law. In a case where any parts of the surface of the tablet are specular, it is necessary to secure certain distance between the camera and the optical path from the light source, and the optical path of the specular reflection because the light source and/or the camera itself is captured by the camera and appear in the images. Fig. 11 illustrates the location of the light source of the current embodiment. The light source is located cylindrically in the space between the camera 11 and the sheet wrapping 16, and the atmosphere other than the light source is surrounded by the black board 12. A two-dimensional tri-color LED array 14 is applied as the light source, and a frosted glass or a white diffuser that transmits the light is located in front of the LED array 14 to prevent the camera 11 from capturing the light source that appears as the ghosts on the image. Although the current embodiment locates the light source cylindrically, the arrangement of the light source should not necessarily be cylindrical. Color miniature bulb can be also used instead of the color LED array 14. Shades of the tablets and the foreign substances are observed on the reflector 17 when irradiating the light from the upper side of the sheet wrappings 16 with locating the reflector 17 below the sheet wrapping 16. Those shades are obstacles to detect defects if the camera captures them. It was clarified that when securing the distance between the sheet wrapping 16 and the reflector 17 far enough, the problem can be prevented. According to the experiment, the distance between the sheet wrapping 16 and the reflector 17 should be approximately at least more than 10 mm though it depends on the characteristics of the lens, the location of the camera 11, and the arrangement of the light source. Since the reflectance and the transmittance of the wrapped portion, the sheet portion and the pocket are different, the brightness distribution captured by the TV camera is tremendously different between the images gained. Also, reflectance and the transmittance of the defects are also different depending on species, sizes, and positions of the foreign substances. Thus, the reflected ray image and the transmitted ray image possess different characteristics of the brightness distribution each other. The focus of the present invention is the full utilization of such characteristics. The present invention can recognize and detect stuck foreign substances, mingled foreign substances, tablets of other species, transformation ofthe wrapped object, the broken pieces, the dirt, extremely thin hairs and fibers around all regions of the wrapped object, the sheet and the pocket quite precisely because the defects are detected according to the logical correlation between image data of the reflected ray image and the transmitted ray image. Those images can be input simultaneously without changing the positions of the camera and the wrapping sheets. As a result of heightening the efficiency of utilizing both methods of reflection and transmission by inputting the reflected ray image and the transmitted ray image simultaneously on the condition of using the illumination of specific colors, it becomes possible to escape from the complication of the device because there is no need to input several images by changing methods. Since the device inputs the reflected ray image and the transmitted ray image simultaneously, the present invention can also escape from the omission of the detection and the detection of the false defects. Although two band-pass color filters are used in the above-mentioned embodiments, low-pass or high-pass color filters can also be used. The combination of the colors of filters other than green and red is also applicable. What is the most important is to choose the color filter that most precisely corresponds to the colors of the sheet and the tablet so that the most vivid contrast of the shade can be gained. Instead of using such color filters, light sources that can emit the light at several different wavelengths such as LEDs that emit the light at several levels of wavelengths can be used. Although a TV camera is applied in the above-mentioned embodiments, other kind of two-dimensional sensors such as a far-infrared camera, an X-ray camera, or a silver-chloride film is also applicable. It is possible to capture a two-dimensional image by scanning a line sensor as well. The line sensor is regarded as a two dimensional sensor. In the present invention, monochrome sensors and color sensors are both defined as two dimensional sensors or cameras. There is no problem to position the camera below-the wrapping sheet though it is positioned above on this statement, the angle of the camera is also arbitrary. Although the aforementioned embodiments are directed to a device for detecting a defect in the tablet wrapping process, the present invention is not limited to it. The present invention can also be applied to other types of inspections such as the inspection of any other objects on or enclosed by the wrapping sheet. POTENTIALITY OF THE INDUSTRIAL USE As explained above, the present invention enables precise and easy detection of defects according to the codes that represent the correlation of brightness distributions, or the color distribution of the reflected ray image and the transmitted ray image of the wrapping sheets that are illuminated from above and below simultaneously or one by one. Those images are captured by a TV camera. The present invention also allows classification of defects by adding the code of the neighboring region after the area division. Locating a half-mirror or a reflector right under the wrapping sheet enables detection of the mingled hairs and fibers that are extremely thin. By illuminating the object of the light with two kinds of lights that have different characteristics of color emission for the reflection and the transmission simultaneously, the reflected ray and the transmitted ray image can be within one image. This method slashes the time-related control of the light sources and also halves the number of the input images. Thus, the inspection can be executed within shorter time but constantly. The countermeasures of the situation when the separation of the reflected ray image and the transmitted ray image, are also disclosed as the method of detecting defects by not separating those images. Finally, it is possible to stress the color contrast by heightening the reflectance of the reflector about the particular color that is more highly contained by the sheet, or the same color as the sheet, and lowering the reflectance of the reflector about the color that tablets more highly contain, after comparing the intensities of RGB elements of tablets and the sheet one by one.

Claims: A sheet wrapping inspecting device which detects a defect including a mingled foreign substance (G2), damage (J1), dirt (H2) of a wrapping sheet (1; 16) and/or a wrapped object, comprising; a first light source (3; 14)arranged to illuminate the wrapping sheet (1; 16), said first light source (3; 14) being located above the wrapping sheet (1; 16); a second light source (5, 17) arranged to illuminate the wrapping sheet (1; 16), said second light source (5; 17) being located below the wrapping sheet (1; 16); a sensor arranged to observe the wrapping sheet (1; 16), said sensor being located above or below the wrapping sheet (1; 16) to provide signals representing a two- dimensional a reflection image of the wrapping sheet (1; 16) ; and to provide signals representing a two-dimensional transmission image of the wrapping sheet (1; 16); characterized in that said device is arranged to create a code distribution map from said signals representing said reflection image and said transmission image, wherein the code given to each pixel of said map comprises a binary or multi-value digit expressing the brightness of the corresponding reflection image pixel and comprises a binary or multi-value digit expressing the brightness of the corresponding transmission image pixel, and in that said device is arranged to thereafter detect said defect by the help of said code distribution map. A sheet wrapping inspecting device which detects a defect including a mingled foreign substance (G2), damage (J1), dirt (H2) of a wrapping sheet (1; 16) and/or a wrapped object, comprising: a first light source (3; 14) arranged to illuminate the wrapping sheet (1; 16), said first light source (3; 14) being located above the wrapping sheet (1; 16); a second light source (5, 17) arranged to illuminate the wrapping sheet (1; 16), said second light source (5; 17) being located below the wrapping sheet (1; 16); a sensor arranged to observe the wrapping sheet (1; 16) said sensor being located above or below the wrapping sheet (1; 16) to provide signals representing a two-dimensional a reflection image of the wrapping sheet (1; 16); and to provide signals representing a two-dimensional transmission image of the wrapping sheet (1; 16); characterized in that said device is arranged to create a color code distribution map from said signal representing said reflection image and said transmission image, wherein the color code given to each pixel of said map comprises binary or multi-value digits expressing color elements according to a color system of the corresponding reflection image pixel and comprises binary or multi-value digits expressing color elements according to a color system of the corresponding transmission image pixel, and in that said device is arranged to thereafter detect said defect by the help of said color code distribution map. The inspecting device as recited in claim 2, wherein said device inspects a shape and/or color of a wrapped object and/or the wrapping sheet, and detects the defect such as a foreign substance and/or the dirt according to a brightness of the code distribution image obtained from a single or a plurality of color density distributions of the reflected ray image and the transmitted ray image. The inspecting device as recited in one of the preceding claims, further comprising means arranged to separate the inputted image inputted from said sensor into an element of the reflected ray image and an element of the transmitted ray image by illuminating said first and second light sources simultaneously to obtain an input image from said two-dimensional sensor. The inspecting device as recited in one of the preceding claims, further comprising means arranged to separate the inputted image inputted from said sensor into an element of the reflected ray image and an element of the transmitted ray image by illuminating said first and second light sources simultaneously to obtain an input image from said sensor. The inspecting device as recited in claims 2, 3, 4 or 5, wherein at least one of said first and second light sources is equipped with a dimmer or an optical filter which is capable of modifying a quantity of the transmitted ray or a band of transmitted wavelength, whereby said device is capable of adjusting color distributions of the reflected ray and the transmitted ray, or adjusting a ratio of quantity of the reflected ray to quantity of the transmitted ray according to a reflectance, a transmittance and/or a color distribution of the wrapping sheet. The inspecting device as recited in claims 2, 3, 4 or 5, wherein said first and/or second light sources are provided with a plurality of light emitting sources of several color peculiarities, and wherein a luminous intensity, a color peculiarity or a wavelength peculiarity are changed or adjusted by controlling electric current of each light emitting source. The inspecting device as recited in claims 1, 2, 3, 4 or 5, comprising a reflector which is located under the wrapping sheet and reflects at least five percent (%) of incident light as said second light source. The inspecting device as recited in claim 8, wherein said reflector has a reflection specificity depending on a color or a wavelength of the incident light, and wherein the color specificity of said reflector is selected or changed in order to most effectively heighten the color contrast of each part of the color/intensity distribution by enhancing or deducting such distributions. The inspecting device as recited in claim 9, wherein said color reflector has a color including a combination of an element of the color to be enhanced and an element of the color to be deducted on a region of a translucent portion of the sheet wrapping on a captured image. The inspecting device as recited in claim 9, wherein said color reflector has a color including a combination of a color element to be enhanced and an element of a complementary color to be deducted of a region of a translucent portion of the sheet wrappings on a captured image. The inspecting device as recited in claim 8 or 9, wherein said reflector has a concave or convex surface with a diffuser. The inspecting device as recited in claim 1, 2, 3, 4, 5, or 8, wherein said at least one of said first and second light sources as recited in claims 1, 2, 3, 4, 5 and 8 and said light source located above the wrapping sheet as recited in claim 8 are located out of a gaze of a camera between the camera and the sheet wrapping in order to reduce an element of a specular reflection from the sheet wrapping. The inspecting device as recited in claims 8 or 9, wherein said reflector is located at least 10 mm away from the sheet wrapping. The inspecting device as recited in claim 1, 2, 3, 4, or 5, wherein said sensor comprises a one-dimensional line sensor and a driving unit arranged to move said one-dimensional sensor. The inspecting device as recited in claim 1, 2, 3, 4 or 5, wherein said sensor comprises a one-dimensional line sensor and a driving unit arranged to move the object to be inspected. The inspecting device as recited in one of the preceding claims, wherein, the device further detects a defect by dividing the inputted image into several regions according to the brightness distribution or the code distribution of the inputted image and thereafter giving a code of the neighboring region as an auxiliary code to the code value of each divided region. The inspecting device as recited in one of the preceding claims, wherein further a logical operation between images being performed to discriminate a defect based on the logical operation results. The inspecting device as recited in claim 4 or 5, said device inspects a shape or color of a wrapped object and/or the sheet and detects the foreign substance and/or the dirt by a computation of a single or a plurality of color distribution images modified from the reflected ray image and the transmitted ray image. The inspecting device as recited in claim 4 or 5, wherein said device detects the defect of a wrapped object and the wrapping sheet according to a result of binarization of a color image depending on a brightness distribution, the image being obtained by said sensor under a condition of adjusting a ratio of luminous intensities of both said light sources. The inspecting device as recited in claim 4 or 5, wherein said device detects the defect of a wrapped object and the wrapping sheet according to a result of binarization of a grated image depending on a brightness distribution, the image being obtained by said sensor under a condition of adjusting a ratio of luminous intensities of both said light sources. The inspecting device as recited in claim 4 or 5, wherein said device detects the defect of a wrapped object and the wrapping sheet according to a result of binarization of a color image depending on a color intensity distribution, the image being obtained by said sensor under a condition of adjusting a ratio of luminous intensities of both said light sources.

Inventors: ITO MINORU, KONDOU KIYOYUKI, ITO, MINORU, KONDOU, KIYOYUKI
Applicants: YUKI ENGINEERING SYSTEM CO LTD, YUKI ENGINEERING SYSTEM CO, LTD.
Application year: 1998
Main classification: G01N21
IPC codes: G01N21