Damage detection method for precision manufacturing of large-size parts

Through the improved Canny operator, combined with multi-scale Gaussian filtering and frequency domain texture suppression, the shortcomings of traditional machine vision detection under uneven light and local contrast changes are solved, and higher detection accuracy and robustness are achieved.

CN120147323AInactive Publication Date: 2025-06-13TIANJIN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510633168.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When traditional machine vision detects large-sized parts, it cannot adapt to uneven light and local contrast changes, resulting in overexposure of high-reflection areas, missed detection in shadow areas, and high error detection rates.

Method used

The improved Canny operator is used to perform image denoising processing through a combination of multi-scale Gaussian filtering and frequency domain texture suppression, calculate the gradient amplitude and direction, and perform non-maximum suppression and double-threshold processing to extract the damaged image contour.

Benefits of technology

It effectively improves detection accuracy and robustness, can better detect surface damage of large-sized parts, reduces false detection rates, and preserves image target edges and detailed features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147323A_ABST
    Figure CN120147323A_ABST
Patent Text Reader

Abstract

The invention discloses a damage detection method for precision manufacturing of a large-size part, and the method comprises the steps: collecting a damage image of the precision manufacturing of the large-size part, and carrying out the gray processing of the damage image; filtering the damaged image after the gray processing, and completing the de-noising processing; calculating a gradient magnitude and a gradient direction of the damaged image; performing non-maximum suppression on the gradient amplitude and the gradient direction, and determining the edge contour of the damaged image; and extracting high and low thresholds of the edge contour of the damaged image, and connecting edges according to the high and low thresholds to obtain the contour of the damaged image. According to the method, the problem of poor detection accuracy caused by uneven illumination of a large-size part can be effectively solved, tiny damage edges are reserved, periodic texture interference is eliminated, textures and real damage are effectively distinguished, and the local adaptive capacity and the anti-interference performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image processing, and relates to a damage detection method for precision manufacturing of large-sized components, and specifically relates to a damage detection method for precision manufacturing of large-sized components based on an improved Canny operator. Background Art

[0002] In modern manufacturing, large-sized components are widely used in fields such as aerospace, energy, shipbuilding, and rail transit. Due to their large size, complex structure, and special material properties, various damages are extremely likely to occur during the processing. Large-sized parts usually bear extreme environments such as high loads, high temperatures, and corrosion. If manufacturing defects are not detected and repaired in time, it will lead to catastrophic failures during service. Traditional surface damage detection mainly relies on manual visual inspection, which has problems such as low efficiency, strong subjectivity, and easy missed detection. Therefore, machine vision technology has gradually become the mainstream solution for surface damage detection due to its non-contact, high-precision, and high-efficiency characteristics.

[0003] Traditional machine vision for detecting large-sized parts uses a fixed threshold, which cannot adapt to uneven illumination or local contrast changes on the surface of large-sized parts, resulting in overexposure in high-reflection areas and missed detection in shadow areas. And traditional Gaussian filtering cannot separate periodic textures from real damages, resulting in a high false detection rate. Summary of the Invention

[0004] In order to solve the above problems, the present invention aims to provide a damage detection method for precision manufacturing of large-sized components based on an improved Canny operator, which can effectively improve the detection accuracy and robustness, and has better performance in detecting surface damages of large-sized parts, so as to solve one or more technical problems existing in the prior art, and at least provide a beneficial choice or create conditions.

[0005] In order to achieve the above object, the present invention provides the following technical solutions: A damage detection method for precision manufacturing of large-sized components, the detection method comprising: Collecting a damage image of precision manufacturing of large-sized components, and performing grayscale processing on the damage image; Filtering the damage image after grayscale processing to complete denoising; Calculating the gradient magnitude and gradient direction of the above damage image; Performing non-maximum suppression on the gradient magnitude and gradient direction to determine the edge contour of the damage image; Extracting the high and low thresholds of the edge contour of the damage image, connecting the edges according to the high and low thresholds to obtain the damage image contour, and outputting the damage image contour.

