Foreign matter inspection device and foreign matter inspection method
The X-ray foreign body inspection device uses region of interest setting and restored image comparison to enhance accuracy by reducing false positives and negatives, ensuring precise foreign matter detection.
Patent Information
- Application Number
- JP2024031369
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2025-09-11
AI Technical Summary
Existing X-ray foreign body inspection devices face issues with erroneous judgments due to preset reference values, leading to false positives or false negatives, and lack a final pass/fail judgment capability.
The device employs a region of interest setting, mask image generation, restored image creation using a learning model, and a difference evaluation value calculation to accurately determine the presence of foreign substances by comparing the inspection image with a restored image.
This approach reduces erroneous detections and enhances the accuracy of foreign matter inspection by double-checking using a restored image, improving overall inspection performance.
Smart Images

Figure 2025133422000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a foreign matter inspection apparatus and a foreign matter inspection method for inspecting an object for foreign matter. [Background technology]
[0002] Conventionally, there is a foreign body inspection device that uses X-rays to detect foreign bodies such as metals and bones contained in food and other objects to be inspected. X-ray foreign body inspection devices irradiate X-rays onto objects to be inspected, such as meat, fish, processed foods, and pharmaceuticals, which are conveyed sequentially at predetermined intervals on a conveying path, and inspect whether or not the objects contain foreign bodies based on the amount of transmitted X-rays (see, for example, Patent Document 1).
[0003] Such X-ray foreign body inspection devices have preset reference values, such as foreign body detection reference values and judgment target values, for determining whether or not foreign bodies are present, and compare the detected value detected by the device with the reference values to determine whether or not foreign bodies are present. In such judgment methods using reference values, there is a risk of erroneous judgment depending on how the reference values are set, so there is a demand for improved judgment accuracy.
[0004] For example, if the reference value is set low in an attempt to detect foreign matter with high sensitivity, there is a problem of an increase in false positives, where good products are judged as defective, and conversely, if the reference value is set high, there is a problem of an increase in false positives, where defective products are judged as good.
[0005] For this reason, the device disclosed in Patent Document 1 compares the measurement value of a non-defective product that is not determined to contain a foreign object based on the first reference value K1 with a second reference value K2 that is set based on that measurement value to determine whether or not there is a possibility that the object being inspected contains a foreign object, and for non-defective products that are determined to contain a foreign object, a message is displayed urging the inspector to re-inspect the product. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Laid-Open No. 2007-263836 Summary of the Invention [Problem to be solved by the invention]
[0007] However, the device disclosed in Patent Document 1 merely determines whether reinspection is necessary, and has the problem that it cannot itself perform a final pass / fail judgment on the inspected object.
[0008] The present invention has been made to solve these conventional problems, and an object of the present invention is to provide a foreign matter inspection device and a foreign matter inspection method that can reduce erroneous detection of foreign matters and perform foreign matter inspection with high accuracy. [Means for solving the problem]
[0009] In order to solve the above problem, the foreign substance inspection device of the present invention is configured to include: a region of interest setting unit (34) that sets a region of interest (P) including a foreign substance candidate region (B) in an inspection image (A) in which a foreign substance candidate region (B) that may contain an image of the foreign substance in the object to be inspected (100) has been identified; a mask image generation unit (35) that generates a mask image (M) in which the foreign substance candidate region in the image of the region of interest (P) is masked; a restored image generation unit (36) that generates a restored image (Q) from the mask image based on a restoration algorithm of a model obtained by learning images of non-defective products of the object to be inspected; a difference evaluation value calculation unit (37) that calculates a difference evaluation value for evaluating the difference between the image of the region of interest and the restored image; and a foreign substance determination unit (38) that determines whether the foreign substance candidate region includes the image of the foreign substance based on a comparison of the difference evaluation value with a predetermined threshold.
[0010] As a result, the foreign matter inspection device according to the present invention can reduce erroneous foreign matter detection and perform foreign matter inspection with high accuracy, compared to when foreign matter judgment is performed using only the image of the region of interest. For example, when the foreign matter inspection device according to the present invention performs a provisional judgment using only the image of the region of interest and then performs a re-judgment using a difference image between the image of the region of interest and the restored image, it is possible to double-check the inspection and improve inspection performance.
[0011] Furthermore, the foreign body inspection device according to the present invention may be configured such that the inspection image is an X-ray absorption image obtained by converting the amount of X-rays transmitted through the object to be inspected into a density value proportional to the thickness of the object, the difference evaluation value is a value based on the difference in density values between the image of the region of interest and the restored image, and when the absolute values of the difference between the positive density values and the difference between the negative density values are equal, the difference evaluation value obtained from the difference between the positive density values and the difference between the negative density values may be different.
[0012] As a result, the foreign matter inspection device according to the present invention makes the difference evaluation value obtained from the difference in positive density values larger than the difference evaluation value obtained from the difference in negative density values of the same absolute value, and thereby can accurately detect foreign matters for which the difference in density values between the image of the region of interest and the restored image is positive when the inspection image is an X-ray absorption image.
[0013] Furthermore, the foreign matter inspection device according to the present invention makes the difference evaluation value obtained from the difference in positive density values smaller than the difference evaluation value obtained from the difference in negative density values of the same absolute value, thereby enabling accurate detection of foreign matter for which the difference in density values between the image of the region of interest and the restored image is negative when the inspection image is an X-ray absorption image.
[0014] Furthermore, the foreign body inspection device according to the present invention may be configured such that the inspection image is an X-ray transmission image obtained by converting the amount of X-rays transmitted through the object to be inspected into a luminance value, the difference evaluation value is a value based on the difference in luminance values between the image of the region of interest and the restored image, and when the absolute values of the difference in positive luminance values and the difference in negative luminance values are equal, the difference evaluation value obtained from the difference in negative luminance values differs from the difference in positive luminance values.
[0015] As a result, the foreign matter inspection device of the present invention makes the difference evaluation value obtained from the difference in negative brightness values larger than the difference evaluation value obtained from the difference in positive brightness values of the same absolute value, so that when the inspection image is an X-ray transmission image, it can accurately detect foreign matters where the difference in brightness values between the image of the region of interest and the restored image is negative.
[0016] Furthermore, the foreign body inspection device according to the present invention makes the difference evaluation value obtained from the difference in negative brightness values smaller than the difference evaluation value obtained from the difference in positive brightness values of the same absolute value, so that when the inspection image is an X-ray transmission image, foreign bodies for which the difference in brightness values between the image of the region of interest and the restored image is positive can be detected with high accuracy.
[0017] The foreign substance inspection device according to the present invention may further include a foreign substance candidate region identifying section (32) that identifies the foreign substance candidate region in the inspection image.
[0018] Furthermore, the foreign substance inspection method according to the present invention includes: a region of interest setting step (S7) for setting a region of interest (P) including a foreign substance candidate region (B) in an inspection image (A) in which a foreign substance candidate region (B) that may contain an image of the foreign substance in the object to be inspected (100) has been identified; a mask image generating step (S8) for generating a mask image (M) in which the foreign substance candidate region in the image of the region of interest (P) is masked; a restored image generating step (S9) for generating a restored image (Q) from the mask image based on a restoration algorithm of a model obtained by learning images of non-defective products of the object to be inspected; a difference evaluation value calculating step (S10) for calculating a difference evaluation value for evaluating the difference between the image of the region of interest and the restored image; and a foreign substance determination step (S11) for determining whether the foreign substance candidate region includes the image of the foreign substance based on a comparison of the difference evaluation value with a predetermined threshold. [Effects of the Invention]
[0019] The present invention provides a foreign matter inspection device and a foreign matter inspection method that can reduce erroneous detection of foreign matters and perform foreign matter inspection with high accuracy. [Brief explanation of the drawings]
[0020] [Figure 1] 1 is a schematic configuration diagram of a foreign matter inspection device according to an embodiment of the present invention. [Figure 2] 2 is a diagram for explaining an area of an inspection image handled by the foreign matter inspection device of FIG. 1. FIG. [Figure 3] 2 is a diagram for explaining the processing of the foreign matter inspection apparatus of FIG. 1. FIG. [Figure 4] 2A and 2B are graphs showing the relationship between the difference evaluation value calculated by the difference evaluation value calculation unit included in the foreign substance inspection device of FIG. 1 and the difference in brightness or density values between the image of the area of interest and the restored image, where (a) shows an example in which the difference evaluation value is symmetrical with respect to the positive and negative of the difference in brightness or density values, (b) and (c) show examples in which the difference evaluation value is asymmetrical with respect to the positive and negative of the difference in brightness or density values, and (d) shows an example in which the difference evaluation value is equal to the difference in brightness or density values. [Figure 5]2 is a flowchart showing the process of a foreign matter inspection method using the foreign matter inspection device of FIG. 1. DETAILED DESCRIPTION OF THE INVENTION
[0021] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of a foreign matter inspection device and a foreign matter inspection method according to the present invention will be described with reference to the accompanying drawings.
[0022] The foreign matter inspection device 1 is installed on a part of a conveying line that conveys inspection objects 100, and detects the presence or absence of foreign matter such as metal, glass, stone, or bone mixed in the inspection objects 100 that are conveyed sequentially at predetermined intervals. Examples of the foreign matter inspection device 1 include an X-ray inspection device that uses X-rays, and an inspection device that irradiates the inspection object 100 with light in the near-infrared region or the visible light region and measures the transmitted light or reflected light. In this embodiment, an example will be described in which the foreign matter inspection device 1 is an X-ray inspection device.
[0023] As shown in FIG. 1, the foreign matter inspection device 1 includes a transport unit 10, an X-ray inspection unit 20, and a control unit 50 having a display unit 45 and an operation unit .
[0024] The transport unit 10 is a conveyor in which a loop-shaped transport belt 11 is wound around a plurality of transport rollers 12 and 13, and is supported by a housing (not shown). The transport unit 10 can transport the inspection object 100 placed on the transport surface 11a of the transport belt 11 in sequence in the right direction in FIG. 1 so that the inspection object 100 passes through a predetermined inspection section of the X-ray inspection unit 20. The inspection object 100 may be placed on the transport belt 11 manually by the user, or may be placed by a dedicated device (not shown).
[0025] The conveyor belt 11 is made of a material that is easily permeable to X-rays (elements other than elements with large atomic weights). The conveyor belt 11 is driven by controlling the rotation of the drive motor so that the conveyor speed is set in advance by the operation unit 46 when inspecting the inspection object 100. As a result, the inspection object 100 carried in from the carry-in entrance is conveyed to the right in FIG. 1 towards the carry-out exit at the set conveying speed.
[0026] The X-ray inspection unit 20 has an X-ray source 21 that irradiates the object 100 to be inspected, which is being transported by the transport unit 10, with X-rays in a predetermined energy band that can penetrate the object 100. The X-ray source 21 generates X-rays with a wavelength and intensity according to the tube current and tube voltage of a known X-ray tube 22, and is capable of irradiating the object 100 on the transport belt 11 with fan-beam-shaped X-rays that pass through an X-ray window 23a of an envelope 23 and are perpendicular to the transport direction of the transport unit 10.
[0027] The X-ray inspection unit 20 further includes an X-ray detector 24 disposed directly below the conveyor belt 11.
[0028] Although not shown, this X-ray detector 24 is composed of an X-ray line sensor camera in which detection elements consisting of a scintillator, which is a phosphor, and a photodiode or a charge-coupled device are arranged in an array at a predetermined pitch in the width direction of the conveying path of the conveying section 10, so as to detect X-rays at a predetermined resolution.
[0029] That is, the X-ray detector 24 detects the X-rays irradiated from the X-ray source 21 and transmitted through the object 100 for each predetermined transmission area of the object 100 corresponding to the detection element, converts the detected X-rays into an electrical signal according to the amount of transmission, and outputs an X-ray detection signal for each transmission area.
[0030] The control unit 50 controls the transport speed and transport interval of the inspection object 100 by the transport belt 11 in the transport unit 10. The control unit 50 also controls the X-ray irradiation intensity and irradiation period in the X-ray inspection unit 20, and controls the X-ray detection cycle and the detection period of the inspection object 100 by the X-ray line sensor of the X-ray detector 24 according to the transport speed of the inspection object 100.
[0031] The control unit 50 also has an inspection image generation unit 31, a foreign substance candidate region identification unit 32, a tentative judgment unit 33, a region of interest setting unit 34, a mask image generation unit 35, a restored image generation unit 36, a difference evaluation value calculation unit 37, a foreign substance judgment unit 38, and a memory unit 39.
[0032] The inspection image generating unit 31 takes in X-ray detection signals from the X-ray detector 24 at predetermined intervals and generates an inspection image of the inspection object 100 consisting of two-dimensional position information determined by the direction of passage of the inspection object 100 and the arrangement direction of the detection elements, and signal processing results for each position.
[0033] The inspection image generated by the inspection image generating unit 31 may be an X-ray transmission image in which the amount of X-rays transmitted through the inspection object 100 is converted into a brightness value, or an X-ray absorption image in which the amount of X-rays transmitted through the inspection object 100 is converted into a density value proportional to the thickness of the inspection object 100. The inspection image generating unit 31 generates an inspection image each time the inspection object 100 is transported to the X-ray inspection unit 20 and passes through a predetermined inspection section.
[0034] For an X-ray absorption image, for example, if the X-ray absorption rate of the object 100 under inspection is α and the thickness of the object 100 under inspection is L, then the intensity S' of X-rays with intensity S after they have passed through the object 100 under inspection can theoretically be written as S' = S·exp(-α·L). By taking the logarithm of both sides and transforming, it can also be written as α·L = log(S) - log(S'). The X-ray transmission image corresponds to the two-dimensional distribution of S', and by transforming it by taking the logarithm as described above, it is possible to obtain an X-ray absorption image that shows the two-dimensional distribution of the amount of absorption α·L by the object 100 under inspection.
[0035] Alternatively, the inspection image generated by the inspection image generation unit 31 may be a transmitted image or a reflected image of the inspection object 100 captured by an imaging device while irradiating the inspection object 100 with light in the near-infrared region or the visible light region.
[0036] FIG. 2 is a diagram for explaining each region in an inspection image in which an image W of the inspection object 100 is captured.
[0037] Original image A is an image that contains image W of inspection object 100 among the inspection images generated by inspection image generating unit 31. Note that, hereinafter, original image A of an inspection image will also be simply referred to as "inspection image A."
[0038] The foreign substance candidate region B is a region B1 in the original image A that may contain an image of a foreign substance in the object under inspection 100, or a rectangular region B2 that includes region B1.
[0039] An attention region P is a region in original image A that includes a foreign substance candidate region B. If there are multiple foreign substance candidate regions B in original image A, an attention region P is set for each of the multiple foreign substance candidate regions B. FIG. 2 shows an example in which one attention region P is set for one foreign substance candidate region B, and an example in which two attention regions P1, P2 are set for two foreign substance candidate regions B. The attention region P may also be the entire original image A. Note that hereinafter, the image of attention region P will also be referred to as the "attention region image P."
[0040] The foreign substance candidate region identifying section 32 identifies a foreign substance candidate region B, which may contain an image of a foreign substance in the inspection object 100, in the inspection image A generated by the inspection image generating section 31. The foreign substance candidate region identifying section 32 identifies the foreign substance candidate region B using various known foreign substance inspection algorithms.
[0041] For example, the foreign substance candidate region identifying unit 32 may perform image processing such as a filter for extracting an image of a foreign substance on the inspection image A generated by the inspection image generating unit 31, and identify a region of the image of a foreign substance mixed in the inspection object 100. As a filter for enhancing the image of a foreign substance, for example, a feature extraction filter such as a differential filter (Roberts filter, Prewitt filter, Sobel filter) or a Laplacian filter is used.
[0042] Alternatively, the foreign substance candidate region identifying unit 32 may identify the foreign substance candidate region B in the inspection image A using a deep learning-based object detection model such as SSD (Single Shot MultiBox Detector) or YOLO (You Only Look Once).
[0043] The provisional determination unit 33 compares the brightness value or density value of the foreign substance candidate region B identified by the foreign substance candidate region identification unit 32 with a predetermined threshold value, and provisionally determines whether or not the foreign substance candidate region B contains an image of a foreign substance. Note that the inspection image A in which the provisional determination unit 33 provisionally determines the foreign substance candidate region B may be an image in which the foreign substance candidate region B has been identified by an arbitrary external device.
[0044] 3, the attention region setting unit 34 sets an attention region P including a foreign substance candidate region B in an original image A of an inspection image in which the foreign substance candidate region B has been identified. The attention region setting unit 34 may set the attention region P for all inspection images A, or may set the attention region P only for inspection images A that have been determined by the tentative determination unit 33 to contain an image of a foreign substance. If the foreign substance candidate region identifying unit 32 identifies multiple foreign substance candidate regions B for one inspection image A, the attention region setting unit 34 sets multiple attention regions P including each of the multiple foreign substance candidate regions B in the inspection image A.
[0045] 3, the mask image generation unit 35 generates a mask image M by masking a foreign substance candidate region B in the attention area image P set by the attention area setting unit 34. The mask image generation unit 35 generates, as the mask image M, an image in which the foreign substance candidate region B in the attention area image P is filled with a value such as 0 or is missing.
[0046] The restored image generating unit 36 performs restoration processing to generate a restored image Q from the mask image M, as shown schematically in Fig. 3, based on a restoration algorithm of a model obtained by learning from a non-defective image, which is an image of a non-defective product of the inspection object 100. Here, the non-defective product image is, for example, an image of a non-defective product of the same type as the inspection object 100 and which does not contain any foreign matter.
[0047] The restoration algorithm used by the restored image generation unit 36 when generating the restored image Q is, for example, an algorithm using deep learning or an algorithm using K-SVD (K-Singular Value Decomposition).
[0048] The restored image generating unit 36 uses a plurality of non-defective product images that have been subjected to arbitrary masking for training. At this time, it is desirable that the non-defective product images do not include image information other than that of the non-defective product, such as the background of the non-defective product.
[0049] That is, the restoration algorithm of the restored image generating unit 36 can convert the mask image M into a restored image Q that does not contain any foreign matter by learning from a non-defective image that does not contain any foreign matter.
[0050] The difference evaluation value calculation unit 37 calculates a difference evaluation value for evaluating the difference between the attention area image P and the restored image Q generated by the restored image generation unit .
[0051] For example, the difference evaluation value calculation unit 37 calculates the absolute value F of the difference δ between the luminance value or density value of the attention area image P and the restored image Q according to the following formulas (1a), (1b), and (2): Sym (P, Q) is calculated as the difference evaluation value. Fig. 4(a) shows the difference evaluation value F that is symmetrical with respect to the positive and negative of the difference δ in the brightness or density values between the attention area image P and the restored image Q. Sym This is a graph showing (P,Q).
[0052]
number
[0053]
number
[0054] Equation (1a) is the pixel (i * ,j *) is shown. δ in formula (1b) represents the difference in luminance values or density values between the target region image P and the restored image Q at pixel (i * , j * ).
[0055] That is, as schematically shown in FIG. 3, the difference evaluation value calculation unit 37 performs a difference process to generate a difference image composed of the difference δ between the luminance values or density values of the target region image P and the restored image Q. The difference image generated by the difference evaluation value calculation unit 37 may be displayed on the display unit 45.
[0056] Alternatively, the difference evaluation value calculation unit 37 may calculate an asymmetric F NonSym (P, Q) with respect to the sign of the difference δ between the luminance values or density values of the target region image P and the restored image Q as the difference evaluation value.
[0057]
Equation
[0058] FIG. 4(b) is a graph showing the difference evaluation value F * , j * when δ is the difference in luminance values between the target region image P and the restored image Q at pixel (i NonSym (P, Q). Here, w1 + w2 > 0, w1 < w2, and w1 < 0. That is, the absolute value of the slope of the difference evaluation value F NonSym (P, Q) for a negative luminance value difference δ is greater than the absolute value of the slope of the difference evaluation value F NonSym (P, Q) for a positive luminance value difference δ.
[0059] That is, for F<_{0000013}>(P, Q) where w1 + w2 > 0, w1 < w2, and w1 < 0, when the absolute values of the positive luminance value difference δ and the negative luminance value difference δ are equal, the difference evaluation value F NonSym (P, Q) obtained from the negative luminance value difference δ is greater than the difference evaluation value F NonSymGreater than (P, Q). In an X-ray transmission image, the luminance value of a foreign object is often smaller than those of other normal areas. Therefore, as shown in FIG. 4(b), F NonSym By using (P, Q) as the differential evaluation value, the accuracy of foreign object determination in the subsequent foreign object determination unit 38 can be improved.
[0060] FIG. 4(c) shows the differential evaluation value F * ,j * (P, Q) when δ is the difference in density values between the target region image P and the restored image Q at pixel (i NonSym (P, Q). Here, w1 + w2 > 0, w1 < w2, and w1 > 0. That is, the absolute value of the slope of the differential evaluation value F NonSym (P, Q) for a positive density value difference δ is greater than the absolute value of the slope of the differential evaluation value F NonSym (P, Q) for a negative density value difference δ.
[0061] That is, for F NonSym (P, Q) where w1 + w2 > 0, w1 < w2, and w1 > 0, when the absolute values of the positive density value difference δ and the negative density value difference δ are equal, the differential evaluation value F NonSym (P, Q) obtained from the positive density value difference δ is greater than the differential evaluation value F NonSym (P, Q) obtained from the negative density value difference δ. In an X-ray absorption image, the density value of a foreign object is often larger than those of other normal areas. Therefore, as shown in FIG. 4(c), F NonSym (P, Q) is used as the differential evaluation value, and the accuracy of foreign object determination in the subsequent foreign object determination unit 38 can be improved.
[0062] As described above, the graphs of FIGS. 4(b) and (c) show the differential evaluation value F NonSym (P, Q) suitable for the case where the luminance value of a foreign object is smaller than those of other normal areas in an X-ray transmission image and the case where the density value of a foreign object is larger than those of other normal areas in an X-ray absorption image.
[0063] However, for example, if one wishes to detect a cavity in the object 100 to be inspected as a foreign body, conversely, the brightness value of the cavity in the X-ray transmission image will be larger than that of other normal areas, and the density value of the cavity in the X-ray absorption image will be smaller than that of other normal areas.
[0064] In such a case, for an X-ray image, if the absolute values of the difference in positive brightness values δ and the difference in negative brightness values δ are equal, the difference evaluation value F obtained from the difference in negative brightness values δ is NonSym (P, Q) is the difference evaluation value F obtained from the difference δ of the positive luminance value NonSym The difference evaluation value F is smaller than (P, Q). NonSym Similarly, for X-ray absorption images, if the absolute values of the difference δ between positive density values and the difference δ between negative density values are equal, the difference evaluation value F obtained from the difference δ between positive density values is NonSym (P, Q) is the difference evaluation value F obtained from the difference δ of negative density values NonSym The difference evaluation value F is smaller than (P, Q). NonSym Just use (P,Q).
[0065] Alternatively, the difference evaluation value calculation unit 37 calculates the difference δ between the luminance value or density value of the attention area image P and the restored image Q as the difference evaluation value F as it is, according to the following equation (4): Identity (P, Q). Identity This is a graph showing (P,Q).
[0066]
number
[0067] Alternatively, the difference evaluation value calculation unit 37 calculates a difference evaluation value δ by SSIM (Structural Similarity Index Measure) according to the following equations (5a) to (5d): SSIM It may also be a calculation of
[0068]
number
[0069] In formulas (5a) to (5d), μ P is the average brightness or density value of the region-of-interest image P, and μ Q is the average brightness or density value of the restored image Q. P is the standard deviation of the brightness or density values of the region-of-interest image P, and σ Q is the standard deviation of the brightness or density values of the restored image Q. c1 and c2 are small constants to prevent division by zero.
[0070] I(P,Q) indicates the degree of match between the average brightness or density values of the attention area image P and the restored image Q, with a minimum value of 0 and a maximum value of 1. c(P,Q) indicates the degree of match between the contrast of brightness or density values of the attention area image P and the restored image Q, with a minimum value of 0 and a maximum value of 1. s(P,Q) indicates the correlation coefficient between the brightness or density values of the attention area image P and the restored image Q, with a minimum value of -1 and a maximum value of 1. That is, the difference evaluation value δ SSIM The minimum value of is -1 and the maximum value is 1.
[0071] Alternatively, the difference evaluation value calculation unit 37 may calculate, as a difference evaluation value, the similarity (distance) of the distribution of luminance values or density values between the attention area image P and the restored image Q, such as KLD (Kullback-Leibler Divergence). Alternatively, the difference evaluation value calculation unit 37 may calculate, as a difference evaluation value, the distance of any image feature amount between the attention area image P and the restored image Q.
[0072] The foreign substance determination unit 38 determines whether or not the foreign substance candidate region B includes an image of a foreign substance based on a comparison between the difference evaluation value calculated by the difference evaluation value calculation unit 37 and a predetermined threshold value. The determination result by the foreign substance determination unit 38 is displayed on the display unit 45.
[0073] For example, the foreign matter determination unit 38 calculates the difference evaluation value F Sym (P,Q) or F NonSym If (P, Q) exceeds a predetermined threshold θ, it is determined that the foreign substance candidate region B contains an image of a foreign substance.
[0074] Furthermore, if the inspection image A is an X-ray absorption image and the density value of the foreign matter to be detected is expected to be higher than that of other normal parts, the foreign matter determination unit 38 determines F Identity If (P, Q) is greater than a predetermined threshold θ1 (>0), it is determined that the foreign substance candidate region B contains an image of a foreign substance. On the other hand, if the inspection image A is an X-ray absorption image and the density value of the foreign substance to be detected is expected to be smaller than that of other normal areas, the foreign substance determination unit 38 determines F Identity If (P, Q) is smaller than a predetermined threshold θ2 (<0), it is determined that the foreign substance candidate region B includes an image of a foreign substance.
[0075] Furthermore, if the inspection image A is an X-ray transmission image and the luminance value of the foreign matter to be detected is expected to be greater than that of other normal parts, the foreign matter determination unit 38 determines F Identity If (P, Q) is greater than a predetermined threshold θ1 (>0), it is determined that the foreign substance candidate region B contains an image of a foreign substance. On the other hand, if the inspection image A is an X-ray transmission image and the brightness value of the foreign substance to be detected is expected to be smaller than that of other normal areas, the foreign substance determination unit 38 determines F Identity If (P, Q) is smaller than a predetermined threshold θ2 (<0), it is determined that the foreign substance candidate region B includes an image of a foreign substance.
[0076] Although FIG. 4 shows a case where the thresholds θ, θ1, and θ2 are constant, these thresholds may be changed depending on the magnitude of the difference δ between the brightness or density values.
[0077] Alternatively, the foreign matter determination unit 38 may use the difference evaluation value δ calculated by the difference evaluation value calculation unit 37 based on the SSIM. SSIMAlternatively, a threshold value may be set for each of the various difference evaluation values, such as the difference evaluation value by KLD, to determine whether or not foreign substance candidate region B contains an image of a foreign substance. Alternatively, foreign substance determination unit 38 may determine that foreign substance candidate region B contains an image of a foreign substance only if all of the plurality of difference evaluation values calculated by difference evaluation value calculation unit 37 are values indicating that foreign substance candidate region B contains an image of a foreign substance.
[0078] The storage unit 39 stores each threshold value used by the foreign matter determination unit 38. For example, each threshold value used by the foreign matter determination unit 38 is determined in advance in accordance with the type of the object to be inspected 100 and the type of difference evaluation value calculated by the difference evaluation value calculation unit 37. Furthermore, each threshold value stored in the storage unit 39 may be changed to a desired value by a user's operation input to the operation unit 46.
[0079] Alternatively, each threshold value used by foreign substance determination unit 38 may be automatically set based on inspection image A. For example, foreign substance determination unit 38 may set each threshold value based on the maximum and minimum values of the luminance value or density value of inspection image A.
[0080] An example of the processing of a foreign matter inspection method using the foreign matter inspection device 1 according to this embodiment will be described below with reference to the flowchart in Fig. 5. Note that descriptions that overlap with the description of the configuration of the foreign matter inspection device 1 described above will be omitted as appropriate.
[0081] First, when a user inputs an operation commanding the start of measurement to the operation unit 46, the transport unit 10 starts transporting one or more inspection objects 100 that have been sequentially placed on the transport belt 11 by the user or a dedicated device. Then, the X-ray source 21 irradiates X-rays onto the inspection objects 100 that are transported by the transport unit 10 and pass through a predetermined inspection section (step S1).
[0082] Next, when a detection sensor (not shown) detects the object 100 entering the inspection area (step S2: YES), the inspection image generation unit 31 generates an inspection image of the object 100 being transported by the transport unit 10 (step S3).
[0083] Next, the foreign substance candidate region identifying unit 32 identifies a foreign substance candidate region B that may include an image of a foreign substance in the inspection object 100 in the inspection image A generated by the inspection image generating unit 31 (step S4).
[0084] Next, the provisional determination unit 33 compares the brightness value or density value of the foreign substance candidate region B identified by the foreign substance candidate region identification unit 32 with a predetermined threshold value, and provisionally determines whether the foreign substance candidate region B contains an image of a foreign substance (step S5).
[0085] If the provisional determination unit 33 provisionally determines that the foreign substance candidate region B contains an image of a foreign substance (step S6: YES), the processing from step S7 onwards is executed. If the provisional determination unit 33 provisionally determines that the foreign substance candidate region B does not contain an image of a foreign substance, the processing from step S12 onwards is executed.
[0086] In step S7, the attention region setting unit 34 sets an attention region P including the foreign substance candidate region B in the inspection image A in which the foreign substance candidate region B has been identified (attention region setting step S7).
[0087] Next, the mask image generating unit 35 generates a mask image M by masking the foreign substance candidate region B in the attention area image P (mask image generating step S8).
[0088] Next, the restored image generating unit 36 generates a restored image Q from the mask image M based on a restoration algorithm of a model obtained by learning the non-defective image of the inspection object 100 (restored image generating step S9).
[0089] Next, the difference evaluation value calculation unit 37 calculates a difference evaluation value for evaluating the difference between the attention area image P and the restored image Q (difference evaluation value calculation step S10).
[0090] Next, the foreign substance determining unit 38 re-determines whether or not the foreign substance candidate region B includes an image of a foreign substance based on a comparison between the difference evaluation value and a predetermined threshold value (foreign substance determining step S11).
[0091] Next, the display unit 45 displays the determination result by the tentative determination unit 33 or the foreign substance determination unit 38 (step S12). That is, if the tentative determination unit 33 tentatively determines that the foreign substance candidate region B does not contain an image of a foreign substance, the display unit 45 displays a message that the object under inspection 100 does not contain a foreign substance. On the other hand, if the tentative determination unit 33 and the foreign substance determination unit 38 determine that the foreign substance candidate region B contains an image of a foreign substance, the display unit 45 displays a message that the object under inspection 100 contains a foreign substance.
[0092] Next, when the determination results are obtained for all the objects 100 to be inspected, that is, when the inspection of all the objects 100 to be inspected is completed (step S13: YES), the series of processes is completed. If the inspection of all the objects 100 to be inspected is not completed (step S13: NO), the processes from step S2 onwards are executed again.
[0093] As described above, the foreign substance inspection device 1 according to this embodiment restores a mask image M in which a foreign substance candidate region B in a region-of-interest image P is masked based on a restoration algorithm, and performs foreign substance determination based on the difference between the resulting restored image Q and the original region-of-interest image P.
[0094] As a result, the foreign substance inspection device 1 according to this embodiment can reduce erroneous foreign substance detection and perform foreign substance inspection with high accuracy compared to when foreign substance determination is performed using only the attention area image P.
[0095] For example, the foreign substance inspection device 1 according to this embodiment can double-check the inspection by making a provisional judgment using only the attention area image P, and then making a re-judgment using the difference image between the attention area image P and the restored image Q, thereby improving the inspection performance.
[0096] Furthermore, the foreign matter inspection device 1 according to this embodiment makes the difference evaluation value obtained from the difference δ in positive density values larger than the difference evaluation value obtained from the difference δ in negative density values with the same absolute value. This enables accurate detection of foreign matter for which the difference in density values between the region-of-interest image P and the restored image Q is positive when the inspection image A is an X-ray absorption image.
[0097] Furthermore, the foreign matter inspection device 1 according to this embodiment makes the difference evaluation value obtained from the difference δ in positive density values smaller than the difference evaluation value obtained from the difference δ in negative density values with the same absolute value. This enables accurate detection of foreign matter for which the difference in density values between the region-of-interest image P and the restored image Q is negative when the inspection image A is an X-ray absorption image.
[0098] Furthermore, the foreign body inspection device 1 according to this embodiment makes the difference evaluation value obtained from the difference in negative brightness values δ larger than the difference evaluation value obtained from the difference in positive brightness values δ of the same absolute value, thereby enabling accurate detection of foreign bodies for which the difference in brightness values between the attention area image P and the restored image Q is negative when the inspection image A is an X-ray transmission image.
[0099] Furthermore, the foreign body inspection device 1 according to this embodiment makes the difference evaluation value obtained from the difference δ in negative brightness values smaller than the difference evaluation value obtained from the difference δ in positive brightness values with the same absolute value. This enables accurate detection of foreign bodies for which the difference in brightness values between the attention area image P and the restored image Q is positive when the inspection image A is an X-ray transmission image. [Explanation of symbols]
[0100] 1 Foreign body inspection equipment 20 X-ray Inspection Department 31 Inspection image generation unit 32 Foreign object candidate area identification section 33 Provisional Judgment Section 34 Area of interest setting section 35 Mask image generation unit 36 Restored image generation unit 37 Difference evaluation value calculation unit 38 Foreign object determination section 39 Memory section 45 Display section 46 Operation section 50 control section 100 Inspection object A Inspection image (original image) B,B1,B2 Foreign object candidate area M Mask Image P,P1,P2 Attention area (attention area image) Q Restored image W Image of the object to be inspected
Claims
1. an attention area setting unit (34) for setting an attention area (P) including a foreign substance candidate area (B) that may include an image of a foreign substance in an object (100) in an inspection image (A) in which the foreign substance candidate area (B) has been identified; a mask image generating unit (35) that generates a mask image (M) by masking the foreign substance candidate region in the image (P) of the region of interest; a restored image generating unit (36) that generates a restored image (Q) from the mask image based on a restoration algorithm of a model obtained by learning an image of a non-defective product of the object to be inspected; a difference evaluation value calculation unit (37) that calculates a difference evaluation value for evaluating the difference between the image of the region of interest and the restored image; and a foreign substance determination unit (38) that determines whether the foreign substance candidate region includes an image of the foreign substance based on a comparison between the difference evaluation value and a predetermined threshold.
2. the inspection image is an X-ray absorption image obtained by converting the amount of X-rays transmitted through the object to a density value proportional to the thickness of the object, the difference evaluation value is a value based on a difference in density value between the image of the region of interest and the restored image, 2. The foreign matter inspection device according to claim 1, wherein when the absolute values of the difference between the positive density values and the difference between the negative density values are equal, the difference evaluation value obtained from the difference between the positive density values and the difference evaluation value obtained from the difference between the negative density values are different.
3. the inspection image is an X-ray transmission image obtained by converting the amount of X-rays transmitted through the inspection object into a brightness value; the difference evaluation value is a value based on a difference in luminance value between the image of the region of interest and the restored image, 2. The foreign matter inspection device according to claim 1, wherein when the absolute values of the difference between the positive brightness values and the difference between the negative brightness values are equal, the difference evaluation value obtained from the difference between the negative brightness values is different from the difference between the positive brightness values.
4. 4. The foreign matter inspection device according to claim 1, further comprising a foreign matter candidate region identifying section (32) that identifies the foreign matter candidate region in the inspection image.
5. a region of interest setting step (S7) of setting a region of interest (P) including a foreign substance candidate region (B) that may include an image of a foreign substance in the object to be inspected (100) in an inspection image (A) in which the foreign substance candidate region (B) has been identified; a mask image generating step (S8) of generating a mask image (M) by masking the foreign substance candidate region in the image (P) of the region of interest; a restored image generating step (S9) of generating a restored image (Q) from the mask image based on a restoration algorithm of a model obtained by learning an image of a non-defective product of the object to be inspected; a difference evaluation value calculation step (S10) of calculating a difference evaluation value for evaluating a difference between the image of the region of interest and the restored image; a foreign substance determination step (S11) of determining whether the foreign substance candidate region includes an image of the foreign substance based on a comparison between the difference evaluation value and a predetermined threshold.
Citation Information
Patent Citations
Density data conversion method and device, and x-ray inspection system
JP2006300888A
Image restoration apparatus, image restoration method, image restoration program, restorer generation apparatus, restorer generation method, restorer generation program, determiner generation apparatus, determiner generation method, determiner generation program, article determination apparatus, article determination method, and article determination program
JP2021043816A
Peripheral monitoring unit and program
JP2021135721A
Artificial intelligence systems and methods for interior design
JP2022540934A
Information processing device, information processing method, information processing program, learning device, learning method and learned model
JP2023126337A