A carbon fiber plate crack detection method based on image processing
Through image processing-based methods, including sliding window directional cutting, weighted average grayscale and Gaussian filtering, the problem of poor image recognition effect of large-size carbon fiber boards is solved, achieving more accurate crack recognition and simplification of computational complexity .
Patent Information
- Application Number
- CN202111345622.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-15
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-11-15
AI Technical Summary
The prior art has poor results in large-size image recognition of carbon fiber boards, high computational complexity, difficult to accurately identify crack areas, and is easily affected by factors such as light and mechanical vibration, resulting in low contrast and noise interference.
The image-based method is adopted to identify cracks of carbon fiber boards through sliding window directional clipping, weighted average grayscale, Gaussian filtering, histogram equalization, custom iterative optimization algorithms and morphological region feature extraction. Specific steps include input image, grayscale, smoothing processing, histogram equalization, segmentation threshold determination, denoising filtering and morphological feature detection.
The large-size recognition effect is more accurate, the calculation complexity is simplified, the noise is effectively removed, the image contrast is enhanced, and the cracked areas of carbon fiber boards are accurately identified, solving the problem of poor large-size image recognition effect.
Smart Images

Figure CN114037691B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of digital image processing, and in particular to a carbon fiber plate crack detection method based on image processing. Background Art
[0002] As a new type of prestressed material, carbon fiber plate plays an important role in the reinforcement of bridges, concrete, walls and piers. The actual tensile strength of different carbon fiber plate materials is also different. Therefore, it is necessary to test the tensile strength of carbon fiber plate materials. By collecting images of the carbon fiber plates after the test and identifying cracks and defects, the tensile strength of the material can be further determined. Summary of the invention
[0003] In order to overcome the defects in the above-mentioned prior art, the present invention provides a carbon fiber plate crack detection method based on image processing, which has a more accurate large-size recognition effect, greatly simplifies the computational complexity in processing, and further improves the crack area through morphological regional feature extraction.
[0004] Technical Solution
[0005] A carbon fiber plate crack detection method based on image processing comprises the following steps:
[0006] (1) Input the image, create a sliding window to directional crop the image, and label it;
[0007] (2) graying the crack image by calculating the grayscale image using the weighted average of the cropped image;
[0008] (3) Use Gaussian filter to smooth the grayscale image;
[0009] (4) Draw a grayscale histogram and use histogram equalization to enhance the overall contrast of the Gaussian filtered image;
[0010] (5) Determine the segmentation threshold to segment the target and background by combining custom and iterative optimization algorithms;
[0011] (6) Use binary image filtering to connect the areas and remove small area noise;
[0012] (7) Acquire crack targets based on morphological regional features and perform detection and identification.
[0013] Furthermore, the cropping adopts a method of creating a window and sliding cropping to convert a large-size image into a small-size image, thereby quickly and efficiently completing the recognition of cracks in the image.
[0014] Furthermore, the grayscale is converted using a weighted average method, and the specific operation is as follows:
[0015] For a color image with three RGB channels, the grayscale values of the three channels are combined according to the ratio of 0.299:0.587:0.114 for red, green, and blue, and the obtained value is used as the grayscale value of the original image.
[0016] Furthermore, the smoothing process adopts a Gaussian filtering method, and the specific operation is as follows:
[0017] Create a 5×5 convolution kernel template, move the template in the image, align the center of the convolution kernel with each pixel in the image in turn, then multiply and add the corresponding elements, fill in 0 where there is no element, and use the calculated value as the pixel corresponding to the center of the template.
[0018] Furthermore, the histogram equalization is used to enhance the overall contrast of the Gaussian filtered image. The specific operation is as follows: the histogram of the Gaussian filtered image is transformed into a uniformly distributed form, and the dynamic range of the grayscale value difference between pixels is increased, that is, the grayscale values of the large number of pixels in the image are widened, and the grayscale values of the small number of pixels are merged, thereby enhancing the overall contrast of the Gaussian filtered image.
[0019] Furthermore, the specific steps of the method combining the customization and iterative optimization algorithm are as follows:
[0020] (1) Initial value, the minimum gray value T of the statistical crack image min , maximum gray value T max , calculate the average value of the two as the initial threshold
[0021] (2) Segmentation: Segment the image according to the threshold T to obtain two pixel sets G1 = {f(x, y) ≥ T} and G2 = {f(x, y) ≤ T};
[0022] (3) Mean, calculate the grayscale averages u1 and u2 of the pixel sets G1 and G2:
[0023]
[0024]
[0025] (4) Iterate and calculate the new one based on u1 and u2 Repeat steps 2 to 4 until the threshold T converges to a certain range.
[0026] Furthermore, the binary image filtering adopts an area filtering method of connected regions, marks and sorts the connected regions in the image, and performs filtering and denoising by removing the noise of small-area connected regions.
[0027] Furthermore, the morphological regional features obtain crack targets, and the shape of the cracks is recognized by calculating the aspect ratio of the circumscribed rectangle of the cracks in the image.
[0028] Beneficial Effects
[0029] Compared with the prior art, the present invention has the following beneficial effects: the large-size recognition effect is more accurate, the computational complexity in the processing is greatly simplified, and the morphological regional feature extraction is further improved. In the crack area, the image acquisition is easily affected by factors such as light, atmosphere, and mechanical vibration, resulting in the crack image being brighter or darker overall, and the contrast between the target and the background is low. The image contrast is adjusted by histogram equalization to enhance the image visual effect. The part image is interfered with by the equipment and the transmission medium during the collection or transmission process to generate noise. In order to reduce the impact of noise on the detection and recognition of crack targets, Gaussian filtering is used to denoise the image. While denoising, the edge detail information of the image can also be effectively preserved, and the area containing cracks in the large-size image is effectively identified, solving the problem that the general crack recognition technology has poor recognition effect on large-size images. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a large-size high-definition image of a carbon fiber plate in a carbon fiber plate crack detection method based on image processing of the present invention;
[0031] Figure 2 yes Figure 1 A partial enlarged view of
[0032] Figure 3 yes Figure 2 A magnified image of the original image where the frame is selected;
[0033] Figure 4 yes Figure 3 Grayscale image of
[0034] Figure 5 is the Gaussian filter graph;
[0035] Figure 6 is the image enhancement map;
[0036] Figure 7 is a binary image;
[0037] Figure 8 is a binary filter image;
[0038] Fig. 9 is the crack identification diagram;
[0039] Fig.10 It is the crack judgment diagram;
[0040] Fig.11 It is a crack mosaic;
[0041] Fig.12 It is an implementation flow chart of the present invention. DETAILED DESCRIPTION
[0042] In order to better illustrate the content of the present invention, the following is a detailed description with reference to the accompanying drawings and implementation examples:
[0043] have Figure 1-Figure 12 As shown, the present invention discloses a carbon fiber plate crack detection method based on image processing, and the specific implementation steps include:
[0044] (1) Input the image, create a sliding window to directional crop the image, and label it;
[0045] (2) graying the crack image by calculating the grayscale image using the weighted average of the cropped image;
[0046] (3) Use Gaussian filter to smooth the grayscale image;
[0047] (4) Draw a grayscale histogram and use histogram equalization to enhance the overall contrast of the Gaussian filtered image;
[0048] (5) Determine the segmentation threshold to segment the target from the background using a combination of custom and iterative optimization algorithms;
[0049] (6) Use binary image filtering to connect the areas and remove small area noise;
[0050] (7) Acquire crack targets based on morphological regional features and perform detection and identification.
[0051] Furthermore, the cropping adopts a method of creating a window and sliding cropping to convert a large-size image into a small-size image, thereby quickly and efficiently completing the recognition of cracks in the image.
[0052] Furthermore, the grayscale is converted using a weighted average method, and the specific operation is as follows:
[0053] For RGB three-channel color images, the grayscale values of the three channels are combined in the ratio of 0.299:0.587:0.114 for red, green and blue, and the obtained value is used as the grayscale value of the original image. Since the human eye has different sensitivities to the three colors, a more reasonable grayscale image can be obtained by combining them in this ratio.
[0054] Furthermore, the smoothing process adopts a Gaussian filtering method, and the specific operation is as follows:
[0055] Establish a 5×5 convolution kernel template, move the template in the image, align the center of the convolution kernel with each pixel in the image in turn, then multiply and add the corresponding elements, fill 0 where there is no element, and use the calculated value as the pixel corresponding to the center of the template. Gaussian filtering can effectively remove Gaussian noise and effectively protect the edge detail information of the image.
[0056] Furthermore, the histogram equalization is used to enhance the overall contrast of the Gaussian filtered image. The specific operation is as follows: the histogram of the Gaussian filtered image is transformed into a uniformly distributed form, and the dynamic range of the grayscale value difference between pixels is increased, that is, the grayscale values of the large number of pixels in the image are widened, and the grayscale values of the small number of pixels are merged, thereby enhancing the overall contrast of the Gaussian filtered image.
[0057] Furthermore, the method combining the customization and iterative optimization algorithm has a certain degree of adaptability, and can quickly find the optimal threshold for segmentation and separate the target and background of the object. The specific steps are as follows:
[0058] (1) Initial value, the minimum gray value T of the statistical crack image min , maximum gray value T max , calculate the average value of the two as the initial threshold
[0059] (2) Segmentation: Segment the image according to the threshold T to obtain two pixel sets G1 = {f(x, y) ≥ T} and G2 = {f(x, y) ≤ T};
[0060] (3) Mean, calculate the grayscale averages u1 and u2 of the pixel sets G1 and G2:
[0061]
[0062]
[0063] (4) Iterate and calculate the new one based on u1 and u2 Repeat steps 2 to 4 until the threshold T converges to a certain range.
[0064] Furthermore, the binary image filtering adopts an area filtering method of connected regions, marks and sorts the connected regions in the image, and performs filtering and denoising by removing the noise of small-area connected regions.
[0065] Furthermore, the morphological regional features obtain crack targets, and the shape of the cracks is recognized by calculating the aspect ratio of the circumscribed rectangle of the cracks in the image.
[0066] Specifically, an image is input and a fixed small-size window is established, the original large-size image is slidingly cropped and labeled to obtain a series of small-size cropped images;
[0067] The cropped image is grayed out by weighted averaging to obtain a grayscale image, and then a Gaussian filter is established to perform Gaussian smoothing filtering on the grayscale image. In order to enhance the contrast between the target and the background, the Gaussian filtered image is enhanced to obtain an image enhancement image.
[0068] The segmentation threshold is determined by using a custom threshold and an iterative optimization algorithm, and the Gaussian filter enhancement image is converted into a binary image;
[0069] Finally, morphological region detection is used to remove small area noise through area filtering of connected regions, and the shape of cracks is recognized through the aspect ratio characteristics of the outer rectangle of the crack in the image.
[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the technical solutions of the present invention have been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A carbon fiber plate crack detection method based on image processing, characterized in that: The steps include: Step 1: Input the image, create a sliding window to crop the image, and label it; Step 2: grayscale the crack image by calculating the grayscale image using the weighted average of the cropped image; Step 3, using a Gaussian filter to smooth the grayscale image; Step 4, draw the grayscale histogram and use histogram equalization to enhance the overall contrast of the Gaussian filtered image; Step 5: Determine the segmentation threshold to segment the target and background by combining the custom and iterative optimization algorithms; Step 6: Use binary image filtering to filter the connected area and remove small area noise; Step 7, obtaining crack targets according to morphological regional features and performing detection and identification; A method combining a custom algorithm and an iterative optimization algorithm is used to determine a drawing threshold to segment the target and the background. The specific steps of the method combining a custom algorithm and an iterative optimization algorithm are as follows: (1) Initial value, the minimum gray value T of the statistical crack image min , maximum gray value T max , calculate the average value of the two as the initial threshold (2) Segmentation: Segment the image according to the threshold T to obtain two pixel sets G1 = {f(x, y) ≥ T} and G2 = {f(x, y) ≤ T}; (3) Mean, calculate the grayscale averages u1 and u2 of the pixel sets G1 and G2: (4) Iterate and calculate the new one based on u1 and u2 Repeat steps 2 to 4 until the threshold T converges to a certain range.
2. The carbon fiber plate crack detection method based on image processing according to claim 1, characterized in that: The cropping adopts a method of creating a window and sliding cropping to convert a large-size image into a small-size image, thereby quickly and efficiently completing the recognition of cracks in the image.
3. The carbon fiber plate crack detection method based on image processing according to claim 1, characterized in that: The specific operation of the grayscale conversion using the weighted average method is as follows: according to the different sensitivities of the human eye to the three colors of red, green and blue, the three channel components of the RGB image are weighted averaged with weights of 0.299, 0.587 and 0.114 respectively to obtain a more reasonable grayscale image.
4. The carbon fiber plate crack detection method based on image processing according to claim 1, characterized in that: The specific operation of the smoothing process using the Gaussian filtering method is as follows: establish a 5×5 convolution kernel template, move the template in the image, align the center of the convolution kernel with each pixel in the image in turn, then multiply and add the corresponding elements, fill in 0 where there is no element, and use the calculated value as the pixel corresponding to the center of the template.
5. The carbon fiber plate crack detection method based on image processing according to claim 1, characterized in that: The histogram equalization is used to enhance the overall contrast of the Gaussian filtered image. The specific operation is as follows: the histogram of the Gaussian filtered image is transformed into a uniformly distributed form, and the dynamic range of the grayscale value difference between pixels is increased, that is, the grayscale values of the pixels with a large number of pixels in the image are widened, and the grayscale values of the pixels with a small number of pixels are merged, thereby enhancing the overall contrast of the Gaussian filtered image.
6. The carbon fiber plate crack detection method based on image processing according to claim 1, characterized in that: The binary image filtering adopts the area filtering method of the connected region, marks and sorts the connected regions in the image, and performs filtering and denoising by removing the noise of small-area connected regions.
7. The carbon fiber plate crack detection method based on image processing according to claim 1, characterized in that: The morphological regional features are used to obtain crack targets, and the shape of the cracks is recognized by calculating the aspect ratio of the circumscribed rectangle of the cracks in the image.