[0006] In one embodiment of the present invention, the step of filtering the damaged image after grayscale processing and completing the denoising process further includes: Input the grayscale image after grayscale processing; Adopt multi-scale Gaussian filtering and output a multi-scale filtered image; Adopt frequency-domain texture suppression and output a frequency-domain filtered image; Perform weighted fusion on the multi-scale filtered image and the frequency-domain filtered image; Output the final filtered image of the damaged image to complete the denoising process.

[0007] In one embodiment of the present invention, the step of adopting multi-scale Gaussian filtering and outputting a multi-scale filtered image further includes: Perform smoothing processing by adopting multi-scale Gaussian filtering; Set two Gaussian filtering kernels with different scales to filter the image after grayscale processing respectively. The expression is as follows:

[0008]

[0009]

[0010] Among them, x and y are the spatial coordinates of the pixel, σ is the standard deviation of the Gaussian function, I is the input image, represents the convolution operation, σ 1 is the small Gaussian filtering kernel, σ 2 is the large Gaussian filtering kernel; Assign weights to the processing results of the two Gaussian filtering kernels and perform weighted fusion; Output the fused multi-scale filtered image.

[0011] In one embodiment of the present invention, the step of adopting frequency-domain texture suppression and outputting a frequency-domain filtered image further includes: Perform periodic texture suppression by adopting frequency-domain texture suppression; Perform Fourier transform on the image after grayscale processing to convert the image into a frequency-domain image. The expression is as follows:

[0012] Among them, I (x,y) is the grayscale value of the image at x , y , F (u,v) is the frequency-domain representation of the original image, f is the Fourier transform operator; Determine a band-stop filter to suppress the frequency components corresponding to the periodic texture, and the expression is as follows:

[0013] Wherein, H (u, v) is the frequency-domain representation of the band-stop filter; Perform an inverse Fourier transform on the filtered frequency-domain image, and the expression is:

[0014] Wherein, F filtered (u, v) is the filtered frequency-domain image, I filtered is the final result image after conversion; Output the frequency-domain filtered image.

[0015] In an embodiment of the present invention, the weighted fusion of the multi-scale filtered image and the frequency-domain filtered image further includes: Assign weights to the multi-scale filtered image and the frequency-domain filtered image, and perform weighted fusion, and the expression is:

[0016] Wherein, 1 , 2 , 3 are weight coefficients and satisfy 1 + 2 + 3 = 1.

[0017] In an embodiment of the present invention, the calculation of the gradient magnitude and gradient direction of the above-mentioned damaged image further includes: Adopt a 3×3 Scharr operator convolution kernel, define four directions of 0°, 45°, 90°, and 135°, and the Scharr operator convolution kernels in each direction are as follows: , , , ; Obtain the gradient components in four directions through the gradient template, and calculate the gradient magnitude and gradient direction of each pixel in the denoised damaged image, and the expression is as follows:

[0018]

[0019] Among them, G is the gradient magnitude of each pixel, θ is the gradient direction of each pixel.

[0020] In an embodiment of the present invention, the step of performing non-maximum suppression to determine the edge contour of the damaged image further includes: Merge adjacent pixel points in the gradient direction according to the four directions; Compare the gradient magnitude of the center point with its neighborhood along the gradient direction; If the gradient magnitude of the center point is the maximum value, retain it; if the gradient magnitude of the center point is not the maximum value, suppress it; Return the suppressed image to determine the edge contour of the damaged image.

[0021] In an embodiment of the present invention, the step of extracting the high and low thresholds of the edge contour of the damaged image, connecting the edges according to the high and low thresholds, and obtaining the contour of the damaged image further includes: Input the edge contour of the damaged image after non-maximum suppression processing; Divide the image of the edge contour of the damaged image into multiple sub-blocks, calculate the Otsu threshold of each sub-block, generate an initial threshold map, and perform Gaussian smoothing on the initial threshold map to generate a global threshold map; Determine the high threshold and the low threshold, compare them with the gradient magnitude of each pixel point in turn to determine the strong edges and the weak edges, and after connecting the edges, determine the contour of the damaged image.

