Method, device and equipment for detecting surface cracks of aviation structural component and medium
By acquiring the target image and extracting crack features based on multi-directional traversal pixel points, the problem that traditional detection technology is difficult to accurately detect tiny cracks is solved, achieving a more efficient and accurate detection effect.
Patent Information
- Application Number
- CN202510517708.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-24
AI Technical Summary
Traditional non-destructive testing technology is difficult to accurately detect tiny cracks on the surface of aviation structural parts, the manual detection efficiency is low and it is easy to miss the inspection. Image recognition technology has low detection accuracy in complex environments.
By acquiring the target image of the aviation structural parts, traversing the pixel points based on multiple directions, the initial crack image is extracted, and the crack skeleton information is extracted for detection using the brightness difference between the binarized image and the template crack image.
It improves the accuracy and efficiency of surface crack detection of aviation structural parts, effectively separates background and cracks, reduces noise interference, and enhances the reliability of detection results.
Smart Images

Figure CN120047440A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and particularly to a method, device, equipment and medium for detecting surface cracks of aviation structural components. Background Art
[0002] Due to the long-term exposure of aviation structural components (such as the protective grille of the engine air inlet) to harsh environments, they are easily impacted by high-speed airflows and foreign objects such as sand and stones, and tiny cracks are likely to occur on the surface, thus affecting the performance of the aircraft. In severe cases, it may even lead to structural failure and endanger flight safety. Therefore, the accurate detection of tiny cracks on the surface of aviation structural components has become an important part of aircraft maintenance work.
[0003] Limited by the special geometric shape and surface complexity of aviation structural components, traditional non-destructive testing techniques (such as penetrant testing, ultrasonic testing, and eddy current testing, etc.) have great limitations in application and are difficult to meet the requirements of accurately detecting tiny cracks. Currently, crack detection mainly relies on manual inspection. However, due to the limitations of the eyesight, fatigue level, and experience of the inspectors, manual detection has low efficiency and is prone to false detection and missed detection, and it is difficult to guarantee the accuracy of the detection results.
[0004] In recent years, image recognition technology has gradually been introduced into the field of crack detection. However, in the crack detection of aviation structural components, image processing still faces many challenges: Firstly, random noise is easily generated during the image acquisition and storage processes, affecting the clear presentation of crack features; Secondly, problems such as uneven light sources in the external environment and stains attached to the surface of the structural components will cause uneven gray-scale distribution of the image, thereby reducing the accuracy of crack detection. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, device, equipment and medium for detecting surface cracks of aviation structural components, which can solve the technical problem of low accuracy in crack detection.
[0006] To solve the above technical problem, an embodiment of the present invention provides a method for detecting surface cracks of aviation structural components, including the following steps: Obtain a target image of the aviation structural component to be detected; Based on various different directions of surface cracks of the aviation structural component, traverse the pixel points in the target image along each direction respectively, so as to extract an initial crack image containing the crack width information on the surface of the aviation structural component from the target image through the gray-scale value differences between the pixel points in the target image; Extract a target crack image containing the surface crack skeleton information of the aviation structural component from the initial crack image according to the brightness differences between the binary image of the initial crack image and multiple template crack images; wherein, the multiple template crack images are respectively binary images corresponding to binary matrices created based on different directions and different widths of the surface cracks of the aviation structural component. Detect the surface cracks of the aviation structural component through the target crack image.
[0007] Optionally, the aviation structural component is a protective grid plate, which is composed of multiple grids of the same size, and the horizontal and vertical spacings between adjacent two grids are equal. The traversing the pixel points in the target image along each direction respectively includes: Binarize the target image, and perform a closing operation on the binarized target image to obtain the Hole region of each grid in the target image. Determine the Bottom region of each grid in the target image according to the Hole region of each grid and the arrangement rule of each grid in the target image. Traverse the pixel points in each Bottom region along each direction respectively.
[0008] Optionally, the binarizing the target image and performing a closing operation on the binarized target image to obtain the Hole region of each grid in the target image includes: When binarizing the target image, set the region with pixel value higher than the first preset threshold in the target image to white, and the region with pixel value lower than the first preset threshold to black. By performing a closing operation on the binarized target image, eliminate the black regions with area smaller than the second preset threshold, and fill the white regions with area smaller than the second preset threshold. Adopt a preset contour tracking algorithm to extract the contour of the processed target image to form a circumscribed rectangle, and use the circumscribed rectangle as the Hole region of the grid.
[0009] Optionally, the determining the Bottom region of each grid in the target image according to the Hole region of each grid and the arrangement rule of each grid in the target image includes: Obtain the upper left coordinate, width and height of the circumscribed rectangle of the Hole region. According to the upper left coordinate, width, height of the circumscribed rectangle of the Hole region and the vertical spacing between adjacent two grids, obtain the upper left coordinate, width and height of the circumscribed rectangle of the Bottom region.
[0010] Optionally, the binary matrix includes binary matrices created respectively for cracks in the horizontal, vertical, left - oblique, and right - oblique directions on the surface of the aviation structural part, as follows: ; ; ; ; wherein, is the binary matrix in the horizontal direction, is the binary matrix in the vertical direction, is the binary matrix in the left - oblique direction, is the binary matrix in the right - oblique direction, respectively represent the row - column indices of the binary matrix, represents the height, represents the width of the crack, is a preset offset constant, represents the point to the vertical distance from the crack center axis.
[0011] Optionally, the target image contains multiple local regions, and the detection of surface cracks of the aviation structural part by the target crack image includes: Obtaining the gray - scale value of each local region, and determining the binarization threshold of each local region according to the gray - scale value of each local region; Binarizing each local region through the binarization threshold of each local region to obtain the binarized image of the target image; wherein, the binarization threshold of each local region is adjusted in real time through preset parameters; Detecting the surface cracks of the aviation structural part through the intersection of the binarized image of the target image and the target crack image.
[0012] Optionally, the obtaining of the target image of the aviation structural part to be detected includes: Taking an initial image of the aviation structural part; Performing perspective transformation on the initial image; Correcting the perspective - transformed initial image according to the tilt direction of the shooting camera and the surface shape of the aviation structural part to obtain the target image.
[0013] An embodiment of the present invention also provides a detection device for surface cracks of an aviation structural part, including: An image acquisition module, configured to acquire a target image of the aviation structural part to be detected; The first image processing module is configured to traverse pixel points in a target image along each direction based on multiple different directions of surface cracks of an aviation structural member, so as to extract an initial crack image containing the width information of the surface cracks of the aviation structural member from the target image through the gray value differences between the pixel points in the target image; The second image processing module is configured to extract a target crack image containing the skeleton information of the surface cracks of the aviation structural member from the initial crack image according to the brightness differences between the binary image of the initial crack image and multiple template crack images; wherein, the multiple template crack images are respectively binary images corresponding to binary matrices created based on different directions and different widths of the surface cracks of the aviation structural member; The image detection module is configured to detect the surface cracks of the aviation structural member through the target crack image.
[0014] An embodiment of the present invention further provides a computer device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for detecting surface cracks of an aviation structural member.
[0015] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned method for detecting surface cracks of an aviation structural member is implemented.
[0016] The method for detecting surface cracks of an aviation structural member provided by the present invention has at least the following beneficial effects: First, based on multiple different directions of surface cracks of an aviation structural member, pixel points in a target image are traversed along each direction, so as to extract the width information of the surface cracks of the aviation structural member from the image through the gray value differences between the pixel points in the target image, and the corresponding image is used as the initially extracted crack image. Then, a specific rule, that is, a binary matrix, is introduced to define the crack characteristics of different directions and different widths on the surface of the aviation structural member. Through this specific rule, more in-depth crack feature extraction can be performed from the initially extracted crack image to obtain the skeleton information of the surface cracks of the aviation structural member, thereby effectively avoiding detecting large blocky defects and edge information. Moreover, when the above-mentioned specific rule is used to further extract crack features from the initially extracted crack image, it is based on a binary image, which can effectively separate the background and cracks of the image, so that there is less noise around the cracks. Based on this, the surface cracks of the aviation structural member can be effectively detected, and the accuracy of crack detection can be improved. Description of the Drawings
[0017] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings, and these exemplary illustrations do not constitute a limitation on the embodiments.
[0018] Figure 1 is a flowchart of a method for detecting surface cracks of an aviation structural part according to an embodiment of the present invention; Figure 2 is a contrast diagram between the original image and the perspective-transformed contrast image according to an embodiment of the present invention; Figure 3 is an illustration diagram of an area to be detected according to an embodiment of the present invention; Figure 4 is a binary image according to an embodiment of the present invention; Figure 5 is a Bottom area image according to an embodiment of the present invention; Figure 6 is a comparison diagram of the effects of conventional binarization and adaptive binarization according to an embodiment of the present invention; Figure 7 is a flowchart block diagram of a method for detecting surface cracks of an aviation structural part according to an embodiment of the present invention. Detailed implementation manners
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in the embodiments of the present invention, many technical details are provided to help readers better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions required to be protected by the present invention can still be implemented. The following division of each embodiment is for convenience of description and should not constitute any limitation on the specific implementation manner of the present invention. Each embodiment can be combined and cross-referenced with each other on the premise of not conflicting.
[0020] The existing crack detection technologies have the following specific defects: 1. Defects of manual detection: (1) Low detection efficiency: Manual detection requires a lot of time and effort, and the detection process is easily affected by human factors (such as eyesight, fatigue, experience, etc.).
[0021] (2) Poor consistency: Due to different subjective judgments of the detection personnel, false detections and missed detections are common, making it difficult to ensure the accuracy of the detection results.
[0022] 2. Limitations of traditional image recognition algorithms: (1) Edge blurring: The crack size is tiny, and traditional filtering algorithms often cause edge blurring when processing images, making it difficult to distinguish fine cracks.
[0023] (2) Fixed threshold problem: Traditional binarization algorithms use fixed thresholds and are difficult to adapt to the interference of complex backgrounds (such as oil stains, shadows, etc.), easily losing crack information.
[0024] (3) Low efficiency: The sliding window algorithm is often affected by the gray value changes in non-crack regions, with a high false detection rate and a slow processing speed.
[0025] The crack detection method for the surface of the aircraft structural component of the present invention can effectively solve the above problems.
[0026] An embodiment of the present invention relates to a crack detection method for the surface of an aircraft structural component. The specific process of the crack detection method for the surface of the aircraft structural component in this embodiment can be as Figure 1 shown and includes: Step 101, obtain a target image of the aircraft structural component to be detected.
[0027] Step 102, based on multiple different directions of the surface cracks of the aircraft structural component, traverse the pixel points in the target image along each direction respectively, so as to extract an initial crack image containing the width information of the surface cracks of the aircraft structural component from the target image through the gray value differences between the pixel points in the target image.
[0028] Step 103, according to the brightness differences between the binary image of the initial crack image and multiple template crack images respectively, extract a target crack image containing the skeleton information of the surface cracks of the aircraft structural component from the initial crack image; wherein, the multiple template crack images are binary images corresponding to binary matrices created based on different directions and different widths of the surface cracks of the aircraft structural component.
[0029] Step 104, detect the surface cracks of the aircraft structural component through the target crack image.
[0030] In this embodiment, first, based on various different directions of surface cracks of the aviation structural component, pixel points in the target image are traversed along each direction, so as to extract the width information of the surface cracks of the aviation structural component from the image through the gray value differences between the pixel points in the target image, and the corresponding image is used as the initially extracted crack image. Then, a specific rule, that is, a binary matrix, is introduced to define the crack characteristics of different directions and different widths on the surface of the aviation structural component. Through this specific rule, more in-depth crack feature extraction can be carried out from the initially extracted crack image to obtain the skeleton information of the surface cracks of the aviation structural component, which can effectively avoid detecting large blocky defects and edge information. Moreover, when further extracting crack features from the initially extracted crack image by using the specific rule, it is based on a binary image, which can effectively separate the background and cracks of the image, resulting in less noise around the cracks. Based on this, the surface cracks of the aviation structural component can be effectively detected, improving the accuracy of crack detection.
[0031] The implementation details of the method for detecting surface cracks of the aviation structural component of the present invention will be specifically described below. The following content is only the implementation details provided for convenient understanding and is not necessary for implementing this solution.
[0032] In step 101, due to the limitation of the geometric structure of the aviation structural component, the camera needs to be deflected at an angle during image shooting, so the captured image of the aviation structural component will be slightly deformed. To ensure the accuracy and reliability of subsequent crack detection, the captured image needs to be subjected to a perspective transformation and corrected according to different shooting conditions (such as the tilt direction of the camera and the surface shape of the structural component) so that the image more conforms to the actual geometric shape, as Figure 2 shown. Therefore, in this embodiment, when obtaining the target image of the aviation structural component to be detected, first, the initial image of the aviation structural component is captured, and then the initial image is subjected to a perspective transformation, and the initially transformed image is corrected according to the tilt direction of the shooting camera and the surface shape of the aviation structural component, and finally the target image is obtained.
[0033] Among them, the perspective transformation operation is as follows: (1) Select the coordinates of four points in the original image.
[0034] (2) Calculate the coordinates of the four points in the corrected state.
[0035] The y-coordinate of the upper left point and the y-coordinate of the upper right point are equal to the minimum y-value of the upper left point and the upper right point; The y-coordinate of the lower left point and the y-coordinate of the upper right point are equal to the maximum y-value of the upper left point and the upper right point; The x-coordinate of the upper left point and the x-coordinate of the lower left point are equal to the minimum x-value of the upper left point and the lower left point; The x-coordinate of the upper right point and the x-coordinate of the lower right point are equal to the maximum x-value of the upper right point and the lower right point.
[0036] (3) Construct a perspective transformation equation system.
[0037] (4) Solve the matrix through linear algebra.
[0038] (5) Obtain the image after perspective transformation.
[0039] In one example, when capturing the initial image of an aviation structural component, images of the aviation structural component with multiple resolutions are obtained. Then, the aviation structural component image that meets the resolution requirements is read and converted into a grayscale image before proceeding to the next step. Since a color image has three channels (RGB) and a grayscale image uses only one channel, the data volume of the grayscale image is smaller than that of the color image, making it simpler, more efficient, and highlighting the brightness information for processing. Cracks are usually detected through brightness differences, and color information will introduce unnecessary complexity. Based on the sensitivity of the human eye to colors, the weights of red, green, and blue are 0.299, 0.587, and 0.114 respectively. That is, the grayscale image is obtained through the following formula : .
[0040] In one example, after obtaining the target image of the aviation structural component, the following preprocessing operations are also performed on the target image: (1) Median filtering, which is used to remove the "salt-and-pepper noise" in the image, that is, the points in the image where the pixel values deviate extremely from the surrounding values. Median filtering does not blur the edges while denoising, which is particularly important for crack detection because it can retain the structural information in the image while reducing the interference of noise on crack extraction.
[0041] (2) Adaptive histogram equalization, which is used to improve the contrast of the image, especially in the case of uneven illumination. It improves the visibility of low-contrast regions through local area equalization, which helps with subsequent crack detection.
[0042] (3) Since the images collected by the camera have a high resolution and are not convenient for preprocessing in the early stage of the image, common interpolation methods for image size transformation include nearest neighbor interpolation, bilinear interpolation, and trilinear interpolation. Although the trilinear interpolation method has better results, due to its large computational amount and long time, it is not conducive to real-time processing. Therefore, the bilinear interpolation method is selected.
[0043] In some embodiments, during crack detection, the crack region is first roughly located. By quickly screening potential crack regions, the interference of irrelevant regions can be effectively reduced, the recognition range can be narrowed, and thus the computational amount and processing complexity can be reduced. Rough location can not only improve the efficiency of subsequent accurate recognition but also avoid the resource waste and misjudgment risks that may be brought by direct accurate detection. Therefore, in this embodiment, the target detection region in the target image is first located, and then pixel point searches are performed in the target detection region along different directions of the center point of the target detection region to extract the initial crack image from the target detection region. Then, the target crack image is extracted from the initial crack image, and subsequent crack detection is performed.
[0044] Taking an aviation structural part as a protective grid plate as an example, the protective grid plate is composed of multiple grids of the same size, and the horizontal and vertical spacings between adjacent grids are equal. According to this rule, each grid in the target image is divided into three regions: Hole, Left, and Bottom, as Figure 3 shown. Since cracks only appear in the Bottom region of the grid and the protective grid has a certain arrangement rule, the Bottom region can be deduced by determining the Hole region.
[0045] Specifically, first, the target image is binarized to make the region to be detected in the image clearer from the background, so as to accurately locate the Hole region. When binarizing the target image, a threshold (the first preset threshold) is set. The region in the target image with a pixel value higher than the first preset threshold is set to white (255), and the region lower than the first preset threshold is set to black (0). According to experimental analysis, setting the threshold T = 10 can obtain the binarized image of the protective grid, as Figure 4 shown. Then, a closing operation is performed on the binarized target image. In crack detection, the closing operation can eliminate small black regions and fill small white regions, that is, by performing a closing operation on the binarized target image, the black regions with an area smaller than the second preset threshold are eliminated, and the white regions with an area smaller than the second preset threshold are filled, making the contour of the Hole region more complete. Finally, a preset contour tracking algorithm is used to extract the contour of the processed target image, and the area of the circumscribed rectangle of the extracted contour is calculated. The contours whose circumscribed rectangles are within the preset area range are selected as the Hole regions corresponding to the grids.
[0046] After obtaining the Hole region of each grid, next, according to the Hole region of each grid and the arrangement rule of each grid in the target image, determine the Bottom region of each grid in the target image. For each grid, first obtain the upper left coordinate (X, Y), width (W), and height (H) of the circumscribed rectangle of the Hole region, that is, obtain Then, according to the upper left coordinate, width, height of the circumscribed rectangle of the Hole region, and the vertical spacing (Vh) between two adjacent grids, obtain the upper left coordinate, width, and height of the circumscribed rectangle of the Bottom region.
[0047] For example, set the area interval of the circumscribed rectangle of the Hole region as (A1, A2), and the contour within this area interval is the required complete hole (i.e., the Hole region). After finding all the holes, the Bottom region of each grid can be determined according to the vertical spacing (Vh) of the protective grid grids: calculate the upper left coordinate (X, Y), width (W), and height (H) of the circumscribed rectangle of each Hole, and then determine that the upper left coordinate of the circumscribed rectangle of the Bottom region is (X, Y + H), the width is W, and the height is Vh, so as to obtain the Bottom region of each grid. This Bottom region is the target detection region, as Figure 5 shown.
[0048] Through this step, the overall efficiency and accuracy of crack detection are significantly improved, laying a foundation for refined detection.
[0049] In steps 102 and 103, in this embodiment, matching templates (including horizontal templates, vertical templates, left - inclined templates, and right - inclined templates) are created for cracks in different directions on the surface of the aviation structural part, so as to improve the detection coverage, and the matching template is a binary matrix for detecting the specific shape of cracks.
[0050] Among them, the horizontal template: is used to detect cracks in the horizontal direction, where the specified width of the middle row is assigned 255, and this template matrix (i.e., the binary matrix in the horizontal direction) is defined as follows: ; In the formula, represents the height, that is, the number of rows of the binary matrix, represents the width of the crack, respectively represent the row and column indices of the binary matrix.
[0051] The vertical template: is used to detect cracks in the vertical direction, where the specified height of the middle column is assigned 255, and this template matrix (i.e., the binary matrix in the vertical direction) is defined as follows: ; In the formula, represents the height, represents the width of the crack, respectively represent the row and column indices of the binary matrix.
[0052] Left - inclined template: Used to detect cracks from the upper left to the lower right. The right - diagonal area of the template matrix is assigned a value of 255. This template matrix (i.e., the binary matrix in the left - inclined direction) is defined as follows: ; In the formula, is a preset offset constant used to define the slope (main - diagonal offset), represents the height, represents the width of the crack, represents the vertical distance from the pixel point to the main line of the template (i.e., the central axis of the crack), respectively represent the row and column indices of the binary matrix.
[0053] Right - inclined template: Used to detect cracks from the upper right to the lower left. The right - diagonal area of the template matrix is assigned a value of 255. This template matrix (i.e., the binary matrix in the right - inclined direction) is defined as follows: ; In the formula, is a preset offset constant used to define the slope (main - diagonal offset), represents the height, represents the crack width, represents the vertical distance from the pixel point to the main line of the template, respectively represent the row and column indices of the binary matrix.
[0054] Based on this, search for cracks in the target image along multiple different directions of the surface cracks of the aviation structural part, namely the horizontal direction, the vertical direction, and the inclined direction (including the right - inclined and left - inclined). The search is based on the gray - value difference. When the gray - value of the searched pixel point is greater than the gray - value of the central point, the search stops. Thus, through the gray - value difference between each pixel point in the target image, an initial crack image containing the information about the surface crack width of the aviation structural part can be extracted from the target image. Among them, after traversing to obtain the gray - values of each pixel point in the target image, the gray - values of each pixel point can be compared. If in one direction, for example, in the horizontal direction, there are continuous pixel points with very small gray - value differences, and the gray - values of these pixel points are significantly different from those of the pixel points in other positions, then these continuous pixel points in this direction are regarded as an initial crack, thus forming an initial crack image containing the information about the surface crack width of the aviation structural part.
[0055] Then, match the extracted initial crack image with the images corresponding to the above - mentioned template matrices respectively (i.e., multiple template crack images), and a target crack image containing the information about the surface crack skeleton of the aviation structural part can be extracted from the initial crack image.
[0056] In specific implementation, the width of the crack is one of the main features for crack search. Areas that are too wide or too narrow may be excluded. By searching for the crack to determine the actual width of the crack, parameters are provided for the subsequent matching of the initial crack image and the template crack image. The crack width calculation formula is as follows: ; In the formula, is the width searched from the center point to the left, is the width searched from the center point to the right.
[0057] Then, by comparing the brightness differences between the initial crack image and the template crack image, the areas with higher correlation have smaller brightness differences, so as to determine whether it is a crack in the initial crack image. At the same time, the adaptive threshold can be used to adapt to different crack widths.
[0058] ; In the formula, is the gray value of the image area, is the gray value of the template area.
[0059] In an example, by performing morphological operations to fill the small gaps in the image crack, the crack connectivity can be enhanced, isolated small noise points can be removed, and the final detection result can be made smoother.
[0060] ; ; In the formula, represents the dilation operation, represents the erosion operation, is the structure element (i.e., the matrix kernel).
[0061] At this time, by superimposing the template crack images corresponding to the horizontal template, vertical template, left - inclined template, and right - inclined template, the skeleton information of the crack in the initial crack image (i.e., the target crack image) can be extracted, as follows: ; In the formula, is the pixel value of the i - th image, and n is the total number of images, including template crack images in different directions.
[0062] In an example, before matching the initial crack image and the template crack image in this step, first perform adaptive histogram equalization on the initial crack image to enhance the contrast, especially to increase the difference between the crack and the background in the crack area, and perform Gaussian blur on the image to smooth the image and reduce the interference of high - frequency noise on crack detection. High - frequency noise may be misjudged as the crack edge, and after smoothing, the true crack features can be better captured.
[0063] In step 104, when detecting the surface cracks of the aviation structural part, the surface cracks of the aviation structural part can be directly detected through the target crack image, or the target image can be binarized first to generate a binarized image, and then the surface cracks of the aviation structural part can be detected by combining the target crack image and the binarized image of the target image.
[0064] In a specific implementation, the target image contains multiple local regions. The binarization method used for binarizing the target image is as follows: obtain the gray value of each local region, and determine the binarization threshold of each local region according to the gray value of each local region; binarize each local region through the binarization threshold of each local region to obtain the binarized image of the target image; wherein, the binarization threshold of each local region is adjusted in real time through preset parameters. It can be understood that in order to improve the crack detection accuracy, the binarization operation can be directly performed on the obtained target detection region.
[0065] This adaptive binarization algorithm analyzes the gray level of local regions of the target detection region image, and determines the binarization threshold of each region according to the gray value of each region, thereby effectively suppressing problems such as uneven brightness in the image (such as shadows, light spots or other uneven brightness), noise interference, etc. As described below: (1) Fill the input image.
[0066] (2) Calculate the sum of local regions.
[0067] (3) Calculate the average value of local regions.
[0068] (4) Calculate the local average gray value, that is, the local threshold.
[0069] (5) Adjust the local binarization threshold through adjustable parameters to adapt to the change of image brightness and enhance the binarization effect.
[0070] (6) Invert the result to generate a binarized image.
[0071] This adaptive binarization algorithm has a better effect on the separation degree between cracks and the background (that is, there is less noise around the cracks), but it will detect shadow and stain areas. And the above target crack image contains the skeleton information of the cracks, which can effectively avoid detecting large blocky defects and edge information, but a large amount of noise will be introduced in the crack area. Therefore, by combining these two images in an intersection way, the crack information can be effectively extracted, as follows: ; In the formula, represents the binarized image obtained based on the adaptive binarization algorithm, It represents the target crack image obtained through the above template matching.
[0072] In this embodiment, through the improved adaptive binarization algorithm, the crack information on the protective grid plate can be efficiently and accurately extracted. By comparing the images processed by the conventional binarization algorithm and the algorithm of this embodiment, as Figure 6 shown, it can be clearly seen that the binarization algorithm provided by this embodiment can not only clearly extract the crack skeleton, but also significantly reduce the interference of surrounding noise on crack extraction, thus greatly improving the accuracy and reliability of crack detection, and providing good technical support for the crack detection of the protective grid plate.
[0073] In the specific implementation, finally, the detected cracks are screened by length, and according to experimental analysis, when the crack length is greater than 1 / 3 of the height of the target detection area, it is determined as a real crack.
[0074] An embodiment of the present invention relates to a method for detecting surface cracks of an aviation structural component. The specific process of the method for detecting surface cracks of the aviation structural component in this embodiment can be as Figure 7 shown, including: Step 1: Read the picture of the aviation structural component that meets the resolution requirements and convert it into a grayscale image.
[0075] Step 2: Perform a perspective transformation on the read image, and correct it according to different shooting conditions (such as the tilt direction of the camera and the surface shape of the structural component) so that the image more conforms to the actual geometric shape.
[0076] Step 3: Perform preprocessing operations on the picture after perspective transformation.
[0077] Step 3.1: Median filtering.
[0078] Step 3.2: Adaptive histogram equalization.
[0079] Step 3.3: Interpolation for image size transformation.
[0080] Step 4: Locate the target detection area: When identifying cracks, first perform a rough positioning on the crack area, and effectively reduce the interference of irrelevant areas by quickly screening potential crack areas, narrowing the recognition range, thereby reducing the calculation amount and processing complexity.
[0081] Step 5: Adaptive binarization: By performing a gray-scale analysis on the image of the target detection area in a local area, determine the binarization threshold of each area according to the gray-scale value of each area, so as to effectively suppress problems such as uneven brightness (such as shadows, light spots or other uneven brightness) and noise interference in the image.
[0082] Step 6: Rule-based multi-directional template matching binarization: Grayscale the input image, perform contrast-limited adaptive histogram equalization (CLAHE), and apply Gaussian blur to suppress noise and highlight the crack features of dark narrow stripes. Subsequently, use the adaptive width search method to determine the geometric features of the cracks, and conduct directional detection and verification through template matching (including vertical and oblique templates) to ensure robustness against cracks of different sizes and improve the detection ability for complex cracks.
[0083] Step 6.1: Perform adaptive histogram equalization on the input image.
[0084] Step 6.2: Apply Gaussian blur to the image.
[0085] Step 6.3: Create matching templates for cracks in different directions (including horizontal template, vertical template, left oblique template, right oblique template).
[0086] Step 6.4: Search for the crack width along the horizontal, vertical, and oblique directions (i.e., search based on the difference in grayscale values and stop when the grayscale value of the search point is higher than the central pixel).
[0087] Step 6.5: Template matching and threshold judgment. Compare the brightness differences between the template area and the actual area. Areas with higher correlation have smaller brightness differences, thereby determining whether it is a crack.
[0088] Step 6.6: Fill small gaps in the cracks through morphological operations, enhance the connectivity of the cracks, remove isolated small noise points, and make the final detection result smoother.
[0089] Step 6.7: Overlay the binary images of the horizontal template, vertical template, left oblique template, and right oblique template to extract the skeleton information of the cracks.
[0090] Step 7: Take the intersection of the adaptive binarization and the rule-based multi-directional template matching binarization.
[0091] Step 8: Screen the extracted suspected cracks by crack length.
[0092] The above crack detection method for aircraft structural parts generally follows the processing idea from coarse to fine and from global to local. Each step addresses specific problems and finally achieves accurate crack detection.
[0093] The crack detection method for the surface of aircraft structural parts of the present invention has the following beneficial effects: 1. Improved adaptive crack detection algorithm: (1) Based on the traditional adaptive crack detection algorithm, for complex backgrounds and high-noise environments, the noise suppression mechanism is optimized, and the interference of random noise on crack feature extraction is eliminated through regularization methods.
[0094] (2) Combine the local gradient feature analysis of the image to improve the ability of the crack detection algorithm to capture the edge features of micro-cracks.
[0095] 2. Hierarchical detection strategy: (1) Use a fast feature extraction method (coarse positioning) to detect suspected crack areas in the global image, significantly reducing the computational amount.
[0096] (2) Apply a refined edge feature enhancement algorithm (fine-grained detection) to the suspected crack areas to improve the detection accuracy and the accurate description of the crack boundary.
[0097] 3. Combination of noise suppression and feature enhancement: (1) Use a method of fusing multiple algorithms to separate the interference features from the crack features.
[0098] (2) Introduce multi-scale image processing technology to analyze the crack features at different resolutions, making the algorithm more robust when detecting micro-cracks.
[0099] 4. Dynamic parameter adaptive adjustment: According to the different crack morphologies (such as length, width, curvature), adaptively adjust the detection threshold and the feature extraction range of the algorithm to improve the detection rate of complex crack morphologies.
[0100] The step division of the above various methods is only for clear description. When implementing, they can be combined into one step or some steps can be split into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of the present invention; adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of its algorithm and process are all within the protection scope of this invention.
[0101] Another embodiment of the present invention relates to a detection device for surface cracks of an aviation structural component. The implementation details of the detection device for surface cracks of the aviation structural component in this embodiment will be specifically described below. The following content is only the implementation details provided for convenient understanding and is not necessary for implementing this solution. The detection device for surface cracks of the aviation structural component in this embodiment includes: An image acquisition module for acquiring a target image of the aviation structural component to be detected; A first image processing module for traversing the pixel points in the target image along each direction based on multiple different directions of the surface cracks of the aviation structural component, so as to extract an initial crack image containing the width information of the surface cracks of the aviation structural component from the target image through the gray value differences between the pixel points in the target image; A second image processing module, configured to extract a target crack image containing the surface crack skeleton information of the aviation structural member from the initial crack image according to the brightness differences between the binary image of the initial crack image and multiple template crack images; wherein, the multiple template crack images are respectively binary images corresponding to binary matrices created based on different directions and different widths of the surface cracks of the aviation structural member. An image detection module, configured to detect the surface cracks of the aviation structural member through the target crack image.
[0102] It is not difficult to find that this embodiment is a device embodiment corresponding to the above method embodiment, and this embodiment can be implemented in cooperation with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiment are still valid in this embodiment, and in order to reduce repetition, they will not be elaborated here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiment.
[0103] It is worth mentioning that each module involved in this embodiment is a logical module. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, units not closely related to solving the technical problems proposed by the present invention are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
[0104] Another embodiment of the present invention relates to a computer device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for detecting the surface cracks of the aviation structural member in the above embodiments.
[0105] Wherein, the memory and the processor are connected in a bus manner. The bus can include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and the memory together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, so they will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be an element or multiple elements, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna. Further, the antenna also receives data and transmits the data to the processor.
[0106] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory can be used to store the data used by the processor when executing operations.
[0107] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method embodiments described above are implemented.
[0108] That is, those skilled in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. This program is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0109] Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes can be made to them in form and details without departing from the spirit and scope of the present invention.
Claims
1. A method for detecting surface cracks of aviation structural parts, characterized in that: The method comprises: Acquire a target image of an aviation structure to be inspected; Based on the various directions of the surface cracks of the aviation structure, the pixels in the target image are traversed along each direction respectively, so as to extract the initial crack image containing the width information of the surface cracks of the aviation structure from the target image through the gray value difference between each pixel in the target image; According to the brightness difference between the binary image of the initial crack image and the multiple template crack images, a target crack image containing the crack skeleton information on the surface of the aviation structure is extracted from the initial crack image; wherein the multiple template crack images are binary images corresponding to the binary matrices created based on different directions and different widths of the surface cracks of the aviation structure; Surface cracks on aviation structural parts are detected through target crack images.
2. The method for detecting surface cracks of aviation structural parts according to claim 1, characterized in that: The aviation structural member is a protective grid, which is composed of a plurality of grids of the same size, and the horizontal spacing and vertical spacing between two adjacent grids are equal; The traversing the pixel points in the target image along each direction respectively includes: Binarize the target image and perform a closing operation on the binarized target image to obtain the Hole region of each grid in the target image; According to the Hole area of each grid and the arrangement rules of each grid in the target image, determine the Bottom area of each grid in the target image; Traverse the pixels in each Bottom area along each direction respectively.
3. The method for detecting surface cracks of aviation structural parts according to claim 2, characterized in that: The target image is binarized, and a closing operation is performed on the binarized target image to obtain the Hole region of each grid in the target image, including: When binarizing the target image, areas in the target image whose pixel values are higher than a first preset threshold are set to white, and areas whose pixel values are lower than the first preset threshold are set to black; By performing a closing operation on the binarized target image, a black area whose area is smaller than a second preset threshold is eliminated, and a white area whose area is smaller than the second preset threshold is filled; The preset contour tracking algorithm is used to extract the contour of the processed target image to form a bounding rectangle, and the bounding rectangle is used as the hole area of the grid.
4. The method for detecting surface cracks of aviation structural parts according to claim 3, characterized in that: Determining the Bottom area of each grid in the target image according to the Hole area of each grid and the arrangement rule of each grid in the target image includes: Get the upper left corner coordinates, width and height of the circumscribed rectangle of the Hole area; Get the upper left corner coordinates, width and height of the circumscribed rectangle of the Bottom area according to the upper left corner coordinates, width, height and the vertical distance between two adjacent grids of the circumscribed rectangle of the Hole area.
5. The method for detecting surface cracks of aviation structural parts according to claim 1, characterized in that: The binary matrix includes binary matrices created for cracks in the horizontal direction, vertical direction, left oblique direction, and right oblique direction on the surface of the aviation structure, respectively, as follows: ; ; ; ; In the formula, is a binary matrix in the horizontal direction, is a binary matrix in the vertical direction, is a binary matrix in the left oblique direction, is a binary matrix in the right oblique direction, Represent the row and column indices of the binary matrix respectively, Indicates height, represents the width of the crack, is the preset offset constant, Indicate point The vertical distance to the crack center axis.
6. The method for detecting surface cracks of aviation structural parts according to claim 1, characterized in that: The target image includes a plurality of local areas, and the detection of surface cracks of an aviation structure component through the target crack image includes: Obtaining the grayscale value of each local area, and determining the binarization threshold of each local area according to the grayscale value of each local area; Binarizing each local area by a binarization threshold of each local area to obtain a binarized image of the target image; wherein the binarization threshold of each local area is adjusted in real time by a preset parameter; The surface cracks of aviation structural parts are detected by the intersection of the binary image of the target image and the target crack image.
7. The method for detecting surface cracks of aviation structural parts according to claim 1, characterized in that: The step of acquiring a target image of an aviation structural part to be inspected comprises: Take pictures to obtain the initial images of aviation structural parts; Perform perspective transformation on the initial image; According to the tilt direction of the shooting camera and the surface shape of the aviation structure, the initial image after perspective transformation is corrected to obtain the target image.
8. A device for detecting surface cracks of aviation structural parts, characterized in that: The device comprises: An image acquisition module, used to acquire a target image of an aviation structural part to be inspected; The first image processing module is used to traverse the pixel points in the target image along each direction based on multiple different directions of the surface cracks of the aviation structure, so as to extract an initial crack image containing the width information of the surface cracks of the aviation structure from the target image according to the gray value difference between each pixel in the target image; A second image processing module is used to extract a target crack image containing crack skeleton information on the surface of the aviation structure from the initial crack image according to the brightness difference between the binary image of the initial crack image and a plurality of template crack images; wherein the plurality of template crack images are binary images corresponding to binary matrices created based on different directions and different widths of cracks on the surface of the aviation structure; The image detection module is used to detect surface cracks of aviation structural parts through target crack images.
9. A computer device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for detecting surface cracks of an aviation structural component as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting surface cracks of an aviation structural component according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and apparatus for testing surface defect
CN101256157A
Automatic identification method and system of pavement disease image
CN107230202A
Non-contact crack measurement method and system
CN113446932A
Aircraft component defect online identification system based on visual inspection
CN116433665A
Apparent crack length measuring method based on three-dimensional point cloud data
CN116718599A
Cited By
Fracture analysis method and system applied to SHPB impact test
CN120558696A