A gear tooth profile defect detection method and system based on image recognition
By employing techniques such as pixel-level grayscale difference coding and Hamming distance neighborhood comparison, refined and precise detection of gear tooth profile defects has been achieved, solving the problems of insufficient detection sensitivity and accuracy in existing technologies, and making it suitable for industrial gear inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU JINYI TRANSMISSION MASCH CO LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-06-23
AI Technical Summary
Existing methods for detecting gear tooth defects have shortcomings in pixel feature extraction and defect region localization and extraction, resulting in low detection sensitivity and insufficient accuracy, making it difficult to achieve early and accurate identification and effective removal of false defects.
By employing pixel-level grayscale difference encoding, Hamming distance neighborhood comparison, similarity-weighted region growth, consistency verification, and edge smoothing, refined and precise detection of defects on gear tooth surfaces is achieved.
It significantly improves the sensitivity and accuracy of gear tooth profile defect detection, optimizes the extraction precision of defect areas, and adapts to industrial inspection needs.
Smart Images

Figure CN122265284A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and in particular to a method and system for detecting gear tooth defects based on image recognition. Background Technology
[0002] In the field of visual inspection technology for gear tooth defects, existing image recognition and detection methods lack refined coding processing for extracting pixel features from the original images of the gear end face. They rely solely on basic grayscale amplitude comparison to conduct pixel difference analysis, without deeply mining the temporal and spatial correlation features of grayscale changes. This makes it impossible to transform pixel grayscale differences into quantifiable coding features, making it difficult to effectively identify subtle anomalies between pixels. The methods also have insufficient ability to capture minor damage defects on the tooth surface, resulting in low sensitivity of defect detection and difficulty in achieving early and accurate identification of tooth defects.
[0003] Existing technologies have significant shortcomings in the localization and extraction of defect areas. During the expansion from abnormal pixels to the defect area, the growth trajectory is not constrained by the extension direction of the gear tooth surface, making it susceptible to interference from background noise and resulting in invalid region growth. Furthermore, the consistency verification mechanism for suspected defect areas is inadequate, the outlier removal methods for pixel encoding deviations lack scientific rigor, and targeted edge smoothing is not applied to the initially extracted defect areas. Consequently, the resulting defect areas suffer from jagged contours and the presence of false defect pixels. The localization and contour extraction accuracy of the defect areas cannot meet the actual technical requirements of industrial gear inspection. Therefore, improving the efficiency of gear tooth defect detection based on image recognition has become an urgent problem to be solved. Summary of the Invention
[0004] This invention provides a method and system for detecting gear tooth profile defects 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 gear tooth profile defect detection method based on image recognition, comprising: S01. Perform pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face; S02. Based on the grayscale encoding sequence, perform neighborhood comparison on the Hamming distance between pixels in the original image of the gear end face to obtain the local anomaly distribution of the original image of the gear end face. S03. Perform intensity sorting and filtering on the local anomaly distribution to obtain candidate anomaly seed points of the original image of the gear end face; S04. Based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed point, perform similarity weighted region growth on the candidate anomaly seed point to obtain the suspected defect area of the original image of the gear end face. S05. Perform consistency verification on the suspected defect area, and remove outliers from the pixel encoding deviation values of the verified area to obtain the refined defect area of the suspected defect area. Perform edge smoothing processing on the refined defect area to obtain the tooth surface damage area of the original image of the gear end face.
[0006] In a preferred embodiment, the step of performing pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face includes: The grayscale amplitude change history of the original image of the gear end face is extracted at equal intervals according to time frames to obtain the grayscale time sampling sequence of the original image of the gear end face. Based on the grayscale temporal sampling sequence, inter-frame amplitude difference is performed on the original image of the gear end face to obtain the inter-frame grayscale difference of the original image of the gear end face. The inter-frame grayscale differences are subjected to differential symbol binarization mapping to obtain the binary symbol string of the original image of the gear end face; The binary symbol string is compressed and merged using run-length compression to obtain the compressed symbol count sequence of the original image of the gear end face; The count pairs of the compressed symbol count sequence are sequentially concatenated to obtain the grayscale encoding sequence of the original image of the gear end face.
[0007] In a preferred embodiment, the step of performing neighborhood comparison on the Hamming distance between pixels in the original image of the gear end face based on the grayscale encoding sequence to obtain the local anomaly distribution of the original image of the gear end face includes: The grayscale encoded sequence is reconstructed using correlational topology to obtain the Hamming distance correlation map of the original image of the gear end face; Based on the Hamming distance correlation graph, a walking path traversal is performed on the encoded pixels of the gray-scale encoded sequence to obtain the neighborhood path set of the encoded pixels; Perform global path frequency statistics on the neighborhood path set to obtain the rarity of the neighborhood path set; Based on the rarity, path weight backtracking is performed on the encoded pixel to obtain the local anomaly intensity of the encoded pixel; The distribution of the local anomaly intensity is redistributed and normalized to obtain the local anomaly distribution of the original image of the gear end face.
[0008] In a preferred embodiment, the step of performing path weight backtracking allocation on the encoded pixels based on the rarity to obtain the local anomaly intensity of the encoded pixels includes: Based on the Hamming distance correlation map, the path of the encoded pixel is collected to obtain the pixel correlation path set of the Hamming distance correlation map; Based on the pixel association path set and the rarity, the coded pixel is associated with a weight mapping to obtain the path weight distribution of the coded pixel. The path weight distribution is summed to obtain the cumulative total weight of the encoded pixel. The weight deviation of the path weight distribution is estimated to obtain the weight dispersion index of the encoded pixel. Based on the cumulative total weight and the weight dispersion index, the local anomaly intensity of the encoded pixel is calculated, wherein the formula for calculating the local anomaly intensity is: ; In the formula, For the coded pixel point, Encoding pixels The intensity of local anomalies, Encode pixels in the pixel association path set The set of paths traversed For the pixel association path set path Rarity, For the pixel association path set path Rarity weight, This is the absolute value operator.
[0009] In a preferred embodiment, the step of intensity-sorting and filtering the local anomaly distribution to obtain candidate anomaly seed points of the original image of the gear end face includes: The local anomaly distributions are sorted in descending order of global intensity values, and the sorted anomaly distributions are associated with the coded pixels to obtain an intensity sorting index table of the local anomaly distributions. Based on the intensity sorting index table, the inflection point threshold of the local anomaly distribution is located to obtain the dynamic intensity threshold of the local anomaly distribution; The encoded pixels with an anomaly intensity higher than the dynamic intensity threshold in the local anomaly distribution are used as the initial seed point set of the original image of the gear end face; Spatial proximity redundancy removal is performed on the initial seed point set to obtain candidate abnormal seed points for the original image of the gear end face.
[0010] In a preferred embodiment, the step of performing similarity-weighted region growing on the candidate anomaly seed points, starting from the extension direction of the gear tooth surface in the original image of the gear end face, to obtain the suspected defect region of the original image of the gear end face, includes: The tooth surface texture main orientation is analyzed on the original image of the gear end face to obtain the tooth surface extension direction field of the original image of the gear end face; Based on the tooth surface extension direction field, the growth trajectory of the candidate abnormal seed point is preset to obtain the extended ray beam of the candidate abnormal seed point; The extended ray beam is encoded and sampled along its path to obtain the encoded sampling chain of the extended ray beam; Based on the coded sampling chain, the similarity continuation length of the ray pixels on the extended ray beam is measured to obtain the conservative maintenance depth of the ray pixels. Based on the aforementioned conservative maintenance depth, the candidate abnormal seed points are regionalized and integrated to obtain the suspected defect region of the original image of the gear end face.
[0011] In a preferred embodiment, the step of measuring the similarity continuation length of ray pixels on the extended ray beam based on the encoded sampling chain to obtain the conservative maintenance depth of the ray pixels includes: The ray pixels on the extended ray beam are encoded and sampled point by point to obtain the original difference value of the ray pixels; Based on the original difference value, the ray pixels are aggregated by distance weighting to obtain the weighted cumulative similarity of the ray pixels. The original difference value is evaluated for the severity of local fluctuations to obtain the fluctuation penalty coefficient for each pixel. Based on the weighted cumulative similarity and the fluctuation penalty coefficient, the initial maintenance depth estimate of the ray pixel is calculated, wherein the calculation formula for the initial maintenance depth estimate is: ; In the formula, For the first The conservatism of depth at each ray pixel The position number of the ray pixel. The pixel traversal sequence number of the ray pixel is [the number of pixels traversed]. It is a natural constant. The preset distance attenuation rate, For the first The original difference value of each ray pixel. It is an exponential function. The preset volatility penalty factor, For the first The original difference value of each ray pixel. To find the maximum value function, It is a smooth term with minimal positive numbers; The initial retention depth estimate is normalized by range mapping to obtain the conservative retention depth of the ray pixel.
[0012] In a preferred embodiment, the step of performing consistency verification on the suspected defective region and outlier removal of pixel encoding deviation values in the verified region to obtain a refined defective region from the suspected defective region includes: Based on the grayscale encoding sequence, the suspected defect region is traversed by intra-domain encoding to obtain the region encoding sequence of the suspected defect region; Based on the region coding sequence, the pixel points in the region of the suspected defective region are accumulated between sequences to obtain the difference accumulation weight of the pixel points in the region. The cumulative difference weights are sorted in descending order to obtain the pixel outlier sorting table for the suspected defective regions. Based on the pixel outlier sorting table, outlier pixels in the suspected defective region are progressively removed to obtain the refined defective region of the suspected defective region.
[0013] In a preferred embodiment, the step of smoothing the edges of the refining defect area to obtain the tooth surface damage area of the original image of the gear end face includes: Collect the contour pixel coordinates of the refining defect area, and concatenate the contour pixel coordinates to obtain the initial contour point chain of the contour pixel coordinates. The local curvature of the initial contour point chain is obtained by fitting the local curvature of the initial contour point chain. Based on the local curvature, the curvature abrupt change calibration is performed on the initial contour point chain to obtain the contour anomaly points of the refining defect region. Based on the aforementioned contour anomaly points, edge jaggedness elimination is performed on the initial contour point chain to obtain the tooth surface damage area of the original image of the gear end face.
[0014] To address the aforementioned problems, the present invention also provides a gear tooth profile defect detection system based on image recognition, the system comprising: The grayscale temporal coding module is used to perform pixel-level grayscale difference coding on the original image of the gear end face to obtain the grayscale coding sequence of the original image of the gear end face. The neighborhood comparison module is used to perform neighborhood comparison of the Hamming distance between pixels in the original image of the gear end face based on the grayscale encoding sequence, so as to obtain the local anomaly distribution of the original image of the gear end face. Anomaly sorting and filtering module is used to sort and filter the local anomaly distribution by intensity to obtain candidate anomaly seed points of the original image of the gear end face; The directional constraint growth module is used to perform similarity-weighted region growth on the candidate anomaly seed points based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed points, to obtain the suspected defect area of the original image of the gear end face. The region refinement and smoothing module is used to perform consistency verification on the suspected defect region, and to remove outliers from the pixel encoding deviation values of the verified region to obtain the refined defect region of the suspected defect region. The refined defect region is then subjected to edge smoothing processing to obtain the tooth surface damage region of the original image of the gear end face.
[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention performs feature quantization processing on the original image of the gear end face through pixel-level grayscale difference encoding, and achieves accurate identification of local pixel anomalies by combining Hamming distance neighborhood comparison. Then, candidate anomaly seed points are obtained through intensity sorting and spatial proximity redundancy removal, which completes the refined and accurate extraction of abnormal pixels on the gear tooth surface. This allows even the slightest grayscale anomalies on the tooth surface to be effectively captured, greatly improving the sensitivity of gear tooth defect detection and the accuracy of anomaly point identification, and laying a reliable feature foundation for the subsequent extraction of defect areas.
[0016] 2. This invention utilizes the tooth surface extension direction to achieve similarity-weighted region growth. Combined with consistency verification, outlier removal of pixel encoding deviation values, and edge smoothing processing, it achieves accurate extraction and contour optimization of defect areas. This effectively eliminates false defect pixels in suspected defect areas and resolves the jaggedness problem of defect contours, improving the accuracy of tooth surface damage area localization and contour extraction. Simultaneously, the algorithm design of the entire detection process forms a standardized image recognition and detection logic, optimizing the overall detection process and significantly improving the efficiency of gear tooth profile defect detection, thus adapting to the detection needs of industrial scenarios. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a gear tooth profile defect detection method based on image recognition, provided in an embodiment of the present invention. Figure 2 A functional block diagram of a gear tooth profile defect detection system based on image recognition provided in an embodiment of the present invention; 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
[0018] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0019] This application provides a method for detecting gear tooth defects based on image recognition. The execution entity of this image recognition-based gear tooth defect detection 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 image recognition-based gear tooth defect detection method 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 (CDNs), and big data and artificial intelligence platforms.
[0020] Reference Figure 1 The diagram shown is a flowchart illustrating a gear tooth profile defect detection method based on image recognition according to an embodiment of the present invention. In this embodiment, the gear tooth profile defect detection method based on image recognition includes: S01. Perform pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face; In this embodiment of the invention, the step of performing pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face includes: The grayscale amplitude change history of the original image of the gear end face is extracted at equal intervals according to time frames to obtain the grayscale time sampling sequence of the original image of the gear end face. Based on the grayscale temporal sampling sequence, inter-frame amplitude difference is performed on the original image of the gear end face to obtain the inter-frame grayscale difference of the original image of the gear end face. The inter-frame grayscale differences are subjected to differential symbol binarization mapping to obtain the binary symbol string of the original image of the gear end face; The binary symbol string is compressed and merged using run-length compression to obtain the compressed symbol count sequence of the original image of the gear end face; The count pairs of the compressed symbol count sequence are sequentially concatenated to obtain the grayscale encoding sequence of the original image of the gear end face.
[0021] The grayscale amplitude change history of the original image of the gear end face is captured frame by frame at fixed time intervals. During the capture process, the time interval between each frame is kept completely consistent. All the captured grayscale amplitude frames are arranged in chronological order to form an ordered set, which is the grayscale temporal sampling sequence of the original image of the gear end face.
[0022] Based on the grayscale amplitude frames arranged in sequence in the grayscale temporal sampling sequence, the difference between the grayscale amplitude of the next frame and the grayscale amplitude of the previous frame is extracted in turn. The grayscale amplitude difference between each group of adjacent frames is extracted, and all the extracted grayscale amplitude differences are arranged in the corresponding frame order. The resulting set of differences is the inter-frame grayscale difference of the original image of the gear end face.
[0023] For each grayscale difference in the inter-frame grayscale difference, a sign determination is performed. When the difference is positive, it is mapped to the number 1; when the difference is negative, it is mapped to the number 0; and when the difference is zero, it is also mapped to the number 0. All the mapped numbers 1 and 0 are connected sequentially according to the original difference order. The resulting continuous number sequence is the binary symbol string of the original image of the gear end face.
[0024] The consecutive occurrences of the digit 1 and consecutive occurrences of the digit 0 in the binary symbol string are counted separately. According to the order of the binary symbol string, the type of each consecutive identical digit and the number of times the digit appears consecutively are recorded. The combination of each group of digit types and corresponding consecutive counts is arranged in order, and the resulting ordered statistical set is the compressed symbol counting sequence of the original image of the gear end face.
[0025] Each combination of number type and consecutive count in the compressed symbol counting sequence is treated as an independent counting pair. Following the original arrangement of the compressed symbol counting sequence, all independent counting pairs are sequentially spliced together. The complete and ordered set of counting pairs formed after splicing is the grayscale encoding sequence of the original image of the gear end face.
[0026] The beneficial effect is the refined and orderly extraction and transformation of the grayscale amplitude variation characteristics of the original image of the gear end face, which fully preserves the temporal variation law of grayscale amplitude in the original image and forms a standardized feature sequence. By using fixed-interval cropping and inter-frame amplitude difference extraction, the dynamic details of grayscale changes in the image are accurately captured. Then, through the binarization mapping of the difference symbols, the grayscale differences are transformed into intuitive and easy-to-analyze symbolic forms. The compression and merging of run lengths simplifies the feature expression form without losing the core information of grayscale changes. Finally, the grayscale encoding sequence formed by sequentially concatenating counting pairs can clearly represent pixel-level grayscale differences, providing a precise, orderly basic sequence with clear grayscale change characteristics for subsequent inter-pixel correlation analysis, and giving subsequent image analysis operations a reliable feature basis.
[0027] S02. Based on the grayscale encoding sequence, perform neighborhood comparison on the Hamming distance between pixels in the original image of the gear end face to obtain the local anomaly distribution of the original image of the gear end face. In this embodiment of the invention, the step of performing neighborhood comparison of the Hamming distance between pixels in the original image of the gear end face based on the grayscale encoding sequence to obtain the local anomaly distribution of the original image of the gear end face includes: The grayscale encoded sequence is reconstructed using correlational topology to obtain the Hamming distance correlation map of the original image of the gear end face; Based on the Hamming distance correlation graph, a walking path traversal is performed on the encoded pixels of the gray-scale encoded sequence to obtain the neighborhood path set of the encoded pixels; Perform global path frequency statistics on the neighborhood path set to obtain the rarity of the neighborhood path set; Based on the rarity, path weight backtracking is performed on the encoded pixel to obtain the local anomaly intensity of the encoded pixel; The distribution of the local anomaly intensity is redistributed and normalized to obtain the local anomaly distribution of the original image of the gear end face.
[0028] The step of performing path weight backtracking allocation on the encoded pixels based on the rarity to obtain the local anomaly intensity of the encoded pixels includes: Based on the Hamming distance correlation map, the path of the encoded pixel is collected to obtain the pixel correlation path set of the Hamming distance correlation map; Based on the pixel association path set and the rarity, the coded pixel is associated with a weight mapping to obtain the path weight distribution of the coded pixel. The path weight distribution is summed to obtain the cumulative total weight of the encoded pixel. The weight deviation of the path weight distribution is estimated to obtain the weight dispersion index of the encoded pixel. Based on the cumulative total weight and the weight dispersion index, the local anomaly intensity of the encoded pixel is calculated, wherein the formula for calculating the local anomaly intensity is: ; In the formula, For the coded pixel point, Encoding pixels The intensity of local anomalies, Encode pixels in the pixel association path set The set of paths traversed For the pixel association path set path Rarity, For the pixel association path set path Rarity weight, This is the absolute value operator.
[0029] Spatial correlation analysis was conducted on the coding features of each coded pixel in the grayscale coding sequence. Based on the actual spatial position relationship of each coded pixel in the original image of the gear end face, the Hamming distance correlation relationship between each coded pixel was established. The correlation relationship of all coded pixels and the corresponding Hamming distance information were used to construct the overall topological structure. The complete topological structure formed is the Hamming distance correlation map of the original image of the gear end face.
[0030] Based on the Hamming distance correlation graph, according to the topological connection relationship of the coded pixels in the graph, starting from each coded pixel, all feasible connection paths of its neighboring coded pixels are traversed in turn. The complete traversal path information corresponding to each coded pixel is recorded. All traversal paths of each coded pixel are classified and collected according to the corresponding pixel. The resulting path set corresponding to each pixel is the neighborhood path set of the coded pixel.
[0031] A full traversal and statistical analysis is performed on all paths in the neighborhood path set to accurately record the actual number of times each path appears in the neighborhood path set. Based on the occurrence frequency of each path, the occurrence frequency of each path in the global scope is determined. The occurrence frequency of each path is converted into the corresponding path rarity representation information. The resulting rarity representation information corresponding to each path is the rarity of the neighborhood path set.
[0032] Based on the Hamming distance correlation graph, for each coded pixel, all path information passing through the coded pixel in the graph is comprehensively sorted out. All paths passing through the coded pixel are collected and organized in a unified manner according to the pixel. The set of paths corresponding to each coded pixel is the pixel correlation path set of the Hamming distance correlation graph.
[0033] Each path in the pixel-associated path set is matched one-to-one with the rarity of the corresponding path in the neighborhood path set. The rarity of each path is directly used as the association weight of that path. All path weights in the pixel-associated path set are systematically organized according to the encoded pixel. The resulting set of path weights corresponding to each encoded pixel is the path weight distribution of the encoded pixel.
[0034] For each encoded pixel, the path weight distribution is calculated by summing all path weights in the distribution without omission, resulting in the total weight of each encoded pixel. This total weight is the cumulative weight of the encoded pixel.
[0035] For each encoded pixel, a dispersion analysis is performed on all weight values in the path weight distribution. The deviations of each weight value from the average weight in the distribution are analyzed. All deviations are integrated and quantified to form information that can accurately characterize the dispersion characteristics of the path weight distribution. This information is the weight dispersion index of the encoded pixel.
[0036] The cumulative weight of each coded pixel and the weight dispersion index are fused together to form a quantitative representation that accurately reflects the anomaly characteristics of the coded pixel. This result is the local anomaly intensity of the coded pixel.
[0037] The local anomaly intensity of all coded pixels is fully sorted and integrated. According to the actual spatial position of the pixels in the original image of the gear end face, each local anomaly intensity is mapped to the corresponding pixel position in the image. The mapped anomaly intensity values are then adjusted and standardized in an overall manner. The resulting anomaly intensity distribution information that corresponds one-to-one with the pixel position in the image is the local anomaly distribution of the original image of the gear end face.
[0038] The encoded pixels are derived from the grayscale encoding sequence and are each pixel in the grayscale encoding sequence. The path set is a set of pixel association paths obtained by aggregating the paths traversed by the encoded pixels based on the Hamming distance correlation map; it represents the set of paths traversed by the encoded pixel. Rarity and path The rarity weights are all derived from the rarity of the neighborhood path set obtained by globally statistically analyzing the path frequency of the neighborhood path set, where the path... and path All belong to the path set traversed by this encoded pixel. Absolute value operations are used to evaluate paths. Rarity and Path The absolute value of the difference between the rarity weights is taken to characterize the degree of difference between the two.
[0039] This formula is used to calculate the local anomaly intensity of coded pixels. By fusing the overall accumulation of path rarity and the dispersion of path weights, it accurately reflects the local anomaly characteristics of coded pixels. The overall accumulation of path rarity is obtained by summing the rarity of all paths traversed in the path set without omission, reflecting the sum of the rarity of the paths traversed by the coded pixel. The dispersion of path weights is obtained by analyzing the dispersion of the rarity of all paths traversed in the path set, sorting out the deviation of each rarity from the average rarity, and comprehensively integrating and quantifying it, reflecting the discrete distribution characteristics of path rarity. The local anomaly intensity formed by fusing these two factors can accurately characterize the anomaly features of coded pixels, providing a reliable basis for subsequent screening of candidate anomaly seed points.
[0040] The intensity of local anomalies increases as the sum of the rareness of all paths in the path set increases. Conversely, the intensity of local anomalies increases as the dispersion of the rareness distribution of all paths in the path set decreases. And vice versa.
[0041] The beneficial effects include: a refined neighborhood comparison of Hamming distances between pixels in the original image of the gear end face, achieved using grayscale coding sequences; a Hamming distance correlation map constructed through topological reconstruction, fully integrating pixel coding features and spatial relationships, clearly presenting the correlation features between pixels; the rarity obtained through path traversal and global frequency statistics accurately characterizing the feature differences of pixel neighborhood paths; and then, through backtracking allocation of path weights and feature fusion, quantifying and accurately extracting the local anomaly features of coded pixels. The final distribution reshaping and normalization operation precisely correlates the intensity of local anomalies with the image pixel positions, resulting in a local anomaly distribution that completely and realistically reflects the anomaly features of pixels in the image, providing accurate and consistent anomaly feature basis for subsequent screening of candidate anomaly seed points.
[0042] By fusing the overall accumulation of path rarity with the dispersion of path weights, the representation of local anomaly intensity includes both the sum of the rarity of the paths traversed by the coded pixel and the discrete distribution characteristics of path rarity, making the representation of local anomaly intensity more accurate and comprehensive. This representation method can accurately capture the anomaly characteristics of coded pixels, avoiding the bias caused by single-dimensional analysis, and ensuring that the represented value of local anomaly intensity highly matches the actual anomaly situation of the coded pixel. This provides accurate and reliable feature basis for subsequent screening of candidate anomaly seed points, improves the accuracy and reliability of anomaly point identification in gear tooth profile defect detection, ensures the accuracy of subsequent defect area extraction, and makes the feature analysis stage of the entire detection process more rigorous and reliable.
[0043] S03. Perform intensity sorting and filtering on the local anomaly distribution to obtain candidate anomaly seed points of the original image of the gear end face; In this embodiment of the invention, the step of performing intensity sorting and filtering on the local anomaly distribution to obtain candidate anomaly seed points of the original image of the gear end face includes: The local anomaly distributions are sorted in descending order of global intensity values, and the sorted anomaly distributions are associated with the coded pixels to obtain an intensity sorting index table of the local anomaly distributions. Based on the intensity sorting index table, the inflection point threshold of the local anomaly distribution is located to obtain the dynamic intensity threshold of the local anomaly distribution; The encoded pixels with an anomaly intensity higher than the dynamic intensity threshold in the local anomaly distribution are used as the initial seed point set of the original image of the gear end face; Spatial proximity redundancy removal is performed on the initial seed point set to obtain candidate abnormal seed points for the original image of the gear end face.
[0044] The local anomaly intensity values corresponding to all coded pixels in the local anomaly distribution are globally sorted in order. All values are arranged in descending order of intensity. Each sorted local anomaly intensity value is then associated with its corresponding coded pixel in the original image of the gear end face. The arrangement number, local anomaly intensity value, spatial location of the coded pixel, and coding information are systematically integrated and recorded to form a complete table containing the correspondence between the three. This table is the intensity sorting index table of the local anomaly distribution.
[0045] Based on the generated intensity ranking index table, a complete analysis of the numerical change trends of the local anomaly intensity values arranged in descending order in the table is performed. The difference between each pair of adjacent local anomaly intensity values in the index table is extracted, and the change in the difference between each pair of adjacent values is recorded in detail. Based on the difference change characteristics, the specific position where the change trend of the local anomaly intensity values in the index table changes is found. This position is the dividing point where the intensity value changes from a state of rapid decline to a state of gradual decline. The local anomaly intensity value corresponding to this dividing point is directly determined as the dynamic intensity threshold of the local anomaly distribution. The entire localization process is completed solely based on the numerical sequence and difference change characteristics in the intensity ranking index table.
[0046] The local anomaly distribution of the original image of the gear end face is fully traversed, and the local anomaly intensity value corresponding to each coded pixel is retrieved one by one. Each retrieved local anomaly intensity value is compared with the dynamic intensity threshold one-to-one. All coded pixels with local anomaly intensity values higher than the dynamic intensity threshold are collected and classified in a unified manner. These coded pixels that have been compared and filtered are recorded as a whole. The set composed of these coded pixels is the initial seed point set of the original image of the gear end face.
[0047] A comprehensive analysis of the spatial location information of all coded pixels in the initial seed point set is performed. The specific spatial coordinates of each coded pixel in the original image of the gear end face are extracted. A fixed spatial range is defined with a single coded pixel as the center, and other coded pixels belonging to the same initial seed point set within this range are analyzed to determine the spatial proximity relationship between coded pixels in the seed point set. For multiple coded pixels within the same fixed spatial range, a redundancy removal operation is performed, retaining only one coded pixel within that spatial range. The same method is used to remove all coded pixels with spatial proximity relationships in the initial seed point set. Then, all the remaining coded pixels after the removal operation are re-integrated and recorded. This integrated set of coded pixels is the candidate abnormal seed point of the original image of the gear end face.
[0048] The beneficial effects include: The intensity ranking index table, formed through global descending sorting and associative mapping, achieves a precise correspondence between local anomaly intensity and coded pixels, making the sorting and organization of anomaly features more systematic. The dynamic intensity threshold is located based on the difference change features of the index table, ensuring that the threshold setting aligns with the actual numerical patterns of local anomaly distribution and guaranteeing the adaptability of the initial seed point set selection. The spatial proximity redundancy removal operation effectively eliminates spatially duplicated pixels in the initial seed point set, ensuring that the final candidate anomaly seed points retain both high anomaly features and spatial independence. This provides a precise and redundant core starting point for subsequent defect region growth, solidifying the foundation for early screening in defect detection.
[0049] S04. Based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed point, perform similarity weighted region growth on the candidate anomaly seed point to obtain the suspected defect area of the original image of the gear end face. In this embodiment of the invention, the step of performing similarity-weighted region growing on the candidate anomaly seed points based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed points, to obtain the suspected defect region of the original image of the gear end face includes: The tooth surface texture main orientation is analyzed on the original image of the gear end face to obtain the tooth surface extension direction field of the original image of the gear end face; Based on the tooth surface extension direction field, the growth trajectory of the candidate abnormal seed point is preset to obtain the extended ray beam of the candidate abnormal seed point; The extended ray beam is encoded and sampled along its path to obtain the encoded sampling chain of the extended ray beam; Based on the coded sampling chain, the similarity continuation length of the ray pixels on the extended ray beam is measured to obtain the conservative maintenance depth of the ray pixels. Based on the aforementioned conservative maintenance depth, the candidate abnormal seed points are regionalized and integrated to obtain the suspected defect region of the original image of the gear end face.
[0050] The step of measuring the similarity continuation length of ray pixels on the extended ray beam based on the encoded sampling chain to obtain the conservative maintenance depth of the ray pixels includes: The ray pixels on the extended ray beam are encoded and sampled point by point to obtain the original difference value of the ray pixels; Based on the original difference value, the ray pixels are aggregated by distance weighting to obtain the weighted cumulative similarity of the ray pixels. The original difference value is evaluated for the severity of local fluctuations to obtain the fluctuation penalty coefficient for each pixel. Based on the weighted cumulative similarity and the fluctuation penalty coefficient, the initial maintenance depth estimate of the ray pixel is calculated, wherein the calculation formula for the initial maintenance depth estimate is: ; In the formula, For the first The conservatism of depth at each ray pixel The position number of the ray pixel. The pixel traversal sequence number of the ray pixel is [the number of pixels traversed]. It is a natural constant. The preset distance attenuation rate, For the first The original difference value of each ray pixel. It is an exponential function. The preset volatility penalty factor, For the first The original difference value of each ray pixel. To find the maximum value function, It is a smooth term with minimal positive numbers; The initial retention depth estimate is normalized by range mapping to obtain the conservative retention depth of the ray pixel.
[0051] The tooth surface texture of the original image of the gear end face is extracted globally. The main extension direction of the tooth surface texture at each pixel position in the image is sorted out. The main orientation information of the texture at each position is bound to the spatial position of the corresponding pixel. The main orientation information of the texture in the whole domain is systematically integrated and sorted out. The resulting global feature set that can completely reflect the extension direction of the texture at each position of the tooth surface is the tooth surface extension direction field of the original image of the gear end face.
[0052] Based on the main orientation of the tooth surface texture at the pixel position corresponding to each candidate anomaly seed point in the tooth surface extension direction field, a growth trajectory extending along the main orientation is set for each candidate anomaly seed point. Starting from each candidate anomaly seed point, a ray-like pixel traversal path is generated along the preset growth trajectory in various directions extending to the tooth surface texture. All ray-like traversal paths corresponding to each candidate anomaly seed point are collected as a whole, and the resulting path set is the extended ray beam of the candidate anomaly seed point.
[0053] Along each ray-like traversal path in the extended ray beam, starting from the pixel position of the candidate anomaly seed point, the corresponding grayscale coding sequence information is extracted sequentially for each pixel on the path according to the extension order of the path. The coding information collected on each ray path is arranged in order according to the pixel traversal order. The ordered coding information set corresponding to all ray paths is integrated in a unified manner, and the resulting coding information set is the coding sampling chain of the extended ray beam.
[0054] For each ray pixel on the extended ray beam, the grayscale encoding information of the pixel is extracted individually, and the encoding information is compared with the grayscale encoding information of the candidate anomaly seed point at the starting point of the same ray path. The feature differences obtained from the comparison are converted into quantitative information that can characterize the encoding differences of the pixel. This quantitative information is the original difference value of the ray pixel.
[0055] Using the candidate anomaly seed point as the reference point, the pixel interval distance between each ray pixel on the extended ray beam and the reference point is determined. Based on the pixel interval distance, the original difference value of each ray pixel is matched with the corresponding weight. The original difference value of each ray pixel is accumulated with the corresponding weight. Then, the accumulated result is subjected to feature aggregation of the whole domain. The resulting aggregation result is the weighted cumulative similarity of the ray pixels.
[0056] The original difference values on each ray path in the extended ray beam are continuously sequenced and compared one by one with the changes in the original difference values between adjacent ray pixels. The difference fluctuation characteristics at each pixel position are characterized by the magnitude of the change in the value. The fluctuation characteristics are converted into the corresponding quantitative characterization value, which is the fluctuation penalty coefficient of each pixel.
[0057] The weighted cumulative similarity and fluctuation penalty coefficient corresponding to each ray pixel are fused together to form an initial quantization result that can accurately reflect the similarity continuity characteristics of the ray pixels. This initial quantization result is the initial maintenance depth estimate of the ray pixels.
[0058] The initial maintenance depth estimates of all ray pixels on the extended ray beam are analyzed across the entire domain to accurately determine the upper and lower limits of all estimates. Each initial maintenance depth estimate is mapped to a unified numerical range according to a fixed ratio, and the numerical standardization of all estimates is completed. The standardized values are the conservative maintenance depths of the ray pixels.
[0059] Using candidate abnormal seed points as the core of region growth, and based on the conservative maintenance depth of each ray pixel, the boundary of pixels that can be included in the region growth range on the extended ray beam is accurately determined. All pixels that meet the growth range conditions are spatially integrated according to the tooth surface extension direction. The growth regions corresponding to each candidate abnormal seed point are uniformly collected and fused, and the complete pixel region formed is the suspected defect region of the original image of the gear end face.
[0060] The position and traversal sequence numbers of the ray pixels are derived from the traversal order of the ray pixels along the extended ray beam, determined sequentially according to the extension direction of the ray-like traversal path. The natural constant is a fixed mathematical constant, directly using its mathematical definition. The distance attenuation rate is a pre-set fixed value used to characterize the degree of influence of pixel spacing on similarity. The original difference value of the first ray pixel and the first The original difference values of each ray pixel are all obtained by sampling and encoding the ray pixels on the extended ray beam point by point. and This corresponds to two adjacent ray pixels on the extended ray beam. The exponential function is a mathematical function used to characterize exponential changes; its mathematical definition is used directly. The fluctuation penalty factor is a pre-set fixed value used to characterize the degree of influence of differential fluctuations on similar continuity features. The maximum value function is a mathematical function used to select the larger of two values; its mathematical definition is used directly. The minimum positive smoothing term is a pre-set minimum positive number used to avoid the denominator being zero during calculation.
[0061] This formula is used to calculate the initial retention depth estimate of ray pixels. By fusing weighted cumulative similarity and fluctuation penalty coefficient, it accurately characterizes the similarity continuity features between ray pixels and candidate anomaly seed points. The weighted cumulative similarity is obtained by a distance-weighted cumulative aggregation of ray pixels based on the original difference values, reflecting how the similarity between ray pixels and candidate anomaly seed points changes with pixel spacing. The fluctuation penalty coefficient is obtained by assessing the severity of local fluctuations in the original difference values, reflecting the fluctuation characteristics of the original difference values between ray pixels. The initial retention depth estimate formed by fusing these two factors is then mapped using range normalization to obtain a conservative retention depth, providing a precise quantitative basis for determining the region growth boundary on the extended ray beam.
[0062] When the weighted cumulative similarity of ray pixels increases, the representation value of the initial depth prediction increases accordingly. When the fluctuation penalty coefficient of ray pixels decreases, the representation value of the initial depth prediction increases accordingly. When the weighted cumulative similarity of ray pixels decreases, the representation value of the initial depth prediction decreases accordingly. When the fluctuation penalty coefficient of ray pixels increases, the representation value of the initial depth prediction decreases accordingly.
[0063] The beneficial effect is that the tooth surface extension direction field formed by analyzing the main orientation of the tooth surface texture allows the regional growth trajectory of candidate abnormal seed points to conform to the actual texture features of the gear tooth surface, avoiding irregular regional growth. Through multi-dimensional similarity continuation length measurement, from encoding difference comparison to distance-weighted aggregation, and then to fluctuation feature evaluation, the similarity features between ray pixels and seed points are accurately characterized. Range normalization mapping provides a unified representation standard for the conservative maintenance depth, making the growth boundary determined by this more reasonable. Finally, the regional growth integration completed by combining the tooth surface extension direction allows the delineation of suspected defect areas to not only conform to the tooth surface texture direction but also accurately match the encoded similar features, providing a regional basis that conforms to the actual defect distribution for subsequent defect area refinement.
[0064] By fusing weighted cumulative similarity and fluctuation penalty coefficients, the initial maintenance depth prediction reflects both the variation in similarity between ray pixels and candidate anomaly seed points with pixel spacing and the fluctuation characteristics of the original difference values, making the prediction more comprehensive and accurate. This fusion approach avoids the biases caused by single-dimensional analysis, allowing the determination of conservative maintenance depth to better align with the actual extension patterns of tooth surface textures. This provides a reliable quantitative basis for defining region growth boundaries, thereby improving the accuracy of suspected defect areas and ensuring the basic reliability of subsequent defect area refinement. This makes the feature analysis stage of the entire defect detection process more scientific and targeted.
[0065] S05. Perform consistency verification on the suspected defect area, and remove outliers from the pixel encoding deviation values of the verified area to obtain the refined defect area of the suspected defect area. Perform edge smoothing processing on the refined defect area to obtain the tooth surface damage area of the original image of the gear end face.
[0066] In this embodiment of the invention, the step of performing consistency verification on the suspected defective region and removing outliers from the pixel encoding deviation values of the verified region to obtain the refined defective region of the suspected defective region includes: Based on the grayscale encoding sequence, the suspected defect region is traversed by intra-domain encoding to obtain the region encoding sequence of the suspected defect region; Based on the region coding sequence, the pixel points in the region of the suspected defective region are accumulated between sequences to obtain the difference accumulation weight of the pixel points in the region. The cumulative difference weights are sorted in descending order to obtain the pixel outlier sorting table for the suspected defective regions. Based on the pixel outlier sorting table, outlier pixels in the suspected defective region are progressively removed to obtain the refined defective region of the suspected defective region.
[0067] The refinement defect area is then smoothed at the edges to obtain the tooth surface damage area of the original image of the gear end face, including: Collect the contour pixel coordinates of the refining defect area, and concatenate the contour pixel coordinates to obtain the initial contour point chain of the contour pixel coordinates. The local curvature of the initial contour point chain is obtained by fitting the local curvature of the initial contour point chain. Based on the local curvature, the curvature abrupt change calibration is performed on the initial contour point chain to obtain the contour anomaly points of the refining defect region. Based on the aforementioned contour anomaly points, edge jaggedness elimination is performed on the initial contour point chain to obtain the tooth surface damage area of the original image of the gear end face.
[0068] Based on the grayscale encoding sequence, all pixels in the suspected defect area are covered. According to the spatial position of the pixels in the area, the grayscale encoding sequence information corresponding to each pixel is extracted one by one. All the extracted encoding information is integrated in an orderly manner according to the traversal order. The resulting ordered encoding information set is the region encoding sequence of the suspected defect area.
[0069] Using the region coding sequence as the core, the coding sequence of each pixel in the region is compared with the coding sequences of all other pixels in the region in turn. The difference features after each comparison are extracted and continuous accumulation processing is carried out. All the difference accumulation results corresponding to each pixel are transformed into a quantifiable feature representation value. This representation value is the difference accumulation weight of the pixels in the suspected defect region.
[0070] Collect the cumulative difference weights corresponding to all pixels in the suspected defect area, arrange these weights in descending order of value, and associate each cumulative difference weight with its corresponding pixel. Systematically integrate and record the arrangement number, cumulative difference weight, and spatial location information of the corresponding pixel. The resulting table containing the correspondence between the three is the pixel outlier sorting table for the suspected defect area.
[0071] According to the weight order of the pixel outlier sorting table, starting from the pixel with the highest cumulative difference weight, outlier attributes are determined for each pixel one by one and corresponding removal operations are performed. During the removal process, the consistency of the coding features of the remaining pixels in the region is continuously checked until the consistency of the coding features of all pixels in the region reaches a regular state. The complete region formed by the remaining pixels after the removal operation is completed is the refined defect region of the suspected defect region.
[0072] Accurately identify the edge contour range of the refined defect area, collect the spatial coordinate information of all pixels on the contour one by one, and connect all the collected coordinate information sequentially according to the continuous distribution order of the pixels on the contour. The continuous and ordered set of coordinate points is the initial contour point chain of the contour pixel coordinates.
[0073] Based on the continuous coordinates of the initial contour point chain, the entire contour point chain is uniformly segmented, and the bending state of each segment is analyzed. The actual bending degree of each segment is converted into quantitative information that can accurately characterize the bending features of the contour. This quantitative information is the local curvature of the initial contour point chain.
[0074] By comprehensively analyzing the local curvature values of each segment on the initial contour point chain, comparing the changes in local curvature values between adjacent segments, accurately identifying the contour positions where curvature values suddenly change, and precisely marking the corresponding pixels at these positions, these marked pixels are the contour anomaly points of the refined defect area.
[0075] For all contour anomalies on the initial contour point chain, the coordinate points around the anomalies are smoothly adjusted according to the natural curvature of the contour to eliminate the jagged protrusions and depressions on the contour caused by the anomalies. The adjusted contour point chain is then subjected to overall path regularization and coordinate calibration. The defect area corresponding to the contour formed after regularization and calibration is the tooth surface damage area of the original image of the gear end face.
[0076] The beneficial effects include: by using intra-domain traversal of the region coding sequence and outlier removal through differential accumulation weights, pixels whose coding features deviate from the overall pattern in suspected defect areas are effectively removed, making the coding features of refined defect areas more consistent, eliminating pseudo-defect pixels, and improving the accuracy of defect areas. Based on path concatenation of contour pixel coordinates and local curvature analysis, abnormal points on the contour are accurately identified and eliminated, making the edge contours of the tooth surface damage area smoother and more natural, avoiding jaggedness. This results in the final tooth surface damage area accurately reflecting the actual distribution of defects and possessing a regular contour shape, providing a reliable regional basis for subsequent defect assessment and analysis.
[0077] like Figure 2 The diagram shown is a functional block diagram of a gear tooth profile defect detection system based on image recognition provided in an embodiment of the present invention.
[0078] The image recognition-based gear tooth profile defect detection system 10 described in this invention can be installed in an electronic device. Depending on the functions implemented, the image recognition-based gear tooth profile defect detection system 10 may include a grayscale temporal encoding module 11, a neighborhood comparison module 12, an anomaly sorting and filtering module 13, a direction constraint growth module 14, and a region refinement and smoothing module 15. The module described in this invention can also be called a unit, referring to a series of computer program segments that can be executed by the processor of an electronic device and perform a fixed function, stored in the memory of the electronic device.
[0079] In this embodiment, the functions of each module / unit are as follows: The grayscale temporal encoding module 11 is used to perform pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face. The neighborhood comparison module 12 is used to perform neighborhood comparison of the Hamming distance between pixels in the original image of the gear end face based on the grayscale encoding sequence, so as to obtain the local anomaly distribution of the original image of the gear end face. The anomaly sorting and filtering module 13 is used to sort and filter the local anomaly distribution by intensity to obtain candidate anomaly seed points of the original image of the gear end face. The directional constraint growth module 14 is used to perform similarity-weighted region growth on the candidate anomaly seed points based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed points, to obtain the suspected defect area of the original image of the gear end face. The region refinement and smoothing module 15 is used to perform consistency verification on the suspected defect region, and to remove outliers from the pixel encoding deviation values of the verified region to obtain the refined defect region of the suspected defect region. The refined defect region is then subjected to edge smoothing processing to obtain the tooth surface damage region of the original image of the gear end face.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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 detecting gear tooth profile defects based on image recognition, characterized in that, The method includes: S01. Perform pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face; S02. Based on the grayscale encoding sequence, perform neighborhood comparison on the Hamming distance between pixels in the original image of the gear end face to obtain the local anomaly distribution of the original image of the gear end face. S03. Perform intensity sorting and filtering on the local anomaly distribution to obtain candidate anomaly seed points of the original image of the gear end face; S04. Based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed point, perform similarity weighted region growth on the candidate anomaly seed point to obtain the suspected defect area of the original image of the gear end face. S05. Perform consistency verification on the suspected defect area, and remove outliers from the pixel encoding deviation values of the verified area to obtain the refined defect area of the suspected defect area. Perform edge smoothing processing on the refined defect area to obtain the tooth surface damage area of the original image of the gear end face.
2. The gear tooth profile defect detection method based on image recognition as described in claim 1, characterized in that, The step of performing pixel-level grayscale difference encoding on the original image of the gear end face to obtain the grayscale encoding sequence of the original image of the gear end face includes: The grayscale amplitude change history of the original image of the gear end face is extracted at equal intervals according to time frames to obtain the grayscale time sampling sequence of the original image of the gear end face. Based on the grayscale temporal sampling sequence, inter-frame amplitude difference is performed on the original image of the gear end face to obtain the inter-frame grayscale difference of the original image of the gear end face. The inter-frame grayscale differences are subjected to differential symbol binarization mapping to obtain the binary symbol string of the original image of the gear end face; The binary symbol string is compressed and merged using run-length compression to obtain the compressed symbol count sequence of the original image of the gear end face; The count pairs of the compressed symbol count sequence are sequentially concatenated to obtain the grayscale encoding sequence of the original image of the gear end face.
3. The gear tooth profile defect detection method based on image recognition as described in claim 1, characterized in that, The step of performing neighborhood comparison of Hamming distances between pixels in the original image of the gear end face based on the grayscale encoding sequence to obtain the local anomaly distribution of the original image of the gear end face includes: The grayscale encoded sequence is reconstructed using correlational topology to obtain the Hamming distance correlation map of the original image of the gear end face; Based on the Hamming distance correlation graph, a walking path traversal is performed on the encoded pixels of the gray-scale encoded sequence to obtain the neighborhood path set of the encoded pixels; Perform global path frequency statistics on the neighborhood path set to obtain the rarity of the neighborhood path set; Based on the rarity, path weight backtracking is performed on the encoded pixel to obtain the local anomaly intensity of the encoded pixel; The distribution of the local anomaly intensity is redistributed and normalized to obtain the local anomaly distribution of the original image of the gear end face.
4. The gear tooth profile defect detection method based on image recognition as described in claim 3, characterized in that, The step of performing path weight backtracking allocation on the encoded pixels based on the rarity to obtain the local anomaly intensity of the encoded pixels includes: Based on the Hamming distance correlation map, the path of the encoded pixel is collected to obtain the pixel correlation path set of the Hamming distance correlation map; Based on the pixel association path set and the rarity, the coded pixel is associated with a weight mapping to obtain the path weight distribution of the coded pixel. The path weight distribution is summed to obtain the cumulative total weight of the encoded pixel. The weight deviation of the path weight distribution is estimated to obtain the weight dispersion index of the encoded pixel. Based on the cumulative total weight and the weight dispersion index, the local anomaly intensity of the encoded pixel is calculated, wherein the formula for calculating the local anomaly intensity is: ; In the formula, For the coded pixel point, Encoding pixels The intensity of local anomalies, Encode pixels in the pixel association path set The set of paths traversed For the pixel association path set path Rarity, For the pixel association path set path Rarity weight, This is the absolute value operator.
5. The gear tooth profile defect detection method based on image recognition as described in claim 1, characterized in that, The step of sorting and filtering the local anomaly distribution by intensity to obtain candidate anomaly seed points of the original image of the gear end face includes: The local anomaly distributions are sorted in descending order of global intensity values, and the sorted anomaly distributions are associated with the coded pixels to obtain an intensity sorting index table of the local anomaly distributions. Based on the intensity sorting index table, the inflection point threshold of the local anomaly distribution is located to obtain the dynamic intensity threshold of the local anomaly distribution; The encoded pixels with an anomaly intensity higher than the dynamic intensity threshold in the local anomaly distribution are used as the initial seed point set of the original image of the gear end face; Spatial proximity redundancy removal is performed on the initial seed point set to obtain candidate abnormal seed points for the original image of the gear end face.
6. The gear tooth profile defect detection method based on image recognition as described in claim 1, characterized in that, Based on the extension direction of the gear tooth surface in the original image of the gear end face, and starting from the candidate anomaly seed points, a similarity-weighted region growing process is performed on the candidate anomaly seed points to obtain the suspected defect regions of the original image of the gear end face, including: The tooth surface texture main orientation is analyzed on the original image of the gear end face to obtain the tooth surface extension direction field of the original image of the gear end face; Based on the tooth surface extension direction field, the growth trajectory of the candidate abnormal seed point is preset to obtain the extended ray beam of the candidate abnormal seed point; The extended ray beam is encoded and sampled along its path to obtain the encoded sampling chain of the extended ray beam; Based on the coded sampling chain, the similarity continuation length of the ray pixels on the extended ray beam is measured to obtain the conservative maintenance depth of the ray pixels. Based on the aforementioned conservative maintenance depth, the candidate abnormal seed points are regionalized and integrated to obtain the suspected defect region of the original image of the gear end face.
7. The gear tooth profile defect detection method based on image recognition as described in claim 6, characterized in that, The step of measuring the similarity continuation length of ray pixels on the extended ray beam based on the encoded sampling chain to obtain the conservative maintenance depth of the ray pixels includes: The ray pixels on the extended ray beam are encoded and sampled point by point to obtain the original difference value of the ray pixels; Based on the original difference value, the ray pixels are aggregated by distance weighting to obtain the weighted cumulative similarity of the ray pixels. The original difference value is evaluated for the severity of local fluctuations to obtain the fluctuation penalty coefficient for each pixel. Based on the weighted cumulative similarity and the fluctuation penalty coefficient, the initial maintenance depth estimate of the ray pixel is calculated, wherein the calculation formula for the initial maintenance depth estimate is: ; In the formula, For the first The conservatism of depth at each ray pixel The position number of the ray pixel. The pixel traversal sequence number of the ray pixel is [the number of pixels traversed]. It is a natural constant. The preset distance attenuation rate, For the first The original difference value of each ray pixel. It is an exponential function. The preset volatility penalty factor, For the first The original difference value of each ray pixel. To find the maximum value function, It is a smooth term with minimal positive numbers; The initial retention depth estimate is normalized by range mapping to obtain the conservative retention depth of the ray pixel.
8. The gear tooth profile defect detection method based on image recognition as described in claim 1, characterized in that, The process of performing consistency verification on the suspected defective regions and removing outliers from the pixel encoding deviation values of the verified regions to obtain the refined defective regions of the suspected defective regions includes: Based on the grayscale encoding sequence, the suspected defect region is traversed by intra-domain encoding to obtain the region encoding sequence of the suspected defect region; Based on the region coding sequence, the pixel points in the region of the suspected defective region are accumulated between sequences to obtain the difference accumulation weight of the pixel points in the region. The cumulative difference weights are sorted in descending order to obtain the pixel outlier sorting table for the suspected defective regions. Based on the pixel outlier sorting table, outlier pixels in the suspected defective region are progressively removed to obtain the refined defective region of the suspected defective region.
9. The gear tooth profile defect detection method based on image recognition as described in claim 1, characterized in that, The refinement defect area is then smoothed at the edges to obtain the tooth surface damage area of the original image of the gear end face, including: Collect the contour pixel coordinates of the refining defect area, and concatenate the contour pixel coordinates to obtain the initial contour point chain of the contour pixel coordinates. The local curvature of the initial contour point chain is obtained by fitting the local curvature of the initial contour point chain. Based on the local curvature, the curvature abrupt change calibration is performed on the initial contour point chain to obtain the contour anomaly points of the refining defect region. Based on the aforementioned contour anomaly points, edge jaggedness elimination is performed on the initial contour point chain to obtain the tooth surface damage area of the original image of the gear end face.
10. A gear tooth profile defect detection system based on image recognition, characterized in that, The system for implementing the image recognition-based gear tooth profile defect detection method of claim 1 includes: The grayscale temporal coding module is used to perform pixel-level grayscale difference coding on the original image of the gear end face to obtain the grayscale coding sequence of the original image of the gear end face. The neighborhood comparison module is used to perform neighborhood comparison of the Hamming distance between pixels in the original image of the gear end face based on the grayscale encoding sequence, so as to obtain the local anomaly distribution of the original image of the gear end face. Anomaly sorting and filtering module is used to sort and filter the local anomaly distribution by intensity to obtain candidate anomaly seed points of the original image of the gear end face; The directional constraint growth module is used to perform similarity-weighted region growth on the candidate anomaly seed points based on the extension direction of the gear tooth surface in the original image of the gear end face, starting from the candidate anomaly seed points, to obtain the suspected defect area of the original image of the gear end face. The region refinement and smoothing module is used to perform consistency verification on the suspected defect region, and to remove outliers from the pixel encoding deviation values of the verified region to obtain the refined defect region of the suspected defect region. The refined defect region is then subjected to edge smoothing processing to obtain the tooth surface damage region of the original image of the gear end face.