[0022] In an embodiment of the present invention, the step of dividing the image of the edge contour of the damaged image into multiple sub-blocks, calculating the Otsu threshold of each sub-block, generating an initial threshold map, and performing Gaussian smoothing on the initial threshold map to generate a global threshold map further includes: Divide into multiple sub-blocks, and leave a partial overlapping area between the sub-blocks to avoid sudden changes between blocks. The expression is:

[0023] where k is the number of sub-blocks, the size of image I is M×N, and the size of the sub-block is m×n; Execute the Otsu threshold segmentation algorithm on each sub-block to calculate the Otsu threshold of each sub-block. The expression is:

[0024] where k is the k-th sub-block, is the sub-block I k of the between-class variance; The Otsu threshold value for each sub-block is filled, and a weighted average is performed on the overlapping area to generate an initial threshold map; Perform Gaussian filtering on the initial threshold map to eliminate the abrupt change between blocks and obtain a smoothed global threshold map. The expression is:

[0025] Where: is the Gaussian kernel, is the smoothing intensity.

[0026] In an embodiment of the present invention, the determination of the high threshold and the low threshold, and the comparison with the gradient amplitude of each pixel point in turn to determine the strong edge and the weak edge. After connecting the edges, the determination of the damaged image contour further includes: Mark the points with a gradient amplitude greater than the high threshold as strong edges, and mark the points with a gradient amplitude between the low threshold and the high threshold as weak edges; Determine the strong edge as the foreground, determine the points with a gradient amplitude lower than 0.3 times the low threshold as the background, and merge the strong edge and the connected weak edge; Determine the damaged image contour.

[0027] The present invention has the following beneficial effects: 1) The improved Gaussian filter adopts a combination of multi-scale adaptive filtering and frequency-domain band-stop filtering, which can effectively retain the edges of minor damages, distinguish textures from real damages, eliminate periodic texture interferences such as metal wire drawing, and retain the target edges and detail features of the image to the greatest extent.

[0028] 2) The improved gradient direction amplitude calculation method uses the Scharr operator and extends it to calculate the gradient direction and amplitude in four directions, effectively improving the accuracy and direction sensitivity of gradient calculation.

[0029] 3) The improved double-threshold processing method uses Otsu adaptive threshold selection based on block optimization, effectively dealing with the uneven illumination on the surface of large-sized parts and being unable to adapt to local contrast changes. It has better local adaptability and can retain more details. Description of the Drawings

[0030] Figure 1 is the process schematic of the present invention Figure 1 ; Figure 2 is the process schematic of the present invention Figure 2 ; Figure 3 is the process schematic of the present invention Figure 3 ; Figure 4 is the original picture; Figure 5 is the detection result of the traditional canny algorithm; Figure 6 The detection result of the Canny algorithm of the present invention. Specific implementation manners

[0031] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0032] The implementation manners of the present invention, examples of which are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The terms "first", "second", "third", etc. (if any) in the description and claims of the present invention and in the drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the objects described in this way can be interchanged under appropriate circumstances. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. The directional terms mentioned in the present invention, such as: up, down, left, right, front, back, inside, outside, side, etc., are only the directions with reference to the accompanying drawings. The implementation manners described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation to the present invention. In addition, the present invention repeats reference numerals and / or reference letters in different examples. This repetition is for the purpose of simplification and clarity and does not in itself indicate the relationship between the various embodiments and / or arrangements discussed. In addition, the present invention provides examples of various specific processes and materials, but those of ordinary skill in the art can be aware of the application of other processes and / or the use of other materials.

