Defect 3D Modeling Method, Apparatus, and Computer-Readable Storage Medium

By acquiring X-ray inspection datasets and robotic arm pose data, and combining edge detection algorithms and grayscale correction, a three-dimensional reverse projection of defects was achieved, solving the problem of component overlap in two-dimensional X-ray images and providing detailed three-dimensional defect modeling effects.

CN113570708BActive Publication Date: 2026-04-03CHONGQING SPECIAL EQUIP INSPECTION & RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing X-ray nondestructive testing technology produces two-dimensional X-ray images. The complex internal structure of power equipment leads to severe overlap of components, making it impossible to intuitively see the specific condition of the equipment and causing inconvenience in defect identification.

Method used

By acquiring the ray detection dataset, including the detection images and the robot arm pose data, the defect is stereoscopically inversely projected, and combined with edge detection algorithms and grayscale correction, the defect is stereoscopically modeled.

Benefits of technology

It achieves accurate three-dimensional modeling of defects, solves the problem of overlapping parts in two-dimensional images, and provides detailed three-dimensional information on defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113570708B_ABST
    Figure CN113570708B_ABST
Patent Text Reader

Abstract

This invention discloses a method for 3D defect modeling. The method includes: acquiring a ray detection dataset, which includes several detection images and several robotic arm pose data corresponding to the detection images, wherein the robotic arm pose data represents the position and orientation of the robotic arm holding the ray machine when the 3D defect image is captured; and performing a reverse projection of the defect 3D model based on the detection images and the robotic arm pose data. This invention also discloses a 3D defect modeling device and a computer-readable storage medium. This invention enables 3D defect modeling, accurately determines the defects in the 3D defect model, and achieves rapid 3D defect modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision technology, and in particular to a method, apparatus, and computer-readable storage medium for three-dimensional defect modeling. Background Technology

[0002] X-ray nondestructive testing (NDT) is a detection method that utilizes the strong penetrating power of X-rays to detect internal defects in electrical equipment. It primarily relies on the variation in the intensity of X-rays penetrating the equipment to detect internal defects. Because X-ray NDT is rapid and accurate, this technology can be widely applied to the detection of internal defects in various industrial equipment.

[0003] Currently, X-ray nondestructive testing technology involves emitting X-rays from an X-ray machine onto the equipment under test. The X-rays penetrate the equipment and directly form a two-dimensional projected X-ray image on a digital imaging panel. Finally, image acquisition software installed on a computer captures the projected X-ray image. Based on the acquired X-ray image, personnel determine the internal defects of the tested equipment.

[0004] However, the X-ray images obtained by the above methods are two-dimensional images. Due to the complex internal structure of power equipment, the components in the X-ray images are severely overlapping, making it impossible to intuitively see the specific condition of the equipment, which brings many inconveniences to the staff in determining internal defects. Summary of the Invention

[0005] The main objective of this invention is to propose a method, apparatus, and computer-readable storage medium for three-dimensional defect modeling, aiming to realize the function of three-dimensional defect modeling, accurately determine the defects in three dimensions, and achieve rapid three-dimensional defect modeling.

[0006] To achieve the above objectives, the present invention provides a method for three-dimensional defect modeling, the method comprising the following steps:

[0007] Obtain a radiographic inspection dataset, which includes several inspection images and several robotic arm pose data corresponding to the inspection images. The robotic arm pose data is the position and orientation of the robotic arm that placed the X-ray machine when the inspection image of the defect is obtained by taking a stereoscopic picture.

[0008] Based on the detected image and the robotic arm pose data, a 3D inverse projection of the defect is performed to obtain a 3D model of the defect.

[0009] Optionally, the step of performing a stereoscopic inverse projection of the defect based on the detected image and the robotic arm pose data to obtain a stereoscopic model of the defect includes:

[0010] The X-ray irradiation angle is obtained based on the robotic arm's pose data. The X-ray irradiation angle is the angle at which the X-ray machine irradiates the defective three-dimensional structure.

[0011] Image recognition is performed on the detected image to obtain a defect planar diagram;

[0012] The defect planar diagram is reverse-modeled and projected based on the ray irradiation angle to obtain a three-dimensional model of the defect.

[0013] Optionally, the step of performing image recognition on the detected image to obtain a defect planar image includes:

[0014] The grayscale value of the detected image is corrected according to the ray irradiation angle to obtain a corrected image;

