One aspect of the present disclosure relates to an inspection apparatus.
Known in the art is an inspection apparatus that generates a processed image by performing image processing using an image processing algorithm on a transmission image obtained by transmitting electromagnetic waves through an article and performs an inspection of the article based on the processed image. In such an inspection apparatus, a plurality of image processing algorithms are stored in a storage unit in advance, and out of the stored image processing algorithms, an optimal image processing algorithm used for image processing at the time of inspection is selected and set.
For example, Japanese Patent No. 5635903 discloses an inspection apparatus (X-ray inspection apparatus) that, when an operator selects a foreign-matter detection characteristic of a foreign matter to be detected from an article to be inspected, extracts multiple image processing algorithms that approximate the selected foreign-matter detection characteristic from a plurality of image processing algorithms stored in advance and displays them on a display unit.
However, in the above-described conventional inspection apparatus, a plurality of image processing algorithms extracted according to the foreign-matter detection characteristic are displayed on the display unit, but it is the operator who determines which of the relevant extracted image processing algorithms is ultimately used for the image processing. Thus, the selection of the image processing algorithm may take time or labor, and the optimal image processing algorithm may not be selected during the process of the above-described selection. For this reason, there is room for improvement in selecting the optimal image processing algorithm.
Thus, an object of one aspect of the present disclosure is to provide an inspection apparatus that allows the optimal image processing algorithm out of a plurality of image processing algorithms stored in advance to be set without human intervention.
An inspection apparatus according to one aspect of the present disclosure is an inspection apparatus that performs image processing using an image processing algorithm selected in advance from among a plurality of image processing algorithms on a transmission image obtained by transmitting electromagnetic waves through an article, and inspects presence of a foreign matter contained in the article based on an image processing result, including a storage unit configured to store the image processing algorithms; an acquisition unit configured to acquire, as a reference transmission image, a transmission image obtained by transmitting electromagnetic waves through the article to which a foreign matter is attached or a synthesized transmission image generated by virtually synthesizing the foreign matter with a transmission image obtained by transmitting electromagnetic waves through the article; an evaluation unit configured to evaluate detection accuracy of the foreign matter for each of the image processing algorithms based on evaluation images obtained by processing the reference transmission image with the image processing algorithms stored in the storage unit; and a setting unit configured to set at least one of the image processing algorithms as the image processing algorithm selected in advance based on evaluation in the evaluation unit.
The foreign matter contained in the reference transmission image acquired by the acquisition unit includes a test piece (specimen) corresponding to the foreign matter. In the inspection apparatus of this configuration, on the basis of the evaluation images obtained by processing the reference transmission image by the respective image processing algorithms stored in the storage unit, the detection accuracy of the foreign matter for each of the image processing algorithms is evaluated, thereby enabling the image processing algorithms to be objectively evaluated. Then, out of the objectively evaluated image processing algorithms, at least one image processing algorithm is automatically set as the image processing algorithm selected in advance in image processing at the time of inspection. As a result, the optimal image processing algorithm out of the image processing algorithms stored in advance can be set without human intervention.
In the inspection apparatus according to one aspect of the present disclosure, the synthesized transmission image may be generated by synthesizing a transmission image obtained by transmitting electromagnetic waves through the foreign matter with at least a part of a transmission image obtained by transmitting electromagnetic waves through the article. As a result, the transmission image of the article to which the foreign matter is attached can be easily acquired.
In the inspection apparatus according to one aspect of the present disclosure, the evaluation unit may evaluate the detection accuracy based on a score calculated based on average brightness of a portion corresponding to the foreign matter of the evaluation image, minimum brightness of a portion corresponding to the foreign matter, and maximum brightness of a portion corresponding to the article other than the foreign matter. This allows the detection accuracy of the foreign matter to be determined more accurately.
In the inspection apparatus according to one aspect of the present disclosure, the evaluation unit may evaluate the detection accuracy based on a score calculated based on a calculation formula in which the score is set to become higher as a portion corresponding to the foreign matter of the evaluation image becomes brighter and as a portion corresponding to the article other than the foreign matter becomes darker in a case where the evaluation image is obtained so as to be indicated darker as a transmission amount of the electromagnetic waves increases and indicated brighter as a transmission amount of the electromagnetic waves declines as a result of processing the reference transmission image with the image processing algorithm. Accordingly, the respective evaluation for the image processing algorithms is explicitly indicated, and thus the image processing algorithm evaluated by the evaluation unit can be reliably set as the image processing algorithm selected in advance.
In the inspection apparatus according to one aspect of the present disclosure, the acquisition unit may generate, based on a transmission image acquired by transmitting electromagnetic waves through the foreign matter that is transported in a state in which it is mounted on a belt conveyor, a foreign-matter transmission image so as to be indicated darker as a transmission amount of electromagnetic waves increases and indicated brighter as a transmission amount of electromagnetic waves declines and for which a portion corresponding to the foreign matter and a portion corresponding to a background of a periphery of the foreign matter are extracted from the transmission image, generate a virtual foreign matter image for which brightness of a portion corresponding to the background is set to zero by subtracting a mode value of brightness in the foreign-matter transmission image from brightness of each pixel constituting the foreign-matter transmission image, and generate the synthesized transmission image by synthesizing the virtual foreign-matter image with a transmission image obtained by transmitting electromagnetic waves through the article. Accordingly, the synthesized transmission image used in evaluating the detection accuracy of the foreign matter with respect to the image processing algorithm can be easily generated and the reference transmission image appropriate as an image in evaluating the image processing algorithm can be acquired.
In the inspection apparatus according to one aspect of the present disclosure, the acquisition unit may acquire a first variation that is variation in brightness of a portion corresponding to the foreign matter with respect to a portion corresponding to the background in the foreign-matter transmission image, and a second variation that is variation in brightness of a portion corresponding to the foreign matter with respect to a portion corresponding to the article in a transmission image obtained by transmitting electromagnetic waves through the article containing the foreign matter, and the acquisition unit may correct, based on the first variation and the second variation, brightness of respective pixels constituting the synthesized transmission image. Accordingly, the synthesized transmission image that is closer to reality can be acquired, and thus the evaluation accuracy by the evaluation unit can be enhanced.
According to one aspect of the present disclosure, it is possible to set the optimal image processing algoritlun out of multiple image processing algorithms stored in advance without human intervention.
As illustrated in
The X-ray inspection apparatus 1 generates X-ray transmission images of articles A by irradiating the articles A with X-rays (electromagnetic waves) while transporting the articles A and performs the inspection (for example, storage number inspection, foreign-matter mixing inspection, missing-part inspection, and crack inspection) of the articles Abased on the relevant X-ray transmission images. The articles A before inspection are brought into the X-ray inspection apparatus 1 by an infeed conveyor 51. The articles A after inspection are taken out from the X-ray inspection apparatus 1 by an outfeed conveyor 52. The articles A determined to be defective by the X-ray inspection apparatus 1 are distributed off the production line by a sorting device (depiction omitted) disposed downstream of the outfeed conveyor 52. The articles A determined to be good by the X-ray inspection apparatus 1 pass through the relevant sorting device as is.
The apparatus body 2 accommodates the controller 20 and others. The support legs 3 support the apparatus body 2. The shield box 4 is provided on the apparatus body 2. The shield box 4 prevents external leakage of X-rays. Inside the shield box 4, provided is an inspection area R where inspection of the articles A by X-rays is performed. In the shield box 4, an infeed opening 4a and an outfeed opening 4b are formed. The articles A before inspection are brought into the inspection area R via the infeed opening 4a from the infeed conveyor 51. The articles A after inspection are taken out to the outfeed conveyor 52 via the outfeed opening 4b from the inspection area R. On each of the infeed opening 4a and the outfeed opening 4b, an X-ray shielding curtain (depiction omitted) that prevents X-ray leakage is provided.
The transport unit 5 is disposed inside the shield box 4. The transport unit 5 transports the articles A along the transport direction D from the infeed opening 4a to the outfeed opening 4b through the inspection area R. The transport unit 5 is a belt conveyor bridged between the infeed opening 4a and the outfeed opening 4b, for example.
As illustrated in
The X-ray detector 7 is disposed inside the shield box 4. The X-ray detector 7 detects the X-rays that are emitted from the X-ray irradiation unit 6 toward the article A transported by the transport unit 5 and are transmitted through the article A. The X-ray detector 7 is a line sensor composed of X-ray detecting elements arrayed in one dimension along the horizontal direction perpendicular to the transport direction D.
As illustrated in
The controller 20 is disposed inside the apparatus body 2. The controller 20 controls the operation of various units of the X-ray inspection apparatus 1. The controller 20 is made up of a central processing unit (CPU), a read-only memory (ROM), a random-access memory (RAM), a solid-state drive (SSD), and the like. In the ROM, a program for controlling the X-ray inspection apparatus 1 is recorded. To the I/O port and communication port, the transport unit 5, the X-ray irradiation unit 6, the X-ray detector 7, and the display operating unit 8 are connected. As a result, the controller 20 can control the various operations of the X-ray inspection apparatus 1.
The controller 20, as illustrated in
The storage unit 21 stores therein a plurality of image processing algorithms. The image processing algorithms stored in the storage unit 21 can be acquired from outside via a network such as the Internet. In addition, the image processing algorithms stored in the storage unit 21 can be acquired from an external storage medium such as a USB memory, a CF card, or a removable hard disk.
The image processing algorithms stored in the storage unit 21 can be generated automatically from a plurality of image processing filters, by employing genetic algorithms (GA) that are methods of applying genetic and evolutionary mechanisms in the living world, based on the specification of the X-ray inspection apparatus 1, inspection conditions, or the like. The image processing algorithms stored in the storage unit 21 in advance may be, in addition to the algorithms generated by employing the genetic algorithms, algorithms for which a plurality of image processing filters are manually combined as appropriate or the like.
The acquisition unit 22 acquires a transmission image P11 (see
The image processor 23 displays the generated relevant processed image P2 on the display operating unit 8.
The foreign-matter determination unit 28 performs inspection of the article A based on the processed image P2 that has been image-processed by the image processor 23. Specifically, the foreign-matter determination unit 28 determines the presence of the foreign matter F (determination of quality) based on variations in brightness (for example, presence of an abrupt brightness change portion) when the processed image P2 is scanned in one direction. The foreign-matter determination unit 28 may explicitly display the inspection result, on the display operating unit 8 on which the processed image is displayed, by surrounding the periphery of the foreign matter F by a frame or inserting characters, for example. Note that the brightness in the present specification means the brightness of each pixel constituting an image and is indicated by a gray value, density value, lightness value, luminance value, and the like.
In order to perform an inspection of the foreign matter F in such an X-ray inspection apparatus 1, there is a need to select in advance an image processing algorithm for generating the processed image P2 out of a plurality of image processing algorithms stored in the storage unit 21 and set it as the image processing algorithm used for the inspection. Then, in order to enhance the detection accuracy of the foreign matter F, there is a need to select and set an optimal image processing algorithm for generating the processed image P2 in advance. Thus, the X-ray inspection apparatus 1 is provided with an initial setting function that selects and sets the image processing algorithm used for inspection out of the image processing algorithms.
A conventional X-ray inspection apparatus has had an initial setting function that presents to the operator respective evaluation images P3 (see
First, an acquisition function of a reference transmission image P1 that is an image to be processed by each image processing algorithm will be described. The acquisition unit 22, as illustrated in
The acquisition unit 22 irradiates an article A with the X-rays, the article A containing foreign matters F (article A for which the foreign matters F or test pieces were attached to a conforming article containing no foreign matters F) transported by the belt conveyor as the transport unit 5, and acquires the transmission image P11by detecting the X-rays that were transmitted through the article A. The acquisition unit 22 of the present embodiment acquires the transmission image P11 that appears brighter as the amount of X-ray transmission is greater and that appears darker as the amount of X-ray transmission is smaller.
The acquisition unit 22 irradiates an article A with the X-rays, the article A containing no foreign matters F (confonning article A) transported by the belt conveyor as the transport unit 5, and acquires the conforming-article transmission image PA1 by detecting the X-rays that were transmitted through the conforming article A. The acquisition unit 22 of the present embodiment acquires the conforming-article transmission image PA1 that appears brighter as the amount of X-ray transmission is greater and that appears darker as the amount of X-ray transmission is smaller.
The acquisition unit 22 irradiates foreign matters F with the X-rays, the foreign matters F being transported by the belt conveyor as the transport unit 5, and acquires the foreign-matter transmission image PF by detecting the X-rays that were transmitted through the foreign matters F. The acquisition unit 22 of the present embodiment acquires the foreign-matter transmission image PF that appears brighter as the amount of X-ray transmission is greater and that appears darker as the amount of X-ray transmission is smaller. The acquisition unit 22 acquires the synthesized transmission image P13 by synthesizing the foreign-matter transmission image PF on the conforming-article transmission image PA1 obtained in this way. The acquisition unit 22 acquires the synthesized transmission image P13 that appears brighter as the amount of X-ray transmission is greater and that appears darker as the amount of X-ray transmission is smaller.
The conforming-article transmission image PA1 is an X-ray transmission image of an inspection target article containing no foreign matters F. The synthesized transmission image P13 formed by synthesizing a virtual foreign matter image PF3 (see
On the synthesized transmission image P13 by the acquisition unit 22, the function of generating the synthesized transmission image P13 by using the virtual foreign matter image PF3 will be described in more detail. The X-ray inspection apparatus 1 of the present embodiment has a function capable of storing (registering) the virtual foreign matter image PF3 (see
As illustrated in
In this case, the acquisition unit 22 generates a brightness histogram of the foreign-matter transmission image PF1 and acquires a mode value of brightness. The acquisition unit 22 determines that the relevant mode value is a background portion that is a portion other than the foreign matter F in the foreign-matter transmission image PF1. The acquisition unit 22 subtracts, on the entire foreign-matter transmission image PF1, the brightness to be the above-described mode value, and acquires a foreign-matter area image PF2 illustrated in
The acquisition unit 22 generates the synthesized transmission image P13 by synthesizing the virtual foreign matter image PF3 on the above-described conforming-article transmission image PA1. At this time, the acquisition unit 22 acquires a first variation that is the variation in brightness of the portion corresponding to the foreign matter F with respect to the portion (area) corresponding to the background in the foreign-matter transmission image PF1, and a second variation that is the variation in brightness of the portion corresponding to the foreign matter F with respect to the portion corresponding to the article A in the transmission image P11 obtained by transmitting X-rays through the article A containing the foreign matter F. The acquisition unit 22 corrects, based on the above-described first variation and the second variation, the brightness of the respective pixels constituting the synthesized transmission image P13.
In more detail, based on the brightness of the synthesized image calculated by the following calculation formula, the brightness of the respective pixels constituting the synthesized transmission image P13 is corrected.
Note that the adjustment coefficient indicates weight at the time of synthesizing.
In the X-ray inspection apparatus 1 of the present embodiment, by such correction of the synthesized image by the acquisition unit 22, the synthesized transmission image P13 that is closer to reality can be acquired. In
Next, the function to evaluate each image processing algorithm will be described. The image processor 23 generates an evaluation image P3 on which the evaluation of the image processing algorithm is performed by the evaluation unit 24. Specifically, the image processor 23 performs, for each of the image processing algorithms stored in the storage unit 21, a process of generating the evaluation images P3 by performing image processing using the image processing algorithms stored in the storage unit 21 on the reference transmission image P1 acquired by the acquisition unit 22. That is, as illustrated in
The image processor 23 may generate the above-described evaluation images P3 for all the image processing algorithms (for example, 200 or more) stored in the storage unit 21, or may generate the evaluation images P3 for a part of the image processing algorithms (for example, approximately 5 to 10) automatically selected by using various selecting methods.
The evaluation unit 24 evaluates, based on the evaluation images P3 generated by the image processor 23, the detection accuracy of the foreign matter for the respective image processing algorithms. The evaluation unit 24 evaluates the detection accuracy of the foreign matter F on the basis of a score that is calculated based on the average brightness of the portion corresponding to the foreign matter F of the evaluation image P3, the minimum brightness of the portion corresponding to the foreign matter F, and the maximum brightness of the portion corresponding to the article A other than the foreign matter F.
In detail, the evaluation unit 24 evaluates the detection accuracy on the basis of the score that is calculated based on a calculation formula for which the score gets higher when the portion (pixels) corresponding to the foreign matter F of the evaluation image P3 is brighter and when the portion (pixels) corresponding to the article A other than the foreign matter F is darker. In more detail, the evaluation unit 24 evaluates the detection accuracy of the foreign matter based on the score obtained by the following calculation expression 1. In the present embodiment, the evaluation unit 24 determines that the image processing algorithm that generated the evaluation image P3 of the maximum score is the optimal algorithm.
AveMinRate: Level uniformity (between 0 and 1.00)
When the average brightness of the foreign matter F portion is zero, it is set to AveMinRate=0.
AveSub: Average level difference (between 0 and 100)
Average level difference=(Average brightness of foreign matter F portion)−(Maximum brightness of other than foreign matter F portion)
MinSub: Minimum level difference (between 0 and 100)
Minimum level difference=((Minimum brightness of foreign matter F portion)−(Maximum brightness of other than foreign matter F portion))×2
AveRate: Average contrast (between 0 and 100)
It will be described that, according to the above-described PGP-24E calculation expression 1, the image processing algorithm can be evaluated correctly, as indicated in the following. First, the transmission image P11 (see
When the score was calculated based on the above-described calculation expression 1 on each of such evaluation image P31 and evaluation image P32, the results indicated in the following Table 1 were obtained. That is, according to the above-described calculation expression 1, it can be seen that the score of the image for which the foreign matters F were successfully detected becomes greater than the score of the image for which the foreign matters F were not properly detected.
The setting unit 25 sets (determines) one selected by the evaluation unit 24 out of the image processing algorithms stored in the storage unit 21 as the image processing algorithm to be used in inspection. The setting unit 25 of the present embodiment sets, as the image processing algorithm used in inspection, the image processing algorithm for which the score calculated by the evaluation unit 24 is the highest. The setting unit 25 sets, for each of the articles A of a plurality of types (for example, 200 to 300 types), the image processing algorithm evaluated optimum by the evaluation unit 24 for each of a plurality of sensitivity levels.
Next, in the X-ray inspection apparatus 1 thus configured, on the article A, the procedure of setting (initial setting) the optimal image processing algorithm for each type of the foreign matter F and for each sensitivity level will be described. In this case, the procedure of using the synthesized transmission image P13 as the reference transmission image P1 will be described.
The operator sets, in a sensitivity auto-set menu screen that is an initial setting screen, the type of foreign matter F to be extracted at the sensitivity level 4 to 7, for example. Then, after determining the setting of X-ray output level and image enhancement level by sensitivity auto-set, the operator runs, through the transport unit 5, a conforming article A that is the article A that has a possibility of containing foreign matters F but contains no foreign matters F so that the conforming-article transmission image PA1 is acquired. The operator repeats the relevant work so that 10 pieces of the conforming-article transmission images PA1 are acquired.
Then, the operator selects, for the conforming-article transmission image PA1, the virtual foreign matter image PF3 corresponding to the foreign matter F to be extracted at the time of sensitivity level 4. The X-ray inspection apparatus 1 synthesizes the virtual foreign matter image PF3 selected by the operator on each of the 10 pieces of the conforming-article transmission images PA1 and generates 10 pieces of the synthesized transmission images P13. In the X-ray inspection apparatus 1, when 10 pieces of the synthesized transmission images P13 are generated, automatically or by the operation of the operator, image processing by a plurality of image processing algorithms for the 10 pieces of the synthesized transmission images P13 is started. The image processing algorithms are, as in the foregoing, stored in the storage unit 21 (including an external storage medium).
In the X-ray inspection apparatus 1, when the respective evaluation images P3 processed by the image processing algorithms are generated, the score for evaluating the detection accuracy of the foreign matter F is calculated on each of the evaluation images P3. The X-ray inspection apparatus 1 selects the image processing algorithm of the highest score and automatically sets it as the image processing algorithm used in the inspection. In this case, on an article A, the image processing algorithm that is optimum for the sensitivity level 4 of a foreign matter F is set. The operator repeats similar procedures on the sensitivity levels 5 to 7.
When the inspection of the articles A is performed in the X-ray inspection apparatus 1 for which such an initial setting was performed, as long as the operator selects at least the type of the articles A, the image processing of the transmission image P11 is performed using the image processing algorithm selected in advance out of the image processing algorithms and the inspection of the articles A is performed.
As in the foregoing, in the X-ray inspection apparatus 1 according to the present embodiment, on the basis of the evaluation images P3 obtained by processing the reference transmission image P1 by a plurality of image processing algorithms stored in the storage unit 21, the detection accuracy of the foreign matter F for the respective image processing algorithms is evaluated, thereby enabling the image processing algorithms to be objectively evaluated. Then, out of the objectively evaluated image processing algorithms, it is automatically set as the image processing algorithm selected in advance in image processing at the time of inspection. As a result, the optimal image processing algorithm out of the image processing algorithms stored in advance can be set without going through human intervention.
As in the foregoing, the embodiment according to one aspect of the present disclosure has been described. However, one aspect of the present disclosure is not necessarily limited to the above-described embodiment, and various modifications are possible within a scope not departing from the gist thereof.
In the above-described embodiment, the X-ray detector 7 composed of a single line sensor has been exemplified but may have two pieces of line sensors of a first line sensor and a second line sensor. In this case, it may be what is called a dual-energy sensor for which the first line sensor detects X-rays of low energy band and the second line sensor detects X-rays of higher energy band than the low energy band. In this case also, on the transmission images generated by the detection of the first line sensor and the second line sensor, respective appropriate image processing algorithms are performed. As a result, in the initial setting also, on the article A, the image processing algorithm that is optimum for each of the first line sensor and the second line sensor is set for each type of the foreign matter F and for each sensitivity level.
In the above-described embodiment, on the article A, an example in which one optimal algorithm is set for the type of the foreign matter F and for each sensitivity level has been described, but two or more may be selected and be set as the image processing algorithms selected in advance.
In the above-described embodiment, as an example of the method of generating the synthesized transmission image P13, an example in which the acquisition unit 22 synthesizes the foreign-matter transmission image PF on the transmission image (conforming-article transmission image PA1) obtained by transmitting the electromagnetic waves through the article A has been described, but the embodiments are not limited thereto. For example, the processing in which pixel values of at least a part of the pixels constituting the conforming-article transmission image PA1 are changed based on a predetermined pixel value that is determined based on the absorption characteristics of the electromagnetic waves and the like may be performed. Such processing may be processed by a computer program.
In the above-described embodiment, the mode in which the inspection apparatus is the X-ray inspection apparatus 1 has been exemplified. However, the inspection apparatus according to the present disclosure is not limited to the X-ray inspection apparatus 1, and it only needs to be an apparatus that performs foreign matter inspection of the articles A by using electromagnetic waves. In this case, the electromagnetic waves are X-rays, near-infrared rays, light, and other electromagnetic waves. The type of articles A is not particularly limited and various articles A can be a subject of the inspection. Similarly, the type of foreign matters is not particularly limited and various foreign matters can be a subject of the inspection.
Number | Date | Country | Kind |
---|---|---|---|
2019-126313 | Jul 2019 | JP | national |