[0033] As Figure 1 shown, the present invention provides a method for detecting damage in the precision manufacturing of large-sized components. The detection method is based on an improved Canny operator and includes the following steps: S100. Collect damage images of the precision manufacturing of large-sized components and perform grayscale processing on the damage images.

[0034] In this step, surface damage pictures of the precision manufacturing of large-sized components are collected by an image acquisition device and fed back to an external device. Optionally, the external device is a PC, and the weighted average grayscale method is used to convert the color image of the surface damage picture into a grayscale image.

[0035] S200. Filter the grayscale-processed damage images to complete the denoising process.

[0036] In this step, an improved Gaussian filter based on multi-scale filtering and frequency-domain texture suppression is used to perform filtering and denoising on the damaged image after grayscale processing, that is, the grayscale image in step S100, so as to suppress noise.

[0037] Specifically, the multi-scale improved Gaussian filtering result and the frequency-domain texture suppression result of Gaussian filtering are obtained respectively, and then the two results are weighted and fused to obtain the final filtering result.

[0038] The multi-scale improved Gaussian filtering uses Gaussian filter kernels of multiple different scales σ 1, σ 2 to filter the image respectively, and the expressions are as follows:

[0039]

[0040] Among them, I is the input image, represents the convolution operation.

[0041] The improvement of frequency-domain texture suppression of Gaussian filtering filters the image using a band-stop filter, and the expression is as follows:

[0042] Among them, F filtered (u, v) is the frequency-domain image after filtering, I filtered is the final result image after conversion.

[0043] The final filtering result is obtained, and the expression is as follows:

[0044] Among them 1 , 2 , 3 are the weight coefficients, satisfying 1 + 2 + 3 = 1.

[0045] Furthermore, step S200 specifically further includes: S210. Input the grayscale image after grayscale processing.

[0046] In this step, the grayscale image grayscaled by the PC side in step S10 is input.

[0047] S220. Apply multi-scale Gaussian filtering and output the multi-scale filtered image.

[0048] In this step, based on multi-scale Gaussian filtering, obtain the multi-scale filtered image.

[0049] Specifically, S221. Perform smoothing processing using multi-scale Gaussian filtering.

[0050] The mathematical expression of Gaussian filtering is:

[0051] where x and y are the spatial coordinates of the pixel points, σ is the standard deviation of the Gaussian function.

[0052] S222. Set two Gaussian filtering kernels with different scales to filter the grayscale-processed image respectively.

[0053] In this step, set the small Gaussian filtering kernel σ 1 and the large Gaussian filtering kernel σ 2 . The dual filtering kernel can effectively meet the requirements of smoothing noise and retaining details. The small-scale filtering kernel effectively retains details, and the large-scale filtering kernel effectively smooths noise.

[0054] Preferably, set the small Gaussian filtering kernel σ 1 = 1.0 to retain the detailed part of the large part damage image; set the large Gaussian filtering kernel σ 2 = 2.0 to effectively smooth the noise.

[0055] The expressions are as follows:

[0056]

[0057] where, I is the input image, represents the convolution operation, σ 1 is the small Gaussian filtering kernel, σ 2 is the large Gaussian filtering kernel.

[0058] S223. Assign weights to the processing results of the two Gaussian filtering kernels and perform weighted fusion; In this step, for the two Gaussian filtering kernels σ 1 and σ 2The obtained results are weighted and fused. Preferably, a small Gaussian filtering kernel σ 1 Processing result: large Gaussian filtering kernel σ 2 The processing result is a weight of 0.7:0.3 for weighted fusion.

[0059] S224. Output the fused multi-scale filtered image.

[0060] S230. Use frequency-domain texture suppression to output the frequency-domain filtered image.

[0061] In this step, based on multi-scale Gaussian filtering, the frequency-domain filtered image is obtained.

[0062] Specifically, S231. Use frequency-domain texture suppression for periodic texture suppression.