[0015] The defect edge image is obtained by performing defect edge recognition on the corrected image based on the edge detection algorithm.

[0016] The defect edge image is plotted with lines of equal thickness to obtain a defect planar image.

[0017] Optionally, before the step of correcting the grayscale value of the detected image based on the ray irradiation to obtain the corrected image, the following steps are included:

[0018] The detected image is denoised using a median filtering method to obtain a denoised image.

[0019] The overall brightness of the denoised image is proportionally enhanced to obtain a proportionally enhanced image.

[0020] The step of correcting the grayscale value of the detected image according to the ray irradiation angle to obtain a corrected image includes:

[0021] The grayscale value of the proportionally enhanced image is corrected according to the ray irradiation angle to obtain a corrected image.

[0022] Optionally, after the step of performing a stereoscopic inverse projection of the defect based on the detected image and the robotic arm pose data to obtain a stereoscopic model of the defect, the method further includes:

[0023] The blind spots in the defective 3D model are corrected to obtain a corrected defective 3D model.

[0024] In addition, to achieve the above objectives, the present invention also provides an apparatus comprising: a memory, a processor, and a defect stereo modeling program stored in the memory and executable on the processor, wherein the defect stereo modeling program, when executed by the processor, implements the steps of the defect stereo modeling method as described above.

[0025] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a defect stereo modeling program, which, when executed by a processor, implements the steps of the defect stereo modeling method as described above.

[0026] This invention provides a method, apparatus, and computer-readable storage medium for 3D defect modeling. It acquires a radiographic testing dataset, which includes several testing images and corresponding robotic arm pose data. The robotic arm pose data represents the position and orientation of the robotic arm holding the X-ray machine when the testing images of the 3D defect are captured. Based on the testing images and the robotic arm pose data, a 3D defect model is obtained through inverse projection. Through this method, the invention enables 3D defect modeling, accurately identifies defects in the 3D defect model, and achieves rapid 3D defect modeling. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention;

[0028] Figure 2 This is a flowchart illustrating the first embodiment of the defect 3D modeling method of the present invention;

[0029] Figure 3 This is a three-dimensional structural schematic diagram of the defect corrected according to the present invention;

[0030] Figure 4 This is a flowchart illustrating the second embodiment of the defect 3D modeling method of the present invention;

[0031] Figure 5 This is a schematic diagram of the reverse projection of the defect plan view according to the present invention;

[0032] Figure 6 This is a three-dimensional structural diagram of the defect after the modeling of this invention is completed;

[0033] Figure 7 This is a schematic diagram of the structure of the discretized geometric model of the rotational imaging system of the present invention;

[0034] Figure 8 This is a flowchart illustrating the third embodiment of the defect 3D modeling method of the present invention.

[0035] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0036] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0037] The main solution of this invention is: to acquire a radiographic testing dataset, which includes several testing images and several robotic arm pose data corresponding to the testing images, wherein the robotic arm pose data is the position and orientation of the robotic arm that placed the X-ray machine when the testing image of the defect is obtained by shooting the three-dimensional defect; and to perform a three-dimensional defect inverse projection based on the testing image and the robotic arm pose data to obtain a three-dimensional defect model.

[0038] Existing X-ray nondestructive testing (NDT) technology involves emitting X-rays from an X-ray machine onto the equipment under test. The X-rays penetrate the equipment and directly form a two-dimensional projected X-ray image on a digital imaging panel. Finally, image acquisition software installed on a computer captures the projected X-ray image. Workers then use the acquired X-ray image to determine internal defects in the equipment. However, the X-ray images obtained using this method are two-dimensional. Due to the complex internal structure of electrical equipment, components often overlap significantly in the X-ray images, making it difficult to visually assess the equipment's specific condition and causing considerable inconvenience for workers in determining internal defects.

[0039] The present invention aims to realize the function of 3D defect modeling, accurately determine the 3D defects, and realize rapid 3D defect modeling.

[0040] like Figure 1 As shown, Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention.

[0041] In this embodiment of the invention, the terminal can be a PC, or a smartphone, tablet computer, or other mobile terminal device with display function.

[0042] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0043] Preferably, the terminal may also include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. These sensors may include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display screen according to the ambient light level, while the proximity sensor can turn off the display screen and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the mobile terminal's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition functions (such as pedometers, taps), etc. Of course, the mobile terminal may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, and infrared sensor, which will not be elaborated here.

