A geotechnical material defect identification method and system based on image recognition
Patent Information
- Application Number
- CN202610979123.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-09-25
AI Technical Summary
[0002]传统土工材料缺陷检测多采用固定单一光照角度采集表面图像,仅能获取单一场景下的灰度信息,无法完整采集不同光照方向下各像素位置的灰度变化规律,难以构建能够反映材料表面真实光学响应的光照响应曲线
[0054]1.本发明通过多方向定向光照采集形成完整灰度图像序列,为每个像素位置构建随光照角度变化的光照响应曲线,依据预设无缺陷基准曲线的容许偏差精准判定像素异常状态,对异常像素开展邻域连通性分析并剔除无效小面积异常区域,生成边界清晰、分布真实的异常分布图,完整保留微小缺陷与隐蔽缺陷的位置信息,大幅提升异常像素标记的准确性与缺陷初始定位的可靠性,为后续缺陷提取与判别提供高质量的基础数据。
Smart Images

Figure CN122820602A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual defect detection technology, and in particular to a method and system for identifying defects in geotechnical materials based on image recognition. Background Technology
[0002] Traditional methods for detecting defects in geosynthetic materials often rely on acquiring surface images from a fixed, single illumination angle. This approach only obtains grayscale information within a single scene and cannot comprehensively capture the grayscale variation patterns of each pixel under different illumination directions. Consequently, it struggles to construct an illumination response curve that accurately reflects the true optical response of the material surface. Furthermore, this method lacks a mechanism for comparing morphological deviations with a defect-free baseline curve, making it impossible to accurately determine whether pixel grayscale variations exceed reasonable tolerances. Abnormal pixel marking lacks objective basis, and the absence of neighborhood connectivity analysis and invalid small region removal results in anomaly distribution maps with chaotic markings and distorted regions. These maps fail to accurately represent the true distribution of defects, easily leading to missed detections of minute and hidden defects.
[0003] Existing defect identification schemes do not employ adaptive image enhancement processing driven by local texture contrast. Using fixed grayscale transformation rules fails to adapt to texture differences in different regions, resulting in insufficient grayscale differentiation between defect areas and the normal background. This leads to blurred, discontinuous, and incomplete defect edge contour extraction. Such technologies do not perform fracture frequency verification based on edge continuity, nor do they use shape features such as elongation, compactness, and smoothness to distinguish genuine defects from fakes. They cannot effectively filter out noise, artifacts, and other interference factors. Candidate defect areas are often mixed with numerous non-defect areas, resulting in a high false positive rate and low accuracy in the final defect identification results, making it difficult to meet the reliability and accuracy requirements of geotechnical material quality testing. Summary of the Invention
[0004] This invention provides a method and system for identifying defects in geotechnical materials based on image recognition, in order to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides a method for identifying defects in geosynthetic materials based on image recognition, comprising:
[0006] Pt.1. Based on the grayscale change characteristics of each pixel position in the grayscale image sequence of the geomaterial under different lighting directions, a light response curve is constructed, and pixels whose shape deviates from the preset defect-free reference curve allowable deviation are marked as abnormal pixels, thereby generating an abnormal distribution map of the geomaterial.
[0007] Pt.2. Perform adaptive image enhancement processing based on local texture contrast on the abnormal distribution map to generate an enhanced image, and generate candidate defect regions based on the regions surrounded by edge contours in the enhanced image;
[0008] Pt.3. For the candidate defect regions, perform defect authenticity determination based on edge continuity and shape constraints, filter out the real defect regions, and output the defect identification results.
[0009] In a preferred embodiment, the grayscale change characteristics of each pixel position in the grayscale image sequence based on geotechnical materials under different illumination directions constitute an illumination response curve, including:
[0010] According to the specified sequence of illumination angles, directional light beams are projected onto the surface of the geomaterial one by one. The surface reflected light intensity distribution under the current illumination angle is captured synchronously during each projection to obtain a single-angle grayscale image of the geomaterial.
[0011] An index mapping relationship is established between the single-angle grayscale image and the corresponding illumination angle to obtain the grayscale image metadata pair of the geotechnical material;
[0012] Based on the order of the illumination angle sequence, the grayscale image metadata pairs are sequentially spliced to obtain the grayscale image sequence of the geotextile material;
[0013] The illumination response curve of the geosynthetic material is constructed by using the illumination direction angle of the illumination angle sequence as the horizontal axis and the gray value of the grayscale image sequence as the vertical axis.
[0014] In a preferred embodiment, marking pixels whose shape deviates from the allowable deviation in the preset defect-free reference curve as abnormal pixels includes:
[0015] Extract the core morphological features of the illumination response curve, including the angle of the peak value, the peak gray value, and the asymmetry of the slope between the rising and falling segments of the curve.
[0016] Extract morphological features of the same type as the core morphological features from the preset defect-free baseline curve and use them as standard morphological features.
[0017] The core morphological features are compared with the standard morphological features to determine the overall morphological deviation of the geosynthetic material.
[0018] When the overall deviation of the shape is greater than the threshold of the allowable deviation in the defect-free reference curve, it is determined that the shape of the illumination response curve has deviated.
[0019] Record the positions of all pixels that are determined to have deviated in shape, and add a deviation flag to each record to obtain the abnormal pixels of the geotextile material.
[0020] In a preferred embodiment, the formula for calculating the morphological deviation is as follows:
[0021] ;
[0022] In the formula, The overall deviation of the morphology. The angle at which the peak value of the illumination response curve is located. The angle at which the peak value of the defect-free reference curve is located. The peak gray value of the illumination response curve is [value]. The peak gray value of the defect-free reference curve is... The slope asymmetry of the illumination response curve is given by [reference to a specific curve]. The slope asymmetry of the defect-free reference curve. The preset peak angle deviation weighting coefficient, The preset peak grayscale deviation weighting coefficient, The preset slope asymmetry deviation weighting coefficient, This is a preset measure to prevent the removal of small quantities.
[0023] In a preferred embodiment, generating the anomaly distribution map of the geosynthetic material includes:
[0024] Create a blank base map with the same size as a single image in the grayscale image sequence. Initialize the value of each pixel in the blank base map to zero to obtain the initial distribution base map of the geosynthetic material.
[0025] Traverse the pixel positions of the abnormal pixels, and on the initial distribution base map, modify the value of the pixel position to the first identifier value to obtain the intermediate distribution map of the geosynthetic material;
[0026] Neighborhood connectivity analysis is performed on the intermediate distribution map to merge adjacent abnormal marker pixels into abnormal regions, and the number of pixels occupied by the abnormal regions is counted.
[0027] The identifier values of all pixel positions in the abnormal regions that do not meet the minimum area requirement are restored to zero to obtain the abnormal distribution map of the geotechnical material.
[0028] In a preferred embodiment, the step of performing adaptive image enhancement processing based on local texture contrast on the anomaly distribution map to generate an enhanced image, and generating candidate defect regions based on the regions enclosed by edge contours in the enhanced image, includes:
[0029] The abnormal distribution map is segmented into local image blocks, wherein each local image block covers a rectangular sub-region composed of adjacent pixels;
[0030] The grayscale range and distribution pattern of the internal pixel values in the local image block are analyzed, and the grayscale difference between the center pixel and the surrounding neighboring pixels of the local image block is calculated to obtain the texture contrast coefficient of the geotextile material.
[0031] Based on the texture contrast coefficient, a grayscale mapping table is fitted to the local image block, wherein the grayscale mapping table converts the input grayscale value into the output grayscale value to obtain the dynamic mapping curve of the geomaterial.
[0032] Using the dynamic mapping curve, a nonlinear grayscale transformation is performed on each pixel within the local image block, and all transformed image blocks are mosaicked according to their original spatial positions to obtain an enhanced image of the geotechnical material.
[0033] Gradient amplitude detection is performed on the enhanced image to obtain an edge intensity distribution map. Then, a continuous closed contour line is formed by edge pixel tracking and closure operations. The pixel area surrounded by the closed contour line is used as a candidate defect area of the geotechnical material.
[0034] In a preferred embodiment, the step of forming a continuous closed contour line through edge pixel tracking and closure operations includes:
[0035] Pixels with intensity values exceeding a preset intensity threshold are selected from the edge intensity distribution map and used as starting edge points to obtain the edge point seed queue of the geomaterial.
[0036] The neighboring pixels are traversed to both sides along the normal direction of the starting edge point in the edge point seed queue. The neighboring pixels that continuously satisfy the strength threshold condition are connected in sequence to obtain the edge point trajectory segment of the geomaterial.
[0037] When the edge point trajectory segment encounters a branch point or endpoint, the direction information of the edge point trajectory segment is recorded, and the tracking continues along the unexplored direction until all neighborhood directions have been explored, thus obtaining the edge pixel chain of the geomaterial.
[0038] Identify the start and end points of the edge pixel chain. When the start and end points are adjacent in space or separated by a distance less than a preset closure threshold, connect the start and end points directly to obtain the candidate defect region of the geotechnical material.
[0039] In a preferred embodiment, performing a defect authenticity determination based on edge continuity and shape constraints on the candidate defect region includes:
[0040] Along the direction of the outer edge node sequence in the candidate defect region, the Euclidean distance between two adjacent pixel nodes is measured successively. If the Euclidean distance exceeds the continuity tolerance, the current position is recorded as a break node.
[0041] After traversing the complete sequence of outer edge nodes, the total number of fracture nodes on the candidate defect region is accumulated, and the perimeter of the candidate defect region is calculated. The fracture frequency of the geosynthetic material is obtained by dividing the total number of fracture nodes by the perimeter.
[0042] If the fracture frequency is less than the preset fracture allowable frequency threshold, the candidate defect region is determined to have edge continuity attribute, and the candidate defect region is included in the list of regions to be verified by shape.
[0043] In a preferred embodiment, the step of filtering out the actual defect areas and outputting the defect identification results further includes:
[0044] Determine the smallest bounding rectangle of the region to be verified in the list of regions to be verified, obtain the ratio of the length of the long side to the short side, and obtain the stretching feature of the region to be verified.
[0045] Record the area and perimeter of the region to be verified, and establish a correlation between the square of the area and the perimeter to obtain the compactness feature of the region to be verified;
[0046] The curvature values at each location are extracted along the boundary curve of the region to be verified, and the fluctuation range of all curvature values is obtained to obtain the smoothness characteristics of the region to be verified.
[0047] The stretching feature, the compactness feature, and the smoothness feature are combined into a shape feature vector of the region to be verified. A typical defect shape feature library is called, and the shape feature vector is compared with the standard shape vector in the feature library one by one to obtain the real defect region and artifact region of the geomaterial.
[0048] By summarizing the location information and morphological parameters of all real defect areas, the defect identification results of the geotechnical material are obtained.
[0049] To address the aforementioned problems, the present invention also provides an image recognition-based system for identifying defects in geosynthetic materials, the system comprising:
[0050] The optical response anomaly analysis module is used to construct an illumination response curve based on the grayscale change characteristics of each pixel position in the grayscale image sequence of the geomaterial under different illumination directions, and to mark pixels whose shape deviates from the preset defect-free reference curve tolerance as abnormal pixels, thereby generating an anomaly distribution map of the geomaterial.
[0051] The texture intensity region selection module is used to perform adaptive image enhancement processing based on local texture contrast on the abnormal distribution map, generate an enhanced image, and generate candidate defect regions based on the regions surrounded by edge contours in the enhanced image.
[0052] The shape and edge discrimination module is used to perform a defect authenticity judgment based on edge continuity and shape constraints on the candidate defect regions, filter out the real defect regions, and output the defect recognition results.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] 1. This invention forms a complete grayscale image sequence through multi-directional directional illumination acquisition, constructs an illumination response curve for each pixel location that varies with the illumination angle, accurately determines the abnormal state of pixels based on the allowable deviation of a preset defect-free baseline curve, performs neighborhood connectivity analysis on abnormal pixels and removes invalid small-area abnormal regions, and generates an abnormal distribution map with clear boundaries and realistic distribution, fully preserving the location information of minor and hidden defects, significantly improving the accuracy of abnormal pixel marking and the reliability of initial defect localization, and providing high-quality basic data for subsequent defect extraction and discrimination.
[0055] 2. This invention implements adaptive image enhancement processing based on local texture contrast, dynamically adapting the grayscale features of different regions to enhance the distinction between defects and background. Through gradient amplitude detection and edge tracking closure, a complete and continuous defect contour is formed. Relying on edge continuity verification and multi-dimensional shape constraints such as stretching, compactness, and smoothness, the invention completes the screening of genuine and fake defects, effectively filtering noise and artifact interference, accurately locating the real defect area and outputting complete defect parameters, significantly improving the accuracy and stability of defect identification, and ensuring the credibility of geotechnical material defect detection results and the efficiency of the detection process. Attached Figure Description
[0056] Figure 1 This is a flowchart illustrating a method for identifying defects in geosynthetic materials based on image recognition, provided in an embodiment of the present invention.
[0057] Figure 2 A functional module diagram of a geosynthetic material defect identification system based on image recognition, provided in an embodiment of the present invention;
[0058] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0059] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0060] This application provides a method for identifying defects in geosynthetic materials based on image recognition. The executing entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the method for identifying defects in geosynthetic materials based on image recognition can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0061] Reference Figure 1 The diagram shown is a flowchart illustrating a method for identifying geosynthetic material defects based on image recognition, according to an embodiment of the present invention. In this embodiment, the method for identifying geosynthetic material defects based on image recognition includes:
[0062] Pt.1. Based on the grayscale change characteristics of each pixel position in the grayscale image sequence of the geomaterial under different lighting directions, a light response curve is constructed, and pixels whose shape deviates from the preset defect-free reference curve allowable deviation are marked as abnormal pixels, thereby generating an abnormal distribution map of the geomaterial.
[0063] In this embodiment of the invention, the grayscale change characteristics of each pixel position in the grayscale image sequence based on geotechnical materials under different illumination directions constitute an illumination response curve, including:
[0064] According to the specified sequence of illumination angles, directional light beams are projected onto the surface of the geomaterial one by one. The surface reflected light intensity distribution under the current illumination angle is captured synchronously during each projection to obtain a single-angle grayscale image of the geomaterial.
[0065] An index mapping relationship is established between the single-angle grayscale image and the corresponding illumination angle to obtain the grayscale image metadata pair of the geotechnical material;
[0066] Based on the order of the illumination angle sequence, the grayscale image metadata pairs are sequentially spliced to obtain the grayscale image sequence of the geotextile material;
[0067] The illumination response curve of the geosynthetic material is constructed by using the illumination direction angle of the illumination angle sequence as the horizontal axis and the gray value of the grayscale image sequence as the vertical axis.
[0068] The step of marking pixels whose shape deviates from the preset defect-free reference curve by more than the allowable deviation as abnormal pixels includes:
[0069] Extract the core morphological features of the illumination response curve, including the angle of the peak value, the peak gray value, and the asymmetry of the slope between the rising and falling segments of the curve.
[0070] Extract morphological features of the same type as the core morphological features from the preset defect-free baseline curve and use them as standard morphological features.
[0071] The core morphological features are compared with the standard morphological features to determine the overall morphological deviation of the geosynthetic material.
[0072] When the overall deviation of the shape is greater than the threshold of the allowable deviation in the defect-free reference curve, it is determined that the shape of the illumination response curve has deviated.
[0073] Record the positions of all pixels that are determined to have deviated in shape, and add a deviation flag to each record to obtain the abnormal pixels of the geotextile material.
[0074] The formula for calculating the overall deviation of the morphology is as follows:
[0075] ;
[0076] In the formula, The overall deviation of the morphology. The angle at which the peak value of the illumination response curve is located. The angle at which the peak value of the defect-free reference curve is located. The peak gray value of the illumination response curve is [value]. The peak gray value of the defect-free reference curve is... The slope asymmetry of the illumination response curve is given by [reference to a specific curve]. The slope asymmetry of the defect-free reference curve. The preset peak angle deviation weighting coefficient, The preset peak grayscale deviation weighting coefficient, The preset slope asymmetry deviation weighting coefficient, This is a preset measure to prevent the removal of small quantities.
[0077] The generation of the anomaly distribution map of the geosynthetic material includes:
[0078] Create a blank base map with the same size as a single image in the grayscale image sequence. Initialize the value of each pixel in the blank base map to zero to obtain the initial distribution base map of the geosynthetic material.
[0079] Traverse the pixel positions of the abnormal pixels, and on the initial distribution base map, modify the value of the pixel position to the first identifier value to obtain the intermediate distribution map of the geosynthetic material;
[0080] Neighborhood connectivity analysis is performed on the intermediate distribution map to merge adjacent abnormal marker pixels into abnormal regions, and the number of pixels occupied by the abnormal regions is counted.
[0081] The identifier values of all pixel positions in the abnormal regions that do not meet the minimum area requirement are restored to zero to obtain the abnormal distribution map of the geotechnical material.
[0082] Following a fixed illumination angle sequence determined after verification through defect-free geosynthetic material testing, multi-directional light sources are sequentially adjusted to project beams of light with constant direction and uniform intensity onto the geosynthetic material testing surface. Simultaneously, an image acquisition device is triggered to perform exposure imaging each time the beam is projected, completely acquiring the reflected light intensity distribution information at various locations on the geosynthetic material surface under that illumination angle. The acquired reflected light intensity information is converted into a digital image with uniform grayscale distribution according to the linear relationship between light intensity and grayscale value, thus obtaining a single-angle grayscale image of the geosynthetic material.
[0083] Each generated single-angle grayscale image is uniquely bound to the specific illumination angle value used in this imaging process. The unique character identifier corresponding to the illumination angle is written into the file storage header attribute of the single-angle grayscale image to ensure that the corresponding single-angle grayscale image can be directly retrieved and located through the illumination angle value, thus obtaining the grayscale image metadata pair of the geotechnical material.
[0084] By strictly following the fixed arrangement order of the pre-set illumination angle sequence, all grayscale image metadata pairs of geosynthetic materials are arranged and combined in order of illumination angle from low to high, ensuring that the position of each grayscale image metadata pair corresponds completely to the order of illumination angle changes, without misalignment or reversal, thus obtaining the grayscale image sequence of geosynthetic materials.
[0085] The grayscale values of the same pixel coordinate position in the grayscale image sequence of the geomaterial are selected one by one under all illumination angles. The angles of each illumination direction in the illumination angle sequence are used as the horizontal coordinates of the two-dimensional coordinate system, and the grayscale values of the pixel position under the corresponding illumination angle are used as the vertical coordinates of the two-dimensional coordinate system. The corresponding coordinate points are marked one by one in the two-dimensional coordinate system, and then all coordinate points are connected in sequence using a smooth connection method to construct the illumination response curve of a single pixel of the geomaterial.
[0086] The horizontal angle and vertical grayscale values of all coordinate points on the illumination response curve are read point by point. The coordinate point with the largest vertical grayscale value is determined by full traversal. The horizontal angle value corresponding to this coordinate point is recorded as the peak angle of the curve, and the vertical grayscale value corresponding to this coordinate point is recorded as the peak grayscale value. The rising segment (where the grayscale value increases with increasing angle) and the falling segment (where the grayscale value decreases with increasing angle) in the illumination response curve are determined separately. The grayscale change value per unit angle in the rising segment and the grayscale change value per unit angle in the falling segment are counted. The difference between the two grayscale change values per unit angle is calculated. Then, the ratio of this difference to the grayscale change value per unit angle in the rising segment is calculated to obtain the slope asymmetry of the rising and falling segments of the curve. This completes the extraction of all core morphological features of the illumination response curve.
[0087] Using a method that is completely consistent with the extraction of the core morphological features of the illumination response curve of the pixel to be detected, the corresponding peak angle, peak gray value, and slope asymmetry of the rising and falling segments are determined on the defect-free baseline curve constructed in advance through a large number of defect-free geotechnical material samples. These three feature values are used as the standard morphological features for judging whether the pixel is abnormal.
[0088] The peak angle of the illumination response curve is compared with the peak angle of the standard morphological feature by numerical difference. The peak gray value of the illumination response curve is compared with the peak gray value of the standard morphological feature by numerical difference. The slope asymmetry of the illumination response curve is compared with the slope asymmetry of the standard morphological feature by numerical difference. Based on the fixed weights corresponding to the preset three types of feature discrimination priorities, the three difference comparison results are weighted and integrated to obtain the morphological comprehensive deviation of a single pixel of the geotextile material.
[0089] The calculated overall shape deviation value is directly compared with the allowable deviation threshold value of the defect-free baseline curve determined in advance through defect-free sample statistics. When the overall shape deviation value is greater than the allowable deviation threshold value, it is determined that the shape of the illumination response curve corresponding to the pixel position has deviated.
[0090] Record the coordinates of all pixels that are determined to have deviated from the shape of the illumination response curve in sequence, assign a fixed non-zero deviation marker to each recorded pixel coordinate, and obtain the abnormal pixels of the geomaterial after marking all abnormal positions.
[0091] The angle value of the peak of the illumination response curve of the pixel to be detected is obtained directly by traversing all coordinate points of the curve to determine the horizontal angle value corresponding to the maximum gray value. The angle value of the peak of the defect-free reference curve is extracted directly from the pre-constructed standard defect-free curve by traversing all coordinate points in the same way.
[0092] The peak gray value of the illumination response curve of the pixel to be detected is obtained directly by traversing all coordinate points of the curve to determine the vertical gray value corresponding to the maximum gray value. The peak gray value of the defect-free reference curve is extracted directly from the pre-constructed standard defect-free curve by traversing all coordinate points in the same way.
[0093] The slope asymmetry value of the illumination response curve of the pixel to be detected is obtained by calculating the unit angle gray value of the rising and falling segments of the curve, and then taking the difference between the two and the fixed proportion of the unit angle gray value of the rising segment. The slope asymmetry value of the defect-free reference curve is directly extracted from the pre-constructed standard defect-free curve using the same calculation method.
[0094] The peak angle deviation weighting coefficient, peak gray scale deviation weighting coefficient, and slope asymmetry deviation weighting coefficient are all preset to fixed values based on the sensitivity of geotechnical material defects to the three types of morphological characteristics, after being verified by a large number of defect samples.
[0095] The "zero-value prevention" setting is a pre-set fixed minimum value to prevent the numerical comparison calculation from failing due to the standard morphological characteristic value being zero.
[0096] The peak angle deviation, peak grayscale deviation, and slope asymmetry deviation are multiplied by their respective weighting coefficients and then summed to obtain a comprehensive morphological deviation value that can fully reflect the degree of difference between the overall morphology of the illumination response curve of the pixel under test and the defect-free reference curve.
[0097] The morphological deviation value is specifically used to directly compare with the preset allowable deviation threshold, so as to accurately determine whether the pixel illumination response curve has deviated in shape, and provide a unified and objective quantitative judgment basis for abnormal pixel marking.
[0098] Read the total number of pixels horizontally and vertically of any single-angle grayscale image in the grayscale image sequence, construct a blank digital image base map with the same number of rows and columns according to the pixel size, set the initial value of all pixel positions in the blank image base map to zero, and obtain the initial distribution base map of geotechnical materials after completing the initial value configuration.
[0099] Examine the precise coordinates of each abnormal pixel, locate the pixel that perfectly matches the coordinates of the abnormal pixel in the initial distribution map, replace the initial zero value of the pixel with a pre-set fixed first identifier value, and obtain the intermediate distribution map of the geotextile material after completing the numerical replacement of all abnormal pixel positions.
[0100] For pixels marked with the first identifier value in the intermediate distribution map, a four-neighbor connectivity check is performed. Each abnormally marked pixel is checked to see if its four directly adjacent pixels (above, below, left, and right) also have the first identifier value. Abnormally marked pixels with direct adjacent relationships are merged into independent abnormal regions. The total number of pixels contained in each abnormal region is counted sequentially.
[0101] The total number of pixels in each abnormal region is compared with a pre-set minimum area pixel count threshold. For abnormal regions where the total number of pixels is lower than the minimum area pixel count threshold, the values of all pixels within the abnormal region are reset to zero from the first identifier value. For abnormal regions where the total number of pixels is not lower than the minimum area pixel count threshold, the original first identifier value remains unchanged. After completing the removal of all small-area interference regions, an abnormal distribution map of geotechnical materials is obtained.
[0102] Pt.2. Perform adaptive image enhancement processing based on local texture contrast on the abnormal distribution map to generate an enhanced image, and generate candidate defect regions based on the regions surrounded by edge contours in the enhanced image;
[0103] In this embodiment of the invention, the step of performing adaptive image enhancement processing based on local texture contrast on the abnormal distribution map to generate an enhanced image, and generating candidate defect regions based on the regions enclosed by edge contours in the enhanced image, includes:
[0104] The abnormal distribution map is segmented into local image blocks, wherein each local image block covers a rectangular sub-region composed of adjacent pixels;
[0105] The grayscale range and distribution pattern of the internal pixel values in the local image block are analyzed, and the grayscale difference between the center pixel and the surrounding neighboring pixels of the local image block is calculated to obtain the texture contrast coefficient of the geotextile material.
[0106] Based on the texture contrast coefficient, a grayscale mapping table is fitted to the local image block, wherein the grayscale mapping table converts the input grayscale value into the output grayscale value to obtain the dynamic mapping curve of the geomaterial.
[0107] Using the dynamic mapping curve, a nonlinear grayscale transformation is performed on each pixel within the local image block, and all transformed image blocks are mosaicked according to their original spatial positions to obtain an enhanced image of the geotechnical material.
[0108] Gradient amplitude detection is performed on the enhanced image to obtain an edge intensity distribution map. Then, a continuous closed contour line is formed by edge pixel tracking and closure operations. The pixel area surrounded by the closed contour line is used as a candidate defect area of the geotechnical material.
[0109] The process of forming a continuous closed contour line through edge pixel tracking and closure operations includes:
[0110] Pixels with intensity values exceeding a preset intensity threshold are selected from the edge intensity distribution map and used as starting edge points to obtain the edge point seed queue of the geomaterial.
[0111] The neighboring pixels are traversed to both sides along the normal direction of the starting edge point in the edge point seed queue. The neighboring pixels that continuously satisfy the strength threshold condition are connected in sequence to obtain the edge point trajectory segment of the geomaterial.
[0112] When the edge point trajectory segment encounters a branch point or endpoint, the direction information of the edge point trajectory segment is recorded, and the tracking continues along the unexplored direction until all neighborhood directions have been explored, thus obtaining the edge pixel chain of the geomaterial.
[0113] Identify the start and end points of the edge pixel chain. When the start and end points are adjacent in space or separated by a distance less than a preset closure threshold, connect the start and end points directly to obtain the candidate defect region of the geotechnical material.
[0114] According to the preset fixed number of rows and columns of pixels, the anomaly distribution map is completely divided into multiple rectangular sub-regions composed of consecutive adjacent pixels. All rectangular sub-regions do not overlap and completely cover the anomaly distribution map, resulting in a segmented local image block.
[0115] Read the grayscale values of all pixels within a local image block, determine the maximum and minimum grayscale values, and calculate the difference between them to obtain the grayscale range. Statistically analyze the distribution frequency of each grayscale value within the local image block to obtain the distribution pattern. Extract the grayscale value of the central pixel of the local image block, calculate the difference between this value and the grayscale values of the pixels in the surrounding pixels (top, bottom, left, right, and four corners), and take the absolute value. Sum all the absolute values to obtain the grayscale difference amplitude. Combine the grayscale range, distribution pattern, and grayscale difference amplitude to determine the final value, thus obtaining the texture contrast coefficient of the geotextile material.
[0116] Based on the texture contrast coefficient, a one-to-one correspondence between the input grayscale value and the output grayscale value of the local image block is established according to the preset grayscale conversion rules. All correspondences are organized into a table-style grayscale mapping table. Continuous curves are drawn according to the change rules of the input and output grayscale values in the grayscale mapping table to obtain the dynamic mapping curve of the geotechnical material.
[0117] According to the correspondence of the dynamic mapping curve, the original gray value of each pixel in the local image block is replaced with the target gray value matched by the curve. After the gray value replacement of all local image blocks is completed, the local image blocks are stitched together into a complete image according to the original spatial position of the anomaly distribution map to obtain the enhanced image of the geotechnical material.
[0118] The grayscale change of each pixel in the enhanced image with its neighboring pixels is calculated and used as the edge intensity of that pixel. The edge intensities of all pixels are combined to form an image, resulting in an edge intensity distribution map. Pixels with edge intensities greater than a preset edge intensity threshold are selected as starting points. Continuous high edge intensity pixels are connected along the grayscale change direction to form a trajectory. The starting point and ending point of the trajectory are directly connected to form a closed line, resulting in a continuous closed contour line. All pixels enclosed by the continuous closed contour line are combined into a whole region to obtain the candidate defect region of the geotechnical material.
[0119] Examine the edge intensity value of each pixel in the edge intensity distribution map one by one, filter out all pixels with edge intensity values greater than the preset edge intensity threshold, and organize these pixels into an ordered set according to the horizontal and vertical traversal order to obtain the edge point seed queue of the geotechnical material.
[0120] Determine the normal extension direction of each starting edge point in the edge point seed queue. Traverse adjacent pixels one by one along the left and right sides of the normal direction. Determine whether the edge strength of adjacent pixels meets the condition of being greater than the preset edge strength threshold. Connect the neighboring pixels that continuously meet the condition in the traversal order to form a continuous line segment structure and obtain the edge point trajectory segment of the geotechnical material.
[0121] When the edge point trajectory segment encounters a branch point that can extend in multiple directions or an endpoint without subsequent pixels during the extension process, it records the extension angle and position coordinate information of the current trajectory segment, returns to the branch point closest to the current position, selects the direction on the branch point that has not been traversed, and continues to track and connect pixels. The branch backtracking and direction tracking operations are repeated until all adjacent directions of the branch point have been explored. All tracked and connected pixels are combined into a complete chain, resulting in the edge pixel chain of the geotechnical material.
[0122] The first pixel of the edge pixel chain is the starting point and the last pixel is the ending point. The number of pixel intervals between the starting point and the ending point is calculated. When the starting point and the ending point are directly adjacent pixels, or when the number of pixel intervals between the starting point and the ending point is less than a preset closure threshold, the starting point and the ending point are directly connected to form a closed loop line. The set of pixels enclosed by this closed loop line is the candidate defect area of the geotechnical material.
[0123] Pt.3. For the candidate defect regions, perform defect authenticity determination based on edge continuity and shape constraints, filter out the real defect regions, and output the defect identification results.
[0124] In this embodiment of the invention, performing a defect authenticity determination based on edge continuity and shape constraints on the candidate defect region includes:
[0125] Along the direction of the outer edge node sequence in the candidate defect region, the Euclidean distance between two adjacent pixel nodes is measured successively. If the Euclidean distance exceeds the continuity tolerance, the current position is recorded as a break node.
[0126] After traversing the complete sequence of outer edge nodes, the total number of fracture nodes on the candidate defect region is accumulated, and the perimeter of the candidate defect region is calculated. The fracture frequency of the geosynthetic material is obtained by dividing the total number of fracture nodes by the perimeter.
[0127] If the fracture frequency is less than the preset fracture allowable frequency threshold, the candidate defect region is determined to have edge continuity attribute, and the candidate defect region is included in the list of regions to be verified by shape.
[0128] The process of filtering out the actual defect areas and outputting the defect identification results also includes:
[0129] Determine the smallest bounding rectangle of the region to be verified in the list of regions to be verified, obtain the ratio of the length of the long side to the short side, and obtain the stretching feature of the region to be verified.
[0130] Record the area and perimeter of the region to be verified, and establish a correlation between the square of the area and the perimeter to obtain the compactness feature of the region to be verified;
[0131] The curvature values at each location are extracted along the boundary curve of the region to be verified, and the fluctuation range of all curvature values is obtained to obtain the smoothness characteristics of the region to be verified.
[0132] The stretching feature, the compactness feature, and the smoothness feature are combined into a shape feature vector of the region to be verified. A typical defect shape feature library is called, and the shape feature vector is compared with the standard shape vector in the feature library one by one to obtain the real defect region and artifact region of the geomaterial.
[0133] By summarizing the location information and morphological parameters of all real defect areas, the defect identification results of the geotechnical material are obtained.
[0134] Along the extension direction of the outer edge node sequence of the candidate defect region, the coordinate positions of two adjacent pixel nodes in each group are obtained sequentially. The straight-line interval length between the two pixel nodes is determined according to the coordinate positions. This straight-line interval length is used as the Euclidean distance. The Euclidean distance is directly compared with the preset continuity tolerance value. When the Euclidean distance is greater than the continuity tolerance value, the position of the adjacent pixel nodes in the group is marked as a break node.
[0135] After completing the traversal of all outer edge node sequences of the candidate defect region and the marking of fracture nodes, count all marked fracture nodes one by one to obtain the total number of fracture nodes. Then, accumulate the interval length of all adjacent pixel nodes along the outer edge node sequence of the candidate defect region to obtain the perimeter value of the candidate defect region. Use the total number of fracture nodes as the dividend and the perimeter value as the divisor for calculation. The result is the fracture frequency of the geosynthetic material.
[0136] The fracture frequency value is compared with the preset fracture allowable frequency threshold value. When the fracture frequency value is less than the fracture allowable frequency threshold value, the candidate defect area is determined to have edge continuity attribute. The candidate defect area is added to the set of areas to be shape verified, and the list of geomaterial areas to be shape verified is obtained.
[0137] For each region to be verified in the list of regions to be verified, draw the smallest rectangle that can completely enclose the region. Measure the length of the long side and the length of the short side of the smallest bounding rectangle, calculate the ratio of the length of the long side to the length of the short side, and use the resulting value as the stretching feature of the region to be verified.
[0138] The area value is obtained by counting all the pixels contained in the region to be verified. The perimeter value is obtained by accumulating the interval length of all adjacent pixel nodes along the outer boundary of the region to be verified. The square of the area value is calculated and a fixed correspondence is established with the perimeter value. The compactness feature of the region to be verified is obtained based on this correspondence.
[0139] The curvature values at each location are collected along the boundary curve of the region to be verified. The maximum and minimum values of all curvature values are counted and the difference between them is calculated. This difference is used as the fluctuation range of the curvature value to obtain the smoothness characteristics of the region to be verified.
[0140] The tensile, compact, and smooth features are combined in a fixed order to form a continuous set of feature data, which forms the shape feature vector of the region to be verified. A pre-constructed library of typical defect shape features is retrieved, and the shape feature vector is compared with the standard shape vector in the library item by item. Based on the matching results, the real defect region and artifact region of the geomaterial are divided.
[0141] Collect the coordinates, dimensions, and area of all real defect areas, integrate and classify the information in a unified format to form a complete set of detection data, and obtain the defect identification results of geotechnical materials.
[0142] like Figure 2 The diagram shown is a functional block diagram of a geotechnical material defect identification system based on image recognition, provided in an embodiment of the present invention.
[0143] The image recognition-based geotechnical material defect identification system described in this invention can be installed in an electronic device. Depending on the functions implemented, the image recognition-based geotechnical material defect identification system may include an optical anomaly analysis module, a texture intensity region selection module, and a shape and edge judgment module. The module described in this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0144] In this embodiment, the functions of each module / unit are as follows:
[0145] The optical response anomaly analysis module is used to construct an illumination response curve based on the grayscale change characteristics of each pixel position in the grayscale image sequence of the geomaterial under different illumination directions, and to mark pixels whose shape deviates from the preset defect-free reference curve tolerance as abnormal pixels, thereby generating an anomaly distribution map of the geomaterial.
[0146] The texture intensity selection module is used to perform adaptive image enhancement processing based on local texture contrast on the abnormal distribution map, generate an enhanced image, and generate candidate defect regions based on the regions surrounded by edge contours in the enhanced image.
[0147] The shape and edge discrimination module is used to perform a defect authenticity judgment based on edge continuity and shape constraints on the candidate defect regions, filter out the real defect regions, and output the defect recognition results.
[0148] In the several embodiments provided by this invention, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0149] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0150] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0151] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0152] This application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for identifying defects in geosynthetic materials based on image recognition, characterized in that, The method includes: Pt.
1. Based on the grayscale change characteristics of each pixel position in the grayscale image sequence of the geomaterial under different lighting directions, a light response curve is constructed, and pixels whose shape deviates from the preset defect-free reference curve allowable deviation are marked as abnormal pixels, thereby generating an abnormal distribution map of the geomaterial. Pt.
2. Perform adaptive image enhancement processing based on local texture contrast on the abnormal distribution map to generate an enhanced image, and generate candidate defect regions based on the regions surrounded by edge contours in the enhanced image; Pt.
3. For the candidate defect regions, perform defect authenticity determination based on edge continuity and shape constraints, filter out the real defect regions, and output the defect identification results.
2. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 1, characterized in that, The grayscale change characteristics of each pixel position in the grayscale image sequence based on geotechnical materials under different illumination directions constitute an illumination response curve, including: According to the specified sequence of illumination angles, directional light beams are projected onto the surface of the geomaterial one by one. The surface reflected light intensity distribution under the current illumination angle is captured synchronously during each projection to obtain a single-angle grayscale image of the geomaterial. An index mapping relationship is established between the single-angle grayscale image and the corresponding illumination angle to obtain the grayscale image metadata pair of the geotechnical material; Based on the order of the illumination angle sequence, the grayscale image metadata pairs are sequentially spliced to obtain the grayscale image sequence of the geotextile material; The illumination response curve of the geosynthetic material is constructed by using the illumination direction angle of the illumination angle sequence as the horizontal axis and the gray value of the grayscale image sequence as the vertical axis.
3. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 2, characterized in that, The step of marking pixels whose shape deviates from the preset defect-free reference curve by more than the allowable deviation as abnormal pixels includes: Extract the core morphological features of the illumination response curve, including the angle of the peak value, the peak gray value, and the asymmetry of the slope between the rising and falling segments of the curve. Extract morphological features of the same type as the core morphological features from the preset defect-free baseline curve and use them as standard morphological features. The core morphological features are compared with the standard morphological features to determine the overall morphological deviation of the geosynthetic material. When the overall deviation of the shape is greater than the threshold of the allowable deviation in the defect-free reference curve, it is determined that the shape of the illumination response curve has deviated. Record the positions of all pixels that are determined to have deviated in shape, and add a deviation flag to each record to obtain the abnormal pixels of the geotextile material.
4. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 3, characterized in that, The formula for calculating the overall deviation of the morphology is as follows: ; In the formula, The overall deviation of the morphology. The angle at which the peak value of the illumination response curve is located. The angle at which the peak value of the defect-free reference curve is located. The peak gray value of the illumination response curve is... The peak gray value of the defect-free reference curve is... The slope asymmetry of the illumination response curve is given by [reference to a specific curve]. The slope asymmetry of the defect-free reference curve. The preset peak angle deviation weighting coefficient, The preset peak grayscale deviation weighting coefficient, The preset slope asymmetry deviation weighting coefficient, This is a preset measure to prevent the removal of small quantities.
5. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 4, characterized in that, The generation of the anomaly distribution map of the geosynthetic material includes: Create a blank base map with the same size as a single image in the grayscale image sequence. Initialize the value of each pixel in the blank base map to zero to obtain the initial distribution base map of the geosynthetic material. Traverse the pixel positions of the abnormal pixels, and on the initial distribution base map, modify the value of the pixel position to the first identifier value to obtain the intermediate distribution map of the geosynthetic material; Neighborhood connectivity analysis is performed on the intermediate distribution map to merge adjacent abnormal marker pixels into abnormal regions, and the number of pixels occupied by the abnormal regions is counted. The identifier values of all pixel positions in the abnormal regions that do not meet the minimum area requirement are restored to zero to obtain the abnormal distribution map of the geotechnical material.
6. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 1, characterized in that, The step of performing adaptive image enhancement processing based on local texture contrast on the abnormal distribution map to generate an enhanced image, and generating candidate defect regions based on the regions enclosed by edge contours in the enhanced image, includes: The abnormal distribution map is segmented into local image blocks, wherein each local image block covers a rectangular sub-region composed of adjacent pixels; The grayscale range and distribution pattern of the internal pixel values in the local image block are analyzed, and the grayscale difference between the center pixel and the surrounding neighboring pixels of the local image block is calculated to obtain the texture contrast coefficient of the geotextile material. Based on the texture contrast coefficient, a grayscale mapping table is fitted to the local image block, wherein the grayscale mapping table converts the input grayscale value into the output grayscale value to obtain the dynamic mapping curve of the geomaterial. Using the dynamic mapping curve, a nonlinear grayscale transformation is performed on each pixel within the local image block, and all transformed image blocks are mosaicked according to their original spatial positions to obtain an enhanced image of the geotechnical material. Gradient amplitude detection is performed on the enhanced image to obtain an edge intensity distribution map. Then, a continuous closed contour line is formed by edge pixel tracking and closure operations. The pixel area surrounded by the closed contour line is used as a candidate defect area of the geotechnical material.
7. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 6, characterized in that, The process of forming a continuous closed contour line through edge pixel tracking and closure operations includes: Pixels with intensity values exceeding a preset intensity threshold are selected from the edge intensity distribution map and used as starting edge points to obtain the edge point seed queue of the geomaterial. The neighboring pixels are traversed to both sides along the normal direction of the starting edge point in the edge point seed queue. The neighboring pixels that continuously satisfy the strength threshold condition are connected in sequence to obtain the edge point trajectory segment of the geomaterial. When the edge point trajectory segment encounters a branch point or endpoint, the direction information of the edge point trajectory segment is recorded, and the tracking continues along the unexplored direction until all neighborhood directions have been explored, thus obtaining the edge pixel chain of the geomaterial. Identify the start and end points of the edge pixel chain. When the start and end points are adjacent in space or separated by a distance less than a preset closure threshold, connect the start and end points directly to obtain the candidate defect region of the geotechnical material.
8. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 1, characterized in that, The step of performing a defect authenticity determination based on edge continuity and shape constraints on the candidate defect region includes: Along the direction of the outer edge node sequence in the candidate defect region, the Euclidean distance between two adjacent pixel nodes is measured successively. If the Euclidean distance exceeds the continuity tolerance, the current position is recorded as a break node. After traversing the complete sequence of outer edge nodes, the total number of fracture nodes on the candidate defect region is accumulated, and the perimeter of the candidate defect region is calculated. The fracture frequency of the geosynthetic material is obtained by dividing the total number of fracture nodes by the perimeter. If the fracture frequency is less than the preset fracture allowable frequency threshold, the candidate defect region is determined to have edge continuity attribute, and the candidate defect region is included in the list of regions to be verified by shape.
9. The method for identifying defects in geosynthetic materials based on image recognition as described in claim 8, characterized in that, The process of filtering out the actual defect areas and outputting the defect identification results also includes: Determine the smallest bounding rectangle of the region to be verified in the list of regions to be verified, obtain the ratio of the length of the long side to the short side, and obtain the stretching feature of the region to be verified. Record the area and perimeter of the region to be verified, and establish a correlation between the square of the area and the perimeter to obtain the compactness feature of the region to be verified; The curvature values at each location are extracted along the boundary curve of the region to be verified, and the fluctuation range of all curvature values is obtained to obtain the smoothness characteristics of the region to be verified. The stretching feature, the compactness feature, and the smoothness feature are combined into a shape feature vector of the region to be verified. A typical defect shape feature library is called, and the shape feature vector is compared with the standard shape vector in the feature library one by one to obtain the real defect region and artifact region of the geomaterial. By summarizing the location information and morphological parameters of all real defect areas, the defect identification results of the geotechnical material are obtained.
10. A geosynthetic material defect identification system based on image recognition, characterized in that, The system for implementing the image recognition-based method for identifying defects in geosynthetic materials as described in claim 1 includes: The optical response anomaly analysis module is used to construct an illumination response curve based on the grayscale change characteristics of each pixel position in the grayscale image sequence of the geomaterial under different illumination directions, and to mark pixels whose shape deviates from the preset defect-free reference curve tolerance as abnormal pixels, thereby generating an anomaly distribution map of the geomaterial. The texture intensity region selection module is used to perform adaptive image enhancement processing based on local texture contrast on the abnormal distribution map, generate an enhanced image, and generate candidate defect regions based on the regions surrounded by edge contours in the enhanced image. The shape and edge discrimination module is used to perform a defect authenticity judgment based on edge continuity and shape constraints on the candidate defect regions, filter out the real defect regions, and output the defect recognition results.