[0063] S232. Perform Fourier transform on the grayscale-processed image to convert the image into a frequency-domain image.

[0064] In this step, the Fourier transform is used to convert the damage image of the large-sized part from the spatial domain to the frequency domain. The expression is as follows:

[0065] Among them, I (x, y) is the grayscale value of the image at x , y The place, F (u, v) is the frequency-domain representation of the original image, f Is the Fourier transform operator.

[0066] S233. Determine the band-stop filter to suppress the frequency components corresponding to the periodic texture.

[0067] In this step, the band-stop filter is used to suppress the central region and the characteristic radius range to eliminate the periodic texture. The expression is as follows:

[0068] Among them, H (u, v) is the frequency-domain representation of the band-stop filter.

[0069] S234. Perform inverse Fourier transform on the filtered frequency-domain image.

[0070] In this step, the frequency-domain image is filtered, and the inverse Fourier transform is used to convert the damage image of the large-sized part from the frequency domain back to the spatial domain. The expression is:

[0071]

[0072] Among them, H (u, v) is the frequency-domain representation of the band-stop filter, F filtered (u, v) is the frequency-domain image after filtering, I filtered is the final result image after conversion; S235. Output the frequency-domain filtered image.

[0073] S240. Perform weighted fusion on the multi-scale filtered image and the frequency-domain filtered image.

[0074] In this step, weights are respectively assigned to the multi-scale filtered image and the frequency-domain filtered image, and weighted fusion is performed. The expression is:

[0075] Among them, 1 , 2 , 3 are weight coefficients and satisfy 1 + 2 + 3 = 1.

[0076] Preferably, the multi-scale filtered image and the frequency-domain filtered image are weighted and fused with a weight of 0.6:0.4.

[0077] S250. Output the final filtered image of the damaged image to complete the denoising process.

[0078] In all steps of step S220, the surface damage of large-sized parts is processed by a multi-scale Gaussian filter kernel, and periodic texture interference is suppressed by combining frequency-domain filtering, which can effectively remove noise while retaining the edges of minor damages.

[0079] S300. Calculate the gradient magnitude and gradient direction of the above-mentioned damaged image.

[0080] In this step, the four-direction Scharr operator is first used to calculate the gradient magnitude and gradient direction of the damaged image of the large-sized part.

[0081] Specifically, S310. Use a 3×3 Scharr operator convolution kernel to define four directions of 0°, 45°, 90°, and 135°.

[0082] In this step, the Scharr operator is used to calculate the gradient magnitude and gradient direction. The 2×2 convolution template is extended to 3×3 convolution, and it is extended to four directions of 0°, 45°, 90°, and 135° based on the horizontal and vertical gradient directions. The Scharr operator convolution kernels in each direction are as follows: ,

[0083] ,

[0084] S320. Obtain the gradient components in four directions through the gradient template, and calculate the gradient magnitude of each pixel in the aforementioned damaged image after denoising G , and the expression is as follows:

[0085] S330. Obtain the gradient components in four directions through the gradient template, and calculate the gradient direction of each pixel in the aforementioned damaged image after denoising θ , and the expression is as follows:

[0086] S400. Perform non-maximum suppression on the gradient magnitude and gradient direction to determine the edge contour of the damaged image.

[0087] In this step, perform non-maximum suppression on the extracted gradient magnitude and gradient direction, and accurately retain the edge contour of the damaged image.

[0088] Perform non-maximum suppression in four directions of 0°, 45°, 90°, and 135° to eliminate edge errors. Specifically: S410. Merge adjacent pixel points in the gradient direction in four directions.

[0089] In this step, the gradient directions of adjacent pixel points are merged in four directions of 0°, 45°, 90°, and 135°.

[0090] S420. Along the gradient direction, compare the gradient magnitude of the center point with that of its neighborhood; if the gradient magnitude of the center point is the maximum value, retain it, and if the gradient magnitude of the center point is not the maximum value, suppress it.