[0044] Those skilled in the art will understand that Figure 1 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0045] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a defect 3D modeling program.

[0046] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate data with it; user interface 1003 is mainly used to connect to the client (user terminal) and communicate data with it; while processor 1001 can be used to call the defect 3D modeling program stored in memory 1005 and perform the following operations:

[0047] Obtain a radiographic inspection dataset, which includes several inspection images and several robotic arm pose data corresponding to the inspection images. The robotic arm pose data is the position and orientation of the robotic arm that placed the X-ray machine when the inspection image of the defect is obtained by taking a stereoscopic picture.

[0048] Based on the detected image and the robotic arm pose data, a 3D inverse projection of the defect is performed to obtain a 3D model of the defect.

[0049] Furthermore, the processor 1001 can call the defect 3D modeling program stored in the memory 1005 and also perform the following operations:

[0050] The X-ray irradiation angle is obtained based on the robotic arm's pose data. The X-ray irradiation angle is the angle at which the X-ray machine irradiates the defective three-dimensional structure.

[0051] Image recognition is performed on the detected image to obtain a defect planar diagram;

[0052] The defect planar diagram is reverse-modeled and projected based on the ray irradiation angle to obtain a three-dimensional model of the defect.

[0053] Furthermore, the processor 1001 can call the defect 3D modeling program stored in the memory 1005 and also perform the following operations:

[0054] The grayscale value of the detected image is corrected according to the ray irradiation angle to obtain a corrected image;

[0055] The defect edge image is obtained by performing defect edge recognition on the corrected image based on the edge detection algorithm.

[0056] The defect edge image is plotted with lines of equal thickness to obtain a defect planar image.

[0057] Furthermore, the processor 1001 can call the defect 3D modeling program stored in the memory 1005 and also perform the following operations:

[0058] The detected image is denoised using a median filtering method to obtain a denoised image.

[0059] The overall brightness of the denoised image is proportionally enhanced to obtain a proportionally enhanced image.

[0060] The step of correcting the grayscale value of the detected image according to the ray irradiation angle to obtain a corrected image includes:

[0061] The grayscale value of the proportionally enhanced image is corrected according to the ray irradiation angle to obtain a corrected image.

[0062] Furthermore, the processor 1001 can call the defect 3D modeling program stored in the memory 1005 and also perform the following operations:

[0063] The blind spots in the defective 3D model are corrected to obtain a corrected defective 3D model.

[0064] Based on the above hardware structure, an embodiment of the defect three-dimensional modeling method of the present invention is proposed.

[0065] The present invention provides a method for three-dimensional modeling of defects.

[0066] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the defect 3D modeling method of the present invention.

[0067] In this embodiment of the invention, the defect 3D modeling method is applied to a defect 3D modeling device, and the method includes:

[0068] Step S10: Obtain the X-ray detection dataset, which includes several detection images and several robotic arm pose data corresponding to the detection images. The robotic arm pose data is the position and orientation of the robotic arm that placed the X-ray machine when the detection image of the defect is obtained by taking a three-dimensional picture.

[0069] In this embodiment, to achieve the function of 3D defect modeling, accurately determine the 3D defect, and realize rapid 3D defect modeling, the X-ray machine acquires inspection film by emitting and receiving X-rays. The inspection film is then digitized using an electronic scanning device to obtain its electronic image, which is the inspection image. The 3D defect modeling device also acquires the pose data of the X-ray machine when the inspection film is captured, generating robotic arm pose data. After acquiring several inspection images and several corresponding robotic arm pose data, a X-ray inspection dataset is generated. After generating the X-ray inspection dataset, the 3D defect modeling device acquires the X-ray inspection dataset, which includes several inspection images and several corresponding robotic arm pose data. The robotic arm pose data represents the position and orientation of the robotic arm that placed the X-ray machine when the inspection image of the 3D defect was captured. There is a one-to-one correspondence between the inspection image and the robotic arm pose data.

[0070] Step S20: Perform a three-dimensional reverse projection of the defect based on the detected image and the robot arm pose data to obtain a three-dimensional model of the defect.

[0071] In this embodiment, after acquiring several detection images and several robotic arm pose data corresponding to the detection images, the defect stereo modeling device performs a stereo reverse projection of the defect based on the detection images and the robotic arm pose data to obtain a stereo model of the defect.

