A multi-terminal cooperative online X-ray defect detection method, system and device
By changing the relative position of the workpiece under inspection and the imaging end, and using the abnormal displacement relationship to distinguish the source of the abnormality, the problem of confusing detection results in online X-ray inspection is solved, ensuring that all internal structures obtain effective imaging evidence, and achieving the accuracy and completeness of the detection results.
Patent Information
- Application Number
- CN202611419669.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Existing online X-ray defect inspection equipment has difficulty distinguishing between workpiece defects and imaging abnormalities in multi-field and multi-channel inspections, leading to confusing inspection results. Furthermore, it cannot guarantee that all internal structures will obtain valid imaging evidence, which may result in the release of unqualified workpieces.
By changing the relative position of the workpiece to be inspected and the imaging end, and utilizing the displacement relationship between the anomaly and the coordinates of the workpiece reference and the detection plate, the source of the anomaly can be distinguished, and the detection field of view can be reconstructed to ensure that all internal structures are effectively covered before release or isolation.
It effectively distinguishes between workpiece defects and imaging abnormalities, reduces confusion caused by repeated acquisitions, ensures that all internal structures obtain valid imaging evidence, avoids the release of unqualified workpieces, and achieves the accuracy and completeness of inspection results.
Smart Images

Figure CN123175983A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial X-ray nondestructive testing and automated production line control technology, and in particular to a multi-terminal collaborative online X-ray defect detection method, system and equipment. Background Technology
[0002] Online X-ray defect inspection equipment is typically installed in workpiece manufacturing or assembly lines. The workpiece to be inspected is fed into the inspection station via a conveyor, where an X-ray source emits rays, which are then received by a detector plate as projection signals penetrate the workpiece. The control and processing terminal calls up the inspection plan based on the workpiece model, controlling the workpiece or imaging component to switch between multiple imaging positions, obtaining projected images of the workpiece's internal structure from different directions. Based on the inspection results, it outputs pass / fail or verification information to the programmable logic controller (PLC) and manufacturing execution system (MAS) to complete workpiece release, isolation, and inspection data traceability.
[0003] To cover multi-layered structures, sidewall structures, or internal areas of varying heights, existing online equipment can acquire images from multiple fields of view for the same workpiece. It can also employ two sets of X-ray sources and detector plates to form two imaging channels. While multiple fields of view and multiple channels increase the number of observation directions, the detection results can still be affected by structural projection overlap, localized defects on the detector plate, fixed patterns, afterimages, or changes in the edge response of the imaging area. Both actual workpiece defects and anomalies fixed to the imaging end can appear as bright spots, dark spots, discontinuous boundaries, or localized grayscale anomalies in the image.
[0004] When the relative position of the workpiece and the imaging end remains unchanged, repeated acquisition at the original position will cause both the actual defects and the fixed anomalies at the imaging end to reappear. Based solely on whether the anomaly is repeated, it is difficult to determine whether the anomaly originates from the workpiece or the imaging end. Directly performing neighborhood correction on suspected defects may simultaneously weaken the appearance of actual minor defects; conversely, using suspected anomalies directly as a basis for disqualification may lead to the isolation of workpieces that are not actually defective. When different fields of view produce opposite results for the same internal structure, simple majority judgment or ordinary re-imaging cannot determine which image is affected by structural overlap or anomalies in the imaging area.
[0005] Furthermore, once an anomaly is confirmed in a certain area of the detection plate, simply re-acquiring the current field of view does not guarantee the integrity of the current inspection task. Other images already acquired and subsequent fields of view that have not yet been executed may continue to use the same affected area; after deleting these fields of view, if the number of images or the preset action completion signal are still used as the end condition for inspection, there may be situations where certain specified internal structures have not obtained valid imaging evidence but the workpiece has already been released. Therefore, it is necessary to physically verify the suspected source of anomaly without leaving the online production control scenario, and to make the verification results directly change the subsequent inspection field of view and the final release conditions. Summary of the Invention
[0006] The purpose of this invention is to provide a multi-terminal collaborative online X-ray defect detection method, system, and equipment. When suspected abnormalities or conflicting results occur during online multi-field detection, the method distinguishes whether the abnormality belongs to the workpiece under inspection or to the imaging end based on the displacement relationship between the abnormality and the workpiece reference and the detector plate coordinates. The method also reconstructs the subsequent detection field of the current workpiece based on the abnormality attribution and controls the release, isolation, or verification of the workpiece only after the specified internal structure has been effectively covered.
[0007] To achieve the above objectives, this invention provides a multi-terminal collaborative online X-ray defect detection method, comprising: reading the identification of the workpiece to be inspected and receiving the loading status from the PLC; establishing a detection task; controlling the motion end to change the relative orientation between the workpiece to be inspected and the imaging end according to the field-of-view sequence of the detection scheme; and controlling the imaging end, including an X-ray source and a detector plate, to acquire multi-field-of-view images to obtain the detection results of each internal structure specified in the detection scheme; when the detection results show a suspected abnormality or conflict with the results of the same internal structure, stopping the output of loading permission to the PLC; selecting a workpiece reference that maintains a fixed geometric relationship with the corresponding internal structure from the original detection field of view; controlling the motion end to drive the workpiece to be inspected, the X-ray source, or the detector plate to perform a verification displacement, so that the projection of the workpiece reference and the corresponding internal structure moves from the original imaging area to the verification imaging area and acquires a verification image; according to the displacement relationship of the suspected abnormality relative to the coordinates of the workpiece reference and the detector plate, when the suspected abnormality moves together with the workpiece reference, attributing the suspected abnormality to the workpiece; and when the workpiece reference... When the suspected anomaly remains within the original imaging area in the coordinates of the detection plate, the suspected anomaly is attributed to the imaging end. The subsequent field of view for the current inspection task is reconstructed based on the anomaly attribution: when the suspected anomaly is attributed to the workpiece, a positioning field of view that changes the ray penetration direction of the corresponding part is invoked; when the suspected anomaly is attributed to the imaging end, the acquired images intersecting with the affected detection plate area are set invalid, the field of view that allows the same internal structure to be projected through the affected detection plate area is deleted from the subsequent field of view, and an alternative field of view covering the same internal structure and avoiding the affected detection plate area is invoked; a detection coverage state is maintained for each specified internal structure, updated only by images that match the current inspection task, are in position, have the corresponding internal structure within the effective imaging area, have not passed through the affected detection plate area, and do not have any unresolved result conflicts; after each specified internal structure obtains valid evidence as specified in the inspection plan, an OK, NG, or review judgment result is generated, sent to the PLC and MES, and the release, isolation, or review of the workpiece to be inspected is controlled.
[0008] This invention also provides a multi-terminal collaborative online X-ray defect detection system, comprising: a production line collaborative control unit, communicatively connected to a PLC, MES, and workpiece conveyor, for establishing a detection task for the workpiece to be inspected and maintaining the workpiece in a controlled state before the detection task is completed; an imaging control unit, connected to a motion end, an X-ray source, and a detector plate, for executing imaging actions of a standard field of view, a verification field of view, a positioning field of view, and a substitute field of view; and an anomaly attribution control unit, which receives the internal structure detection results and the displacement status fed back by the imaging control unit, for controlling the verification displacement when there is a suspected anomaly or a conflict in the results, and attributing the suspected anomaly to the workpiece or the imaging unit according to the displacement relationship between the suspected anomaly and the workpiece reference and the detector plate coordinates. The system includes: a detection path control unit, which stores the coverage relationship between the internal structure and each detection field of view and the detection board area; a location field of view that is invoked based on the anomaly attribution output by the anomaly attribution control unit; a detection evidence that intersects with the affected detection board area and an alternative field of view that is invoked; and an update of the detection coverage status of the internal structure. A release control unit, connected to the detection path control unit and the production line collaborative control unit, outputs release, isolation, or verification control information to the PLC after all specified internal structures have achieved effective coverage. All control units are centrally located in the control processing terminal, or distributed among the control processing terminal, PLC, and edge processing terminal. The MES receives the detection task status and judgment results via a communication connection.
[0009] The present invention also provides a multi-terminal collaborative online X-ray defect detection device, including an X-ray source, a detector plate disposed opposite to the X-ray source, a detection station located between the X-ray source and the detector plate, a motion end for changing the relative position of the workpiece to be inspected with respect to the X-ray source and the detector plate, a workpiece conveying end connected to the detection station, a diversion execution end connected to the workpiece conveying end, a PLC, a MES communication interface, and a control processing terminal;
[0010] The control processing terminal is connected to the X-ray source, the detector plate, the motion end, the PLC, and the MES communication interface, respectively. It is used to control the motion end to drive the workpiece to be inspected, the X-ray source, or the detector plate to perform verification displacement when the internal structure detection results show suspected abnormalities or result conflicts. According to the displacement relationship between the suspected abnormality in the verification image and the coordinates of the workpiece reference and the detector plate, the suspected abnormality is attributed to the workpiece or the imaging end. The imaging action of positioning the field of view or the replacement field of view and the update of the internal structure detection coverage status are controlled according to the abnormality attribution.
[0011] The PLC is connected to the workpiece conveying end and the diversion execution end, and is used to control the release, isolation or entry into the verification station of the workpiece to be inspected according to the OK, NG or verification judgment result output by the control processing terminal after the specified internal structure has been effectively covered.
[0012] Compared with existing technologies, this invention actively changes the relative position between the workpiece under inspection and the imaging end after a suspected anomaly occurs, causing the projection of the corresponding internal structure to leave the original imaging area. The source of the anomaly is determined by the movement relationship of the anomaly relative to the workpiece reference and the detection plate area. This forms an attribution basis based on physical projection migration, which helps reduce confusion caused by the repeated occurrence of both actual defects and fixed anomalies on the detection plate during in-situ repeated acquisition. This invention uses anomaly attribution as a control condition for subsequent detection paths. When an anomaly is attributed to the workpiece, the ray penetration direction is changed to reduce the influence of overlapping structures or imaging boundaries on the corresponding parts; when an anomaly is attributed to the imaging end, images and subsequent fields of view passing through the affected area are removed, and alternative fields of view or backup imaging channels are invoked. These two mutually exclusive processing paths can change specific imaging actions based on the source of the anomaly, rather than simply adding ordinary re-shooting. This invention uses whether the internal structure has achieved effective coverage as a condition for the completion of the inspection task and PLC release. After dynamically deleting or replacing the field of view, only standard field of view images, positioning images, or alternative field of view images that meet the validity requirements can update the coverage status, which helps avoid situations where the number of inspection actions has been completed but some internal structures still lack effective imaging evidence. The control process of this invention directly acts on the workpiece to be inspected, the moving end, the X-ray source, the detector plate, the conveying end, and the diversion execution end. It can be implemented on the basis of existing multi-field or dual-channel online X-ray equipment, without relying on an unexplainable black box model or additional dedicated sensors, and can form a closed loop with PLC and MES for detection, verification, path adjustment, result output, and production line handling. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of the overall process of a multi-terminal collaborative online X-ray defect detection method according to the present invention;
[0014] Figure 2 This is a schematic diagram of the composition and structure of the online X-ray defect detection device of the present invention. Detailed Implementation
[0015] The technical solution of the present invention will be further described below with reference to the accompanying drawings. The described embodiments are used to illustrate the technical principles and executable process of the present invention and do not limit the specific product category of the workpiece to be inspected. The workpiece to be inspected can be a battery cell, battery assembly, metal casting, precision assembly, or other industrial products with a multi-layered internal structure; the internal structure can be a layered part, a welded part, a cavity, a connection part, a shell edge, or other structural areas that need to be identified in the inspection plan.
[0016] In this embodiment, the PLC is a programmable logic controller used to control the feeding, unloading, conveying, clamping, and diverting actions on the production line; the MES is a manufacturing execution system used to receive the inspection task status, workpiece identification, and inspection results. The control processing terminal can be an industrial computer, an edge processing terminal, or a control platform composed of multiple processing terminals. The imaging end includes at least an X-ray source and a detector plate arranged opposite each other, and the motion end is used to change the relative position or orientation of the workpiece to be inspected and the imaging end. The motion end can include at least one of a translation axis, a lifting axis, and a rotation axis, or it can be composed of a mechanism that drives the X-ray source or detector plate to move.
[0017] In one optional implementation, the same equipment platform also includes a CT acquisition and reconstruction module. The motion unit can control the rotation of the workpiece under inspection, or control the X-ray source and detector plate to project a sequence of images onto the workpiece at multiple angles. The control processing terminal associates each projection with the current workpiece identifier, angular position, and imaging channel, and can reconstruct tomographic slices or three-dimensional volume data from the projection sequence. The CT mode can serve as a supplementary detection method beyond standard online inspection, and can also be invoked when there is suspected structural overlap or spatial relationship requiring further confirmation.
[0018] For ease of explanation, the original imaging area refers to the area on the photosensitive surface of the detector plate when the suspected anomaly first appears; the verification imaging area refers to another detector plate area to which the corresponding internal structure is expected to be projected after the verification displacement is performed. The positioning field of view is the imaging position used to change the ray penetration direction of the anomalous part after the anomaly is attributed to the workpiece; the alternative field of view is the imaging position used to cover the same internal structure while avoiding the affected imaging area after the anomaly is attributed to the imaging end. Effective coverage refers to the minimum number of valid pieces of evidence required by the detection scheme to obtain images of a specified internal structure that meet the following conditions: correct task attribution, proper movement position, the structural area within the effective imaging range, no passage through the marked affected area, and no unresolved conflicting results.
[0019] To ensure that all imaging positions, structural regions, and verification displacements have a unified and calculable reference, this implementation establishes a probe coordinate system. and equipment motion coordinate system The coordinate system of the detector board has its origin at the center of the effective pixel in the upper left corner of the detector board. axis along the pixel row direction, The axis is along the pixel column direction, and the coordinate unit is pixels; the physical pixel spacing of the detector plate. Prioritize reading from the nominal parameters of the detector plate. When using dimensional calibration, place a calibration block with known dimensions close to the photosensitive surface of the detector plate; if the calibration block is located on the target structural plane of the workpiece, convert it according to the geometric magnification factor of that plane to avoid confusing the equivalent pixel size of the object with the physical pixel pitch of the detector plate. (Detector plate physical pixel pitch) The acceptable range is 50μm to 400μm. The equipment's motion coordinates are based on the clamping reference position of the detection station as the origin, and the motion state is recorded as follows: ,in, It is a motion state vector composed of the positions of each activated motion axis. , , The translation position is in millimeters. , , The rotation angle is measured in units of measurement; the corresponding component for an unset motion axis is set to zero, and each component is obtained from the encoder feedback value of the motion controller.
[0020] For workpiece model Each detection field of view The detection plan should at least preserve the field of view markings. Target motion state Unit penetration direction vector Effective imaging area of the detector plate Radiation working conditions and the internal structure of each regulation Projection area in this field of view .in, For workpiece model index, To define the internal structure index, To detect the field of view index. The direction is obtained by normalizing the direction from the X-ray source focal point to the imaging center or a representative point of the target structure within the field of view; when the difference in the penetration direction of different internal structures within the same field of view is not negligible, they are saved separately. Projection area Represented by the sequence of vertices of a closed polygon in the coordinate system of the detector panel, its effective area coverage ratio is defined as follows: ;in, This represents the pixel area within the coordinate system of the probe plate. Indicates the intersection of regions. Indicates the projection area Falling into the effective imaging area Area proportion within. Coverage relationship. ;when Not lower than the coverage threshold Furthermore, when the penetration direction, contrast-to-noise ratio, sharpness, and structural integrity of the field of view meet the detection requirements of the corresponding internal structure, ,otherwise . The value should be between 0.90 and 1.00, preferably 0.98; the minimum number of valid pieces of evidence required for each internal structure. Choose a value between 1 and 3. For ordinary structures, choose 1. For critical structures that require two-way confirmation according to product testing specifications, choose 2 or 3. The testing plan is written along with the workpiece model.
[0021] The thresholds referred to in this invention are not arbitrarily set during task execution, but are determined during equipment debugging or workpiece changeover calibration by normal workpieces of the same model, samples with known defects, or comparison test blocks made according to product inspection specifications, and are stored together with the workpiece model, field of view identifier, and software version. When the corresponding sample conditions are available, the calibration sample preferably includes no less than 30 normal workpieces and no less than 5 samples of each type of defect; if the number of samples is insufficient, the same comparison test block can be used to repeatedly collect no less than 30 sets of images at different positions and directions. The above quantities are used to illustrate one implementation method for forming stable statistical thresholds and do not replace product inspection specifications or the applicant's actual calibration records. Threshold updates are only performed during maintenance or changeover and remain frozen during online testing to avoid drift in the judgment conditions of the same batch of workpieces.
[0022] like Figure 1 As shown, the online detection method of this embodiment can be executed in the following order: detection task establishment, standard field of view acquisition, internal structure detection, anomaly attribution verification, subsequent field of view reconstruction, coverage status verification, and production line result processing. The order indicates the main causal relationship between each step; without changing the subsequent field of view for anomaly attribution control and the final release for effective coverage control, some equipment preparation, status reading, and data saving actions can be executed in parallel.
[0023] Step S101: Read the identification of the workpiece to be inspected and establish a detection task. The workpiece conveyor sends the workpiece to be inspected to the loading position of the detection equipment. The code reading unit reads the workpiece's serial number, barcode, or other identification that can distinguish the current workpiece. When the equipment is in automatic operation mode and the loading conditions are met, the PLC sends a loading status. The control processing terminal creates the current detection task based on the identification and binds the workpiece model, detection scheme, and task status to the identification. The specific encoding form of the workpiece identification does not affect the implementation of this invention.
[0024] The control and processing terminal reads the specified internal structure, standard field-of-view sequence, imaging positions corresponding to each field of view, and X-ray operating conditions from a pre-configured inspection plan based on the workpiece model. The specified internal structure represents the structural object that must be obtained as valid inspection evidence to complete the inspection of this type of workpiece; the standard field of view represents the imaging positions executed in a predetermined sequence under normal equipment conditions. The inspection plan can be established during the equipment debugging phase based on the workpiece structure and equipment travel, and the coverage relationship of each standard field of view to the specified internal structure is saved.
[0025] The inspection scheme employs directly readable data records, rather than simply storing conceptual relationships between internal structure and field of view. Each structural record includes at least: workpiece model number. Internal structure identification Structure name, structural polygon in template coordinates, minimum detectable defect size or area. Minimum number of valid pieces of evidence and the set of allowed fields of view; each field of view record includes at least: field of view identifier. Target motion state Position tolerances of each axis, X-ray tube voltage tube current Single frame exposure time , number of superimposed frames Penetration direction vector Effective imaging area and the projected polygons corresponding to each internal structure. The control processing terminal is identified by its structure. and field of view markings To read the above records for the composite index, thus forming , and The exact correspondence between them.
[0026] The position tolerance of each axis is obtained through repeated positioning tests: the moving end returns to the same target position from both the forward and reverse directions at least 30 times, the deviation between the encoder feedback value and the target value is recorded, and the 99th percentile of the absolute value of all deviations is taken, rounded up by one encoder resolution as the position tolerance of the corresponding axis. If the equipment only provides a position switch, the repeated projection deviation is measured using the reference boundary of the calibrated workpiece during commissioning, and its 99th percentile is recorded as the projection repeatability error. The unit is pixels. During task execution, only when the feedback deviation of each enabled axis does not exceed the corresponding position tolerance, and the projection deviation of the reference boundary in the device using projection repeatability error verification does not exceed... Only then can the motion position be set to the correct state.
[0027] After the PLC feedback feeding is completed, the workpiece conveyor positions the workpiece to be inspected at the clamping reference position of the inspection station, and the clamping mechanism keeps the workpiece stable relative to the moving end. The control processing terminal reads the position status of the moving end, the working status of the X-ray source, and the acquisition status of the detector plate. Only when the workpiece is held, the moving end reaches the first imaging position, and the imaging end is in the acquisition state, does the inspection task switch from the preparation state to the standard field of view acquisition state; if any condition is not met, X-ray acquisition is not started, and the workpiece is kept in a controlled position.
[0028] Step S102: Acquire multi-field images. The control processing terminal outputs position control information to the motion end according to the standard field sequence. The motion end changes the relative orientation between the workpiece under inspection and the imaging end through translation, lifting, rotation, or a combination thereof. After each imaging position is in place, the control processing terminal triggers the X-ray source to emit a beam, and the detector plate acquires the corresponding field image. The acquisition completion status is associated with the current workpiece identifier, inspection task, and field identifier to avoid using images from the previous workpiece or other fields of view for the current inspection task.
[0029] Imaging control can be uniformly executed by the control processing terminal, or the control processing terminal can send the field of view target to the PLC or edge processing terminal, and the control unit near the moving end can complete the position control and provide feedback on the positioning status. Image data is transmitted from the detection board to the control processing terminal. The PLC provides the control processing terminal with the workpiece's position, clamping, automatic operation, and conveying status. The MES receives the inspection tasks and final results. The above functional distribution does not change the calling relationship between inspection results, displacement verification, field of view reconstruction, and release control.
[0030] When the device is equipped with two imaging channels, each imaging channel includes a paired X-ray source and a detector plate. The two imaging channels can simultaneously acquire images of different directions from the same imaging position, or they can acquire images separately according to their respective field-of-view sequences. The data links of the two channels are independent; the control and processing terminal switches to the subsequent imaging position only after both channels have completed acquisition of the current imaging position. If the detection scheme allows one channel to independently cover a specified internal structure, the available channel can be used as a backup imaging channel when the other channel is unavailable.
[0031] When a suspected anomaly appears in a projection within a CT projection sequence, the verification displacement logic of this invention can be used to move the projections of the workpiece reference and its corresponding internal structure away from the original detector plate area. The movement relationship of the anomaly relative to the workpiece reference and detector plate coordinates can then be compared. If the anomaly is attributed to the imaging end, projections that have passed through the affected detector plate area and cannot be used as valid evidence will not be used for reconstruction. Supplementary acquisition can be achieved by adjusting the acquisition angle, translating the workpiece under inspection, or switching imaging channels. Once valid projection data meeting the requirements for CT reconstruction is obtained, reconstruction can be performed or the workpiece can be transferred for review.
[0032] Each imaging channel undergoes dark-field and empty-field calibration upon initial production, detector plate replacement, or the completion of a specified maintenance cycle. The X-ray source is turned off, and 20–50 frames of images are continuously acquired and averaged pixel-by-pixel to obtain the dark-field image. Without placing a workpiece, continuously acquire 20-50 frames under the current ray conditions and average them pixel by pixel to obtain the empty field image. Original image according to Perform correction; in the formula, the minimum and maximum values of the outer layer are used to truncate the correction result to... The maximum value operation in the denominator is used to avoid correcting the denominator from being less than the zero gray value. Among these, To normalize and correct grayscale, and prevent zero grayscale measurement. ; Indicates the effective imaging area of the current field of view. The median of all valid pixels within the range is taken. The effective imaging area of the detector plate in the current field of view. The unit is consistent with the original grayscale. If a pixel's... If a pixel is less than 0.5 times or greater than 1.5 times the median of all effective pixels on the board, or if its 30-frame dark field grayscale standard deviation exceeds 5 times the median of the standard deviation of the entire board, then the pixel is recorded in the unusable pixel mask; the unusable pixel mask is extended outward by 1 to 3 pixels to form a fixed exclusion area.
[0033] Radiation working conditions ,in, For tube voltage, For tube current, For single-frame exposure time, The number of frames to be superimposed; the above parameters were determined by comparing test blocks and taking test shots at each stage. Available in the range of 40kV to 225kV. It can be selected within the range of 0.05mA to 3mA. The timeframe can be selected within the range of 20ms to 2000ms. The range is 1 to 16; the specific upper limit must not exceed the rated values of the X-ray source and detector plate. For each set of candidate conditions, calculate the average gray level in the target structure region and the adjacent background region respectively. , and standard deviation , ; where subscript Indicates the target structural region, subscript Indicates adjacent background areas. This represents the average gray level of the corresponding area. This represents the standard deviation of gray levels in the corresponding region. The structure-to-noise ratio is defined as... ,in, To prevent the normalized grayscale noise lower limit from being zero in the denominator, we take... CNR is a dimensionless quantity. Candidates are selected based on the following conditions: CNR not lower than 8, saturation ratio not higher than 1%, and target structure grayscale not falling into the lowest 5% of the range. If multiple conditions are met, the total tube current-time product is selected first. The smaller group, of which, This represents the total tube current-time product under these radiation conditions, expressed in mA·s. If they are the same, then select the total exposure time. The smaller group, of which, This represents the total exposure time of the overlay frames, in seconds. If the inter-frame readout time is not negligible, the total acquisition time recorded by the device is used as the second sorting factor. (Tube voltage) Used to meet material penetration and contrast requirements, as an independent screening parameter, not related to... and Direct multiplication is used as a single dose or image quality indicator. The above range is an feasible range; actual values vary depending on the workpiece material, thickness, and equipment ratings and are stored in the corresponding field-of-view record.
[0034] When two imaging channels acquire data synchronously, the control processing terminal sends the same task sequence number and current imaging position number to both channels. Each channel returns three statuses: position in place, beam output completed, and image reception completed. Only when the task sequence number, workpiece identifier, and imaging position number returned by both channels are consistent, and the return time difference is no greater than the synchronization waiting time, will the acquisition be successful. Only then are the results from the two channels combined. Let the number of available historically collected samples be... ,in ,but In the formula, and These represent taking the minimum and maximum values, respectively. This refers to the historical normal sample collection sequence number. For the first The time difference between the completion of two channels in a normal acquisition; when the equipment has no historical samples, a preset safety value of 5 seconds is used, and it is updated after a normal sample is obtained. If the timeout occurs or the sequence number is inconsistent, the current image will not be included in the detection results, the system will remain prohibited from feeding and will retry once for the incomplete channel. If the retry still fails, it will be transferred to the backup channel or the verification station.
[0035] Step S103: Obtain the internal structure detection results. The control processing terminal first registers the current field-of-view image with the calibration template of that field of view, and then transforms the internal structure polygons in the calibration template into the current image. The calibration template sets 3 to 20 reference windows in each field of view. The centers of all reference windows must not be collinear. The side length of each reference window is 16 to 128 pixels. The reference windows are selected from shell corners, hole edges, weld outlines, or other structures that stably appear in normal workpieces. The current image and each reference window are matched using normalized cross-correlation. The position with the highest correlation coefficient is taken as the current reference point position. The minimum correlation coefficient for correct matching among 30 sets of normal repeated images is set to... .when When, reselect or enlarge the reference window; when At that time, the matching acceptance threshold is based on Determined. The two-dimensional affine transformation matrix is obtained using the least squares method with the template coordinates of at least three non-collinear reference points and the current coordinates. ;in, Represents the real number field. The two rows correspond to the detector plate. , The coordinates consist of three columns corresponding to the two coordinate components and constant terms of two-dimensional homogeneous coordinates. Then, using... Transform the vertices of each structural polygon to obtain the internal structural regions in the current image. .
[0036] Let the number of valid reference points be , No. The template homogeneous coordinates of the reference points are: The actual matching coordinates are The former is a three-dimensional homogeneous column vector, and the latter is a two-dimensional column vector in the probe coordinate system. The registration residual is defined as... In the formula, the summation subscript is... Traverse all One valid reference point Represents the two-dimensional Euclidean norm. This represents the registration residual obtained by summing up the values according to this formula, in pixels. Registration allowable value. Take 30 to 100 sets of normal repeated sampling data. The 99th percentile value plus 1 pixel, typically 1-8 pixels. When there are fewer than 3 valid reference points and the correlation coefficient of any key reference window is below... or If the current image is deemed invalid for registration, no conclusion is drawn that there is no abnormality in the corresponding internal structure. Instead, the image is re-acquired or enters a review process.
[0037] As a reproducible anomaly extraction method that does not rely on neural networks, it is applicable to each internal structural region. Calculate local background image and order ;in, Indicates the current pixel Centered on, with side length as The set of pixel coordinates contained in the square window. Let be the coordinates of any pixel within this set. This indicates taking the median. Choose an odd number between 9 and 51, preferably 3 to 7 times the maximum projected width of the smallest detectable defect; when limited by structural dimensions, ensure that the expected defect pixels occupy less than half of the window pixels. The local grayscale absolute median difference is defined as... ;in, This represents the absolute median difference of local gray levels within the current window. The standardized residual is defined as... ,in, This represents the median of the noise standard deviation for each pixel in the effective empty area. Represents pixels The standardized residual, 1.4826, is used as a robust estimate to convert the MAD under Gaussian noise conditions to standard deviation. Adjacent pixels form a connected region, and the abnormal threshold is... Choose 3 to 6; select the minimum number of false anomalies in each image of the normal sample from the calibration samples that ensures all known defects can be detected. If there are no conditions that simultaneously satisfy both conditions within this range. If the current ray conditions and window parameters are not enabled, the ray working conditions, window size, or minimum defect requirements will be readjusted before calibration.
[0038] The pixel area of a connected region is denoted as The minimum abnormal area is calculated by converting the minimum detectable defect physical area specified in the product specification, using... In the formula, The minimum detectable physical area of a defect as specified in the product specification. This is the number of pixels in the smallest connected region after conversion and rounding up. Indicates rounding up. Indicates the field of view The equivalent area of a single pixel on the target structure plane, expressed in mm² / pixel. When the target structure plane is approximately parallel to the detector plate, it can be taken as... Geometric magnification ,in, The distance from the X-ray source to the detector plate. This is the distance from the X-ray source to the plane of the target structure. When the plane of the target structure is significantly tilted, Obtained through homography transformation or local area Jacobian calibration of the field of view calibration plane, without directly applying the square magnification relationship. When the product specification provides the diameter or equivalent diameter of a circular defect. At that time, take For non-circular defects, the actual minimum defect area specified in the product specification shall be adopted. It should not be less than the minimum detectable area of the system verified by comparative test blocks under the current radiation and geometric conditions. Not less than Furthermore, connected areas not exceeding 50% of the internal structural area are recorded as suspected abnormal areas; when the area exceeds 50%, it is preferentially judged as an exposure, occlusion, or registration abnormality and re-acquired.
[0039] For each internal structural region, the control processing terminal establishes a detection state according to the following mutually exclusive conditions. If no region has an area not less than... If a suspected anomalous region is identified, and the current image registration is effective, and the contrast-to-noise ratio and saturation ratio meet the requirements of the field of view, then the status is "no anomaly". If a suspected anomalous region exists, and this region is entirely located within an internal structure polygon... Inside, to the extreme The minimum distance between the boundary and the effective imaging area boundary of the detector plate is not less than the boundary safety distance. If the region does not intersect with the projected polygons of other defined internal structures, and no other valid field of view provides a contrary result for the same internal structure, then the status is a definite anomaly. Other suspected anomalies are classified as pending anomalies, including suspected anomalies that cross two structural polygons, are less than [a certain distance] from the structural boundary or imaging boundary. The current field of view may be affected by fixed unusable pixels, or there may be conflicting results due to the same internal structure.
[0040] Conflicting results with the same internal structure are determined directly by the result code. (Regarding internal structure...) The result code for any valid field of view Where 0 represents no anomaly, 1 represents a clear anomaly, and 2 represents an anomaly to be assigned or invalid; when there are two conditions satisfying And all of them satisfy the image validity conditions of the field of view , ,in, and This indicates two different detection field of view numbers, used as field of view subscripts. Similar to the aforementioned outlier threshold without subscript They are independent of each other, and At that time, the Boer conflict symbol .when If a majority vote is not used, the coverage status of all relevant fields of view is initially set to pending confirmation and enters the anomaly attribution verification process; only after the field of view is located, a replacement field of view is provided, or the conflict is manually verified and eliminated, can the result be determined. .
[0041] Effective imaging area of the detector plate It is obtained by sequentially subtracting the fixed unusable pixel mask, the unstable edge band, and the occlusion area of the current field of view from the full-size rectangular area. The width of the unstable edge band... Determined through open-field images: The average gray level is calculated column-by-column or row-by-row from the four sides of the detector plate inwards. When the average gray level of five consecutive columns or rows is between 90% and 110% of the average gray level of the central region of the entire plate, and the standard deviation is no higher than 1.5 times the standard deviation of the central region, this location is considered the inner boundary of the unstable edge zone. Because... Width has been deducted The edge of the unstable zone, the boundary safety distance is no longer repeatedly accumulated. , and according to Calculate; where, For registration allowable values, This is the projection repetition error. For additional pixel margin, This indicates rounding up to the nearest integer. Choose 1 to 3 pixels, preferably 2 pixels; Typically, the value is 4–20 pixels; for devices with high repeatability positioning errors, a larger value can be used based on the calibration results. The distance from the suspected abnormal area to the boundary is calculated using the total number of pixels in that area to... Boundary or The minimum Euclidean distance to the boundary is calculated, and the distance is less than... This means it is considered close to the boundary.
[0042] When the specified internal structure is free of abnormalities, the control processing terminal can generate an OK candidate result; when an abnormality is clearly located in the effective imaging area, an NG candidate result can be generated. The candidate result is not the PLC's final material feeding permission. As long as an abnormality to be assigned exists, the control processing terminal stops outputting material feeding permission to the PLC, ensuring that the conveyor keeps the workpiece under inspection at the inspection station or controlled buffer position, preventing the workpiece from leaving the inspection chain before the source of the abnormality is determined.
[0043] Step S104: Switch the standard field-of-view acquisition process to the anomaly attribution verification process. After an anomaly to be attributed is formed, the control processing terminal records the internal structure, original detection field of view, and original imaging area corresponding to the anomaly to be attributed, and establishes verification displacement, optional positioning field of view, and optional alternative field of view according to the field of view coverage relationship in the detection scheme. The coverage status corresponding to the original detection field of view is adjusted from covered or processing to pending confirmation, indicating that the field of view image cannot be used as final valid evidence without verification.
[0044] The control relationships can be pre-configured in the detection scheme or generated during mission execution based on the current reachable position of the device. During pre-configuration, at least one verification position, at least one positioning field of view capable of changing the penetration direction, and at least one alternative field of view avoiding different detector plate areas can be saved for each internal structure. If the device cannot simultaneously pre-configure all of the above fields of view due to structural or travel limitations, branches that cannot be automatically completed should be set to a verification transfer state. During runtime generation, the control processing terminal selects a position from the reachable positions of the moving end that causes the projection of the target's internal structure to leave the original imaging area while still remaining within the effective imaging range. Both methods are based on the physical position that the device can execute and do not require setting up complex optimization models.
[0045] The control relationships used in the exception attribution process are implemented using a mapping record table. Each mapping record contains at least an internal structure identifier. Original detection field of view Original imaging region coordinates, allowed verification motion axes and their candidate displacements, and candidate positioning field of view set. Candidate alternative field of view set Affected area identifier and failed transfer status. Pre-configured... By satisfying And the direction of penetration is different from the original field of view. Composition, in which, Index for candidate fields of view; By satisfying Furthermore, the structural projection can fall into the field of view of another detection plate area; during runtime generation, the control processing terminal still filters according to the following displacement matrix, angle, boundary distance and region intersection conditions, without using undefined rules that only contain relevance or priority.
[0046] Step S105: Perform displacement verification and determine anomaly attribution. In the original detection field of view, select a structural boundary adjacent to the anomaly to be assigned and fixed to the workpiece under inspection as the workpiece reference. The workpiece reference can be a shell edge, layered structure boundary, hole edge, weld point outline, or other structures that maintain a fixed geometric relationship with the workpiece. The purpose of selecting the workpiece reference is to determine, in the detector plate coordinates, whether the anomaly to be assigned moves together with the workpiece structure.
[0047] Control processing terminal utilizes field of view Corresponding local motion-projection displacement matrix Determine the verification displacement. The local sensitivity matrix is the one that maps the device motion increment to the two-dimensional projected displacement of the detector plate. Its rows correspond to... , Direction, column corresponds to motion state The components of each motion axis in the process. During equipment calibration, the following were obtained: For each available translation axis, forward and reverse calibration steps of 5mm to 20mm were performed; for each available rotation axis, forward and reverse calibration angles of 1° to 5° were performed; before and after calibration, images were acquired, and the displacement of the workpiece reference centroid in the detector plate coordinate system was measured; , The directional displacement is divided by the calibration step size of the corresponding axis, as... The two coefficients of the axis are repeated three times each in the positive and negative directions and the average is taken. The translation axis column unit is pixels / mm, and the rotation axis column unit is pixels / degree; therefore, the corresponding components in the candidate motion increment are input in mm and degrees, respectively. During task execution, Indicates the state of motion Candidate motion increment vectors of the same dimension, with translational components in mm and rotational components in degrees, and arranged according to... Calculate the predicted projected displacement; where, For the reason , A two-dimensional column vector consisting of directional predicted displacements. Only in the field of view Within the nearby calibration neighborhood, it is used as a local linear model; motions exceeding a single calibration step size are performed using pre-calibrated segmentation. Matrix or piecewise interpolation is used, but not extrapolation of a local matrix to the entire mechanical stroke.
[0048] The half-diagonal of the circumscribed rectangle of the suspected abnormal region is denoted as Comprehensive position error ,in, To account for the overall positional error, For registration allowable values, For projection repetition error, constant 1 represents the discrete rounding margin of one pixel; and The units are all pixels; the target separation distance is defined as... ,in, To minimize the separation margin, a resolution of 20 pixels is used. The control processing terminal selects candidates within the safe travel range. Select to satisfy The transformed target structure projection and anomaly search area to The distances to the boundaries are all not less than And it must not trigger the mechanical limit. A single local linear step size is typically 1mm to 20mm for translation or 0.5° to 5° for rotation; when a larger total displacement is required, calibrated segmented motion is used, with cumulative translation up to 100mm or cumulative rotation up to 20°, but this must not exceed the equipment's stroke. If multiple values exist, the one with the smallest normalized sum of motion values is selected. The normalized sum is the sum of the absolute values of each translation value divided by the effective stroke of the corresponding axis, and the absolute values of each rotation value divided by the effective angle range of the corresponding axis.
[0049] After verifying the displacement is in place, re-match the same workpiece reference and the suspected abnormal area. The centroid of the workpiece reference in the original and verification images is denoted as follows: , The centroids of the suspected abnormal regions are respectively denoted as , In this context, subscripts 0 and 1 represent the original image and the verification image, respectively, and the subscript letters represent the original and verification images. and These represent the workpiece reference and the suspected abnormal area, respectively. The actual displacement vector of the workpiece reference... Abnormal actual displacement vector Only when Only when the current verification displacement is valid can it be used to determine the attribution; otherwise, the separation is considered insufficient, and a larger candidate displacement is selected.
[0050] when When this occurs, it indicates that the suspected anomaly moves along with the workpiece reference, and the control processing terminal assigns the anomaly to the workpiece; when and When the suspected anomaly is located at a point where the coordinates relative to the detector plate are essentially fixed while the workpiece reference has moved, the control processing terminal will attribute the anomaly to the imaging end. If the suspected anomaly region in the verification image splits or merges, the centroid is calculated using the residual weighted centroid of all anomaly pixels. The weights are the residuals of each pixel. If the corresponding region is not detected in the verification image, then in the following ways: Centered on, with radius The search area and Centered on, with radius Within the search area, the anomaly threshold will be lowered once. If a match is performed but no match is found, no attribution conclusion is drawn.
[0051] After the anomaly is attributed to the imaging end, the suspected anomaly area in the original image is expanded outward according to the comprehensive positional error to form the affected area. That is, to set the radius of suspected abnormal areas. Pixel shape expansion; Typically 4 to 20 pixels. The coordinates remain fixed within the current detector plate coordinates and are bound to the detector plate channel identifier. In any subsequent image or field of view, as long as the projected polygon of the internal structure is specified... and If a non-empty intersection exists, the image or field of view is considered to have passed through the affected area and cannot maintain effective coverage of the corresponding internal structure on its own. This processing is incorrect. Interpolation replacement is performed on the inner pixels to avoid eliminating real small defects along with the bad pixel correction.
[0052] If neither of the above two attribution conditions is met, the current result is recorded as "cannot be attributed". The control processing terminal restores the position before verification and performs a second verification. The angle between the second predicted displacement direction and the first predicted displacement direction is 60° to 120°, and the target separation distance is still not less than [value missing]. If the equipment lacks a motion axis that meets the angle requirements, it switches to a backup imaging channel with a different penetration direction. Each suspected abnormality is automatically verified a maximum of two times. If either verification meets the conditions for attribution to the workpiece or imaging end, subsequent verification stops. If both verifications fail to assign the abnormality, the motion fails to reach the correct position, the reference registration is invalid, or the workpiece slips during clamping, the task status is set to manual review, and release is still prohibited. Clamping slippage can be determined based on the change in the relative distance between two or more mutually separated workpiece references; the change in the relative distance exceeds... When this occurs, it is determined that clamping slippage has occurred.
[0053] Step S106: Reconstruct the subsequent field of view based on anomaly attribution. When the anomaly to be assigned belongs to the workpiece, the detection path control unit selects a target positioning field of view from the available positioning fields of view. The target positioning field of view should ensure that the ray penetration direction of the part corresponding to the anomaly is different from the original detection field of view, and that the projection of the part avoids the structure or imaging boundary that originally overlapped with it. The control processing terminal controls the motion end and imaging end to reach the target positioning field of view and acquires positioning images to confirm whether the suspected anomaly is still consistent with the corresponding part of the workpiece.
[0054] The positioning field of view is filtered based on computable conditions. Candidate fields of view are then selected. The angle of change of the penetration direction is according to Calculate; where the superscript is... This represents the transpose of a vector. Represents the dot product of two unit vectors; and All are unit vectors. This means restricting the dot product to... Inside, Expressed in degrees to eliminate ambiguity caused by inverse cosine radians and floating-point out-of-bounds errors. Projected overlap ratio between the target structure and the marked overlapping structure. ,in, The union of the projected polygons of adjacent interfering structures recorded during calibration; the target structure is projected onto... The minimum distance to the boundary is denoted as Candidate fields of view are only available in [location missing]. , , and Enter the positioning field of view set at that time. The angle can be 5° to 30°, with 10° being preferred; Use values from 0 to 0.20. and By gradually changing the imaging angle of the test block, the minimum angle and maximum allowable overlap ratio that allow the known overlapping structures to be separated while the target defect remains visible are selected. When multiple candidate fields of view exist, they are selected sequentially. Minimum The maximum and minimum normalized sum of the current position's field of view is selected; if no candidate field of view is found, the process proceeds to the verification imaging station. The localization image detects objects within the target structure that satisfy the following conditions: When an anomaly is detected and the specific anomaly conditions are met, an NG (Not Found) basis is formed; when no anomaly is detected and the image is valid, the internal structure state is updated with the localization image.
[0055] When an anomaly to be assigned belongs to the imaging end, the detection path control unit marks the original imaging area as the affected area and queries the images of each field of view already acquired in the current task. If the projection of a specified internal structure in an image passes through the affected area, that image cannot maintain the covered state of that internal structure independently. The control processing terminal invalidates the corresponding image or restores its covered state to pending coverage, and deletes the field of view from the standard field of view that still causes the projection of the relevant internal structure to pass through the affected area.
[0056] For each acquired image, the detection path control unit reads the detector plate channel to which the image belongs and the projected polygons of each structure. ; channel and Inconsistency is not subject to this Impact, consistent channels and At that time, the image is... The valid flag is set to zero. If the same image covers multiple internal structures simultaneously, only those structures that are valid with the image will be included. Intersecting structural evidence is invalidated, but valid evidence of non-intersecting structures is not deleted. For fields of view that have not yet been executed, the same intersection criterion is applied; all... and If two fields of view intersect and there is no other unaffected projection area within the same field of view that can be replaced, remove that field of view from the current task queue.
[0057] Target substitution field of view from candidate set Mid-screening. Candidate field of view. The following conditions must be met simultaneously: ; motion state Reachable within the current safe travel range; ; ,in, This represents the union of all affected areas in the detector channel; the X-ray operating conditions meet the CNR and saturation ratio requirements. If no field of view meets the conditions in the same imaging channel, the backup imaging channel is checked; the backup channel uses its independent... Unusable pixel masks and affected areas; original channels not used. If no candidates are found, the current structural state is set to pending review and the review imaging station is invoked.
[0058] When multiple executable alternative fields of view exist, first calculate the number of current internal structures to be covered that each candidate field of view can cover. Then calculate the dimensionless path cost. In the formula, the two summations traverse the set of translation axes respectively. and rotation axis set , Represents the absolute value of the motion increment. and These are the translation axis index and the rotation axis index, respectively. and From the current position to the candidate field of view Motion increment on the corresponding axis This is the effective stroke of the translation axis. This refers to the effective angle range of the rotation axis. When the path passes through a restricted area or requires the movement of an axis not yet configured, the candidate field of view is marked as unavailable. The control processing terminal prioritizes this. The largest field of view, Choose when they are the same Minimum field of view. Beam output is only allowed if the feedback deviation from the motion end does not exceed the positioning tolerance; if positioning fails, the candidate is deleted and reordered; if all candidates fail, the process proceeds to the verification station.
[0059] Step S107: Verify the effective coverage status of the internal structures. When the detection task is established, the detection path control unit establishes the coverage status for each internal structure specified in the detection plan. Internal structures for which no valid image has been obtained are in a pending coverage state; only after a valid standard field-of-view image, positioning image, or alternative field-of-view image has been detected, the corresponding internal structure is updated to a covered state. When an image is marked as invalid, the internal structures supported solely by that image are restored to a pending coverage state.
[0060] When determining the validity of an image, the following checks are performed in sequence: whether the image belongs to the current workpiece and the current inspection task; whether the corresponding motion position is in place; whether the internal structure to be inspected is within the effective imaging area of the current field of view; whether the projection of the internal structure avoids the marked affected area; and whether there are still unresolved result conflicts between the image and other effective fields of view. The results of the above checks are used to determine the coverage status and are not replaced by a single score or weighted value.
[0061] For structure In the field of view The evidence in the middle sets a Boolean valid flag. Only if all of the following conditions are true. Image task number and workpiece identifier are consistent with the current task; motion feedback deviation does not exceed the positioning tolerance; registration residual No more than ; lie in The area ratio inside is not less than ; There is no overlap with the affected area in the same channel; the CNR is not lower than the threshold specified in the corresponding detection scheme and the saturation ratio is not higher than the corresponding upper limit; the result code is not 2 and there is a conflict flag. If any condition is not met Internal structure The number of valid pieces of evidence is defined as In the formula, the summation subscript is... Traversal allows covering structures The entire field of view, This represents the logical AND operation. Wherein, To allow overlay structure The set of fields of view It is an indicator function; only if hour, Only then can effective coverage be achieved.
[0062] Coverage status follows a defined state transition relationship. When a task is established, all structures are in the "To be Covered" state; when images have been acquired but validity checks have not yet been completed, they are in the "Processing" state; when an anomaly or conflict occurs, the status changes from "Processing" or "Covered" to "Pending Confirmation"; when the structure is assigned to the imaging end and the affected evidence is withdrawn, the status changes from "Covered" back to "To be Covered"; when the number of valid evidence reaches the minimum number of valid evidence and there are no conflicts, the status changes to "Covered"; when automatic verification attempts are exhausted or there are no executable positioning fields or alternative fields of view, the status changes to "Pending Review". The "Pending Review" status is lifted by valid images or manual confirmation results from the review station. During final result aggregation, if any covered structure has a confirmation anomaly, "NG" is output; only when all specified structures are covered and there are no confirmation anomalies is "OK" output; when there are "To be Covered", "Pending Confirmation", or "Pending Review" statuses, only the "Review" status is output, not "OK" for release.
[0063] If the positioning image and the verification image still conflict, the control processing terminal selects a verification displacement in a different direction again. Re-verification can be performed by the same motion end, or by a backup imaging channel or a verification imaging station. If the conflict is not resolved, the current internal structure remains in a state of pending coverage or verification; the PLC does not accept material feeding permission, and the conveyor keeps the workpiece to be inspected in place or sends the workpiece to be inspected to the verification station.
[0064] When a clear anomaly is confirmed by the located image, the control processing terminal generates an NG (Not Given) judgment result and outputs isolation control information to the PLC. After all affected fields of view belonging to the imaging end have been effectively replaced, the detection path control unit checks the coverage status of all specified internal structures; only when all are covered can an OK or NG judgment result be generated based on the detection results of each internal structure. As long as there are still uncovered states, even if a preset number of images or motion actions have been completed, an OK release permission will not be generated.
[0065] Step S108: Output the results and complete the production line closed loop. The control processing terminal sends the final judgment result, workpiece identification, effective field of view status, and task completion status to the PLC and MES. After receiving the OK judgment result and release permission, the PLC controls the workpiece conveyor to send the workpiece to be inspected into the qualified product path; after receiving the NG judgment result, it controls the diversion execution end to send the workpiece to be inspected into the isolation path; after receiving the review judgment result, it controls the workpiece to be inspected to remain in the controlled position or enter the review station. The MES saves the workpiece identification, inspection results, and task status for production traceability.
[0066] During data storage, standard field-of-view images, verification images, positioning images, alternative field-of-view images, the valid or invalid status of each image, anomaly attribution results, and the corresponding task status of the PLC and MES can be saved. The saved content explains why the current workpiece was released, isolated, or reviewed. The underlying communication protocol, message fields, and specific timing can be selected according to the equipment control system, as long as the correspondence between workpieces, inspection tasks, images, and production line actions can be maintained.
[0067] The task message between the control processing terminal and the PLC must include at least the task sequence number, workpiece identifier, workpiece in-position status, clamping status, current field of view identifier, motion in-position status, ray permission status, coverage completion status, final result code, and message sequence number. The result message between the control processing terminal and the MES must include at least the task sequence number, workpiece identifier, start time, completion time, result codes for each internal structure, field of view identifier used, anomaly attribution result, and OK, NG, or review result. The PLC will only perform routing upon receiving a message that matches the current workpiece identifier and current task sequence number, has a true coverage completion status, and a final result code of OK or NG. If the message sequence number is duplicated, jumps, or fails verification, the original control state will be maintained and a retransmission will be requested.
[0068] Imaging data is recorded using the task number, workpiece identifier, field of view identifier, and acquisition number as a joint key. Motion feedback, ray conditions, image files, and detection results are all written to the same joint key record. After image processing, the anomaly attribution control unit outputs the internal structure identifier, original field of view identifier, and original anomaly region coordinates. , , The system generates an attribution code; the path detection control unit outputs the deleted field-of-view list, the added field-of-view list, and the coverage status of each structure based on this; the release control unit only reads the final structure status and result code, without directly modifying the image judgment. This forms a unidirectional data flow from data acquisition, attribution results, path reconstruction to PLC processing, and prevents data from different workpieces from being used interchangeably through task sequence numbers.
[0069] As a complete illustrative implementation process, the workpiece to be inspected is a square component with a multi-layered internal structure. The inspection scheme forms multiple standard fields of view at various heights and lateral positions through two imaging channels. After reading the workpiece identification, the control processing terminal completes loading and clamping, and acquires images in each standard field of view. If a suspected dark spot appears near the boundary of the layered structure in one field of view, and another field of view does not produce consistent results for the same internal structure, then this dark spot is marked as an anomaly to be assigned, and the PLC loading permission is stopped.
[0070] The control processing terminal selects the boundary of the layered structure adjacent to the dark spot as the workpiece reference and controls the moving end to perform a verification displacement laterally, moving the projection of the structure from the original imaging area in the middle of the detector plate to another imaging area. If the dark spot in the verification image moves along with the boundary of the layered structure, the anomaly is attributed to the workpiece. The control processing terminal then calls the obliquely penetrating positioning field of view to separate the corresponding part of the dark spot from the original overlapping structure. After the positioning image confirms the anomaly, an NG result is generated and isolation is controlled; if the positioning image eliminates the anomaly, the corresponding internal structure state is updated according to the valid image.
[0071] If the boundary of the layered structure in the verification image moves while the dark spot remains in the original imaging area, the anomaly is attributed to the imaging end. The detection path control unit removes the images that passed through that area in the current task, restores the internal structures supported by these images to be covered, and deletes the field of view that still passes through that area from the remaining field of view. Subsequently, it calls an alternative field of view that projects the same internal structure to another effective area of the detector plate, or switches to a backup imaging channel. Only after all the specified internal structures have regained effective coverage does the control processing terminal form the final judgment result.
[0072] The illustrated process described above does not require the equipment to have two imaging channels. A single-channel device can form a verification imaging area and an alternative field of view by moving the workpiece, the X-ray source, the detector plate, or the imaging assembly. In scenarios where the workpiece is not suitable for movement, the workpiece can be kept fixed, allowing the X-ray source and detector plate to move or rotate synchronously. In scenarios where the imaging assembly is not suitable for movement, verification displacement can be performed using the workpiece's translation or rotation axis. This invention can be implemented as long as the projection of the corresponding internal structure can be moved away from the original imaging area, and the attribution can be determined based on the movement relationship between the anomaly and the two types of references.
[0073] As an alternative, the verification displacement can consist of two consecutive short displacements. The first displacement is used to determine if the suspected anomaly has begun to move with the workpiece reference; the second displacement, in a different direction, is used to rule out insufficient separation caused by the movement direction being approximately parallel to the structural boundary. The results of the two displacements are used together to determine the attribution. This method is suitable for situations where the equipment stroke is limited or the workpiece to be inspected is large.
[0074] Before the equipment is put into use, the field of view coverage relationship can be established by calibrating the workpiece. The calibrated workpiece is placed sequentially at each executable imaging position, and the projection area of the specified internal structure on the detector plate is recorded. The correspondence between the standard field of view, the positioning field of view, the alternative field of view, and the internal structure is established. Then, the usable field of view is selected based on the effective imaging range of the detector plate and the safe travel of the moving end. The calibration results can be saved in the inspection plan according to the workpiece model and recalibrated after equipment maintenance, detector plate replacement, or adjustment of the clamping reference.
[0075] When establishing the field of view coverage relationship, first fix the calibration workpiece with identifiable structural boundaries at the clamping reference position, acquire correction images at each reachable imaging position and complete template registration; for each specified internal structure, manually or according to the two-dimensional projection drawing of the workpiece, give a closed polygon. Record its area, to Boundary distance and overlapping area with adjacent structure projections Subsequently, the aforementioned forward and reverse calibration step sizes were performed on each axis of the moving end to form... and Finally, a comparison test block was used for verification. , , and Only fields of view that simultaneously meet the requirements for known defect detection, the number of false anomalies in normal areas, the reachability of the motion position, and the effectiveness of the X-ray safety interlock are included in the detection plan. After changing the fixture, X-ray source, detector plate, motion axis zero point, or the template version in the software, the calibration process must be repeated.
[0076] As a numerical example to illustrate the calculation relationship, assume the detector plate has a resolution of 1536×1536 pixels. The distance from the X-ray source to the detector plate is 750 mm, and the distance from the X-ray source to the target structure plane is 600 mm. If the exemplary product specification stipulates a minimum detectable defect area of 0.25 mm², and the target structure plane is approximately parallel to the detection plate, then , Assuming a certain field of view uses 100kV, 0.40mA, 400ms, and 4 frames superimposed, then , Assuming the calibration yields a CNR of 10.5 and a saturation ratio of 0.4%, the imaging conditions of this embodiment are met. Assuming 30 repeated positioning iterations yield... Pixels, Registration Allowed Values pixels, then ;Edge instability zone It is 6 pixels and has been removed from Deduct from, take pixels, then .
[0077] The bounding rectangle of a suspected dark spot in this field of view has a size of 12×10 pixels. , The motion-projection displacement matrix calibration yielded a lateral translation sensitivity of 6.2 pixels / mm. The control processing terminal was selected with a lateral translation of 6.5mm, and the predicted displacement was... greater than Verify the reference displacement of the workpiece in the image. Dark spot displacement , Therefore, the anomaly is attributed to the workpiece; if ,but Furthermore, the workpiece reference has already undergone effective displacement, and the anomaly is attributed to the imaging end.
[0078] In the aforementioned branches belonging to the workpiece, the angle between the penetration directions of the original field of view and the candidate positioning field of view is 15°, the projection overlap ratio of the target structure and the interference structure decreases from 0.43 to 0.08, and the minimum distance from the target structure to the boundary of the effective imaging area is 35 pixels, respectively satisfying the following conditions: , and The pixel conditions are used to determine the candidate positioning field of view. The processing used in this numerical example only includes image correction, template matching, connected component extraction, displacement calculation, set intersection, and PLC status determination, which can be implemented by conventional image processing programs and motion control interfaces on industrial computers.
[0079] The production line collaborative control unit in the online X-ray defect inspection system receives the PLC's loading status and workpiece identification, establishes an inspection task, and maintains a prohibition on release until the coverage state is completed. The imaging control unit receives the standard field of view, verification field of view, positioning field of view, or alternative field of view target, and controls the moving end, X-ray source, and detector plate to complete imaging. The anomaly attribution control unit receives the internal structure inspection results and displacement status, and based on the displacement relationship of the suspected anomaly relative to the workpiece reference and detector plate coordinates, determines whether it belongs to the workpiece, the imaging end, or cannot be attributed.
[0080] The detection path control unit stores the coverage relationship between the internal structure and each detection field of view and probe area. When an anomaly is attributed to a workpiece, its output is the positioning field of view to be executed; when an anomaly is attributed to the imaging end, its output includes the affected image, the subsequent field of view to be deleted, and the target replacement field of view. The release control unit reads the coverage status of each internal structure and the final detection result. Only after all specified internal structures have achieved effective coverage will it output release, isolation, or verification control information to the production line collaborative control unit. The above units form a call chain through explicit status inputs and control outputs, rather than simply acting as independent functional modules.
[0081] Each control unit can be centrally deployed at the control processing terminal, or it can be distributed according to the production line structure. For example, the imaging control unit can be located at the edge processing terminal connected to the motion end, the production line collaborative control unit can be set up in conjunction with the PLC, and the detection path control unit and the anomaly attribution control unit can be located in the industrial computer; the MES receives the task status and judgment results through the communication interface, and does not undertake anomaly attribution or detection path control. Regardless of the deployment method, the anomaly attribution result is used to change subsequent imaging actions, and the coverage status is used to constrain the PLC to release the operation.
[0082] The production line collaborative control unit internally includes a task binding subunit, a PLC handshake subunit, and a task status subunit. The task binding subunit generates a task sequence number based on the workpiece identifier and calls the inspection plan; the PLC handshake subunit reads the status of automatic operation, loading completion, clamping, and unloading requests, and outputs commands such as X-ray acquisition permission, unloading prohibition, release, isolation, or verification; the task status subunit saves the preparation, standard acquisition, anomaly verification, path reconstruction, coverage verification, and completion statuses. Its output of the current task sequence number and field of view target is sent to the imaging control unit.
[0083] The imaging control unit internally includes a field-of-view resolution subunit, a motion execution subunit, a ray acquisition subunit, and an image association subunit. The field-of-view resolution subunit reads data from the field-of-view record. and The motion execution subunit sends the position to the motion controller and verifies the positioning tolerance; the X-ray acquisition subunit controls beam output, exposure, and frame overlay when the safety interlock and positioning conditions are met; the image association subunit binds the image with the task number, workpiece identifier, field of view identifier, actual position, and X-ray conditions, and sends the corrected image and positioning status to the anomaly attribution control unit.
[0084] The anomaly attribution control unit includes a template registration subunit, a structural region extraction subunit, an anomaly region extraction subunit, a displacement estimation subunit, and an attribution determination subunit, which are executed sequentially. Seeking generate, And connected component calculation, and Calculation and attribution condition comparison. The detection path control unit includes a mapping storage subunit, an affected area management subunit, a candidate field of view filtering subunit, a path sorting subunit, and a coverage ledger subunit. After receiving the attribution code, it generates deleted fields of view, added fields of view, and coverage status. The release control unit includes a result aggregation subunit, an integrity interlocking subunit, and a PLC / MES interface subunit. Only when all... The final result is output in real time. Data is passed between sub-units according to the above data fields, and it is not required to train a neural network or call an unpublished black-box model.
[0085] like Figure 2 As shown, the online X-ray defect inspection equipment 100 includes an X-ray source 110, a detector plate 120, an inspection station 130, a motion end 140, a workpiece conveying end 150, a PLC 160, a MES communication interface 170, a control processing terminal 180, a diversion execution end 190, and a verification station 191. The workpiece 200 to be inspected is located at the inspection station 130 between the X-ray source 110 and the detector plate 120. The motion end 140 carries the workpiece 200 to be inspected or carries the imaging component to change the relative position between the workpiece 200 to be inspected and the X-ray source 110 and the detector plate 120.
[0086] X-ray source 110 and detector plate 120 are arranged opposite each other to form an imaging channel. When the equipment is equipped with two imaging channels, the two sets of X-ray sources 110 and detector plates 120 can be located in different directions and connected to the control processing terminal 180 through independent data connections. The workpiece conveying end 150 is connected to the inspection station 130 and is used to send the workpiece 200 to be inspected into and out of the inspection station 130. The diversion execution end 190 is located downstream of the workpiece conveying end 150 and is used to send the workpiece to the qualified path, isolation path, or verification station 191 according to the control of PLC 160.
[0087] The control processing terminal 180 is connected to the X-ray source 110, the detector plate 120, the motion unit 140, the PLC 160, and the MES communication interface 170. When a suspected anomaly or conflicting result is detected, the control processing terminal 180 stops the material feeding permission and controls the motion unit 140 to drive the workpiece 200 under inspection, the X-ray source 110, or the detector plate 120 to perform verification displacement. After the anomaly is attributed, the control processing terminal 180 controls the imaging action of the positioning field of view or the alternative field of view, and takes the effective coverage status as a prerequisite for outputting the final control information.
[0088] The PLC 160 is connected to the workpiece conveyor 150 and the diversion execution terminal 190. After the specified internal structure is effectively covered, the control processing terminal 180 outputs the final judgment result and corresponding control status to the PLC 160; the PLC 160 then controls the workpiece 200 to be inspected to be released, isolated, or enter the verification station 191. The MES communication interface 170 is used to transmit workpiece identification, inspection task status, and judgment result between the control processing terminal 180 and the MES.
[0089] The feasible range and acquisition methods of the parameters in this embodiment are summarized as follows: Physical pixel spacing of the detector plate The aperture range is 50μm to 400μm, obtained from nominal parameters or size calibration corrected for magnification; tube voltage is 40kV to 225kV, tube current is 0.05mA to 3mA, single-frame exposure time is 20ms to 2000ms, and the number of stacked frames is 1 to 16, selected jointly by CNR, saturation ratio, total tube current-time product, and equipment ratings; template matching threshold. The abnormal threshold is 0.75 to 0.95. The registration allowable values are 3 to 6. Typically 1–8 pixels, boundary safety distance Typically, the value is 4–20 pixels, determined by statistical results from no fewer than 30 sets of calibration images; the verification single-step translation is typically 1 mm–20 mm, and the single-step rotation angle is 0.5°–5°. Larger total displacements are achieved through segmented calibration mapping and are constrained by mechanical safety travel. The threshold for changes in the positioning field of view is also specified. The overlap ratio threshold is 5° to 30°. The value is 0 to 0.20, determined by the structural separation effect of the comparison test block. For extra-large or high-density workpieces that exceed the above commonly used range, the parameters are recalculated according to the same calibration procedure, rather than arbitrarily changing the judgment criteria in the online task.
Claims
1. A multi-terminal collaborative online X-ray defect detection method, characterized in that, include: Read the identification of the workpiece to be inspected and receive the loading status of the PLC, establish the inspection task, control the moving end to change the relative position between the workpiece to be inspected and the imaging end according to the field sequence of the inspection plan, and control the imaging end, including the X-ray source and the detector plate, to acquire multi-field images and obtain the inspection results of each internal structure specified by the inspection plan. When the detection results show a suspected anomaly or conflict with results of the same internal structure, the output of the material feeding permission to the PLC is stopped. A workpiece reference that maintains a fixed geometric relationship with the corresponding internal structure is selected from the original detection field of view. The motion end is controlled to drive the workpiece to be inspected, the X-ray source, or the detector plate to perform a verification displacement, so that the projection of the workpiece reference and the corresponding internal structure is moved from the original imaging area to the verification imaging area and a verification image is acquired. According to the displacement relationship of the suspected anomaly relative to the coordinates of the workpiece reference and the detector plate, when the suspected anomaly moves together with the workpiece reference, the suspected anomaly is attributed to the workpiece. When the workpiece reference moves while the suspected anomaly remains in the original imaging area in the coordinates of the detector plate, the suspected anomaly is attributed to the imaging end. The subsequent field of view of the current detection task is reconstructed based on the anomaly attribution: when the suspected anomaly is attributed to the workpiece, the positioning field of view that changes the ray penetration direction of the corresponding part is invoked; when the suspected anomaly is attributed to the imaging end, the acquired image that intersects with the affected detection plate area is set to invalid, the field of view that makes the same internal structure project through the affected detection plate area is deleted from the subsequent field of view, and an alternative field of view that covers the same internal structure and avoids the affected detection plate area is invoked. To maintain the detection coverage status for each specified internal structure, the detection coverage status is updated only by images that match the current detection task, are in the correct motion position, have the corresponding internal structure in the effective imaging area, have not passed through the affected detector plate area, and have no unresolved result conflicts. After obtaining valid evidence as specified in the testing plan for each internal structure, an OK, NG, or verification judgment result is generated and sent to the PLC and MES to control the release, isolation, or verification of the workpiece to be inspected.
2. The multi-terminal collaborative online X-ray defect detection method according to claim 1, characterized in that, Establishing the detection task includes: After the PLC provides feedback on the automatic operation status and the material loading completion status, the control conveyor will position the workpiece to be inspected at the clamping reference position of the inspection station. The workpiece model is determined based on the workpiece identification and the corresponding inspection plan is called. The internal structure, field sequence, imaging position and X-ray working conditions specified in the inspection plan are read. Once it is confirmed that the workpiece to be inspected is held firmly, the moving end has reached the first imaging position, and the imaging end is in a data acquisition state, the inspection task is started.
3. The multi-terminal collaborative online X-ray defect detection method according to claim 2, characterized in that, Acquiring the multi-view images includes: According to the field sequence, the moving end is controlled to change the relative orientation between the workpiece to be inspected and the imaging end. After each imaging position is in place, the X-ray source is activated and the corresponding field image is acquired by the detector plate. When the imaging end includes two imaging channels, the two imaging channels are controlled to simultaneously acquire images of different fields of view of the same workpiece under inspection, or to acquire corresponding field of view images respectively, and switch to the subsequent imaging position after both imaging channels have completed the acquisition of the current imaging position.
4. The multi-terminal collaborative online X-ray defect detection method according to claim 2, characterized in that, Obtaining the internal structure detection results includes: According to the detection scheme, the internal structure region corresponding to each field of view image is determined, and the detection results of the internal structure region are divided into no abnormality, clear abnormality, and abnormality to be assigned. When all internal structures are free of abnormalities, an OK candidate result is generated. When an abnormality is clearly located in the effective imaging area, an NG candidate result is generated. When a suspected abnormality crosses the structural boundary, imaging boundary, or different fields of view and produces opposite results for the same internal structure, the abnormality to be assigned is generated, and the PLC is prevented from executing the material release.
5. The multi-terminal collaborative online X-ray defect detection method according to claim 4, characterized in that, After the anomaly to be assigned is formed, a control relationship is established between the internal structure of the anomaly to be assigned, the original detection field of view, the original imaging region, the verification displacement, the positioning field of view, and the alternative field of view. Switch the detection task from the standard field-of-view acquisition process to the anomaly attribution verification process, maintain the binding relationship between the workpiece identifier to be inspected and the detection task, stop outputting the material feeding permission to the PLC, and set the detection coverage status corresponding to the original detection field of view to pending confirmation in order to start the verification displacement.
6. The multi-terminal collaborative online X-ray defect detection method according to claim 5, characterized in that, Performing the verification displacement includes: Select a structural boundary or structural feature from the original detection field of view that is adjacent to the anomaly to be assigned and maintains a fixed geometric relationship with the workpiece to be inspected as the workpiece reference; The motion end is controlled to drive the workpiece to be inspected, the X-ray source, or the detector plate to translate or rotate, so that the projection of the workpiece reference and the corresponding internal structure is moved from the original imaging area to the verification imaging area; After the verification displacement is in place, the verification image is acquired. When the anomaly to be assigned and the workpiece reference move together to the verification imaging area, the anomaly to be assigned is assigned to the workpiece. When the workpiece reference moves while the anomaly to be assigned remains in the original imaging area in the coordinates of the detection plate, the anomaly to be assigned is assigned to the imaging end. When the anomaly to be assigned cannot be attributed to the workpiece or the imaging end, restore the position before verification and perform the verification displacement again in different directions, or switch the imaging channel to collect data again.
7. The multi-terminal collaborative online X-ray defect detection method according to claim 6, characterized in that, Reconstructing the subsequent field of view includes: When the abnormality to be assigned belongs to the workpiece, a target positioning field is selected from the candidate positioning field that can change the ray penetration direction of the corresponding part and make the projection of the part avoid the overlapping structure or imaging boundary. The moving end is controlled to make the workpiece to be inspected and the imaging end reach the relative position corresponding to the target positioning field and then the positioning image is acquired. When the anomaly to be assigned belongs to the imaging end, the detection evidence of the corresponding internal structure in the acquired image that intersects with the affected detection plate area is set to invalid. The field of view that causes the corresponding internal structure to be projected through the affected detection plate area is deleted from the subsequent field of view. A target alternative field of view or a backup imaging channel that causes the same internal structure to be projected to the unaffected imaging area is selected, and the alternative acquisition is completed according to the executable path from the current position to the target alternative field of view.
8. The multi-terminal collaborative online X-ray defect detection method according to claim 7, characterized in that, For each internal structure specified in the detection scheme, a coverage state and a minimum number of valid evidences are set. The coverage state includes at least a state to be covered and a state that is already covered. The number of valid evidences formed by valid standard field-of-view images, positioning images, or alternative field-of-view images is counted. Only when the number of valid evidences reaches the minimum number of valid evidences and there is no result conflict, the corresponding internal structure is updated to the state that is already covered. If the positioning image and the verification image still conflict, the verification displacement in different directions is performed again. If the conflict is not eliminated, the process is transferred to manual review and the prohibition on passage is maintained. When a clear anomaly is confirmed by the location image, an NG (Not From) judgment result is generated and isolation is controlled. When all affected detection evidence belonging to the imaging end is effectively replaced and the specified internal structure is in the covered state, an OK or NG judgment result is formed based on the detection results of each internal structure. When there are still states that need to be covered, confirmed, or reviewed, a review judgment result is generated, and the workpiece to be inspected is kept in place or the workpiece to be inspected is controlled to enter the review station.
9. A multi-terminal collaborative online X-ray defect detection system, characterized in that, include: The production line collaborative control unit is connected to the PLC, MES and workpiece conveyor to establish the inspection task of the workpiece to be inspected and maintain the workpiece to be inspected in a controlled state before the inspection task is completed. The imaging control unit, connected to the motion end, X-ray source and detector plate, is used to perform imaging actions for standard field of view, verification field of view, positioning field of view and alternative field of view; The anomaly attribution control unit receives the internal structure detection results and the displacement status fed back by the imaging control unit, respectively. It is used to control the verification displacement when there is a suspected anomaly or a conflict in the results, and to attribute the suspected anomaly to the workpiece or the imaging end according to the displacement relationship between the suspected anomaly and the workpiece reference and the detector plate coordinates. The detection path control unit stores the coverage relationship between the internal structure and each detection field of view and the detection plate area. It is used to call the positioning field of view according to the anomaly attribution output by the anomaly attribution control unit, or to cancel the detection evidence that intersects with the affected detection plate area and call the alternative field of view, and update the detection coverage status of the internal structure. The release control unit is connected to the detection path control unit and the production line collaborative control unit, and is used to output release, isolation or verification control information to the PLC after the specified internal structure has been effectively covered. Each of the control units is centrally located at the control processing terminal, or distributed among the control processing terminal, PLC, and edge processing terminal; the MES receives the detection task status and judgment results through a communication connection.
10. A multi-terminal collaborative online X-ray defect detection device, characterized in that, It includes an X-ray source, a detector plate disposed opposite to the X-ray source, a detection station located between the X-ray source and the detector plate, a motion end for changing the relative position of the workpiece to be inspected with respect to the X-ray source and the detector plate, a workpiece conveying end connected to the detection station, a diversion execution end connected to the workpiece conveying end, a PLC, a MES communication interface and a control processing terminal; The control processing terminal is connected to the X-ray source, the detector plate, the motion end, the PLC, and the MES communication interface, respectively. It is used to control the motion end to drive the workpiece to be inspected, the X-ray source, or the detector plate to perform verification displacement when the internal structure detection results show suspected abnormalities or result conflicts. According to the displacement relationship between the suspected abnormality in the verification image and the coordinates of the workpiece reference and the detector plate, the suspected abnormality is attributed to the workpiece or the imaging end. The imaging action of positioning the field of view or the replacement field of view and the update of the internal structure detection coverage status are controlled according to the abnormality attribution. The PLC is connected to the workpiece conveying end and the diversion execution end, and is used to control the release, isolation or entry into the verification station of the workpiece to be inspected according to the OK, NG or verification judgment result output by the control processing terminal after the specified internal structure has been effectively covered.