[0091] S430. Return the suppressed image to determine the edge contour of the damaged image.

[0092] S500. Extract the high and low thresholds of the edge contour of the damaged image, connect the edges according to the high and low thresholds, obtain the contour of the damaged image, and output the contour of the damaged image.

[0093] In this step, an improved double-threshold processing method based on the Otsu threshold with block optimization is adopted to adaptively extract the high and low thresholds of large-sized parts, connect the edges, and obtain the damaged image contour.

[0094] Among them, the Otsu threshold segmentation method sets the segmentation threshold T according to the statistical analysis of the image gray histogram, and divides it into foreground and background. Then the between-class variance is as follows:

[0095] Among them, 0 ( T ) and 1 ( T ) are the pixel ratios of the foreground and background respectively, 0 ( T ) and 1 ( T ) are the average gray values of the foreground and background respectively.

[0096] The optimal threshold is the threshold that maximizes the between-class variance:

[0097] Furthermore, step S500 specifically includes: S510. Input the edge contour of the damaged image after non-maximum suppression processing in step S400.

[0098] S520. Divide the image of the edge contour of the damaged image into multiple sub-blocks, calculate the Otsu threshold of each sub-block, generate an initial threshold map, and perform Gaussian smoothing on the initial threshold map to generate a global threshold map.

[0099] In step S520, the generation of the global threshold map further includes the following steps: S521. Divide into multiple sub-blocks, and leave some overlapping areas between sub-blocks to avoid sudden changes between blocks. The expression is:

[0100] Among them, k is the number of sub-blocks, the size of image I is M×N, and the size of the sub-block is m×n.

[0101] Preferably, the image I of the edge contour of the damaged image is divided into 64×64 sub-blocks, and the size of the sub-blocks can be dynamically adjusted according to the image size and local contrast.

[0102] S522. Execute the Otsu threshold segmentation algorithm on each sub-block, calculate the Otsu threshold of each sub-block, and the expression is:

[0103] Among them, k is the k-th sub-block, is the inter-class variance of the sub-block I k of the sub-block.

[0104] In this step, the calculated local threshold reflects the contrast characteristics within the sub-block.

[0105] S523. Fill the Otsu threshold of each sub-block, perform weighted averaging on the overlapping regions, and generate an initial threshold map.

[0106] In this step, fill the threshold of each sub-block into the corresponding position, and then generate an initial threshold map.

[0107] S524. Perform Gaussian filtering on the initial threshold map to eliminate the inter-block mutation and obtain a smoothed global threshold map. The expression is:

[0108] Where: is the Gaussian kernel, is the smoothing intensity.

[0109] S530. Determine the high threshold and the low threshold, compare them with the gradient magnitude of each pixel point in turn, determine the strong edges and the weak edges, and after connecting the edges, determine the damage image contour.

[0110] In this step, it is necessary to determine the strong edges and the weak edges, and after connecting the edges, determine the damage image contour. Specifically: S531. Mark the pixel points with a gradient magnitude greater than the high threshold as strong edges, and mark the pixel points with a gradient magnitude between the low threshold and the high threshold as weak edges.

[0111] S532. Determine the strong edges as the foreground, determine the pixel points with a gradient magnitude lower than the low threshold of the preset coefficient as the background, and merge the strong edges and the connected weak edges.

[0112] Preferably, the pixel points with a gradient magnitude lower than 0.3 times the low threshold are used as the determined background.

[0113] S533. Generate a binary edge map and determine the damage image contour.

[0114] Finally, according to the above steps, output the damage image contour of the large-sized part to complete the entire detection process.

[0115] For the large-sized component precision manufacturing damage detection method of the present invention, in terms of the edge smoothing effect and the effectiveness of edge detection for processing defect images, compared with the traditional canny detection, the results are as Figures 4 - 6As shown. The defective images processed by the traditional Canny method retain the edge information of the background and impurities, making it difficult to clearly identify the edges of the defective parts of the material. However, the defective images processed by the method of the present invention optimize the edge information, enhance the continuity of the edges, and remove most of the background interference and impurities around the edges.