[0072] Step S20, after performing a 3D inverse projection of the defect based on the detected image and the robotic arm pose data to obtain a 3D defect model, may include:

[0073] Step a: Correct the dead corner positions of the defect 3D model to obtain a corrected defect 3D model.

[0074] In this embodiment, to compensate for the structural information at two "dead angle" locations where specific structural information cannot be obtained in the reverse projection, the defect stereo modeling device corrects the dead angle locations of the defect stereo model after obtaining it, thus obtaining a corrected defect stereo model (e.g., Figure 3(As shown). In the final step of image recognition, using the defect edge contour as a starting point, the thickness lines of the defect image can be drawn. Theoretically, the same thickness line means that the defect width is the same at that point in the detection direction. However, in practice, it is difficult to establish a precise correspondence between image grayscale and defect thickness, and the thickness line can only serve as a qualitative reference. But by comprehensively analyzing the sum of the thickness lines from multiple detection images at different angles, the aforementioned "blind spots" and other details of the model can be corrected to a certain extent, thus obtaining a more accurate 3D defect model.

[0075] This embodiment obtains a ray detection dataset using the above-described scheme. The dataset includes several detection images and corresponding robotic arm pose data. The robotic arm pose data represents the position and orientation of the robotic arm that held the ray machine when the 3D defect image was captured. Based on the detection images and the robotic arm pose data, a 3D defect model is obtained through inverse projection. This achieves the function of 3D defect modeling, accurately identifies the defects in the 3D defect model, and enables rapid 3D defect modeling.

[0076] Furthermore, referring to Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the defect 3D modeling method of the present invention. Based on the above... Figure 2 In the embodiment shown, step S20, which involves performing a stereoscopic inverse projection of the defect based on the detected image and the robotic arm pose data to obtain a stereoscopic model of the defect, may include:

[0077] Step S21: Obtain the X-ray irradiation angle based on the robotic arm pose data, wherein the suspected irradiation angle is the angle at which the X-ray machine irradiates the defective three-dimensional structure.

[0078] In this embodiment, after acquiring several detection images and several robotic arm pose data corresponding to the detection images, the defect stereoscopic modeling device obtains the X-ray irradiation angle based on the robotic arm pose data. The X-ray irradiation angle is the angle at which the X-ray machine irradiates the defect stereoscopic image. The X-ray irradiation angle is also the angle at which the X-ray machine captures the defect stereoscopic image.

[0079] Step S22: Perform image recognition on the detected image to obtain a defect planar image;

[0080] In this embodiment, after obtaining the ray irradiation angle, the defect 3D modeling device performs image recognition on the detection image to obtain a defect planar diagram.

[0081] Step S23: Perform reverse modeling projection on the defect planar diagram according to the ray irradiation angle to obtain a three-dimensional model of the defect.

[0082] In this embodiment, after obtaining the defect planar image, the defect 3D modeling device performs reverse modeling projection on the defect planar image according to the ray irradiation angle (e.g., Figure 5 As shown), a 3D model of the defect is obtained. Using the defect edge contours obtained from all detection directions as a reference, cylindrical stretching is performed in the opposite direction to the detection direction, i.e., inverse projection. By performing a union operation on all cylindrical stretches, a rough 3D model of the defect can be obtained (e.g., ...). Figure 6 (As shown). Based on the characteristics of the defect structure, by reasonably selecting the detection angle, a 3D model of the defect can be obtained with the fewest possible detections. A significant feature of defect edges is the drastic change in pixel grayscale values ​​on both sides. Defect edges are identified by the change in pixel grayscale values, and whether it is an edge point is determined by solving the first derivative of adjacent pixels. In a uniform region of an image, the grayscale values ​​between adjacent pixels should not differ much, the edge intensity is weak, and the first derivative tends to 0; when at an edge, the grayscale values ​​of adjacent pixels are significantly different, the target edge intensity is high, and the first derivative is large. When the gradient is greater than a threshold, it is an edge point. Find the adjacent edge points along the direction perpendicular to the direction of the maximum first derivative of the edge point, and connect them sequentially to obtain the defect edge. Specifically, the Canny edge detection algorithm is used for edge recognition.

[0083] Using the defect edge contours obtained from all detection directions as a reference, cylindrical stretching is performed in the opposite direction to the detection direction for inverse modeling and projection. Then, a union operation is performed on all cylindrical stretches to finally obtain the 3D reconstructed defect model.

[0084] The calculation method is as follows:

[0085] The imaging system has three coordinate systems: a system coordinate system (XYZ) with the rotation center D as its origin, a projection coordinate system (XYZ) with the center of the projected image as its origin, and a volume data coordinate system (IJK) with a fixed point in the volume data model as its origin. The projection coordinate system represents the X-ray image plane, and the volume data system represents the coordinates of the volume data model. The units for these two coordinate systems are pixels and voxels, respectively. The system coordinates use actual physical distance in millimeters, and the origin is located at the rotation center D. The coordinate expressions of a point in each of the three coordinate systems are defined in the following format:

[0086] System coordinates: S = [x, y, z, 1] T

[0087] Volume data coordinates: V=[i,j,k,1] T

[0088] Projected image coordinates: P = [u, v, 1] T

[0089] Three-dimensional object data can be used in N x ×N y ×N z The value of the nth voxel is represented by a discretized cube, where each cube represents a voxel. n The entire data extraction can be done using vectors. Similarly, the projected data p can be represented by N. u ×N v The projection data is discretized into small squares, with each square representing a pixel. The entire projection data can be represented by vectors. Indicates, such as Figure 7 As shown.

[0090] The pixel value p of a pixel j It is the sum of the effects of several rays related to the pixel passing through different voxels along the ray path, where the i-th voxel f i For pixel p j The influence weight is A ji , represented as:

[0091] p j =A ji f i

[0092] A ji This represents each corresponding value in the projection matrix, therefore the projection matrix A can be represented as:

[0093]

[0094] Where J = N u ×N v I = N x ×N y ×N z Matrix A represents the mapping relationship between the projected image and the extracted data. The iterative reconstruction algorithm steps can be roughly as follows:

[0095] 1) Set an initial value f for a certain voxel. 0 ;

