A method for nondestructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy
Through terahertz time domain spectroscopy technology and image processing algorithm, the time-consuming and labor-intensive problem of metal corrosion detection under anti-corrosion coating is solved, rapid non-destructive detection is achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510401486.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-04-01
AI Technical Summary
In the prior art, metal corrosion detection under anti-corrosion coatings is time-consuming and labor-intensive and will damage the integrity of the coating, making it impossible to achieve rapid non-destructive testing.
The terahertz time domain spectroscopy technology is used to calculate the reflective peak value through the peak search algorithm, combining gray value normalization and morphological corrosion expansion, adaptive threshold segmentation and filling to achieve non-destructive detection of the corrosion area.
It realizes rapid and non-destructive testing of metal corrosion under anti-corrosion coating, improves detection efficiency, saves human resources, and improves detection accuracy and accurately locates the corrosion area.
Smart Images

Figure CN119915769B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of terahertz time-domain spectroscopy detection technology and computer image processing technology, and in particular relates to a method for non-destructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy. Background Art
[0002] Terahertz (THz) nondestructive testing (NDT) is an emerging technique that utilizes electromagnetic waves in the THz band for nondestructive testing of materials and structures. Terahertz waves, located between microwaves and infrared radiation, are low-energy and non-ionizing, making them harmless to living organisms. They can not only penetrate non-metallic materials but also analyze the spectral properties of different materials to identify their composition and structure. Furthermore, the short wavelength of THz waves provides high spatial resolution, enabling the detection of minute structural defects and material heterogeneity.
[0003] Terahertz time-domain spectroscopy (THz) is a technique that uses electromagnetic waves in the terahertz (THz) band to analyze materials and substances. The core of THz time-domain spectroscopy lies in the generation and detection of THz pulses. Common methods for generating THz pulses include photoconductive antennas and nonlinear optical crystals. When a femtosecond laser pulse impinges on a photoconductive antenna or nonlinear crystal, an extremely short THz pulse is generated. A detector receives the THz pulse after it passes through the sample and records its time-domain signal. Because different materials have different absorption and reflection characteristics in the THz band, THz time-domain spectroscopy can identify the composition and structure of different materials. In summary, THz time-domain spectroscopy is suitable for rapid, contactless, and lossless detection.
[0004] Traditional metal corrosion detection under anti-corrosion coatings mainly involves manually peeling off the anti-corrosion coating in the corroded area and then visually determining the corroded area. This is not only time-consuming and labor-intensive, but also damages the integrity of the anti-corrosion coating. Summary of the Invention
[0005] The main purpose of the present invention is to provide a method for non-destructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy, which solves the problems existing in the prior art and realizes rapid and non-destructive detection of metal corrosion areas under anti-corrosion coatings without destroying the integrity of the original anti-corrosion coating.
[0006] In order to achieve the above object, the solution of the present invention is:
[0007] A method for nondestructive detection of metal corrosion areas under an anti-corrosion coating based on terahertz time-domain spectroscopy comprises the following steps:
[0008] Step 1. Place a metal substrate corrosion sample with an anti-corrosion coating on the detection platform of a terahertz time-domain spectroscopy imaging system. Set the imaging system's scanning area and scanning step size on the sample to obtain the reflected time-domain waveform signal at each discrete point in the scanning area.
[0009] Step 2. Use the peak-finding algorithm to calculate the peak value of the reflected time-domain waveform signal at each discrete point to obtain the peak value of the reflection peak on the corrosion interface and perform time-domain peak imaging;
[0010] Step 3. Normalize the grayscale value of the time-domain peak imaging image to achieve image enhancement, and then optimize the erosion boundary through morphological erosion and dilation to obtain the processed image;
[0011] Step 4. Calculate the image segmentation threshold parameters for the processed image, perform binary segmentation on the image, and fill the interior of the segmented corrosion area to optimize the result. Finally, mark the identified corrosion area on the grayscale normalized image and mark the edge of the corrosion area.
[0012] The specific steps of step 2 are:
[0013] Step 2-1. Set the minimum peak height to detect peaks above the threshold; set the minimum peak distance to control the minimum distance between adjacent peaks; for each discrete point, find the peak that meets the requirements based on the minimum peak height and minimum peak distance;
[0014] Step 2-2. Each peak found in step 2-1 corresponds to a position index. If only one peak is found, that peak is used as the peak of the current discrete point. If more than one peak is found, the peak with the largest amplitude is selected from all detected peaks as the peak of the current discrete point.
[0015] Step 2-3. Calculate the peak value of each discrete point in the scan area according to steps 2-1 and 2-2, and use the calculated peak value as the grayscale value of the corresponding discrete point. Finally, generate a time domain peak image of the scan area.
[0016] The specific steps of step 3 are:
[0017] Step 3-1. Improve the contrast of the image by grayscale normalization. The grayscale normalization formula is:
[0018] ;
[0019] in, Represents the normalized gray value matrix; Gray value matrix representing the image, the size of which is the number of discrete points in the scan area ; 、 Represents the gray value matrix The maximum and minimum values in ;
[0020] Step 3-2. First, perform an erosion operation on the image, and then perform a dilation operation on the eroded image.
[0021] The specific steps of step 4 are:
[0022] Step 4-1. Segment the corroded area from the image and use an adaptive threshold segmentation algorithm to binarize the image to obtain the corroded area.
[0023] Step 4-2. Fill the blank space inside the corroded area obtained in step 4-1. The filling criterion is to determine whether the blank space is surrounded by corroded areas. If so, fill the blank space.
[0024] Step 4-3. Mark the corroded area filled in step 4-2 on the grayscale-normalized image in step 3. Compare the recognition results and mark the edges of the corroded area to more accurately understand the scope and extent of the corrosion.
[0025] Preferably, the specific steps of step 4-1 are:
[0026] Step 4-1-1. The image processed in step 3 Calculate integral graph , the integral graph is defined as follows:
[0027] ;
[0028] in, Represents any point in the original grayscale image The integral value at ; Represents any point in the original grayscale image Gray value at ; 、 Respectively represent The horizontal and vertical coordinates of the pixel point in the middle are in the range of 、 ;
[0029] Step 4-1-2. After calculating the integral image, perform pixel classification, specifically determining the size of The rectangle inside the moving window Pixel values and local thresholds on , so that the window size depends on the width of the image ; Local threshold The calculation formula is:
[0030] ;
[0031] in, Represents the size of the moving window; , , , ;
[0032] Step 4-1-3. Calculate the rectangle using the following formula The number of pixels in ;
[0033] ;
[0034] Step 4-1-4. Finally, to perform image binarization, define the adaptive threshold using the following expression:
[0035] ;
[0036] in, Represents a preset percentage value; in the image binarization step, if the value of each pixel meets the above inequality conditions, it is set to black, otherwise it is set to white.
[0037] After adopting the above technical solution, the present invention has the following technical effects:
[0038] The present invention can perform non-destructive testing of metal corrosion under anti-corrosion coatings in a non-contact, rapid and comprehensive manner. On the one hand, compared with manually peeling off the anti-corrosion coating to determine the corroded area with the naked eye, the present invention greatly improves the detection efficiency while saving human resources. On the other hand, the present invention provides an image segmentation threshold based on grayscale histogramming, avoiding subjective bias in manual selection while ensuring image segmentation accuracy, and finally marking the edge of the corroded area, which can help accurately locate the specific position and shape of the corrosion, thereby improving detection accuracy. This helps engineers and maintenance personnel to more accurately understand the scope and extent of the corrosion so as to take more effective repair measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Flow chart of the method of the present invention.
[0040] Figure 2 This is the image of time domain peak imaging.
[0041] Figure 3 for Figure 2 Grayscale histogram of .
[0042] Figure 4 is the image after grayscale normalization.
[0043] Figure 5 for Figure 4 Grayscale histogram of .
[0044] Figure 6 is the image after dilation and erosion.
[0045] Figure 7 is the image after threshold binarization.
[0046] Figure 8 The image to fill the eroded interior.
[0047] Figure 9 Schematic diagram of marking the recognition area on the image after grayscale value normalization.
[0048] Figure 10 A schematic diagram of marking the identified edges on an image after grayscale value normalization. DETAILED DESCRIPTION
[0049] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.
[0050] like Figure 1 As shown, the present invention discloses a method for nondestructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy, comprising the following steps:
[0051] Step 1. Place a metal substrate corrosion sample with an anti-corrosion coating on the detection platform of a terahertz time-domain spectroscopy imaging system. Set the imaging system's scanning area and scanning step size on the sample to obtain the reflected time-domain waveform signal at each discrete point in the scanning area.
[0052] Step 2. Use the peak-finding algorithm to calculate the peak value of the reflected time-domain waveform signal at each discrete point to obtain the peak value of the reflection peak on the corrosion interface and perform time-domain peak imaging;
[0053] Step 3. Normalize the grayscale value of the time-domain peak imaging image to achieve image enhancement, and then optimize the erosion boundary through morphological erosion and dilation to obtain the processed image;
[0054] Step 4. Calculate the image segmentation threshold parameters for the processed image, perform binary segmentation on the image, and fill the interior of the segmented corrosion area to optimize the result. Finally, mark the identified corrosion area on the grayscale normalized image and mark the edge of the corrosion area.
[0055] Through the above scheme, the present invention can perform non-destructive testing of metal corrosion under anti-corrosion coatings in a non-contact, rapid and comprehensive manner; on the one hand, compared with manual peeling of the anti-corrosion coating to determine the corroded area with the naked eye, the detection efficiency is greatly improved while saving human resources; on the other hand, the present invention gives an image segmentation threshold based on grayscale histogramming, while ensuring the accuracy of image segmentation, avoiding subjective bias in human selection, and finally marking the edge of the corroded area, which can help accurately locate the specific position and shape of the corrosion, thereby improving the detection accuracy, which helps engineers and maintenance personnel to understand the scope and extent of the corrosion more accurately so as to take more effective repair measures.
[0056] Specific embodiments of the present invention are shown below.
[0057] The specific steps of step 1 above are:
[0058] Step 1-1. Place the metal substrate corrosion sample with anti-corrosion coating on the detection platform of the terahertz time-domain spectroscopy imaging system and stabilize the sample to obtain accurate measurement results;
[0059] Step 1-2. Set the imaging system's scanning area on the sample surface based on experimental requirements. This area can be adjusted based on the extent and distribution of corrosion to ensure coverage of all important areas. Also, carefully set the scanning step size to balance resolution and measurement time. A smaller step size provides higher resolution but requires more time, while a larger step size speeds up scanning but may reduce image detail.
[0060] Step 1-3. For each discrete point in the scan area, obtain the reflected time domain waveform signal data of the point, providing basic data for subsequent image generation.
[0061] The specific steps of step 2 above are:
[0062] Step 2-1. Set the minimum peak height to detect peaks above the threshold. Set the minimum peak distance to control the minimum distance between adjacent peaks to avoid detecting peaks that are too close together. For each discrete point, find the peak that meets the requirements based on the minimum peak height and minimum peak distance.
[0063] Step 2-2. Each peak found in step 2-1 corresponds to a position index. If only one peak is found, that peak is used as the peak of the current discrete point. If more than one peak is found, the peak with the largest amplitude is selected from all detected peaks as the peak of the current discrete point.
[0064] Step 2-3. Calculate the peak value of each discrete point in the scanning area according to steps 2-1 and 2-2, and use the calculated peak value as the grayscale value of the corresponding discrete point. Finally, generate the time domain peak image of the scanning area, as shown in the following example: Figure 2 、 3 shown.
[0065] The specific steps of step 3 above are:
[0066] Step 3-1. Improve the contrast of the image by normalizing the grayscale value to make the difference in reflective characteristics between the corroded area and the uncorroded area more obvious, such as Figure 4 、 5 As shown, the formula for grayscale normalization is:
[0067] ;
[0068] in, Represents the normalized gray value matrix; Gray value matrix representing the image, the size of which is the number of discrete points in the scan area ; 、 Represents the gray value matrix The maximum and minimum values in ;
[0069] Step 3-2. First, perform an erosion operation on the image. The main function of the erosion operation is to remove small noise in the image and shrink the target area, making the boundary of the eroded area smoother and more regular. Then, perform a dilation operation on the eroded image. The main function of the dilation operation is to restore the area of the target area and further smooth the boundary, making the edge of the eroded area more obvious and sharper. The combination of these two operations not only effectively removes noise in the image, but also highlights the main features of the eroded area. The results are shown below. Figure 6 shown.
[0070] The specific steps of step 4 above are:
[0071] Step 4-1. Segment the corroded area from the image and use an adaptive threshold segmentation algorithm to binarize the image to obtain the corroded area.
[0072] Specifically, step 4-1 includes the following sub-steps:
[0073] Step 4-1-1. The image processed in step 3 Calculate integral graph , the integral graph is defined as follows:
[0074] ;
[0075] in, Represents any point in the original grayscale image The integral value at ; Represents any point in the original grayscale image Gray value at ; 、 Respectively represent The horizontal and vertical coordinates of the pixel point in the middle are in the range of 、 ;
[0076] Step 4-1-2. After calculating the integral image, perform pixel classification, specifically determining the size of The rectangle inside the moving window Pixel values and local thresholds on , so that the window size depends on the width of the image (The maximum possible window width is 1 / 8 of the local threshold The calculation formula is:
[0077] ;
[0078] in, Represents the size of the moving window (i.e. width or height, since it is a square, both are equal); , , , ;
[0079] Step 4-1-3. Calculate the rectangle using the following formula The number of pixels in ;
[0080] ;
[0081] Step 4-1-4. Finally, to perform image binarization, define the adaptive threshold using the following expression:
[0082] ;
[0083] in, Represents a preset percentage value, generally 50%. The larger the value, the more dependent on the local features of the image. In the image binarization step, if the value of each pixel meets the above inequality conditions, it is set to black, otherwise it is set to white.
[0084] Step 4-2. Fill the blank space inside the corrosion area obtained in step 4-1, such as Figure 7 、 8As shown in the figure, the filling standard is to judge whether the blank area is surrounded by the corrosion area. If so, fill this area. The reason for this is that from a long-term perspective, the part surrounded by the corrosion area will gradually be corroded over time, so this part is corroded by default.
[0085] Step 4-3. Mark the eroded area filled in step 4-2 on the image after grayscale normalization in step 3, as shown in Figure 9 、 10 As shown in the figure, the contrast recognition effect and marking the edge of the corrosion area help to understand the scope and extent of corrosion more accurately.
[0086] The above embodiments and drawings do not limit the product form and style of the present invention. Any appropriate changes or modifications made by ordinary technicians in the relevant technical field should be deemed to be within the patent scope of the present invention.
Claims
1. A method for nondestructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy, characterized in that The following steps are involved: Step 1. Place a metal substrate corrosion sample with an anti-corrosion coating on the detection platform of a terahertz time-domain spectroscopy imaging system. Set the imaging system's scanning area and scanning step size on the sample to obtain the reflected time-domain waveform signal at each discrete point in the scanning area. Step 2. Use the peak-finding algorithm to calculate the peak value of the reflected time-domain waveform signal at each discrete point to obtain the peak value of the reflection peak on the corrosion interface and perform time-domain peak imaging; Step 3. Normalize the grayscale value of the time-domain peak imaging image to achieve image enhancement, and then optimize the erosion boundary through morphological erosion and dilation to obtain the processed image; Step 4. Calculate the image segmentation threshold parameters for the processed image, perform binary segmentation on the image, and fill the interior of the segmented corrosion area to optimize the result. Finally, mark the identified corrosion area on the grayscale normalized image and mark the edge of the corrosion area. The specific steps of step 4 are: Step 4-1. Segment the corroded area from the image and use an adaptive threshold segmentation algorithm to binarize the image to obtain the corroded area. The specific steps of step 4-1 are as follows: Step 4-1-1. The image processed in step 3 Calculate integral graph , the integral graph is defined as follows: ; in, Represents any point in the original grayscale image The integral value at ; Represents any point in the original grayscale image Gray value at ; 、 Respectively represent The horizontal and vertical coordinates of the pixel point in the middle are in the range of 、 ; Step 4-1-2. After calculating the integral image, perform pixel classification, specifically determining the size of The rectangle inside the moving window Pixel values and local thresholds on , so that the window size depends on the width of the image ; Local threshold The calculation formula is: ; in, Represents the size of the moving window; , , , ; Step 4-1-3. Calculate the rectangle using the following formula The number of pixels in ; ; Step 4-1-4. Finally, to perform image binarization, define the adaptive threshold using the following expression: ; in, Represents a preset percentage value; in the image binarization step, if the value of each pixel meets the above inequality conditions, it is set to black, otherwise it is set to white; Step 4-2. Fill the blank space inside the corroded area obtained in step 4-1. The filling criterion is to determine whether the blank space is surrounded by corroded areas. If so, fill the blank space. Step 4-3. Mark the corroded area filled in step 4-2 on the grayscale-normalized image in step 3. Compare the recognition results and mark the edges of the corroded area to more accurately understand the scope and extent of the corrosion.
2. The method for nondestructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy according to claim 1, characterized in that The specific steps of step 2 are: Step 2-1. Set the minimum peak height to detect peaks above the threshold; set the minimum peak distance to control the minimum distance between adjacent peaks; for each discrete point, find the peak that meets the requirements based on the minimum peak height and minimum peak distance; Step 2-2. Each peak found in step 2-1 corresponds to a position index. If only one peak is found, that peak is used as the peak of the current discrete point. If more than one peak is found, the peak with the largest amplitude is selected from all detected peaks as the peak of the current discrete point. Step 2-3. Calculate the peak value of each discrete point in the scan area according to steps 2-1 and 2-2, and use the calculated peak value as the grayscale value of the corresponding discrete point. Finally, generate a time domain peak image of the scan area.
3. The method for nondestructive detection of metal corrosion areas under anti-corrosion coatings based on terahertz time-domain spectroscopy according to claim 1, characterized in that The specific steps of step 3 are: Step 3-1. Improve the contrast of the image by grayscale normalization. The grayscale normalization formula is: ; in, Represents the normalized gray value matrix; Gray value matrix representing the image, the size of which is the number of discrete points in the scan area ; 、 Represents the gray value matrix The maximum and minimum values in ; Step 3-2. First, perform an erosion operation on the image, and then perform a dilation operation on the eroded image.
Citation Information
Patent Citations
Terahertz spectrum technology-based detection method for CMAS in thermal barrier coating layer
CN110455739A
Metal or coating corrosion detection method based on image processing technology
CN111028229A