[0116] Furthermore, the common performance indicators for evaluating image detection are precision and F1 score. Precision refers to the ratio between the number of edge pixels correctly detected and all the detected edge pixels. The F1 score is the harmonic mean of precision and recall, which is used to balance the influence between the two.

[0117] The higher the precision and F1 score, the better the performance of the algorithm. The calculation formulas for precision and F1 score are shown as follows:

[0118]

[0119]

[0120] Among them, T P represents the edge pixels correctly detected, F P represents the non-edge pixels wrongly detected, F N represents the actual edge pixels not detected.

[0121] Table 1. Statistical analysis of edge features of two Canny operators

[0122] By comparing the traditional Canny operator and the improved Canny operator of the present invention, the statistical analysis of the edge features of the two Canny operators is obtained, as shown in Table 1. The precision of the method for detecting damage in the precision manufacturing of large-sized parts of the present invention has increased by 11%, and the F1 score has increased by 21.6%. The experimental results show that the technical solution of the present invention performs better in edge detection.

[0123] The method for detecting damage in the precision manufacturing of large-sized parts of the present invention can effectively handle the uneven illumination on the surface of large-sized parts and the problem of inability to adapt to local contrast changes based on the block-optimized Otsu adaptive threshold selection. It has better local adaptability and can retain more details.

[0124] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification. For those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application.

Claims

1. A damage detection method for precision manufacturing of large-size parts, characterized in that: The damage detection method comprises: Collecting damage images of the large-size parts produced by precision manufacturing, and performing grayscale processing on the damage images; Filtering the damaged image after grayscale processing to complete denoising; Calculate the gradient amplitude and gradient direction of the above damage image; Performing non-maximum suppression on the gradient amplitude and gradient direction to determine the edge contour of the damaged image; Extracting high and low thresholds of the edge contour of the damaged image, connecting the edges according to the high and low thresholds, and obtaining the damaged image contour; The step of filtering the damaged image after grayscale processing to complete denoising further includes: Input grayscale image after grayscale processing; Use multi-scale Gaussian filtering to output multi-scale filtered images; Adopt frequency domain texture suppression and output frequency domain filtered image; Performing weighted fusion on the multi-scale filtered image and the frequency domain filtered image; Output the final filtered image of the damaged image to complete the denoising process; The multi-scale filtered image and the frequency domain filtered image are weightedly fused, further comprising: Weights are assigned to the multi-scale filtered image and the frequency domain filtered image, and weighted fusion is performed. The expression is: in, 1, 2, 3 is the weight coefficient and satisfies 1+ 2+ 3=1.

2. The damage detection method according to claim 1, characterized in that: Using multi-scale Gaussian filtering, the step of outputting a multi-scale filtered image further includes: Multi-scale Gaussian filtering is used for smoothing; Set two Gaussian filter kernels of different scales to filter the grayscale processed image respectively. The expression is as follows: Among them, x, y are the spatial coordinates of the pixel, σ is the standard deviation of the Gaussian function, I is the input image, represents the convolution operation, σ 1 is a small Gaussian filter kernel, σ 2 is the large Gaussian filter kernel; Assign weights to the processing results of the two Gaussian filter kernels and perform weighted fusion; Output the fused multi-scale filtered image.

3. The damage detection method according to claim 2, characterized in that: The method of adopting frequency domain texture suppression and outputting a frequency domain filtered image further comprises: Frequency domain texture suppression is used for periodic texture suppression; Perform Fourier transform on the grayscale processed image and convert it into a frequency domain image. The expression is as follows: in, I (x,y) is the image at x , y The gray value at F (u,v) is the frequency domain representation of the original image, f is the Fourier transform operator; Determine the band-stop filter to suppress the frequency components corresponding to the periodic texture. The expression is as follows: in, H (u,v) is the frequency domain representation of the band-stop filter; The inverse Fourier transform is performed on the filtered frequency domain image, and the expression is: in, F filtered (u,v) is the frequency domain image after filtering, I filtered is the final result image after conversion; Output frequency domain filtered image.

