Pipeline digital ray detection method, system and terminal
By analyzing the pipe's geometric parameters and the coordinates of the detection points, and adjusting the position and orientation of the X-ray source and detector, the problem of detection accuracy under irregular pipe cross-sections was solved, and high-precision digital X-ray detection was achieved.
Patent Information
- Application Number
- CN202511341770.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-19
AI Technical Summary
In existing technologies, when the pipe cross-section is irregular, the X-ray direction cannot be perpendicular to the plane of the digital detector, resulting in image distortion and affecting the accuracy of detection.
By acquiring the pipe geometry parameters, analyzing the coordinates and circumferential angles of the detection points, adjusting the initial position and ideal penetration direction vector of the X-ray source, as well as the position and orientation of the detector, we ensure vertical X-ray penetration and reception at the shortest distance. The detection parameters are iteratively optimized using a pose optimization objective function.
It improves the accuracy and image quality of pipeline inspection, ensuring high-precision digital X-ray inspection even in pipelines with irregular cross-sections.
Smart Images

Figure CN120831374B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pipeline detection, and in particular to a pipeline digital ray detection method, system and terminal. BACKGROUND
[0002] Pipeline non-destructive testing refers to a method of checking and testing a pipeline without destroying or affecting the use performance of the detected object.
[0003] In related technologies, digital ray detection is a kind of pipeline non-destructive testing. First, the pipeline detection area needs to be cleaned, and appropriate X-ray energy and detector type are selected. Then, the X-ray source and the digital detector are fixed at the two ends of the C-shaped mechanical arm, so that the X-ray source and the digital detector are fixed at the two sides of the pipeline in a relative state. Then, the X-ray source is started to emit X-rays through the pipeline detection area. The digital detector receives the X-rays after passing through the pipeline and converts them into digital signals to form an image. Then, the C-shaped mechanical arm is controlled to move on the track outside the pipeline, so as to drive the X-ray source and the digital detector to move synchronously around the pipeline to complete complete image acquisition of the pipeline detection area. Finally, the image is analyzed to identify cracks, corrosion or other types of damage.
[0004] In the related technologies described above, the X-ray source and the digital detector are fixed at the two ends of the C-shaped mechanical arm. When the cross section of the pipeline is a relatively regular circle, the direction of the X-rays can be perpendicular to the plane of the digital detector. However, if the cross section of the pipeline is irregular, such as oval, oval or local deformation, the direction of the X-rays will not be perpendicular to the plane of the digital detector, resulting in image distortion and inaccurate pipeline detection. There is still room for improvement. SUMMARY
[0005] In order to improve the accuracy of pipeline detection, the present application provides a pipeline digital ray detection method, system and terminal.
[0006] In a first aspect, the present application provides a pipeline digital ray detection method, which adopts the following technical solution:
[0007] A pipeline digital ray detection method, comprising:
[0008] Obtaining the pipeline geometric parameters of a preset pipeline;
[0009] Determining whether the pipeline geometric parameters meet the requirements of the preset regular geometric parameters;
[0010] If it is met, controlling the preset ray source to emit X-rays to the pipeline according to the synchronous detection method, and controlling the preset detector to receive the X-rays to complete the detection of the pipeline;
[0011] If not, the detection point circumferential angle of the preset detection point is acquired;
[0012] The pipe geometry parameters and the detection point circumferential angle are analyzed to determine the detection point coordinates of the detection point;
[0013] The detection point coordinates are analyzed to determine the ray source initial position and the ray ideal penetration direction vector of the preset ray source;
[0014] The ray source initial position and the ray ideal penetration direction vector are analyzed to determine the detector position and the detector posture of the preset detector;
[0015] The ray source initial position and the ray ideal penetration direction vector are analyzed to determine the detector position and the detector posture of the preset detector;
[0016] The ray source initial position and the ray ideal penetration direction vector are analyzed to determine the detector position and the detector posture of the preset detector;
[0017] By adopting the above technical solution, when the pipe geometry parameters do not meet the requirements of the regular geometry parameters, the ray source initial position and the ray ideal penetration direction vector are obtained by analyzing the detection point coordinates, and then the detector position and the detector posture are obtained by analyzing the ray source initial position and the ray ideal penetration direction vector, instead of keeping the ray source and the detector synchronous at all times, so as to ensure that the ray source can accurately emit X-rays to the detection point, ensure that the detector can receive X-rays at the shortest distance, and further improve the accuracy of pipe detection.
[0018] Optionally, the step of analyzing the detection point coordinates to determine the ray source initial position and the ray ideal penetration direction vector of the preset ray source comprises:
[0019] The detection point coordinates are analyzed to determine the ray ideal penetration direction vector of the ray source;
[0020] The ray ideal penetration direction vector and the preset ray source interval distance are analyzed to determine the ray source position adjustment vector;
[0021] The detection point coordinates and the ray source position adjustment vector are analyzed to determine the ray source initial position of the ray source.
[0022] By adopting the above technical solution, the ray source position adjustment vector is obtained by extending the ray source interval distance in the opposite direction of the ray ideal penetration direction vector, and the ray source initial position of the ray source is obtained by adjusting the detection point coordinates and the ray source position adjustment vector as adjustment parameters, thereby improving the convenience and accuracy of determining the ray source initial position.
[0023] Optionally, the step of analyzing the detection point coordinates to determine the ray ideal penetration direction vector of the ray source comprises:
[0024] analyzing the detection point coordinate and the preset implicit function gradient to determine a detection point gradient;
[0025] analyzing the detection point gradient to determine a detection point normal vector;
[0026] analyzing the detection point normal vector to determine a normal vector module length;
[0027] analyzing the detection point normal vector and the normal vector module length to determine a ray ideal penetration direction vector of the ray source.
[0028] By using the above technical solution, the detection point gradient at the detection point coordinate is calculated according to the implicit function gradient, the detection point normal vector is determined, and the ray ideal penetration direction vector is obtained after calculating the quotient of the detection point normal vector and the normal vector module length, thereby improving the convenience and accuracy of determining the ray ideal penetration direction vector.
[0029] Optionally, the step of analyzing the ray source initial position and the ray ideal penetration direction vector to determine a detector position and a detector posture of the preset detector comprises:
[0030] analyzing the ray ideal penetration direction vector and a preset pipe axis direction vector to determine the detector posture of the detector;
[0031] analyzing the ray ideal penetration direction vector and a preset detection receiving distance to determine a detection position adjustment vector;
[0032] analyzing the ray source initial position and the detection position adjustment vector to determine the detector position of the detector.
[0033] By using the above technical solution, the detection position adjustment vector is obtained by extending the detection receiving distance along the ray ideal penetration direction vector, and the detector position is obtained by adjusting the ray source initial position based on the detection position adjustment vector, thereby improving the convenience and accuracy of determining the detector position.
[0034] Optionally, the step of analyzing the ray ideal penetration direction vector and a preset pipe axis direction vector to determine the detector posture of the detector comprises:
[0035] analyzing the ray ideal penetration direction vector to determine a first axis direction vector of the detector;
[0036] analyzing the first axis direction vector and the pipe axis direction vector to determine a second axis direction vector of the detector;
[0037] analyzing the first axis direction vector and the second axis direction vector to determine a third axis direction vector;
[0038] The first axis direction vector, the second axis direction vector and the third axis direction vector are associated to generate a detector pose of the detector.
[0039] By adopting the technical solution, the reverse ray ideal penetration direction vector is determined as the first axis direction vector, the front of the detector is ensured to face the ray source, the second axis direction vector is calculated according to the pipe axis direction vector and the first axis direction vector, the first axis and the second axis are ensured to be orthogonal, and modeling is facilitated, the third axis direction vector is calculated according to the first axis direction vector and the second axis direction vector, and the convenience of determining the third axis direction vector is improved.
[0040] Optionally, after the detector receives the X-ray to complete the detection of the pipe according to the detector position and the detector pose, a pose optimization step is further included, and the specific steps include:
[0041] An image quality score of the pipe is obtained.
[0042] It is judged whether the image quality score of the pipe meets the requirement of a preset reference image quality score.
[0043] If yes, the detection point circumferential angle of the detection point is continuously obtained for cyclic detection.
[0044] If no, the initial position of the ray source, the position of the detector and the pose of the detector are analyzed to determine initial pose parameters.
[0045] A pose optimization objective function is obtained.
[0046] The initial pose parameters are iterated according to the pose optimization objective function to generate optimized pose parameters.
[0047] By adopting the technical solution, when it is determined that the image quality score of the pipe does not meet the requirement of the reference image quality score, the initial pose parameters are iterated and optimized according to the pose optimization objective function, so that the optimized pose parameters are obtained, the image quality of the pipe detection point is ensured, and the accuracy of the pipe detection is improved.
[0048] Optionally, the step of obtaining the pose optimization objective function includes:
[0049] An image quality index and a ray direction included angle are obtained.
[0050] The image quality index, a preset quality index threshold and the ray direction included angle are analyzed to determine an image quality loss function.
[0051] A detection coverage rate of the detection point and a detection grid number are obtained.
[0052] Analyze the detection coverage and the number of detection grids to determine a coverage uniformity loss function;
[0053] Obtain a ray source position change vector and a detector position change vector;
[0054] Analyze the ray source position change vector, the detector position change vector, and a preset adjustment coefficient to determine a device motion energy consumption loss function;
[0055] Analyze the image quality loss function, the coverage uniformity loss function, the device motion energy consumption loss function, and a preset loss weight coefficient to determine a pose optimization objective function.
[0056] By using the above technical solution, the image quality loss function, the coverage uniformity loss function, and the device motion energy consumption loss function are weighted and summed to obtain the pose optimization objective function, and the image quality, the coverage uniformity, and the device energy consumption are simultaneously optimized.
[0057] Optionally, the step of iteratively processing the initial pose parameter according to the pose optimization objective function to generate an optimized pose parameter includes:
[0058] Analyze the pose optimization objective function to determine a target function gradient;
[0059] Analyze the initial pose parameter, the target function gradient, and a preset learning rate to generate an iterative pose parameter and obtain a target function change amount;
[0060] Determine whether the target function change amount meets a preset convergence threshold requirement;
[0061] If not, continue to analyze the pose optimization objective function to re-determine the target function gradient;
[0062] If so, define the iterative pose parameter as the optimized pose parameter.
[0063] By using the above technical solution, when the initial pose parameter is iteratively processed according to the pose optimization objective function, the target function change amount and the convergence threshold are compared, and when the target function change amount meets the convergence threshold requirement, the iterative pose parameter is defined as the optimized pose parameter, thereby avoiding excessive iteration.
[0064] In a second aspect, the present application provides a pipeline digital ray detection system, which adopts the following technical solution:
[0065] A pipeline digital ray detection system includes:
[0066] An acquisition module is configured to acquire pipeline geometric parameters and a detection point circumferential angle;
[0067] A memory for storing a program of a pipeline digital radiographic inspection method according to any one of the preceding items;
[0068] A processor, the program in the memory being loadable and executable by the processor to implement a pipeline digital radiographic inspection method according to any one of the preceding items.
[0069] By employing the technical solution described above, the processor is loaded and executes the program of a pipeline digital radiographic inspection method stored in the memory, the acquisition module acquires a series of data related to pipeline digital radiographic inspection, so that when the geometric parameters of the pipeline do not meet the requirements of the regular geometric parameters, the initial position of the ray source and the ideal penetration direction vector of the ray are obtained after analyzing the coordinates of the detection points, and the position and posture of the detector are obtained after analyzing the initial position of the ray source and the ideal penetration direction vector of the ray, instead of keeping the ray source and the detector synchronized at all times, so as to ensure that the ray source can accurately emit X-rays to the detection points and the detector can receive X-rays at the shortest distance, thereby improving the accuracy of pipeline inspection.
[0070] In a third aspect, the present application provides an intelligent terminal, which employs the following technical solution:
[0071] An intelligent terminal, comprising a memory and a processor, the memory storing a computer program of a pipeline digital radiographic inspection method according to any one of the preceding items, which can be loaded and executed by the processor.
[0072] By employing the technical solution described above, the processor is loaded and executes the computer program of a pipeline digital radiographic inspection method stored in the memory by operating the intelligent terminal, so that when the geometric parameters of the pipeline do not meet the requirements of the regular geometric parameters, the initial position of the ray source and the ideal penetration direction vector of the ray are obtained after analyzing the coordinates of the detection points, and the position and posture of the detector are obtained after analyzing the initial position of the ray source and the ideal penetration direction vector of the ray, instead of keeping the ray source and the detector synchronized at all times, so as to ensure that the ray source can accurately emit X-rays to the detection points and the detector can receive X-rays at the shortest distance, thereby improving the accuracy of pipeline inspection.
[0073] In summary, the present application includes at least one of the following beneficial technical effects:
[0074] 1. By analyzing the coordinates of the detection points to obtain the initial position of the ray source and the ideal penetration direction vector of the ray when the geometric parameters of the pipeline do not meet the requirements of the regular geometric parameters, and then analyzing the initial position of the ray source and the ideal penetration direction vector of the ray to obtain the position and posture of the detector, instead of keeping the ray source and the detector synchronized at all times, so as to ensure that the ray source can accurately emit X-rays to the detection points and the detector can receive X-rays at the shortest distance, thereby improving the accuracy of pipeline inspection;
[0075] 2. The ray source position adjustment vector is obtained by extending the ray source interval distance in the opposite direction of the ray ideal penetration direction vector, and the ray source initial position of the ray source is obtained by adjusting the ray source position adjustment vector based on the detection point coordinates, thereby improving the convenience and accuracy of determining the ray source initial position;
[0076] 3. The optimization pose parameters are obtained by iteratively optimizing the initial pose parameters according to the pose optimization objective function when the pipe image quality score does not meet the requirement of the reference image quality score, thereby ensuring the image quality of the pipe detection point and improving the accuracy of pipe detection. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1 is a flowchart of a pipe digital ray detection method in an embodiment of the present application.
[0078] Figure 2 is a flowchart of a step of analyzing the detection point coordinates to determine the ray source initial position of the preset ray source and the ray ideal penetration direction vector in an embodiment of the present application.
[0079] Figure 3 is a flowchart of a step of analyzing the detection point coordinates to determine the ray ideal penetration direction vector of the ray source in an embodiment of the present application.
[0080] Figure 4 is a flowchart of a step of analyzing the ray source initial position and the ray ideal penetration direction vector to determine the detector position and the detector pose of the preset detector in an embodiment of the present application.
[0081] Figure 5 is a flowchart of a step of analyzing the ray ideal penetration direction vector and the preset pipe axis direction vector to determine the detector pose of the detector in an embodiment of the present application.
[0082] Figure 6 is a flowchart of a pose optimization step in an embodiment of the present application.
[0083] Figure 7 is a flowchart of a step of obtaining the pose optimization objective function in an embodiment of the present application.
[0084] Figure 8 is a flowchart of a step of iterating the initial pose parameters according to the pose optimization objective function to generate the optimization pose parameters in an embodiment of the present application. DETAILED DESCRIPTION
[0085] In order to make the purpose, technical scheme and advantages of the present application more clear, the following will be combined with the accompanying drawings to further describe the present application in detail. Figures 1 to 8The application is further described in detail with reference to the embodiments. It should be understood that the specific embodiments described herein are merely intended to explain the application and are not intended to limit the application.
[0086] The pipe digital ray detection method disclosed by the embodiments of the application specifically discloses a processing terminal, a ray source and a detector. The processing terminal is in communication connection with the ray source and the detector to realize data interaction. After the pipe geometric parameters are received by the processing terminal, the processing terminal compares the pipe geometric parameters with the regular geometric parameters. When it is determined that the two are inconsistent, the processing terminal determines the detection point coordinates of the detection point according to the detection point circumferential angle and the pipe geometric parameters, analyzes the detection point coordinates, determines the initial position of the ray source and the ideal penetration direction vector of the ray, controls the ray source to move to the initial position of the ray source, and emits X rays to the pipe in the ideal penetration direction vector of the ray. After the initial position of the ray source and the ideal penetration direction vector of the ray are analyzed, the position and the posture of the detector are determined, the detector is controlled to move to the position of the detector, and X rays are received in the posture of the detector. Thus, the detection of the pipe is completed. Instead of controlling the ray source and the detector to keep synchronization at all times, the accuracy of the pipe detection is improved.
[0087] With reference to Figure 1 The pipe digital ray detection method disclosed by the embodiments of the application comprises the following steps.
[0088] Step S100: Obtain the pipe geometric parameters of a preset pipe.
[0089] The pipe refers to a pipe to be detected, and the specific type is determined by an operator according to the actual situation. The pipe geometric parameters refer to parameters for determining whether the pipe cross section is a regular circle, including the inner diameter, the outer diameter, the wall thickness, the ovality, the roundness error, the cross section circumference and the cross section area, etc. In an embodiment, the inner and outer diameters can be non-contact measured by a laser range finder or an optical scanner; in another embodiment, the roundness error can be detected by a three-dimensional CT scanner or a coordinate measuring machine; and in another embodiment, the shape of the cross section can be analyzed after the cross section is photographed by an industrial camera.
[0090] Step S101: Determine whether the pipe geometric parameters meet the requirements of the preset regular geometric parameters.
[0091] The regular geometric parameters refer to parameters when the pipe cross section is a regular circle, for example, the ovality is less than one percent, the roundness error is within plus or minus 1 mm, and the measured cross section area and circumference can be approximately calculated by the area and circumference formulas of the circle. The requirement of the regular geometric parameters refers to consistency with the regular geometric parameters.
[0092] The processing terminal judges whether the pipe geometric parameter is consistent with the regular geometric parameter, so as to determine whether the cross section of the pipe is a regular circle.
[0093] Step S1011: If consistent, the preset ray source is controlled to emit X-rays to the pipe according to the synchronous detection method, and the preset detector is controlled to receive X-rays to complete the detection of the pipe.
[0094] If the processing terminal determines that the pipe geometric parameter is consistent with the regular geometric parameter, it indicates that the cross section of the pipe is a regular circle, so the ray source and the detector can be kept synchronous at all times to detect the pipe. Therefore, the ray source is controlled to emit X-rays to the pipe according to the synchronous detection method, and the detector is controlled to receive X-rays to complete the detection of the pipe.
[0095] The synchronous detection method refers to a method of controlling the ray source and the detector to correspond to each other and keep synchronous at all times to detect the pipe, which is stored in the processing terminal by the operator.
[0096] The ray source refers to a ray source for emitting X-rays. When the ray penetrates the detected object, the ray is absorbed to different degrees due to different materials, thicknesses, and densities. The detector refers to a digital detector for receiving X-rays after penetrating the pipe. The received ray energy is directly converted into an electronic signal, which is amplified and digitized, and then converted into a visual digital image by a computer system.
[0097] Step S1012: If not consistent, the detection point circumferential angle of the preset detection point is obtained.
[0098] If the processing terminal determines that the pipe geometric parameter is inconsistent with the regular geometric parameter, it indicates that the cross section of the pipe is an irregular shape, so the ray source and the detector cannot be kept synchronous at all times. Therefore, the detection point circumferential angle of the detection point is detected to provide data support for subsequent determination of the detection point coordinates.
[0099] The detection point refers to a point on the pipe waiting to be detected. The detection point circumferential angle refers to the azimuth angle of the detection point on the pipe cross section, which is obtained by inputting by the operator.
[0100] Step S102: The pipe geometric parameter and the detection point circumferential angle are analyzed to determine the detection point coordinates of the detection point.
[0101] The detection point coordinates refer to the three-dimensional coordinates of the detection point. The processing terminal first determines the dynamic semi-axis length of the detection point in the pipe geometric parameter, including the horizontal axis length and the vertical axis length, then calculates the product of the horizontal axis length and the cosine value of the detection point circumferential angle to obtain the X-axis coordinate, calculates the product of the vertical axis length and the sine value of the detection point circumferential angle to obtain the Y-axis coordinate, and the Z-axis coordinate is the coordinate of the axial position of the pipe, which is usually set to 0.
[0102] Step S103: Analyzing the detection point coordinates to determine the ray source initial position and the ray ideal penetration direction vector of the preset ray source.
[0103] Wherein, the ray source initial position refers to the position coordinates of the ray source, and the ray ideal penetration direction vector refers to the unit normal vector at the detection point, indicating the direction in which the ray should penetrate the pipeline vertically, which is obtained by the processing terminal after analyzing the detection point coordinates, and the specific method is referred to the steps of Figure 2 .
[0104] The ray source in this step is consistent with the ray source in step S1011, and will not be repeated here.
[0105] Step S104: Controlling the ray source to emit X-rays to the pipeline according to the ray source initial position and the ray ideal penetration direction vector.
[0106] Wherein, after determining the ray source initial position and the ray ideal penetration direction vector, the processing terminal controls the moving assembly to move the ray source to the ray source initial position, and controls the angle adjusting assembly, such as a universal device, to adjust the direction of the ray source to be consistent with the direction corresponding to the ray ideal penetration direction vector, so as to control the ray source to emit X-rays to the pipeline, so that the X-rays penetrate the detection point vertically.
[0107] Step S105: Analyzing the ray source initial position and the ray ideal penetration direction vector to determine the detector position and the detector pose of the preset detector.
[0108] Wherein, the detector position refers to the position coordinates of the detector, and the detector pose refers to the pose of the detector when receiving X-rays, which is represented by a rotation matrix to ensure that the X-rays are perpendicular to the detector surface, which is obtained by the processing terminal after analyzing the ray source initial position and the ray ideal penetration direction vector, and the specific method is referred to the steps of Figure 4 .
[0109] The detector in this step is consistent with the detector in step S1011, and will not be repeated here.
[0110] Step S106: Controlling the detector to receive X-rays to complete the detection of the pipeline according to the detector position and the detector pose.
[0111] Wherein, after determining the detector position, the processing terminal controls the moving assembly to move the detector to the detector position, and controls the angle adjusting assembly, such as a universal device, to adjust the pose of the detector to the detector pose, so as to ensure that the detector receives X-rays at the shortest distance, and ensures that the X-rays are perpendicular to the detector surface.
[0112] Refer to Figure 2The step of analyzing the detection point coordinates to determine the initial position of the ray source and the ideal penetration direction vector of the ray source of the preset ray source comprises:
[0113] Step S200: Analyzing the detection point coordinates to determine the ideal penetration direction vector of the ray source.
[0114] The ideal penetration direction vector in this step is consistent with the ideal penetration direction vector in step S103, which is obtained by analyzing the detection point coordinates by the processing terminal. For details, refer to the step of Figure 3 .
[0115] Step S201: Analyzing the ideal penetration direction vector of the ray source and the preset interval distance of the ray source to determine the position adjustment vector of the ray source.
[0116] The interval distance of the ray source refers to the distance between the ray source and the detection point, which is determined by the operator according to the actual situation.
[0117] The position adjustment vector of the ray source refers to the direction and value of the adjustment of the position of the ray source, which is obtained by the processing terminal by multiplying the interval distance of the ray source and the ideal penetration direction vector of the ray source.
[0118] Step S202: Analyzing the detection point coordinates and the position adjustment vector of the ray source to determine the initial position of the ray source.
[0119] The initial position of the ray source in this step is consistent with the initial position of the ray source in step S103. The processing terminal converts the detection point coordinates into a position vector, then subtracts the position adjustment vector of the ray source from the position vector to obtain an adjusted position vector, and finally converts the position vector into coordinates, which is the initial position of the ray source.
[0120] For details, refer to Figure 3 The step of analyzing the detection point coordinates to determine the ideal penetration direction vector of the ray source comprises:
[0121] Step S300: Analyzing the detection point coordinates and the preset implicit function gradient to determine the detection point gradient.
[0122] The implicit function gradient refers to the implicit function gradient expression at the detection point. The detection point is regarded as a point in a regular ellipse, so that the elliptic function is determined as the implicit function of the detection point, and the ellipse is parameterized as the angle form, and finally the gradient of the implicit function is solved to obtain the implicit function gradient.
[0123] The detection point gradient refers to the value of the implicit function gradient at the detection point, which is obtained by substituting the detection point coordinates into the implicit function gradient and calculating by the processing terminal.
[0124] Step S301: Analyzing the detection point gradient to determine the detection point normal vector.
[0125] The detection point normal vector refers to the normal vector of the detection point, which is determined by the processing terminal by taking the two gradient values in the detection point gradient as the two elements in the vector and taking 0 as the last element.
[0126] Step S302: Analyzing the detection point normal vector to determine the normal vector length.
[0127] The normal vector length refers to the length of the detection point normal vector, which is obtained by the processing terminal by taking the square root of the sum of the squares of the elements in the detection point normal vector.
[0128] Step S303: Analyzing the detection point normal vector and the normal vector length to determine the ray ideal penetration direction vector of the ray source.
[0129] The ray ideal penetration direction vector in this step is consistent with the ray ideal penetration direction vector in step S200, which is obtained by the processing terminal by calculating the quotient of the detection point normal vector and the normal vector length, thereby normalizing the detection point normal vector to obtain the unit normal vector.
[0130] Reference Figure 4 The step of analyzing the ray source initial position and the ray ideal penetration direction vector to determine the detector position and the detector pose of the preset detector includes:
[0131] Step S400: Analyzing the ray ideal penetration direction vector and the preset pipe axis direction vector to determine the detector pose of the detector.
[0132] The pipe axis direction vector refers to the direction vector of the pipe axis, which is taken as (1, 0, 0) in this application.
[0133] The detector pose in this step is consistent with the detector pose in step S105, which is determined by the processing terminal after analyzing the ray ideal penetration direction vector and the pipe axis direction vector, and the specific method is referred to the step of Figure 5 .
[0134] Step S401: Analyzing the ray ideal penetration direction vector and the preset detection receiving distance to determine the detection position adjustment vector.
[0135] The detection receiving distance refers to the optimal distance for X-rays to be emitted and received, and the specific value is determined by the operator according to the actual situation.
[0136] The detection position adjustment vector refers to the direction and value that need to be adjusted to determine the detector position, and is obtained by multiplying the detection receiving distance and the ideal ray penetration direction vector by the processing terminal.
[0137] Step S402: analyzing the initial position of the ray source and the detection position adjustment vector to determine the detector position of the detector.
[0138] In this step, the detector position is consistent with the detector position in step S105. The processing terminal converts the initial position of the ray source into a position vector, then calculates the sum of the position vector and the detection position adjustment vector to obtain an adjustment position vector, and finally converts the adjustment position vector into a position coordinate, which is the detector position.
[0139] Referring to Figure 5 The step of analyzing the ideal ray penetration direction vector and the preset pipeline axis direction vector to determine the detector posture of the detector comprises:
[0140] Step S500: analyzing the ideal ray penetration direction vector to determine the first axis direction vector of the detector.
[0141] The first axis direction vector refers to the direction vector of the Z axis of the detector. The processing terminal defines the reversed ideal ray penetration direction vector as the first axis direction vector, which ensures that the normal direction of the detector is away from the ray source.
[0142] Step S501: analyzing the first axis direction vector and the pipeline axis direction vector to determine the second axis direction vector of the detector.
[0143] The second axis direction vector refers to the direction vector of the X axis of the detector. The processing terminal calculates the cross product of the pipeline axis direction vector and the first axis direction vector and then normalizes it to obtain the second axis direction vector.
[0144] Step S502: analyzing the first axis direction vector and the second axis direction vector to determine the third axis direction vector.
[0145] The third axis direction vector refers to the direction vector of the Y axis of the detector. The processing terminal calculates the cross product of the first axis direction vector and the second axis direction vector to obtain the third axis direction vector.
[0146] Step S503: associating the first axis direction vector, the second axis direction vector and the third axis direction vector to generate the detector posture of the detector.
[0147] Wherein, after determining the first axis direction vector, the second axis direction vector and the third axis direction vector, the second axis direction vector is determined as the first column of the matrix, the third axis direction vector is determined as the second column of the matrix, and the first axis direction vector is determined as the third column of the matrix, so as to constitute a rotation matrix in which each column is a unit vector and two columns intersect each other, that is, the detector posture.
[0148] Referring to Figure 6 After controlling the detector to receive X-rays according to the detector position and the detector posture to complete the detection of the pipeline, a pose optimization step is further included, and the specific steps include:
[0149] Step S600: Obtain a pipeline image quality score.
[0150] Wherein, the pipeline image quality score refers to the quality score of the image formed when the pipeline is subjected to digital radiographic detection, which is obtained by weighting and summing the contrast and edge sharpness of the image by an operator, the image contrast can be calculated by histogram statistics or frequency domain analysis, and the edge sharpness can be evaluated by Canny edge detection or Laplacian operator, after obtaining the contrast and edge sharpness, the normalized contrast and normalized edge sharpness are obtained by normalization, then the normalized contrast and the normalized edge sharpness are subtracted by 1 respectively, and the two differences are added to obtain the image quality score.
[0151] Step S601: Determine whether the pipeline image quality score meets the requirement of a preset reference image quality score.
[0152] Wherein, the reference image quality score refers to the minimum image quality score for which the image quality is qualified, and the specific value is determined by an operator according to the actual situation, and the requirement of the reference image quality score refers to not less than the reference image quality score.
[0153] The processing terminal determines whether the pipeline image quality score is not less than the reference image quality score, so as to determine whether the pipeline image quality detected by the ray source and the detector can support accurate analysis of the pipeline condition.
[0154] Step S6011: If it meets, continue to acquire the detection point circumferential angle of the detection point for cyclic detection.
[0155] Wherein, if the processing terminal determines that the pipeline image quality score is not less than the reference image quality score, it indicates that the pipeline image quality detected by the ray source and the detector can support accurate analysis of the pipeline condition, so the detection point circumferential angle of the next detection point is continued to be collected, so as to continue to detect the next detection point of the pipeline.
[0156] Step S6012: If it does not meet, analyze the ray source initial position, the detector position and the detector posture to determine the initial pose parameters.
[0157] Wherein, if the processing terminal determines that the pipeline image quality score is lower than the reference image quality score, it indicates that the pipeline image detected by the ray source and the detector is of low quality and cannot support accurate analysis of the pipeline condition, so after analyzing the initial position of the ray source, the position of the detector and the posture of the detector, the initial pose parameters are determined to provide data support for subsequent optimization of the pose parameters.
[0158] The initial pose parameters refer to the matrix of the unoptimized ray source position, detector position and detector posture, and the three-axis coordinates corresponding to the ray source position and the three-axis coordinates corresponding to the detector position are sequentially listed as the first six column elements of the matrix by the processing terminal, and the rotation matrix corresponding to the detector posture is listed as the subsequent column elements of the matrix.
[0159] Step S602: Obtain the pose optimization objective function.
[0160] Wherein, the pose optimization objective function refers to a function that defines the optimization direction of the pose parameters, and the specific obtaining method refers to the steps of Figure 7 .
[0161] Step S603: Iterating the initial pose parameters according to the pose optimization objective function to generate the optimized pose parameters.
[0162] Wherein, after determining the pose optimization objective function, the initial pose parameters are iterated according to the pose optimization objective function, so as to obtain the optimized pose parameters, so that the ray source and the detector re-detect the pipeline with the optimized pose parameters, ensure the quality of the pipeline image, and further ensure the accuracy of the pipeline detection.
[0163] The optimized pose parameters refer to the ray source position, detector position and detector posture that can ensure the quality of the pipeline image, which are obtained by the processing terminal after iteratively optimizing the initial pose parameters according to the pose optimization objective function, and the specific method refers to the steps of Figure 8 .
[0164] Referring to Figure 7 , the step of obtaining the pose optimization objective function comprises:
[0165] Step S700: Obtain the image quality index and the ray direction angle.
[0166] Wherein, the image quality index refers to an index representing the image quality, including image contrast and edge sharpness, and the specific obtaining method is consistent with that of the image contrast and edge sharpness in step S600, which will not be repeated here.
[0167] The ray direction included angle refers to the deviation angle of the X-ray direction and the normal direction, which is calculated by the processing terminal by taking the dot product of the ray direction vector and the normal direction vector, dividing the product of the modulus of the ray direction vector and the modulus of the normal direction vector, and then performing the inverse cosine function calculation.
[0168] Step S701: Analyze the image quality index, the preset quality index threshold and the ray direction included angle to determine the image quality loss function.
[0169] The quality index threshold refers to the maximum value of the image quality index, including the maximum contrast and the maximum edge sharpness, and the specific value is determined by the operator according to the actual situation.
[0170] The image quality loss function refers to the objective function defining the image quality optimization direction, which is obtained by the processing terminal after analyzing the image quality index, the quality index threshold and the ray direction included angle, and the specific formula is as follows:
[0171] .
[0172] In the formula, is the image quality loss function, and are the image contrast and edge sharpness in the image quality index, and are the maximum contrast and the maximum edge sharpness in the quality index threshold, is the ray direction included angle.
[0173] By defining the image quality index and the ray direction included angle as the objective function, the image contrast is maximized, the visibility of defects is improved, the edge clarity is enhanced, the misjudgment caused by blur is reduced, and the projection distortion caused by angle deviation is avoided.
[0174] Step S702: Obtain the detection coverage rate of the detection point and the number of detection grids.
[0175] The detection point coverage rate refers to the detection coverage rate in the grid divided by the detection point. The detection point is divided into multiple grids, and the detection coverage rate of each grid is calculated by ray projection simulation, for example, the number of coverage times is counted using the Monte Carlo method.
[0176] The number of detection grids refers to the number of grids divided by the detection point, which is determined by the operator according to the actual situation and input into the processing terminal.
[0177] Step S703: Analyze the detection coverage rate and the number of detection grids to determine the coverage uniformity loss function.
[0178] The coverage uniformity loss function is the objective function that defines the direction of coverage uniformity optimization. It is quantified by the processing terminal using the spatial entropy function, and the specific formula is as follows:
[0179] .
[0180] In the formula, To cover the uniformity loss function, To detect the number of grid cells, For the first Detection coverage of each grid.
[0181] By using the coverage uniformity loss function, the coverage entropy of the detection area is maximized, thereby reducing duplicate scanning and blind spots, balancing the detection frequency of each area, avoiding wasted time due to local oversampling, and uniform coverage can reduce compression distortion and transmission distortion caused by local high-density scanning.
[0182] Step S704: Obtain the position change vector of the X-ray source and the position change vector of the detector.
[0183] Among them, the position change vector of the X-ray source refers to the position change vector before and after the X-ray source, and the position change vector of the detector refers to the position change vector before and after the detector, which are obtained in real time by the displacement sensors on the X-ray source and the detector.
[0184] Step S705: Analyze the change vector of the X-ray source position, the change vector of the detector position, and the preset adjustment coefficient to determine the energy loss function of the equipment motion.
[0185] The adjustment coefficient refers to the importance coefficients of the X-ray source position and the detector position in the loss function, which are determined by the operator based on their priority.
[0186] The equipment motion energy loss function is a target function that minimizes the energy consumption of mechanical movement of the equipment. It is obtained by analyzing the change vectors of the X-ray source position, the change vector of the detector position, and the adjustment coefficients at the processing terminal. The specific formula is as follows:
[0187] .
[0188] In the formula, Let be the energy loss function of the equipment movement. and These are the source importance coefficient and detector importance coefficient, respectively, which are the adjustment coefficients. Let be the vector representing the change in the position of the ray source. This is the detector position change vector.
[0189] The device motion energy consumption loss function penalizes frequent or large-scale movement of the ray source and the detector, reduces mechanical wear and tear, minimizes mechanical movement energy consumption of the ray source and the detector, prolongs the service life and reduces the operating cost.
[0190] Step S706: Analyzing the image quality loss function, the coverage uniformity loss function, the device motion energy consumption loss function and the preset loss weight coefficient to determine the pose optimization objective function.
[0191] The loss weight coefficient refers to the weight coefficient of the image quality loss function, the coverage uniformity loss function and the device motion energy consumption loss function in the objective function, which is determined by an operator according to different tasks.
[0192] The pose optimization objective function in this step is consistent with the pose optimization objective function in step S602, which is obtained by the processing terminal by weighted summation of the image quality loss function, the coverage uniformity loss function, the device motion energy consumption loss function and the loss weight coefficient, so as to realize global optimization.
[0193] Reference Figure 8 The step of generating the optimized pose parameter according to the pose optimization objective function and the initial pose parameter includes:
[0194] Step S800: Analyzing the pose optimization objective function to determine the objective function gradient.
[0195] The objective function gradient refers to the gradient of the pose optimization objective function, which is obtained by numerical differentiation calculation on the pose optimization objective function.
[0196] Step S801: Analyzing the initial pose parameter, the objective function gradient and the preset learning rate to generate the iterative pose parameter and obtain the objective function change.
[0197] The learning rate refers to the optimization speed, which is taken as 0.01 in the embodiment of the application.
[0198] The iterative pose parameter refers to the pose parameter obtained by iterative optimization of the initial pose parameter according to the objective function gradient, which is obtained by the processing terminal by subtracting the dot product of the initial pose parameter, the objective function gradient and the learning rate.
[0199] The objective function change refers to the change of the pose optimization objective function before and after iteration, which is obtained by the processing terminal by detecting the pipeline according to the iterative pose parameter, thereby re-detecting the variable required by the pose optimization objective function, and substituting the variable into the pose optimization objective function to calculate the objective function after iteration, and then subtracting the objective function before iteration from the objective function after iteration, and calculating the modulus of the difference to obtain the objective function change.
[0200] Step S802: judging whether the target function change quantity meets the requirement of the preset convergence threshold value.
[0201] The convergence threshold value refers to the minimum value of the pose optimization target function convergence, and the specific value is determined by an operator according to the actual situation. The requirement of the convergence threshold value refers to being less than the convergence threshold value.
[0202] The processing terminal judges whether the target function change quantity is less than the convergence threshold value, so as to determine whether the pose parameter optimization is completed.
[0203] Step S8021: if not, the pose optimization target function is continuously analyzed to re-determine the target function gradient.
[0204] If the processing terminal determines that the target function change quantity is not less than the convergence threshold value, it indicates that the pose parameter optimization is not completed. Therefore, the numerical differential calculation of the pose optimization target function is continuously performed, so as to re-determine the target function gradient and continuously perform the iterative optimization.
[0205] Step S8022: if yes, the iterative pose parameter is defined as the optimized pose parameter.
[0206] If the processing terminal determines that the target function change quantity is less than the convergence threshold value, it indicates that the pose parameter optimization is completed. Therefore, the iterative pose parameter is defined as the optimized pose parameter, so as to ensure that the ray source and the detector detect the pipeline with the optimized pose parameter, and further improve the accuracy of the pipeline detection.
[0207] Based on the same inventive concept, the embodiment of the present application provides a pipeline digital ray detection system, which comprises:
[0208] The acquisition module is configured to acquire the pipeline geometric parameters, the detection point circumferential angle, the pipeline image quality score, the pose optimization target function, the image quality index, the ray direction angle, the detection coverage, the detection grid number, the ray source position change vector, the detector position change vector, and the target function change quantity.
[0209] The memory is configured to store a program of a pipeline digital ray detection method.
[0210] The processor can load and execute the program in the memory, and implement the pipeline digital ray detection method.
[0211] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0212] The embodiment of the present application provides a computer readable storage medium, which stores a computer program capable of being loaded and executed by a processor to perform a pipeline digital ray detection method.
[0213] The computer storage medium includes, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program codes can be stored in the medium.
[0214] Based on the same inventive concept, the embodiment of the present application provides an intelligent terminal, which comprises a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to perform a pipeline digital ray detection method.
[0215] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0216] The above are preferred embodiments of the present application, and do not limit the protection scope of the present application, any feature disclosed in the specification (including the abstract and the drawings) can be replaced by other equivalent or similar features, unless specifically described. That is, each feature is only an example of a series of equivalent or similar features, unless specifically described.
Claims
1. A digital radiographic inspection method for pipelines, characterized in that, include: Obtain the pipe geometry parameters of the preset pipe; Determine whether the pipeline geometry parameters meet the requirements of the preset rule geometry parameters; If the conditions are met, the preset radiation source is controlled to emit X-rays into the pipeline according to the synchronous detection method, and the preset detector is controlled to receive the X-rays to complete the detection of the pipeline. If it does not meet the requirements, obtain the circumferential angle of the preset detection point; The geometric parameters of the pipeline and the circumferential angle of the detection point are analyzed to determine the coordinates of the detection point. The coordinates of the detection points are analyzed to determine the initial position of the preset X-ray source and the ideal penetration direction vector of the X-ray. The X-ray source is controlled to emit X-rays into the pipeline based on the initial position of the X-ray source and the ideal penetration direction vector of the X-rays. The initial position of the X-ray source and the ideal penetration direction vector of the X-ray are analyzed to determine the detector position and detector attitude of the preset detector; The detector is controlled to receive X-rays based on its position and orientation in order to complete the inspection of the pipeline.
2. The digital radiographic inspection method for pipelines according to claim 1, characterized in that, The steps for analyzing the coordinates of the detection points to determine the initial position of the preset X-ray source and the ideal penetration direction vector of the X-ray include: The coordinates of the detection point are analyzed to determine the ideal penetration direction vector of the X-ray source. The ideal penetration direction vector of the radiation and the preset radiation source spacing are analyzed to determine the radiation source position adjustment vector; The coordinates of the detection point and the adjustment vector of the X-ray source position are analyzed to determine the initial position of the X-ray source.
3. The digital radiographic inspection method for pipelines according to claim 2, characterized in that, The steps for analyzing the coordinates of the detection point to determine the ideal penetration direction vector of the X-ray source include: The coordinates of the detection point and the preset implicit function gradient are analyzed to determine the gradient of the detection point; The gradient of the detection point is analyzed to determine the normal vector of the detection point; Analyze the normal vector of the detection point to determine the magnitude of the normal vector; The normal vector and normal vector magnitude at the detection point are analyzed to determine the ideal penetration direction vector of the X-ray source.
4. The digital radiographic inspection method for pipelines according to claim 1, characterized in that, The steps for analyzing the initial position of the X-ray source and the ideal penetration direction vector of the X-ray to determine the detector position and detector attitude of the preset detector include: The ideal penetration direction vector of the ray and the preset pipe axis direction vector are analyzed to determine the detector attitude. The ideal penetration direction vector of the ray and the preset detection and receiving distance are analyzed to determine the vector adjustment for the detection position; The initial position of the X-ray source and the adjustment vector of the detection position are analyzed to determine the detector position.
5. The digital radiographic inspection method for pipelines according to claim 4, characterized in that, The steps for determining the detector attitude by analyzing the ideal penetration direction vector of the ray and the preset pipe axis direction vector include: The ideal penetration direction vector of the ray is analyzed to determine the first axis direction vector of the detector; The first axis direction vector and the pipe axis direction vector are analyzed to determine the second axis direction vector of the detector; The direction vectors of the first and second axes are analyzed to determine the direction vector of the third axis. The first axis direction vector, the second axis direction vector, and the third axis direction vector are correlated to generate the detector attitude.
6. The digital radiographic inspection method for pipelines according to claim 1, characterized in that, After controlling the detector to receive X-rays based on its position and orientation to complete the pipeline inspection, the process also includes a pose optimization step, which specifically includes: Obtain the pipeline image quality score; Determine whether the pipeline image quality score meets the preset baseline image quality score requirements; If the match is found, continue to obtain the circumferential angle of the detection point and perform cyclic detection. If not, the initial position of the X-ray source, the position of the detector, and the attitude of the detector are analyzed to determine the initial pose parameters. Obtain the pose optimization objective function; The initial pose parameters are iterated based on the pose optimization objective function to generate optimized pose parameters.
7. The digital radiographic inspection method for pipelines according to claim 6, characterized in that, The steps to obtain the pose optimization objective function include: Obtain image quality metrics and the angle between ray directions; The image quality index, the preset quality index threshold, and the angle between the ray directions are analyzed to determine the image quality loss function; Obtain the detection coverage and number of detection grids for each detection point; The detection coverage and the number of detection grids were analyzed to determine the coverage uniformity loss function; Obtain the position change vectors of the X-ray source and the detector; The position change vectors of the X-ray source and detector, as well as the preset adjustment coefficients, are analyzed to determine the energy loss function of the equipment movement. The image quality loss function, coverage uniformity loss function, device motion energy consumption loss function, and preset loss weight coefficients are analyzed to determine the pose optimization objective function.
8. The digital radiographic inspection method for pipelines according to claim 6, characterized in that, The steps for generating optimized pose parameters by iterating over the initial pose parameters according to the pose optimization objective function include: The objective function for pose optimization is analyzed to determine its gradient. The initial pose parameters, the gradient of the objective function, and the preset learning rate are analyzed to generate iterative pose parameters and obtain the change in the objective function. Determine whether the change in the objective function meets the preset convergence threshold. If it does not meet the requirements, the objective function for pose optimization will be analyzed again to redetermine the gradient of the objective function; If the conditions are met, the iterative pose parameters are defined as optimized pose parameters.
9. A digital radiographic inspection system for pipelines, characterized in that, include: The acquisition module is used to acquire pipeline geometric parameters and the circumferential angle of the detection point; A memory for storing a program for a pipeline digital X-ray inspection method as described in any one of claims 1 to 8; The processor and the program in the memory can be loaded and executed by the processor to implement the pipeline digital ray detection method as described in any one of claims 1 to 8.
10. A smart terminal, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Calibration method and system for geometric calibration of scanning imaging equipment
CN117825417A
Parameter optimization method of CL system, CL system and computer equipment
CN119147559A