[0096] 2) Calculate the current voxel value f k Theoretical projection value

[0097] 3) Calculate the actual projected value p i The ratio of the theoretical projection value to the theoretical projection value is p. i / p μi ;

[0098] 4) Perform back projection calculation using the projection data ratio obtained in step (3), with a correction value corresponding to each voxel point. Use it with fk Multiplication is used to correct voxel values;

[0099] 5) Repeat steps (2)-(4) for all voxel points under the current projection direction to complete the correction of the voxels to be reconstructed under this projection direction. Repeat steps (2)-(5) for all other projection directions. Continue until all projection directions have completed the correction of the image to be reconstructed, which completes one iteration process.

[0100] The expression for the update process of the reconstructed volume data region f is shown in the following formula:

[0101]

[0102] In the formula, i represents the ray index, k represents the iteration number, the summation over j is the projection operation, and the summation over i is the back projection operation. This iterative reconstruction algorithm uses a ratio to represent the projection data p. i Projection operation A performed on the currently estimated data i The relationship of f, this ratio is then back-projected onto the denominator summation expression ∑ in the volume data space. i A ij This involves backprojecting a constant 1 into voxel space. The ratio of the volume data from these two backprojections is the correction factor, which is used in the algorithm to update the current image.

[0103] This embodiment, through the above-described scheme, obtains the X-ray irradiation angle based on the robotic arm's pose data. The X-ray irradiation angle is the angle at which the X-ray machine irradiates the three-dimensional defect. Image recognition is performed on the detected image to obtain a planar view of the defect. Based on the X-ray irradiation angle, the planar view of the defect is reverse-engineered and projected to obtain a three-dimensional model of the defect. Thus, the function of three-dimensional defect modeling is realized, the three-dimensional defect is accurately determined, and rapid three-dimensional defect modeling is achieved.

[0104] Furthermore, referring to Figure 8 , Figure 8 This is a flowchart illustrating the second embodiment of the defect 3D modeling method of the present invention. Based on the above... Figure 4 In the embodiment shown, step S22, which involves image recognition of the detected image to obtain a defect planar diagram, may include:

[0105] Step S221: Correct the grayscale value of the detected image according to the ray irradiation angle to obtain a corrected image;

[0106] In this embodiment, after obtaining the ray irradiation angle, the defect stereo modeling device performs grayscale value correction on the detection image based on the ray irradiation angle to obtain a corrected image.

