X-ray image preprocessing method, x-ray image preprocessing program, and x-ray image preprocessing system
The X-ray image preprocessing method adjusts contrast to align with training data conditions, addressing accuracy issues due to varying imaging conditions, ensuring precise region identification in X-ray images.
Patent Information
- Application Number
- JP2024134655
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2026-02-24
AI Technical Summary
The accuracy of identifying regions in X-ray images using a trained model is compromised due to differences in imaging conditions between training data capture and actual image capture, caused by aging of the X-ray imaging device or replacement of the irradiator, leading to variations in X-ray energy and dose.
An X-ray image preprocessing method that adjusts the contrast of the image to match the conditions of the training data by acquiring multiple regions, calculating representative values, and adjusting the contrast to predetermined values based on the training data.
The method ensures that the contrast between regions in the X-ray image aligns with the training data, thereby maintaining accuracy in identifying regions despite variations in imaging conditions, preventing a decrease in analysis precision.
Smart Images

Figure 2026031248000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an X-ray image preprocessing method, an X-ray image preprocessing program, and an X-ray image preprocessing system, and in particular to an X-ray image preprocessing method, an X-ray image preprocessing program, and an X-ray image preprocessing system for analyzing X-ray images using a trained model. [Background technology]
[0002] Conventionally, there is known a device that analyzes an X-ray image using a trained model (see, for example, Patent Document 1).
[0003] The above-mentioned Patent Document 1 discloses an X-ray imaging system that uses a trained model to identify at least one of a region of an object to be inspected and a region of an abnormal part contained in the object to be inspected. The X-ray imaging system disclosed in the above-mentioned Patent Document 1 includes a fluoroscopy device and an analysis device. In the configuration disclosed in the above-mentioned Patent Document 1, an X-ray image generated by photographing the object to be inspected using the fluoroscopy device is analyzed by the analysis device. Specifically, in the configuration disclosed in the above-mentioned Patent Document 1, the analysis device is configured to input the X-ray image into the trained model to identify the region of the object to be inspected. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Publication No. 2024-029975 Summary of the Invention [Problem to be solved by the invention]
[0005] Although not described in Patent Document 1, when performing a process of identifying (acquiring) a region of an object to be inspected from an X-ray image of the object to be inspected using a trained model, a user sets the imaging conditions, including at least one of the tube voltage and the tube current, to be equal when capturing training data (trainer X-ray images) for generating the trained model and when capturing X-ray images for analysis using the trained model. However, as the X-ray imaging device ages, even if the user sets the tube voltage and tube current to irradiate X-rays with a predetermined energy and dose, the energy and dose of X-rays actually irradiated from the X-ray irradiation unit may be lower than the energy and dose expected by the user. In this case, the imaging conditions when the trained model was created and the imaging conditions when the X-ray images were captured differ from each other, resulting in a decrease in the accuracy of the analysis process (analysis) of acquiring the region of the object to be inspected using the trained model. Furthermore, if the X-ray irradiator is replaced after capturing the training data used to generate the trained model, even if the tube voltage and tube current values are set to those used when capturing the training data, the energy and dose of X-rays actually emitted from the X-ray irradiator when capturing the X-ray image may be higher than the energy and dose of X-rays used when capturing the training data. Even in this case, the imaging conditions used when the trained model was created differ from the imaging conditions used when the X-ray image was captured, reducing the accuracy of the analysis performed to acquire the area of the object under inspection using the trained model. Furthermore, aging of the X-ray imaging device leads to differences between the imaging conditions set by the user and the imaging conditions used during actual imaging. Therefore, even if multiple trained models are generated based on training data captured under multiple imaging conditions, it is difficult to select a trained model generated based on training data captured under imaging conditions that match the imaging conditions used during actual imaging. Therefore, there is a need for a technology that can prevent a decrease in the accuracy of the process of acquiring the area of the object under inspection, even when the imaging conditions used when capturing the training data used to generate the trained model differ from the imaging conditions used when capturing the X-ray image to be analyzed by the trained model.
[0006] The present invention has been made to solve the above-mentioned problems, and one object of the present invention is to provide an X-ray image preprocessing method, an X-ray image preprocessing program, and an X-ray image preprocessing system that can suppress a decrease in the accuracy of the process of acquiring (identifying) the area of an object to be inspected using a trained model, even when the shooting conditions when capturing training data used to generate a trained model are different from the shooting conditions when capturing X-ray images that are the subject of analysis for the trained model. [Means for solving the problem]
[0007] In order to achieve the above object, an X-ray image preprocessing method in a first aspect of the present invention is an X-ray image preprocessing method performed prior to a process of acquiring regions of an object to be inspected from an X-ray image of the object to be inspected using a trained model, and includes the steps of acquiring an X-ray image, acquiring multiple regions from the X-ray image based on pixel values of the X-ray image, acquiring X-ray image representative values of the pixel values of each of the multiple regions, and acquiring a contrast-adjusted X-ray image by adjusting the contrast of the X-ray image so that the X-ray image representative values of each of the multiple regions of the X-ray image become predetermined values acquired based on training data when the trained model was created.
[0008] An X-ray image preprocessing program in a second aspect of the present invention is an X-ray image preprocessing program that is performed prior to processing to acquire regions of an object to be inspected from an X-ray image of the object to be inspected using a trained model, and causes a computer to execute the following controls: control to acquire an X-ray image; control to acquire multiple regions from the X-ray image based on pixel values of the X-ray image; control to acquire X-ray image representative values of each pixel value of the multiple regions; and control to acquire a contrast-adjusted X-ray image by adjusting the contrast of the X-ray image so that the X-ray image representative values of each of the multiple regions of the X-ray image become predetermined values acquired based on training data used when the trained model was created.
[0009] An X-ray image preprocessing system in a third aspect of the present invention is an X-ray image preprocessing system that is performed prior to processing to acquire regions of an object to be inspected from an X-ray image of the object to be inspected using a trained model, and includes an X-ray imaging device having an X-ray irradiation unit that irradiates X-rays and an X-ray detector that detects the X-rays irradiated from the X-ray irradiation unit, and an image processing device that generates an X-ray image, and the image processing device performs control to generate an X-ray image, and control to acquire a contrast-adjusted X-ray image by acquiring multiple regions from the X-ray image based on pixel values of the X-ray image, acquiring X-ray image representative values of the pixel values of each of the multiple regions, and adjusting the contrast of the X-ray image so that the X-ray image representative values of each of the multiple regions of the X-ray image become predetermined values acquired based on the training data used when the trained model was created. [Effects of the Invention]
[0010] Here, when an X-ray imaging device deteriorates over time, even if a user sets the tube voltage and tube current to irradiate X-rays with a predetermined energy and dose, at least one of the energy and dose of X-rays actually irradiated from the X-ray irradiator may decrease. Therefore, when an X-ray imaging device deteriorates over time, an X-ray image is captured under imaging conditions in which at least one of the X-ray energy and dose is lower than the imaging conditions set by the user, resulting in a decrease in contrast between multiple regions in the X-ray image. Furthermore, when an X-ray irradiator is replaced after capturing training data used to generate a trained model, even if a user sets values equal to the tube voltage and tube current values set when the training data was captured, at least one of the energy and dose of X-rays actually irradiated from the X-ray irradiator may be higher than at least one of the energy and dose of X-rays irradiated from the X-ray irradiator when the training data was captured. In this case, because an X-ray image is captured under imaging conditions in which at least one of the X-ray energy and dose is higher than the imaging conditions when the training data was captured, the contrast between multiple regions in the X-ray image is greater than the contrast between multiple regions in the training data.
[0011] Therefore, in the X-ray image preprocessing method according to the first aspect, the X-ray image preprocessing program according to the second aspect, and the X-ray image preprocessing system according to the third aspect, a contrast-adjusted X-ray image is acquired by adjusting the contrast of the X-ray image so that the X-ray representative value of each of the multiple regions of the X-ray image is a predetermined value acquired based on the training data used to create the trained model. This allows a contrast-adjusted X-ray image to be acquired in which the contrast is adjusted so that the representative value of each of the multiple regions is a predetermined value, even in cases where at least one of the energy and dose of X-rays irradiated from the X-ray irradiation unit is reduced and the contrast between the multiple regions of the X-ray image is lower than the contrast between the multiple regions of the training data, or in cases where the contrast between the multiple regions of the X-ray image is higher than the contrast between the multiple regions of the training data. Therefore, the contrast between the multiple regions of the X-ray image can be made closer to the contrast between the multiple regions of the training data. As a result, even if the imaging conditions for capturing training data for generating a trained model differ from the imaging conditions for capturing an X-ray image to be analyzed by the trained model, it is possible to prevent a decrease in the accuracy of the process for acquiring (identifying) the area of an object to be inspected using the trained model. Note that the fact that a decrease in the accuracy of the process for acquiring the area of an object to be inspected can be prevented has been confirmed in experiments conducted by the present inventors, which will be described later. [Brief explanation of the drawings]
[0012] [Figure 1] 1 is a block diagram showing the overall configuration of an X-ray imaging system according to an embodiment of the present invention. [Figure 2] FIG. 1 is a diagram showing an example of an object to be inspected. [Figure 3] FIG. 2 is a block diagram illustrating the functional configuration of a control unit. [Figure 4] FIG. 1 is a diagram showing an example of an X-ray image. [Figure 5]This figure explains a configuration for generating a trained model and a configuration for analyzing X-ray images using the trained model. [Figure 6] FIG. 2 is a diagram illustrating a configuration in which a control unit performs logarithmic transformation processing. [Figure 7] 10 is a diagram illustrating a configuration in which a control unit acquires a solder ball region and a background region. FIG. [Figure 8] 10 is a diagram illustrating a configuration in which a control unit acquires a first average pixel value and a second average pixel value. FIG. [Figure 9] 10 is a diagram for explaining a configuration in which a control unit acquires an X-ray image after contrast adjustment. FIG. [Figure 10] 10 is a flowchart for explaining a configuration in which a control unit acquires an X-ray image after contrast adjustment. [Figure 11] FIG. 10 is a diagram for explaining the results of analyzing an X-ray image according to the first comparative example using a trained model. [Figure 12] FIG. 10 is a diagram for explaining the results of analyzing the contrast-adjusted X-ray image according to the first embodiment using a trained model. [Figure 13] FIG. 10 is a diagram for explaining the results of analyzing an X-ray image according to the second comparative example using a trained model. [Figure 14] FIG. 10 is a diagram for explaining the results of analyzing the contrast-adjusted X-ray image according to the second embodiment using a trained model. DETAILED DESCRIPTION OF THE INVENTION
[0013] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, specific embodiments of the present invention will be described with reference to the accompanying drawings.
[0014] (Overall configuration of X-ray imaging system) An X-ray image preprocessing system 100 according to an embodiment of the present invention will be described with reference to FIGS.
[0015] 1, an X-ray image preprocessing system 100 according to this embodiment is a system that detects X-rays that have passed through the inspection object 90 to image the inside of the inspection object 90. The X-ray image preprocessing system 100 is used, for example, to image the inside of the inspection object 90 as an object in non-destructive inspection applications.
[0016] As shown in FIG. 2, the inspection target 90 is an electronic device including a substrate 91. An electronic component 92 is mounted on the substrate 91. The electronic component 92 is electrically connected to the substrate 91 by a plurality of solder balls 93 (bumps). The plurality of solder balls 93 are arranged in a regular pattern. Specifically, the plurality of solder balls 93 are arranged in a regular grid pattern on the substrate 91. That is, the electronic component 92 is connected to the substrate 91 by a BGA (Ball Grid Array). The plurality of solder balls 93 are arranged in a line on one surface of the substrate 91. The electronic component 92 includes an electronic circuit such as an IC (integrated circuit). The X-ray image preprocessing system 100 preprocesses an X-ray image 40 (see FIG. 4) used for nondestructive testing of the plurality of solder balls 93 for abnormalities such as voids and bridges. In addition to the electronic component 92, electronic components 94 such as surface-mounted resistors or capacitors are mounted on the substrate 91.
[0017] As shown in FIG. 1, the X-ray image preprocessing system 100 includes an X-ray imaging device 1 and an image processing device 2. The X-ray imaging device 1 performs X-ray imaging of an inspection object 90. The image processing device 2 generates an X-ray image 40 (see FIG. 4). The image processing device 2 performs analysis processing using a trained model 31 and preprocessing for the analysis processing on the generated X-ray image 40. In other words, the X-ray image preprocessing system 100 is an X-ray image preprocessing system that performs processing prior to the processing of acquiring the area of the inspection object 90 from the X-ray image 40 of the inspection object 90 using the trained model 31. The X-ray imaging device 1 and the image processing device 2 each have a communication module, and transmit and receive information to and from each other via a network or the like.
[0018] The X-ray imaging device 1 has an X-ray irradiator 10 and an X-ray detector 11. The X-ray irradiator 10 is configured to irradiate X-rays. In this embodiment, the X-ray irradiator 10 irradiates X-rays onto an inspection object 90 including a plurality of solder balls 93. The X-ray irradiator 10 includes an X-ray tube that irradiates X-rays when power is supplied from a power supply device (not shown).
[0019] The X-ray detector 11 detects the X-rays irradiated from the X-ray irradiator 10. The X-ray detector 11 outputs an electrical signal corresponding to the detected X-rays. The X-ray detector 11 includes, for example, an FPD (Flat Panel Detector) which is an X-ray detector. The X-ray irradiator 10 and the X-ray detector 11 are arranged inside a housing (not shown) of the X-ray imaging device 1.
[0020] As shown in FIG. 1, the image processing device 2 has a control unit 20 and a storage unit 21. The image processing device 2 is, for example, a personal computer communicably connected to the X-ray imaging device 1. The control unit 20 controls the operation of each unit of the X-ray imaging device 1. The control unit 20 controls the irradiation of X-rays by the X-ray irradiation unit 10, for example, by controlling a power supply device (not shown). The control unit 20 includes a CPU (Central Processing Unit), ROM (Read Only Memory), RAM (Random Access Memory), etc. The control unit 20 may also include a processor such as a GPU (Graphics Processing Unit) or an FPGA (Field-Programmable Gate Array) configured for image processing.
[0021] The storage unit 21 is configured to store various programs 30 executed by the control unit 20 and parameters. The storage unit 21 is also configured to store a trained model 31 and a predetermined value 70. Details of the trained model 31 and the predetermined value 70 will be described later. The storage unit 21 includes, for example, a non-volatile memory such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive). The program 30 is an example of an "X-ray image preprocessing program" in the claims.
[0022] The image processing device 2 is also connected to a display unit 22 and an operation unit 23. The display unit 22 includes, for example, a liquid crystal monitor. The display unit 22 displays images and text information under the control of the control unit 20. The operation unit 23 accepts input operations by an operator. The operation unit 23 includes, for example, a keyboard and a pointing device such as a mouse. The operation unit 23 outputs an operation signal to the control unit 20 based on the accepted input operation.
[0023] 3, the control unit 20 includes functional blocks, namely, an image generation unit 20a, a logarithmic processing unit 20b, a region acquisition unit 20c, a representative value acquisition unit 20d, and a contrast adjustment unit 20e. The image generation unit 20a, the logarithmic processing unit 20b, the region acquisition unit 20c, the representative value acquisition unit 20d, and the contrast adjustment unit 20e are configured in the form of software as functional blocks realized by the control unit 20 executing a program 30 (see FIG. 2) stored in the storage unit 21 (see FIG. 2). In other words, the program 30 is configured to cause a computer (control unit 20) to execute the respective controls performed by the image generation unit 20a, the logarithmic processing unit 20b, the region acquisition unit 20c, the representative value acquisition unit 20d, and the contrast adjustment unit 20e.
[0024] The image generating unit 20a, the logarithmic processing unit 20b, the area acquiring unit 20c, the representative value acquiring unit 20d, and the contrast adjusting unit 20e may be configured by separate hardware, each of which is provided with a dedicated processor (processing circuit).
[0025] The image generating unit 20a generates an X-ray image 40 (see FIG. 4) based on the X-rays detected by the X-ray detector 11 (see FIG. 1).
[0026] The functions of the logarithmic processing unit 20b, the area acquisition unit 20c, the representative value acquisition unit 20d, and the contrast adjustment unit 20e will be described in detail later.
[0027] (X-ray image) As shown in FIG. 4, the X-ray image 40 shows a plurality of solder balls 93 arranged in a regular grid pattern on the substrate 91.
[0028] (Pre-trained model) As shown in Fig. 5, the trained model 31 is used to analyze the X-ray image 40. Specifically, the trained model 31 is used to identify the solder ball region 80a (see Fig. 7), which is the region of the solder ball 93 (see Fig. 4). The trained model 31 is generated by the image processing device 2 (see Fig. 1) or a computer different from the image processing device 2, and is stored in advance in the storage unit 21 (see Fig. 1).
[0029] As shown in FIG. 5, the trained model 31 is generated by machine learning using input training data 32 and output training data 33 as a data set. The input training data 32 is generated based on a training X-ray image (not shown). The training X-ray image is generated by the X-ray imaging device 1, similar to the X-ray image 40 (see FIG. 4) to be analyzed. The X-ray image 40 to be analyzed and the training X-ray image for generating the trained model 31 are images including an inspection object 90 (solder ball 93) having a common structure. The input training data 32 is an example of "trainer data" in the claims.
[0030] The output teacher data 33 is generated based on the teacher X-ray image by the user labeling the area in which the solder balls 93 appear in the teacher X-ray image.
[0031] The trained model 31 is generated by machine learning using deep learning. Deep learning includes, for example, machine learning based on U-Net, which is a type of Fully Convolution Network (FCN). The trained model 31 is generated by training the model to perform image transformation (image reconstruction) for each pixel in each of the input X-ray images 40, which can distinguish between the region of the solder ball 93 (solder ball region 80a) and the background region 80b other than the solder ball 93.
[0032] 5, the trained model 31 is configured to output a classification result image 60 when an X-ray image 40 is input. The classification result image 60 is a label image in which the regions of the solder balls 93 in the X-ray image 40 are classified from other regions.
[0033] When analyzing an X-ray image 40 using the trained model 31, the imaging conditions (tube voltage and tube current) used to capture the input training data 32 for generating the trained model 31 are matched to the imaging conditions used to capture the X-ray image 40. However, as the X-ray imaging device 1 (see FIG. 1) is used for a certain period of time, the X-ray irradiator 10 (see FIG. 1) deteriorates over time. When the X-ray irradiator 10 deteriorates over time, even if a user sets the tube voltage and tube current to irradiate X-rays with a predetermined energy and dose, the X-ray irradiator 10 may irradiate X-rays with an energy and dose lower than the expected energy and dose. Furthermore, if the X-ray irradiator 10 is replaced after the input training data 32 is captured, the energy and dose of X-rays actually irradiated from the X-ray irradiator 10 may be higher than the energy and dose of X-rays irradiated from the X-ray irradiator 10 when the input training data 32 is captured, even if the user sets the tube voltage and tube current to values equal to those used when the input training data 32 was captured. That is, even if the tube voltage and tube current set by the user are the same, there may be a difference between the imaging conditions of the training data when generating the trained model 31 and the actual imaging conditions when the X-ray image 40 was captured. If a difference occurs between the actual imaging conditions when the X-ray image 40 was captured and the imaging conditions of the training data when generating the trained model 31, the properties of the resulting image will change nonlinearly. Therefore, if a difference occurs between the imaging conditions when the training data was captured and the imaging conditions when the X-ray image 40 was captured, the analysis accuracy by the trained model 31 will decrease.
[0034] (Acquisition of X-ray image after contrast adjustment) Therefore, in this embodiment, a contrast-adjusted X-ray image 44 (see FIG. 9) is acquired by performing preprocessing on the X-ray image 40. The acquired contrast-adjusted X-ray image 44 is then used for analysis using the trained model 31.
[0035] Next, a configuration in which the control unit 20 (see FIG. 3) acquires a contrast-adjusted X-ray image 44 (see FIG. 9) will be described with reference to Figures 6 to 9. The configuration in which the control unit 20 acquires the contrast-adjusted X-ray image 44 can be broadly divided into a configuration in which a logarithmic conversion process is performed on the X-ray image 40, a configuration in which a plurality of regions are acquired from the X-ray image 40, a configuration in which an X-ray image representative value 50 (see FIG. 8) is acquired from each of the plurality of regions, and a configuration in which the contrast of the X-ray image 40 is adjusted based on the X-ray image representative value 50.
[0036] First, with reference to FIG. 6, a configuration in which the logarithmic processing unit 20b performs logarithmic processing on an X-ray image 40 to obtain an X-ray image 41 after logarithmic conversion processing will be described.
[0037] In this embodiment, the logarithmic processing unit 20b performs logarithmic transformation processing on each pixel of the X-ray image 40 using a natural logarithm (a logarithm with Napier's constant e as the base). As a result, the change in pixel value of the X-ray image changes from an exponential change to a linear change. Therefore, the degree of change in pixel value of the low-dose portion increases, and as a result, the resolution of the low-dose portion is improved. Note that in the example shown in FIG. 6, the hatching applied to the background of the X-ray image 40 before the logarithmic transformation processing and the hatching applied to the background of the X-ray image 41 after the logarithmic transformation processing are made different from each other, thereby indicating that the resolution of the low-dose portion of the X-ray image 41 after the logarithmic transformation processing is improved.
[0038] Next, with reference to FIG. 7, a configuration in which the area acquisition unit 20c acquires a plurality of areas will be described.
[0039] 7, the region acquisition unit 20c is configured to acquire two regions: a first region 80 which is a region including the inspection object 90 (see FIG. 1), and a second region 81 which is a region other than the inspection object 90. In this embodiment, the region acquisition unit 20c is configured to acquire the first region 80 and the second region 81 by performing a binarization process on the X-ray image 41 after the logarithmic transformation process. The region acquisition unit 20c acquires the first region 80 and the second region 81, for example, by Otsu's binarization process (discriminant analysis method) which can automatically determine a threshold value for binarization.
[0040] In this embodiment, the first region 80 is a solder ball region 80a in which multiple solder balls 93 are captured. The second region 81 is a background region 81a other than the solder ball region 80a. That is, in this embodiment, the region acquisition unit 20c performs binarization processing to acquire the solder ball region 80a and the background region 81a from the X-ray image 41 after logarithmic conversion processing. Note that in this embodiment, since the solder ball region 80a and the background region 81a are roughly separated by Otsu's binarization, the solder ball region 80a may include electronic components 94 (see FIG. 2) such as chip capacitors.
[0041] 7 is an image showing the solder ball region 80a. The solder ball region 80a is shown in white in the first region image 42. In other words, the first region image 42 is a mask image of the solder ball region 80a.
[0042] The second region image 43 is an image showing the background region 81a. The background region 81a is shown in white in the second region image 43. In other words, the second region image 43 is a mask image of the background region 81a.
[0043] Next, with reference to FIG. 8, a configuration in which the representative value acquiring unit 20d acquires the X-ray image representative value 50 will be described.
[0044] The representative value acquiring unit 20d is configured to acquire an X-ray image representative value 50 of the solder ball region 80a, and also acquire an X-ray image representative value 50 of the background region 81a. In this embodiment, the representative value acquiring unit 20d is configured to acquire, as the X-ray image representative value 50, a first average pixel value 50a which is the average pixel value of the first region 80 and a second average pixel value 50b which is the average pixel value of the second region 81.
[0045] Specifically, the representative value acquiring unit 20d acquires the solder ball region 80a in the X-ray image 41 based on the X-ray image 41 after logarithmic conversion processing and the first region image 42. Then, the representative value acquiring unit 20d acquires the average value of the pixel values of the pixels included in the solder ball region 80a in the X-ray image 41 as the first average pixel value 50a.
[0046] Furthermore, the representative value acquiring unit 20d acquires a background region 81a in the X-ray image 41 based on the X-ray image 41 after the logarithmic transformation process and the second region image 43. Then, the representative value acquiring unit 20d acquires the average value of the pixel values of the pixels included in the background region 81a in the X-ray image 41 as a second average pixel value 50b.
[0047] Next, with reference to FIG. 9, a configuration in which the contrast adjusting unit 20e adjusts the contrast of the X-ray image 40 (see FIG. 4) will be described.
[0048] The contrast adjustment unit 20e is configured to acquire a contrast-adjusted X-ray image 44 by adjusting the contrast of the X-ray image 41 after the logarithmic transformation processing based on the X-ray image representative value 50 (see FIG. 7) of the first region 80 (see FIG. 7) and the X-ray image representative value 50 of the second region 81 (see FIG. 7) so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 41 after the logarithmic transformation processing becomes a predetermined value 70 acquired based on the input teacher data 32 when the trained model 31 was created. Specifically, the contrast adjustment unit 20e is configured to acquire a contrast-adjusted X-ray image 44 by adjusting the contrast of the X-ray image 41 after the logarithmic transformation processing based on the first average pixel value 50a and the second average pixel value 50b so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 41 after the logarithmic transformation processing becomes the predetermined value 70.
[0049] The predetermined value 70 is obtained based on a teacher data representative value, which is a representative value of each pixel in a plurality of regions in the input teacher data 32 (see FIG. 5). The teacher data representative value is, for example, the average value (average pixel value) of the pixel values in each of the plurality of regions in the input teacher data 32. The predetermined value 70 is obtained when the trained model 31 is created and is stored in the memory unit 21.
[0050] In this embodiment, the contrast adjustment unit 20e is configured to acquire a contrast-adjusted X-ray image 44 by adjusting the pixel values of the X-ray image 41 after logarithmic transformation processing so that each of the first average pixel value 50a and the second average pixel value 50b becomes a predetermined value 70. The contrast adjustment unit 20e adjusts the contrast of the X-ray image 41 after logarithmic transformation processing so that the value of the first average pixel value 50a becomes the lower two-thirds of the range of gradation of the X-ray image 41 after logarithmic transformation processing and the value of the second average pixel value 50b becomes the upper one-third of the range of gradation of the X-ray image 41 after logarithmic transformation processing. Specifically, the contrast adjustment unit 20e adjusts the contrast of the X-ray image 41 after logarithmic transformation processing based on the following equation (1):
number
[0051] Next, with reference to FIG. 10, the process of the X-ray image pre-processing method in which the control unit 20 (see FIG. 1) acquires the contrast-adjusted X-ray image 44 (see FIG. 9) will be described.
[0052] In step 101, the image generating unit 20a (see FIG. 3) acquires an X-ray image 40 (see FIG. 4). In this embodiment, in step 101, the image generating unit 20a acquires the X-ray image 40 by generating the X-ray image 40 based on X-rays detected by the X-ray detector 11 (see FIG. 1).
[0053] Next, in step 102, the logarithmic processing unit 20b performs logarithmic transformation processing on each pixel of the X-ray image 40, as shown in Fig. 6. In this embodiment, the logarithmic processing unit 20b performs logarithmic transformation processing on the X-ray image 40 to obtain an X-ray image 41 after the logarithmic transformation processing.
[0054] Next, in step 103, the region acquisition unit 20c acquires a plurality of regions from the X-ray image 40 based on pixel values of the X-ray image 40, as shown in Fig. 7. In this embodiment, the region acquisition unit 20c acquires two regions, a solder ball region 80a and a background region 81a, by performing a binarization process on the X-ray image 41 after the logarithmic conversion process.
[0055] Next, in step 104, the representative value acquiring unit 20d acquires an X-ray image representative value 50 of the pixel values of each of the multiple regions, as shown in Fig. 8. In this embodiment, the representative value acquiring unit 20d acquires, as the X-ray image representative value 50, a first average pixel value 50a from the solder ball region 80a and a second average pixel value 50b from the background region 81a.
[0056] Next, in step 105, the contrast adjustment unit 20e acquires the predetermined value 70 (see FIG. 1). Specifically, the contrast adjustment unit 20e acquires the predetermined value 70 stored in the storage unit.
[0057] Next, in step 106, the contrast adjustment unit 20e adjusts the contrast of the X-ray image 40 so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 40 becomes a predetermined value 70 acquired based on the input training data 32 used when the trained model 31 was created, as shown in Fig. 9, thereby acquiring a contrast-adjusted X-ray image 44. In this embodiment, the contrast adjustment unit 20e acquires the contrast-adjusted X-ray image 44 based on the X-ray image 41 after logarithmic transformation processing, the first average pixel value 50a, and the second average pixel value 50b. Then, the processing ends.
[0058] (Effects of this embodiment) In this embodiment, the following effects can be obtained.
[0059] In this embodiment, as described above, the X-ray image preprocessing method is an X-ray image preprocessing method performed prior to the process of acquiring regions of the object to be inspected 90 from the X-ray image 40 of the object to be inspected 90 using the trained model 31, and includes the steps of acquiring the X-ray image 40, acquiring multiple regions from the X-ray image 40 based on the pixel values of the X-ray image 40, acquiring an X-ray image representative value 50 of the pixel values of each of the multiple regions, and acquiring a contrast-adjusted X-ray image 44 by adjusting the contrast of the X-ray image 40 so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 40 becomes a predetermined value 70 acquired based on the input training data 32 when the trained model 31 was created.
[0060] Here, if the X-ray imaging device 1 ages, even if a user sets the tube voltage and tube current to irradiate X-rays with a predetermined energy and dose, at least one of the energy and dose of X-rays actually irradiated from the X-ray irradiator may be lower. Therefore, if the X-ray imaging device 1 ages, the X-ray image 40 is captured under imaging conditions in which at least one of the X-ray energy and dose is lower than the imaging conditions set by the user, resulting in a decrease in contrast between multiple regions in the X-ray image 40. Furthermore, if the X-ray irradiator 10 is replaced after capturing the input training data 32 used to generate the trained model 31, at least one of the energy and dose of X-rays actually irradiated from the X-ray irradiator 10 may be higher than at least one of the energy and dose of X-rays irradiated from the X-ray irradiator 10 when the input training data 32 was captured, even if a user sets the tube voltage and tube current to values equal to those set when the input training data 32 was captured. In this case, the X-ray image 40 is captured under imaging conditions in which at least one of the X-ray energy and dose is higher than the imaging conditions under which the input training data 32 was captured, so the contrast between multiple regions in the X-ray image 40 is greater than the contrast between multiple regions in the input training data 32.
[0061] Therefore, as described above, a contrast-adjusted X-ray image 44 is acquired by adjusting the contrast of the X-ray image 40 so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 40 becomes equal to the predetermined value 70 acquired based on the input teacher data 32 when the trained model 31 was created. As a result, in either a case where at least one of the energy and dose of X-rays irradiated from the X-ray irradiation unit is reduced and the contrast between the multiple regions of the X-ray image 40 becomes lower than the contrast between the multiple regions of the input teacher data 32, or a case where the contrast between the multiple regions of the X-ray image 40 becomes higher than the contrast between the multiple regions of the input teacher data 32, a contrast-adjusted X-ray image 44 can be acquired in which the contrast has been adjusted so that the X-ray image representative value 50 of each of the multiple regions becomes equal to the predetermined value 70 acquired based on the input teacher data 32 when the trained model 31 was created. Therefore, the contrast between the multiple regions of the X-ray image 40 can be made closer to the contrast between the multiple regions of the input teacher data 32. As a result, even if the imaging conditions for capturing the training data for generating the trained model 31 are different from the imaging conditions for capturing the X-ray image 40 that is the analysis target of the trained model 31, it is possible to prevent a decrease in the accuracy of the process for acquiring (identifying) the area of the inspection object 90 using the trained model 31. Note that the fact that a decrease in the accuracy of the process for acquiring the area of the inspection object 90 can be prevented has been confirmed in an experiment described below by the inventors of the present application.
[0062] Furthermore, in this embodiment, as described above, the program 30 is an X-ray image preprocessing program that is performed prior to the process of acquiring a region of the object to be inspected 90 from the X-ray image 40 of the object to be inspected 90 using the trained model 31, and causes the computer to execute the following controls: control to acquire the X-ray image 40; control to acquire multiple regions from the X-ray image 40 based on the pixel values of the X-ray image 40; control to acquire an X-ray image representative value 50 of the pixel values of each of the multiple regions; and control to acquire a contrast-adjusted X-ray image 44 by adjusting the contrast of the X-ray image 40 so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 40 becomes a predetermined value 70 acquired based on the input training data 32 when the trained model 31 was created.
[0063] This makes it possible to provide a program 30 that, similar to the X-ray image preprocessing method, can prevent a decrease in the accuracy of the process of acquiring (identifying) the area of the object to be inspected 90 using the trained model 31, even if the shooting conditions when capturing the training data for generating the trained model 31 are different from the shooting conditions when capturing the X-ray image 40 that is the object of analysis for the trained model 31.
[0064] In addition, in this embodiment, the X-ray image preprocessing system 100 is an X-ray image preprocessing system that is performed prior to the process of acquiring a region of the object to be inspected 90 from an X-ray image 40 of the object to be inspected 90 using a trained model 31, and is equipped with an X-ray imaging device 1 having an X-ray irradiation unit 10 that irradiates X-rays and an X-ray detector 11 that detects the X-rays irradiated from the X-ray irradiation unit 10, and an image processing device 2 that generates the X-ray image 40, and the image processing device 2 controls the generation of the X-ray image 40, acquires multiple regions from the X-ray image 40 based on the pixel values of the X-ray image 40, acquires an X-ray image representative value 50 of each pixel value of the multiple regions, and adjusts the contrast of the X-ray image 40 so that the X-ray image representative value 50 of each of the multiple regions of the X-ray image 40 becomes a predetermined value 70, thereby acquiring a contrast-adjusted X-ray image 44.
[0065] This makes it possible to provide an X-ray image preprocessing system 100 that, similar to the X-ray image preprocessing method, can prevent a decrease in the accuracy of the process of acquiring (identifying) the area of the object to be inspected 90 using the trained model 31, even if the shooting conditions for capturing the training data to generate the trained model 31 and the shooting conditions for capturing the X-ray image 40 that is the subject of analysis for the trained model 31 are different.
[0066] Furthermore, in the present embodiment, the following additional effects can be obtained by configuring as follows.
[0067] That is, in this embodiment, as described above, the predetermined value 70 is acquired based on the teacher data representative value, which is a representative value of each pixel in multiple regions in the input teacher data 32 (teacher data) when the trained model 31 is created. As a result, since the predetermined value 70 is the teacher data representative value, which is a representative value of each pixel in multiple regions in the input teacher data 32 (teacher data), by adjusting the contrast of the X-ray image so that the X-ray image representative value 50 of each of the multiple regions in the X-ray image becomes the predetermined value 70, the magnitude of the contrast between the multiple regions in the X-ray image 40 can be easily made to approach the magnitude of the contrast between the multiple regions in the input teacher data 32 (teacher data). As a result, even if the imaging conditions for capturing the input teacher data 32 (teacher data) and the imaging conditions for capturing the X-ray image 40 to be analyzed by the trained model 31 are different from each other, it is possible to easily prevent a decrease in the accuracy of the process of acquiring (identifying) the region of the inspection object 90 using the trained model 31.
[0068] In the step of acquiring a plurality of regions from the X-ray image 40, two regions are acquired: a first region 80 that is a region including the inspection object 90; and a second region 81 that is a region other than the inspection object 90. In the step of acquiring the contrast-adjusted X-ray image 44, the contrast of the X-ray image 40 is adjusted so that the X-ray image representative value 50 of the first region 80 and the X-ray image representative value 50 of the second region 81 are the predetermined value 70 of the first region 80 and the predetermined value 70 of the second region 81, respectively, thereby acquiring the contrast-adjusted X-ray image 44. As a result, in the contrast-adjusted X-ray image 44, the contrast between the first region 80 and the second region 81 approaches the contrast between the first region 80 and the second region 81 in comparison with the X-ray image 40 that has not been subjected to contrast adjustment. As a result, by using the contrast-adjusted X-ray image 44 in the process of acquiring the area of the object to be inspected 90 using the trained model 31, it is possible to prevent a decrease in the accuracy of the process of acquiring (identifying) the area of the object to be inspected 90 (the accuracy of analyzing the area of the object to be inspected 90).
[0069] Furthermore, in this embodiment, as described above, the method further includes a step of performing logarithmic transformation on each pixel of the X-ray image 40 prior to the step of acquiring a plurality of regions from the X-ray image 40. In the step of acquiring a plurality of regions from the X-ray image 40, a binarization process is performed on the X-ray image 41 after the logarithmic transformation process, thereby acquiring the first region 80 and the second region 81. Here, the X-rays irradiated from the X-ray irradiator 10 and detected by the X-ray detector 11 after passing through the inspection object 90 attenuate exponentially depending on the distance between the X-ray irradiator 10 and the X-ray detector 11. Therefore, the resolution of the low-dose portion of the X-ray image 40 is lower than the resolution of the high-dose portion of the X-ray image 40. Therefore, by performing the logarithmic transformation process as described above, the change in pixel values in the X-ray image 40 becomes linear, thereby eliminating blurring in the low-dose portion of the X-ray image 40 and improving the resolution of the low-dose portion of the X-ray image 40. Furthermore, by performing logarithmic transformation on the X-ray image 40, it is possible to convert changes in pixel values into linear changes in the X-ray image 41 after the logarithmic transformation process. As a result, the resolution of the low-dose portion is improved, and the first region 80 and the second region 81 can be acquired by performing binarization processing on the X-ray image 41 after the logarithmic transformation process, in which changes in pixel values are converted into linear changes. Therefore, the first region 80 and the second region 81 can be acquired with higher accuracy than in a configuration in which the first region 80 and the second region 81 are acquired by performing binarization processing on the X-ray image 40 that has not been subjected to logarithmic transformation processing.
[0070] Furthermore, in this embodiment, as described above, the X-ray image 40 is an image showing a substrate 91 on which a plurality of solder balls 93 are arranged, the first region 80 is a solder ball region 80a showing the plurality of solder balls 93, and the second region 81 is a background region 81a other than the solder ball region 80a. In the step of acquiring a plurality of regions from the X-ray image 40, a binarization process is performed to acquire the solder ball region 80a and the background region 81a from the X-ray image 41 after logarithmic conversion processing. In the step of acquiring the X-ray image representative value 50, the X-ray image representative value 50 of the solder ball region 80a is acquired, and the X-ray image representative value 50 of the background region 81a is also acquired. This makes it possible to make the contrast between the solder ball region 80a and the background region 81a closer to the contrast between the solder ball region and the background region in the input teacher data 32 (teacher data). As a result, it is possible to suppress a decrease in the accuracy of the process of acquiring (identifying) the solder ball region 80a in the contrast-adjusted X-ray image 44 using the trained model 31. Note that the fact that it is possible to suppress a decrease in the accuracy of the process of acquiring (identifying) the solder ball region 80a using the trained model 31 has been confirmed in an experiment described below by the inventors of the present application.
[0071] Furthermore, in this embodiment, as described above, in the step of acquiring the X-ray image representative value 50, a first average pixel value 50a, which is the average pixel value of the first region 80, and a second average pixel value 50b, which is the average pixel value of the second region 81, are acquired as the X-ray image representative value 50. In the step of acquiring the contrast-adjusted X-ray image 44, the contrast of the X-ray image 40 is adjusted so that each of the first average pixel value 50a and the second average pixel value 50b becomes the predetermined value 70, thereby acquiring the contrast-adjusted X-ray image 44. As a result, when adjusting the contrast between the first region 80 and the second region 81, the contrast of the X-ray image 40 is adjusted using the first average pixel value 50a and the second average pixel value 50b as the X-ray image representative value 50. This makes it possible to prevent the pixel values in the first region 80 from becoming excessively low or the pixel values in the second region 81 from becoming excessively high. In addition, it is possible to prevent the pixel values in the first region 80 from becoming excessively high or the pixel values in the second region 81 from becoming excessively low. As a result, the contrast of the X-ray image 40 can be adjusted easily and accurately.
[0072] [First Example (Effect Confirmation Experiment)] In order to confirm the effects of the above-described embodiment, the following experiment was conducted: The identification accuracy of the solder ball region 80a (see FIG. 11) was compared between an identification result image 61 (see FIG. 11) according to the first comparative example and an identification result image 62 (see FIG. 12) according to the first example.
[0073] The classification result image 61 according to the first comparative example shown in FIG. 11 is a classification result output using X-ray images captured under different tube voltages, which were imaging conditions for capturing training data when generating the trained model 31 (see FIG. 1), and the trained model 31. Specifically, the trained model 31 was generated using training data captured under imaging conditions of a tube voltage of 120 kV (kilovolts) and a tube current of 100 μA (microamperes). The X-ray images were captured under imaging conditions of a tube voltage of 100 kV and a tube current of 100 μA. In the first comparative example, the tube voltage value was intentionally set low to simulate a state in which the energy of the irradiated X-rays decreases due to aging of the X-ray irradiator 10.
[0074] In the classification result image 61, the classification result by the trained model 31 is superimposed as a label 82. In the classification result image 61, the label 82 is not superimposed on most of the solder ball regions 80a. In other words, it was confirmed that the analysis accuracy by the trained model 31 decreases when the tube voltage value when capturing the training data and the tube voltage value when capturing the X-ray image are made different from each other.
[0075] 12, an X-ray image taken under imaging conditions of a tube voltage of 100 kV and a tube current of 100 μA was subjected to contrast adjustment using the X-ray image preprocessing method described in the above embodiment, and the resulting contrast-adjusted X-ray image 44 was input to the trained model 31 to obtain an identification result image 62. Note that in the first example as well, the value of the tube voltage was intentionally set low to reproduce a state in which the energy of the irradiated X-rays decreases due to aging of the X-ray irradiation unit 10.
[0076] The classification result by the trained model 31 is also superimposed as a label 82 on the classification result image 62. In the classification result image 62, the label 82 is superimposed so as to coincide with the solder ball region 80a. In other words, it was confirmed that even when the tube voltage value when capturing the training data and the tube voltage value when capturing the X-ray image are made different from each other, it is possible to suppress a decrease in the analysis accuracy by the trained model 31.
[0077] [Second Example (Effectiveness Verification Experiment)] Furthermore, in order to confirm the effects of the above-described embodiment, the following experiment was conducted: The identification accuracy of the solder ball region 80a (see FIG. 13) was compared between the identification result image 63 of the second comparative example (see FIG. 13) and the identification result image 64 of the second example (see FIG. 14).
[0078] The classification result image 63 of the second comparative example shown in FIG. 13 is a classification result output using the trained model 31 and X-ray images captured under different tube currents, which were imaging conditions when capturing training data to generate the trained model 31. Specifically, the trained model 31 was generated using training data captured under imaging conditions of a tube voltage of 120 kV (kilovolts) and a tube current of 100 μA (microamperes). The X-ray images were captured under imaging conditions of a tube voltage of 120 kV and a tube current of 50 μA. In the second comparative example, the value of the tube current was intentionally set low to simulate a state in which the X-ray irradiation unit 10 changes over time and the dose of irradiated X-rays decreases.
[0079] In the classification result image 63, the classification result by the trained model 31 is superimposed as a label 82. In the classification result image 63, the labels 82 are superimposed on many of the solder ball regions 80a, but the labels 82 are not superimposed on some of the solder ball regions 80a. In other words, it was confirmed that the analysis accuracy by the trained model 31 decreases when the value of the tube current when capturing the training data and the value of the tube current when capturing the X-ray image are made different from each other.
[0080] 14, an X-ray image taken under imaging conditions of a tube voltage of 120 kV and a tube current of 50 μA was subjected to contrast adjustment using the X-ray image preprocessing method described in the above embodiment, and the resulting contrast-adjusted X-ray image 44 was input to the trained model 31 to obtain an identification result image 64. Note that in the second example as well, the value of the tube current was intentionally set low to reproduce a state in which the X-ray irradiation unit 10 changes over time and the dose of irradiated X-rays decreases.
[0081] In the classification result image 64, the classification result by the trained model 31 is also superimposed as a label 82. In the classification result image 64, the label 82 is superimposed so as to coincide with the solder ball region 80a. In other words, it was confirmed that even when the value of the tube current when capturing the training data and the value of the tube current when capturing the X-ray image are made different from each other, it is possible to suppress a decrease in the analysis accuracy by the trained model 31.
[0082] The above experimental results confirmed that when analyzing the contrast-adjusted X-ray image 44 acquired by the X-ray image preprocessing method according to the above embodiment using the trained model 31, it is possible to suppress a decrease in the accuracy of analysis by the trained model 31 even if both the energy and dose of the X-rays irradiated from the X-ray irradiation unit are different from the energy and dose of the X-rays used to capture the training data. In other words, it was confirmed that it is possible to suppress a decrease in the accuracy of the process of acquiring (identifying) the first region 80 (solder ball region 80a) using the trained model 31.
[0083] [Variations] It should be noted that the embodiments and examples disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims rather than the above-described description of the embodiments and examples, and further includes all modifications (variations) within the meaning and scope of the claims.
[0084] For example, in the above embodiment, an example of a configuration has been shown in which the control unit 20 (region acquisition unit 20c) acquires two regions, the first region 80 and the second region 81, from the X-ray image 40 as the multiple regions, but the present invention is not limited to this. For example, the control unit (region acquisition unit) may be configured to acquire three or more regions from the X-ray image as the multiple regions. The number of regions acquired by the control unit (region acquisition unit) may be changed depending on the number of targets to be analyzed by the trained model.
[0085] Furthermore, in the above embodiment, an example of a configuration in which the control unit 20 (logarithmic processing unit 20b) performs logarithmic conversion processing on the X-ray image 40 prior to processing to acquire multiple regions from the X-ray image 40 has been described, but the present invention is not limited to this. For example, the control unit (logarithmic conversion processing unit) does not have to perform logarithmic conversion processing on the X-ray image. However, if the control unit (logarithmic processing unit) does not perform logarithmic conversion processing on the X-ray image, binarization processing will be performed with low resolution in the low-dose portion of the X-ray image and with pixel values still changing exponentially. In this case, the accuracy of acquiring the first and second regions through binarization processing will decrease. Therefore, it is preferable that the control unit (logarithmic processing unit) be configured to perform logarithmic conversion processing on the X-ray image.
[0086] Furthermore, in the above embodiment, an example of a configuration has been shown in which the control unit 20 (region acquisition unit 20c) acquires the first region 80 and the second region 81 by performing binarization processing on the logarithmically transformed X-ray image 41, but the present invention is not limited to this. As long as the first region and the second region can be acquired from the X-ray image, the control unit (region acquisition unit) may acquire the first region and the second region by a method other than binarization processing. For example, the control unit (region acquisition unit) may be configured to acquire the first region and the second region from the X-ray image by a split-merge method that divides the image into partial regions with equal characteristics.
[0087] Furthermore, in the above embodiment, an example of a configuration has been shown in which the control unit 20 (region acquisition unit 20c) acquires the first region 80 and the second region 81 by Otsu's binarization processing, but the present invention is not limited to this. For example, the control unit (region acquisition unit) may be configured to acquire the first region and the second region from the X-ray image by binarization processing other than Otsu's binarization processing. For example, the control unit (region acquisition unit) may be configured to acquire the first region and the second region by binarization processing based on a threshold set (input) by the user.
[0088] Furthermore, in the above embodiment, an example was shown in which the X-ray image 40 is an image of the substrate 91 on which the solder balls 93 are arranged, but the present invention is not limited to this. For example, the X-ray image may be an image of an object to be inspected other than the solder balls. In this case, the control unit (area acquisition unit) may be configured to acquire an area in which the object to be inspected is captured and an area other than the object to be inspected from the X-ray image.
[0089] In the above embodiment, the control unit 20 (representative value acquisition unit 20d) acquires the first average pixel value 50a and the second average pixel value 50b as the X-ray image representative value 50, but the present invention is not limited to this. For example, the control unit (representative value acquisition unit) may be configured to acquire the median, mode, or the like of the pixel values of each of the first and second regions as the X-ray image representative value.
[0090] Furthermore, in the above embodiment, an example of a configuration has been shown in which the control unit 20 (contrast adjustment unit 20e) adjusts the pixel values of the X-ray image 40 (X-ray image 41 after logarithmic transformation processing) so that each of the first average pixel value 50a and the second average pixel value 50b becomes the predetermined value 70, but the present invention is not limited to this. For example, the control unit (contrast adjustment unit) may be configured to adjust the pixel values of the X-ray image (X-ray image after logarithmic transformation processing) so that either the median or the mode of the pixel values of each of the first region and the second region becomes the predetermined value 70.
[0091] Furthermore, in the above embodiment, an example of a configuration has been shown in which the control unit 20 (area acquisition unit 20c) acquires the solder ball area 80a, which is the area of the solder balls 93 of a BGA (Ball Grid Array), but the present invention is not limited to this. For example, the control unit (area acquisition unit) may be configured to acquire the areas of multiple solder materials at the connection portions of multiple terminals of an LGA (Land Grid Array) in which the terminals are arranged in a grid pattern. Furthermore, the control unit (area acquisition unit) may acquire the areas of multiple terminals instead of solder materials.
[0092] In the above embodiment, the predetermined value 70 is the average pixel value of the first region and the average pixel value of the second region of the input teacher data 32 (teacher data), but the present invention is not limited to this. For example, the predetermined value may be either the median or the mode of the pixel values of the first region of the input teacher data (teacher data), and either the median or the mode of the pixel values of the second region.
[0093] In the above embodiment, the X-ray imaging device 1 and the image processing device 2 are provided separately, but the present invention is not limited to this. In the present invention, the X-ray imaging device and the image processing device may be integrally configured.
[0094] In addition, in the above embodiment, an example of a configuration in which the image processing device 2 stores the trained model 31 has been shown, but the present invention is not limited to this. When preprocessing of the X-ray image and analysis of the preprocessed X-ray image (contrast-adjusted X-ray image) are performed by separately provided control devices, the image processing device does not need to store the trained model.
[0095] In addition, in the above embodiment, an example of a configuration in which a plurality of solder balls 93 are arranged in a row on one surface of the substrate 91 has been shown, but the present invention is not limited to this. For example, the present invention can also be applied to a configuration in which a plurality of solder balls 93 are arranged in a row on both the front and back surfaces of the substrate 91.
[0096] In the above embodiment, the process by the control unit 20 to acquire the contrast-adjusted X-ray image 44 has been described using a flow-driven flowchart in which the process is performed in order according to the processing flow, but the present invention is not limited to this. In the present invention, the process performed by the control unit may be an event-driven process in which the process is performed on an event-by-event basis. In this case, the process may be completely event-driven, or may be a combination of event-driven and flow-driven processes.
[0097] [Aspect] It will be appreciated by those skilled in the art that the exemplary embodiments described above are examples of the following aspects.
[0098] (Item 1) An X-ray image preprocessing method performed prior to a process of acquiring a region of an object to be inspected from an X-ray image of the object to be inspected using a trained model, acquiring the X-ray image; acquiring a plurality of regions from the X-ray image based on pixel values of the X-ray image; obtaining an X-ray image representative value of pixel values of each of the plurality of regions; and acquiring a contrast-adjusted X-ray image by adjusting the contrast of the X-ray image so that the X-ray image representative value of each of the plurality of regions of the X-ray image becomes a predetermined value acquired based on training data when the trained model was created.
[0099] (Item 2) Item 2. An X-ray image preprocessing method according to item 1, wherein the predetermined value is obtained based on a representative value of the training data, which is a representative value of each pixel in a plurality of regions in the training data.
[0100] (Item 3) In the step of acquiring the plurality of regions from the X-ray image, two regions are acquired: a first region which is a region including the object to be inspected; and a second region which is a region other than the object to be inspected. 3. The X-ray image preprocessing method according to item 1 or 2, wherein in the step of acquiring the contrast-adjusted X-ray image, the contrast-adjusted X-ray image is acquired by adjusting the contrast of the X-ray image so that the X-ray image representative value of the first region and the X-ray image representative value of the second region become the predetermined value of the first region and the predetermined value of the second region, respectively.
[0101] (Item 4) The method further includes a step of performing a logarithmic transformation process on each pixel of the X-ray image prior to the step of acquiring the plurality of regions from the X-ray image, Item 4. The X-ray image preprocessing method according to item 3, wherein in the step of acquiring the plurality of regions from the X-ray image, the first region and the second region are acquired by performing binarization processing on the X-ray image after logarithmic transformation processing.
[0102] (Item 5) the X-ray image is an image of a substrate on which a plurality of solder balls are arranged, the first region is a solder ball region in which the plurality of solder balls are imaged, the second region is a background region other than the solder ball region, In the step of acquiring the plurality of regions from the X-ray image, the solder ball region and the background region are acquired from the X-ray image after logarithmic conversion processing by performing binarization processing; 5. The X-ray image preprocessing method according to item 4, wherein in the step of acquiring the X-ray image representative value, the X-ray image representative value of the solder ball region is acquired, and the X-ray image representative value of the background region is acquired.
[0103] (Item 6) In the step of acquiring the X-ray image representative value, a first average pixel value that is an average pixel value of the first region and a second average pixel value that is an average pixel value of the second region are acquired as the X-ray image representative value; 6. The X-ray image preprocessing method according to any one of items 3 to 5, wherein in the step of acquiring the contrast-adjusted X-ray image, the contrast-adjusted X-ray image is acquired by adjusting the contrast of the X-ray image so that each of the first average pixel value and the second average pixel value becomes the predetermined value.
[0104] (Item 7) An X-ray image preprocessing program that is performed prior to a process of acquiring an area of an object to be inspected from an X-ray image of the object to be inspected using a trained model, Controlling acquisition of the X-ray image; Controlling acquisition of a plurality of regions from the X-ray image based on pixel values of the X-ray image; Control to acquire an X-ray image representative value of pixel values of each of the plurality of regions; and control to acquire a contrast-adjusted X-ray image by adjusting the contrast of the X-ray image so that the X-ray image representative value of each of the plurality of regions of the X-ray image becomes a predetermined value acquired based on training data when the trained model was created.
[0105] (Item 8) An X-ray image preprocessing system that performs preprocessing prior to a process of acquiring an area of an object to be inspected from an X-ray image of the object to be inspected using a trained model, an X-ray imaging device having an X-ray irradiation unit that irradiates X-rays and an X-ray detector that detects the X-rays irradiated from the X-ray irradiation unit; an image processing device for generating the X-ray image, The image processing device includes: Controlling the generation of the X-ray image; an X-ray image preprocessing system that performs control to acquire a contrast-adjusted X-ray image by acquiring a plurality of regions from the X-ray image based on pixel values of the X-ray image, acquiring an X-ray image representative value of the pixel values of each of the plurality of regions, and adjusting the contrast of the X-ray image so that the X-ray image representative value of each of the plurality of regions of the acquired X-ray image becomes a predetermined value acquired based on training data when the trained model was created. [Explanation of symbols]
[0106] 1 X-ray equipment 2. Image processing device 10 X-ray irradiation section 11 X-ray detector 20 Control Unit 30 Programs (X-ray image preprocessing programs) 31 Pre-trained models 32 Input training data (training data) 40 X-ray images 41 X-ray image after logarithmic transformation 44 X-ray image after contrast adjustment 70 specified value 80 1st area 80a Solder ball area 81 Second area 81a Background area 90 Inspection object 91 Circuit Board 93 Solder balls 100 X-ray image preprocessing system
Claims
1. An X-ray image preprocessing method performed prior to a process of acquiring a region of an object to be inspected from an X-ray image of the object to be inspected using a trained model, comprising: acquiring the X-ray image; obtaining a plurality of regions from the X-ray image based on pixel values of the X-ray image; acquiring an X-ray image representative value that is a representative value of pixel values of each of the plurality of regions; and acquiring a contrast-adjusted X-ray image by adjusting the contrast of the X-ray image so that the X-ray image representative value of each of the plurality of regions of the X-ray image becomes a predetermined value acquired based on training data when the trained model was created.
2. The X-ray image preprocessing method according to claim 1 , wherein the predetermined value is acquired based on a representative value of the training data, which is a representative value of pixels in each of a plurality of regions in the training data.
3. In the step of acquiring the plurality of regions from the X-ray image, two regions are acquired: a first region which is a region including the object to be inspected; and a second region which is a region other than the object to be inspected.
3. The X-ray image preprocessing method according to claim 2, wherein in the step of acquiring the contrast-adjusted X-ray image, the contrast-adjusted X-ray image is acquired by adjusting the contrast of the X-ray image so that the X-ray image representative value of the first region and the X-ray image representative value of the second region become the predetermined value of the first region and the predetermined value of the second region, respectively.
4. The method further includes a step of performing a logarithmic transformation process on each pixel of the X-ray image prior to the step of acquiring the plurality of regions from the X-ray image, 4. The X-ray image preprocessing method according to claim 3, wherein in the step of acquiring the plurality of regions from the X-ray image, the first region and the second region are acquired by performing binarization processing on the X-ray image after logarithmic transformation processing.
5. the X-ray image is an image of a substrate on which a plurality of solder balls are arranged, the first region is a solder ball region in which the plurality of solder balls are imaged, the second region is a background region other than the solder ball region, In the step of acquiring the plurality of regions from the X-ray image, the solder ball region and the background region are acquired from the X-ray image after logarithmic conversion processing by performing binarization processing; 5. The X-ray image preprocessing method according to claim 4, wherein in the step of acquiring the X-ray image representative value, the X-ray image representative value of the solder ball region and the X-ray image representative value of the background region are acquired.
6. In the step of acquiring the X-ray image representative value, a first average pixel value that is an average pixel value of the first region and a second average pixel value that is an average pixel value of the second region are acquired as the X-ray image representative value; 4. The X-ray image preprocessing method according to claim 3, wherein in the step of acquiring the contrast-adjusted X-ray image, the contrast-adjusted X-ray image is acquired by adjusting the contrast of the X-ray image so that each of the first average pixel value and the second average pixel value becomes the predetermined value.
7. An X-ray image preprocessing program that is performed prior to a process of acquiring an area of an object to be inspected from an X-ray image of the object to be inspected using a trained model, Controlling acquisition of the X-ray image; Controlling acquisition of a plurality of regions from the X-ray image based on pixel values of the X-ray image; Control to acquire an X-ray image representative value of pixel values of each of the plurality of regions; and control to acquire a contrast-adjusted X-ray image by adjusting the contrast of the X-ray image so that the X-ray image representative value of each of the plurality of regions of the X-ray image becomes a predetermined value acquired based on training data when the trained model was created.
8. An X-ray image preprocessing system that performs preprocessing prior to a process of acquiring an area of an object to be inspected from an X-ray image of the object to be inspected using a trained model, an X-ray imaging device having an X-ray irradiation unit that irradiates X-rays and an X-ray detector that detects the X-rays irradiated from the X-ray irradiation unit; an image processing device for generating the X-ray image, The image processing device includes: Controlling the generation of the X-ray image; an X-ray image preprocessing system that performs control to acquire a contrast-adjusted X-ray image by acquiring a plurality of regions from the X-ray image based on pixel values of the X-ray image, acquiring an X-ray image representative value of the pixel values of each of the plurality of regions, and adjusting the contrast of the X-ray image so that the X-ray image representative value of each of the plurality of regions of the X-ray image becomes a predetermined value acquired based on training data when the trained model was created.
Citation Information
Patent Citations
X-ray imaging system and method for generating trained model
JP2024029975A