4. The damage detection method according to claim 1, characterized in that: The step of calculating the gradient magnitude and gradient direction of the damaged image further includes: A 3×3 Scharr operator convolution kernel is used to define four directions: 0°, 45°, 90°, and 135°. The Scharr operator convolution kernel for each direction is as follows: , , , ; The gradient components in four directions are obtained through the gradient template, and the gradient amplitude and gradient direction of each pixel in the above-mentioned damaged image after denoising are calculated. The expression is as follows: , in, G is the gradient magnitude of each pixel, θ is the gradient direction of each pixel.

5. The damage detection method according to claim 4, characterized in that: The step of performing non-maximum suppression on the gradient amplitude and the gradient direction to determine the edge contour of the damaged image further comprises: According to the four directions, merge the similar pixels in the gradient direction; Along the gradient direction, compare the gradient magnitude between the center point and its neighborhood; If the gradient amplitude of the center point is the maximum value, it is retained; if the gradient amplitude of the center point is not the maximum value, it is suppressed; The suppressed image is returned, and the edge contour of the damaged image is determined.

6. The damage detection method according to claim 1, characterized in that: Extracting high and low thresholds of the edge contour of the damaged image, connecting the edges according to the high and low thresholds, and obtaining the damaged image contour, further includes: Input the edge contour of the damaged image after non-maximum suppression processing; Dividing the image of the edge contour of the damaged image into a plurality of sub-blocks, calculating the Otsu threshold of each sub-block to generate an initial threshold map, and performing Gaussian smoothing on the initial threshold map to generate a global threshold map; Determine the high threshold and the low threshold, compare them with the gradient amplitude of each pixel in turn, determine the strong edge and the weak edge, and after connecting the edges, determine the contour of the damaged image.

7. The damage detection method according to claim 6, characterized in that: The method of dividing the image of the edge contour of the damaged image into a plurality of sub-blocks, calculating the Otsu threshold of each sub-block, generating an initial threshold map, and performing Gaussian smoothing on the initial threshold map to generate a global threshold map further includes: Divide into multiple sub-blocks, retain some overlapping areas between the sub-blocks to avoid mutations between blocks, the expression is: Where k is the number of sub-blocks, the size of image I is M×N, and the sub-block size is m×n; Execute the Otsu threshold segmentation algorithm for each sub-block and calculate the Otsu threshold of each sub-block. The expression is: Among them, k is the kth sub-block, For sub-block I k The between-class variance of Fill in the Otsu threshold of each sub-block, perform weighted averaging on the overlapping areas, and generate the initial threshold map; The initial threshold map is Gaussian filtered to eliminate the mutations between blocks and obtain the smoothed global threshold map, which is expressed as: , in: is the Gaussian kernel, is the smoothing intensity.

8. The damage detection method according to claim 7, characterized in that: The step of determining the high threshold and the low threshold, comparing them with the gradient amplitude of each pixel point in turn, determining the strong edge and the weak edge, and connecting the edges to determine the damaged image contour further includes: Pixels with gradient magnitude greater than the high threshold are marked as strong edges, and pixels with gradient magnitude between the low threshold and the high threshold are marked as weak edges; Determine the strong edge as the foreground, determine the pixel point whose gradient amplitude is lower than the low threshold of the preset coefficient as the background, and merge the strong edge and the connected weak edge; Determine the lesion image contour.

Citation Information

Patent Citations

  • Improved adaptive threshold Canny edge detection method based on three-dimensional block matching

    CN113837198A

  • Infrared image defect contour detection method for wind power blade composite material

    CN114972397A