[0107] Step S221, before correcting the grayscale value of the detected image according to the ray irradiation angle to obtain the corrected image, may include:

[0108] Step b1 involves denoising the detected image using a median filtering method to obtain a denoised image;

[0109] In this embodiment, before obtaining the corrected image, the defect stereo modeling device performs denoising processing on the detection image based on the median filtering method to obtain a denoised image. Whether the defect electronic image is obtained from an electron imaging plate or from a scanned defect film, it contains a large amount of background noise and therefore must first undergo denoising processing. Analysis of the noise formation process and observation of actual images show that the noise is mostly scattered white or black speckled noise. The purpose of denoising processing is to filter out interference and highlight the target features. There are two requirements for denoising processing: first, to make the image clear; and second, to not destroy useful information such as contours and edges in the image. Various algorithms are available for denoising processing; the simplest method is median filtering, which uses the average gray value of pixels within a certain area surrounding a pixel in the detection image as the gray value of that pixel. Median filtering can effectively remove random noise and impulse noise while protecting image edges; it is also simple and fast.

[0110] Step b2 performs a proportional enhancement process on the overall brightness of the denoised image to obtain a proportionally enhanced image;

[0111] In this embodiment, after obtaining the denoised image, the defect stereo modeling device performs a proportional enhancement process on the overall brightness of the denoised image to obtain a proportionally enhanced image. Some ray images suffer from insufficient overall brightness, resulting in unsatisfactory contrast areas, thus requiring enhancement processing. However, since the grayscale values ​​of different regions of the detection image implicitly contain the thickness information of that region, the enhancement process must perform proportional processing on various parts of the image to increase contrast without disrupting the thickness ratio between different regions.

[0112] Step S221 involves correcting the grayscale value of the detected image based on the ray irradiation angle to obtain a corrected image, which may include:

[0113] Step c: Correct the grayscale value of the proportionally enhanced image according to the ray irradiation angle to obtain the corrected image.

[0114] In this embodiment, after obtaining a proportionally enhanced image, the defect 3D modeling device corrects the grayscale value of the proportionally enhanced image according to the ray irradiation angle to obtain a corrected image. Since the thickness of the tank wall traversed by the ray varies depending on the angle of ray detection, the length of the path is inversely proportional to the sine of the detection angle α (i.e., the angle between the ray and the tank wall). In the third stage of model correction, since the correspondence between the grayscale value of the detection image and the defect thickness needs to be used to correct the defect 3D model, it is necessary to correct the image grayscale value under different detection angles to eliminate the influence of this factor.

[0115] Step S222: Based on the edge detection algorithm, perform defect edge recognition on the corrected image to obtain a defect edge image;

[0116] In this embodiment, after obtaining the corrected image, the defect 3D modeling device performs defect edge recognition on the corrected image based on an edge detection algorithm to obtain a defect edge image. Defect edge recognition is the foundation for the subsequent second-stage inverse projection. A significant characteristic of a defect edge is the drastic change in pixel grayscale values ​​on both sides. Therefore, it can be determined whether it is an edge point by solving the first derivative of adjacent pixels. In a uniform region of an image, the grayscale values ​​between adjacent pixels should not differ significantly, the edge intensity is weak, and the first derivative tends to 0. When at an edge position, the grayscale values ​​of adjacent pixels are significantly different, the target edge intensity is high, and the first derivative is large. When the gradient is greater than a threshold, it is an edge point. The defect edge is obtained by finding its adjacent edge points perpendicular to the direction of the maximum first derivative of the edge point and connecting them sequentially.

[0117] Step S223: Draw equal-thickness lines on the defect edge image to obtain a defect planar view.

[0118] In this embodiment, after obtaining the defect edge image, the defect 3D modeling device draws isothight lines on the defect edge image to obtain a defect planar image. Starting from each edge point, at intervals of a certain gray value difference, a series of points with equal gray values ​​are found along the direction of the maximum first derivative (i.e., the tangent direction) of that edge point, and these points are connected sequentially to obtain a defect isothight line. Using this isothight line as a starting point, the search continues at intervals of a certain gray value difference along the direction of the maximum first derivative to obtain the next defect isothight line. This process is repeated to obtain the defect isothight line map. Theoretically, the same isothight line means that the defect width is the same at that point in the detection direction.

[0119] This embodiment uses the above-described scheme to correct the grayscale value of the detection image based on the ray irradiation angle, obtaining a corrected image; it then uses an edge detection algorithm to identify defect edges in the corrected image, obtaining a defect edge image; finally, it draws equal-thickness lines on the defect edge image to obtain a defect planar image. Thus, it achieves the function of three-dimensional defect modeling, accurately determines the three-dimensional defect, and realizes rapid three-dimensional defect modeling.

[0120] The present invention also provides a defect three-dimensional modeling device.

[0121] The defect stereo modeling apparatus of the present invention includes: a memory, a processor, and a defect stereo modeling program stored in the memory and executable on the processor. When the defect stereo modeling program is executed by the processor, it implements the steps of the defect stereo modeling method as described above.

[0122] The method implemented when the defect stereo modeling program running on the processor is executed can be referred to in various embodiments of the defect stereo modeling method of the present invention, and will not be repeated here.

[0123] The present invention also provides a computer-readable storage medium.

[0124] The present invention provides a defect stereo modeling program stored on a computer-readable storage medium, which, when executed by a processor, implements the steps of the defect stereo modeling method described above.

[0125] The method implemented when the defect stereo modeling program running on the processor is executed can be referred to in various embodiments of the defect stereo modeling method of the present invention, and will not be repeated here.

[0126] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0127] The sequence numbers of the above embodiments of the present invention are for description only and do not represent the superiority or inferiority of the embodiments.

[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0129] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for three-dimensional modeling of defects, characterized in that: The defect 3D modeling method includes the following steps: Obtain a radiographic inspection dataset, which includes several inspection images and several robotic arm pose data corresponding to the inspection images. The robotic arm pose data is the position and orientation of the robotic arm that placed the X-ray machine when the inspection image of the defect is obtained by taking a stereoscopic picture. Based on the detected image and the robotic arm pose data, a 3D inverse projection of the defect is performed to obtain a 3D model of the defect; The step of performing a 3D inverse projection of the defect based on the detected image and the robotic arm pose data to obtain a 3D defect model includes: The X-ray irradiation angle is obtained based on the robotic arm's pose data. The X-ray irradiation angle is the angle at which the X-ray machine irradiates the defective three-dimensional structure. Image recognition is performed on the detected image to obtain a defect planar diagram; The defect planar diagram is reverse-modeled and projected based on the ray irradiation angle to obtain a three-dimensional model of the defect; The step of performing image recognition on the detected image to obtain a defect planar image includes: The grayscale value of the detected image is corrected according to the ray irradiation angle to obtain a corrected image; The defect edge image is obtained by performing defect edge recognition on the corrected image based on the edge detection algorithm. The defect edge image is plotted using lines of equal thickness to obtain a defect planar view; After the step of performing a stereoscopic inverse projection of the defect based on the detected image and the robotic arm pose data to obtain a stereoscopic model of the defect, the following steps are included: The blind spots in the defective 3D model are corrected to obtain a corrected defective 3D model.

2. The defect 3D modeling method according to claim 1, characterized in that, Before the step of correcting the grayscale value of the detected image according to the ray irradiation angle to obtain the corrected image, the following steps are included: The detected image is denoised using a median filtering method to obtain a denoised image. The overall brightness of the denoised image is proportionally enhanced to obtain a proportionally enhanced image. The step of correcting the grayscale value of the detected image according to the ray irradiation angle to obtain a corrected image includes: The grayscale value of the proportionally enhanced image is corrected according to the ray irradiation angle to obtain a corrected image.

3. A defect 3D modeling device, characterized in that, The apparatus includes: a memory, a processor, and a defect stereo modeling program stored in the memory and running on the processor, wherein when the defect stereo modeling program is executed by the processor, it implements the steps of the defect stereo modeling method as described in any one of claims 1 to 2.

4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a defect stereo modeling program, which, when executed by a processor, implements the steps of the defect stereo modeling method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Method for accurate detection of material defect and thickness by using digital radiography transillumination technology

    CN105158280A

  • The invention discloses a dDefect detection method for a solar cell panel

    CN109615612A

  • Appearance defect inspection method and device

    CN111344554A

  • Method for obtaining three-dimensional reconstruction image of e.g. tissue of patient, involves imaging object for different angle positions of X-ray source and X-ray detector to compute volume elements of gray scale images of object

    DE102010020375A1