Intelligent metal part burr identification method based on machine vision
By calculating the pixel generation continuity index and generation path mapping, and combining spatial and temporal consistency features, the problems of false detection and missed detection in burr detection of metal parts are solved, and efficient and accurate burr recognition is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGYIN BOMEI MASCH MFG CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, the detection efficiency of burrs on metal parts is low, easily affected by changes in lighting, surface reflection and processing texture, making it difficult to distinguish between real burrs and noise. Furthermore, it relies on a large number of labeled samples and empirical parameters, resulting in limited generalization ability.
By calculating the continuity index of pixel generation, establishing the generation path mapping, and selecting the main structure path that meets the conditions of closed loop and continuity, and combining the generation deviation intensity, stability and time consistency, stable identification of burrs can be achieved.
It improves the accuracy and reliability of burr identification, reduces false detection and false negative rates, adapts to metal parts of different shapes and sizes, has high robustness and versatility, and provides detailed defect diagnosis reports.
Smart Images

Figure CN121883408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, specifically to a machine vision-based intelligent recognition method for burrs on metal parts. Background Technology
[0002] During the machining process, metal parts are prone to developing burrs at the edges, openings, or local structures due to factors such as material plastic deformation, tool wear, fluctuations in machining parameters, and changes in die clearance. Burrs not only affect the assembly accuracy and appearance quality of metal parts, but may also cause stress concentration, accelerated wear, and even safety hazards during subsequent use. Therefore, accurate and reliable burr detection of metal parts is a crucial aspect of industrial quality control.
[0003] In existing technologies, burr detection on metal parts mainly relies on manual visual inspection or automated inspection methods based on machine vision. Manual inspection is inefficient and highly subjective, making it difficult to meet the consistency and high efficiency requirements of modern industrial production. While machine vision-based methods improve detection efficiency to some extent, they mostly employ edge extraction, grayscale thresholding, morphological operations, or classification methods based on learning models. These methods typically treat burrs as abrupt changes in brightness, edge anomalies, or isolated noise structures, making them susceptible to interference from changes in lighting, surface reflections, processing textures, and normal edge roughness, leading to false positives and false negatives.
[0004] Furthermore, existing methods often focus on local features of a single frame image, failing to adequately consider the spatial continuity of metal structure formation and its temporal evolution, making it difficult to distinguish between genuine burrs and transient noise or processing disturbances. Especially when burrs are small, have similar gray levels to the main structure, or grow along the main edge, traditional threshold- or model-based detection methods often struggle to reliably identify them. Simultaneously, some learning-based solutions rely on a large number of labeled samples and empirical parameters, resulting in poor interpretability and limited generalization ability when processing conditions change.
[0005] Therefore, there is an urgent need for a new intelligent identification method for burrs on metal parts. Starting from the perspective of structural generation and evolution, and combining spatial continuity and temporal consistency characteristics, this method can achieve stable and accurate identification of burrs without relying on empirical thresholds and complex models, thereby improving the reliability and practicality of industrial inspection. Summary of the Invention
[0006] This invention provides a machine vision-based intelligent identification method for burrs on metal parts, which helps to solve the problems mentioned in the background art.
[0007] This invention provides the following technical solution: a machine vision-based intelligent recognition method for burrs on metal parts, comprising:
[0008] The grayscale image of the metal part is acquired and preprocessed. A reference image representing the structural consistency is obtained by calculating the continuity index of pixels.
[0009] An evolutionary path mapping describing the direction of structure generation is established based on the benchmark image, and all possible generation path sequences are constructed.
[0010] Select the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths;
[0011] By calculating the pixel intersection ratio between each path and the main structure path, non-master paths are distinguished, and their generation deviation intensity is further calculated to quantify their abnormality.
[0012] The non-master path is analyzed for its generation stability and self-duration length to assess whether it has the characteristic of continuous abnormal growth.
[0013] Track the same non-master path in multiple consecutive frames of images, and determine its temporal evolution consistency by analyzing the temporal changes in its length and deviation.
[0014] By combining non-master attributes, self-continuous generation characteristics, and time sequence consistency, paths that simultaneously meet multiple anomaly judgment conditions are merged, and finally, the spike region is output.
[0015] Optionally, the step of acquiring a grayscale image of the metal part and preprocessing it, and obtaining a benchmark image characterizing structural consistency by calculating a pixel continuity index, includes:
[0016] After acquiring the grayscale image of the metal part, the absolute value of the difference between each pixel and the median grayscale of its neighbors is calculated to obtain an initial index characterizing the consistency of the pixel generation state.
[0017] The index is enhanced by neighborhood maxima to preserve continuous structural features, and then smoothing is applied to generate the final structural generation benchmark image.
[0018] Optionally, the step of establishing an evolutionary path mapping describing the structure generation direction based on the reference image and constructing all possible generation path sequences includes:
[0019] To characterize the direction of structure generation, a neighborhood set for each pixel is defined, and by comparing the numerical differences between pixels in the structure generation reference image and their neighboring pixels, a generation path mapping relationship is established from each pixel to its most similar neighboring pixel.
[0020] Optionally, the step of selecting the set of main structure generation paths that satisfy the closed-loop and continuity conditions from all paths includes:
[0021] Based on the path mapping relationship, start from any pixel and iteratively trace its predecessor pixel to form a path generation sequence;
[0022] By performing closed-loop determination and continuity calculation on the path sequence, paths that meet the closed-loop conditions and have continuous consistency are identified, classified, and constructed into a main structure generated path set.
[0023] Optionally, the step of distinguishing non-master paths by calculating the pixel intersection ratio between each path and the main structure path, and further calculating their generation deviation intensity to quantify their abnormality, includes:
[0024] Calculate the pixel intersection ratio between each generated path and the main structure path set, and define it as the path master participation rate;
[0025] Paths with zero master control participation rate and continuous path itself are classified as non-master control paths;
[0026] To further filter the data, the minimum distance from the end of each non-master path to the main structure is calculated, and the deviation intensity is generated by combining the path length itself to quantify the degree of anomaly.
[0027] Optionally, the analysis of the non-master path to determine its generation stability and self-duration length, in order to assess whether it possesses the characteristic of continuous abnormal growth, includes:
[0028] For each non-master path, calculate the generation variation between adjacent pixels within it, and evaluate the overall generation stability of the path accordingly.
[0029] Calculate the self-continuation length based on the path length and its distance to the main structure;
[0030] Branches with a self-continuing length greater than zero and whose generation stability is continuous on the path are considered to have self-continuing generation characteristics.
[0031] Optionally, the step of tracking the same non-master path in multiple consecutive frames of images and determining its temporal evolution consistency by analyzing the temporal changes in its length and deviation includes:
[0032] A time consistency index is defined by comparing the length change and deviation change of the same non-master path in consecutive time frames.
[0033] If the metric does not show an increasing trend between consecutive frames, then the path is determined to have temporal consistency and is a genuine structural defect rather than instantaneous noise.
[0034] Optionally, the comprehensive non-master attributes, self-continuous generation characteristics, and time sequence consistency are used to merge paths that simultaneously meet multiple anomaly judgment conditions, ultimately outputting a spike region, including:
[0035] The final burr determination must meet three conditions simultaneously:
[0036] It belongs to a non-master-controlled path, has self-continuous generation characteristics, and has time consistency;
[0037] Merge all pixels contained in non-master paths that simultaneously meet the above conditions to output the final glitch region.
[0038] The present invention has the following beneficial effects:
[0039] 1. This invention presents a machine vision-based intelligent method for recognizing burrs on metal parts. It constructs a continuity index reflecting the consistency of local generation states by calculating the difference in median grayscale values between pixel neighborhoods. Subsequently, a neighborhood maximum enhancement strategy is employed to strengthen the subtle but continuous structural change features. Finally, smoothing processing is used to obtain a stable structural generation benchmark image, establishing a high-quality data foundation for subsequent analysis. Through an innovative generation continuity index calculation and enhancement mechanism, this invention effectively solves the key problem in traditional machine vision inspection where subtle burr features are easily submerged by noise. In the metal part processing, burrs often manifest as subtle, continuous structural anomalies, whose grayscale features are highly similar to background noise and texture fluctuations. Traditional edge detection or gradient algorithms often face a dilemma between sensitivity and noise resistance when dealing with such scenarios: increasing the detection threshold may miss subtle defects, while decreasing the threshold may generate a large number of false alarms. The generation continuity index proposed in this invention fundamentally changes the logical basis of feature extraction. It does not examine the grayscale value of a single pixel in isolation, but rather quantifies the degree of anomaly of each pixel in the local context from the perspective of "generation state consistency" by calculating the difference in grayscale values between the pixel and its surrounding areas. This design enables the algorithm to keenly detect pixel clusters that, while subtle, violate the overall generation rules, laying the theoretical foundation for identifying low-contrast glitch patterns. Further enhancement processing showcases the ingenuity of the algorithm design. By taking the maximum value of the continuity index between the current pixel and its neighborhood, the algorithm achieves targeted enhancement of continuous structural features. Mathematically, this operation is equivalent to a dilation operation targeting feature intensity rather than brightness, connecting and highlighting previously discontinuous and weak glitch signals to form more complete and significant feature regions, while avoiding the equal amplification of isolated noise points. The final smoothing process is not a simple blurring but is performed on the enhanced feature map. Its purpose is to suppress local extremum jitter caused by inherent noise in the image sensor or slight uneven lighting, thereby obtaining a stable and reliable "structure generation baseline image." This image strips away the original grayscale information and instead encodes the structural "compliance" strength at each pixel location, transforming the complex glitch identification problem into a search problem for "non-compliant" structural patterns in the image. This preprocessing process significantly improves the quality of input data for subsequent processing steps, enabling the system to maintain a high detection rate of minute defects even under harsh imaging conditions, providing crucial front-end support for high-precision and high-reliability intelligent burr recognition.
[0040] 2. This machine vision-based intelligent burr recognition method for metal parts establishes a generation path mapping function to characterize the evolutionary precursors of each pixel in terms of structure and define the generation dependencies between pixels. Then, by tracing these mapping relationships, a large number of potential generation path sequences are constructed. A dual criterion based on closed-loop conditions and a continuity index is designed to intelligently filter out the set of main structure generation paths representing the main contour and main structure of the metal part from the massive number of paths. Through a path analysis method that simulates the logic of structural generation and evolution, model-free and adaptive identification of the main structure of the metal part is achieved, overcoming the excessive reliance on prior knowledge and initial conditions in traditional template matching or contour tracking methods. The main structure in a metal part image is essentially a set of pixels determined by the processing technology and conforming to specific generation rules and spatial relationships. This invention creatively transforms the grayscale relationship between pixels into a "generation direction" relationship. By finding the pixel with the most similar structural benchmark in the neighborhood as a precursor, a virtual "path" is defined for each pixel. This transformation dynamically transforms the static image analysis problem into a path tracing problem. By systematically tracking these generated paths, the algorithm can spontaneously generate a large number of path chains, some long, some short, some cyclical, and some terminated. Among these, paths representing the main structure typically possess two inherent characteristics: first, they form spatial closed loops, corresponding to the continuity and closure of the physical structure; second, the structural generation benchmark values at each point on the path change smoothly, exhibiting a high "continuity index," reflecting the consistency of properties of homogeneous materials within compliant processing areas. The dual criterion proposed in this invention accurately captures these two characteristics. Closed-loop determination ensures the physical integrity of the area described by the path, while the continuity index screening ensures the uniformity of material and processing state in the area traversed by the path. This allows for efficient and accurate separation of paths describing the main structure from those describing noise, texture, and defects. This method of structural identification based on the emergent characteristics of the data itself possesses strong robustness and versatility. It does not rely on a specific workpiece geometry model, thus adapting to metal parts of different shapes and sizes; it is insensitive to image rotation and translation, requiring no precise initial registration; and it starts from the relative relationships between pixels, exhibiting good stability to overall changes in illumination. The final set of main structural paths is not a simple outline, but a deep description of the skeleton of the main structure, providing a clear and reliable reference for accurately distinguishing between "compliant main bodies" and "abnormal branches (burrs)". This technology elevates machine vision's understanding of objects from the surface pixels to the level of structural generation relationships, representing a key breakthrough in achieving highly intelligent defect recognition.
[0041] 3. This machine vision-based intelligent burr recognition method for metal parts filters out completely independent non-master-controlled paths by calculating the intersection ratio between the path and the main structure. It then introduces multi-dimensional metrics such as generation deviation intensity, generation stability, and self-sustaining length to quantitatively evaluate the spatial characteristics, internal consistency, and independent growth ability of non-master-controlled paths. Finally, by analyzing the temporal stability of the feature metrics of the same suspected branch in multiple frames of images, it confirms whether it is a real and stable structural defect. By constructing a hierarchical, multi-dimensional branch feature quantification system, it achieves step-by-step confirmation of abnormal structures such as burrs from coarse screening to fine judgment, greatly improving the accuracy and reliability of the recognition results and effectively reducing the probability of misjudging processing textures, stains, and noise as defects. In complex industrial scenarios, the causes of non-master-controlled structural regions in images are diverse, and not all of them are burrs. This invention does not use a single threshold for arbitrary classification but designs a progressive analysis process. First, it uses the master-controlled participation rate for initial screening, separating those regions that have no intersection with the main structure on the generation path. This step efficiently eliminates a large number of normal transition areas that, while not the main body, are dependent on it. Subsequently, the selected independent branches are dissected from multiple angles: the generated deviation intensity combines the branch's length and distance from the main structure, quantifying the degree and scale of its anomaly; the generated stability measures the uniformity of the branch's internal structure; genuine burrs often possess a certain degree of material continuity, exhibiting high stability, while noise clusters have low stability; the self-sustaining length assesses the branch's ability to extend independently without returning to the main structure, a characterization of the self-sustaining growth characteristics of abnormal areas, and a crucial indicator for distinguishing point-like defects from linear or whisker-like burrs. The most innovative aspect is the introduction of a temporal verification mechanism. Genuine burrs are physical structures on the workpiece, and their features in consecutive frames should be relatively stable. False defects formed by instantaneous reflections, floating particles, or random noise lack temporal consistency. By calculating the changes and stability of branch feature indicators across three consecutive frames, the algorithm can ultimately confirm which are persistent, genuine structural anomalies. This dual-insurance mechanism of "spatial feature analysis + temporal consistency verification" makes the method's overall anti-interference capability reach an extremely high level. It can not only identify obvious burrs, but also make reliable judgments on subtle and suspected defects, providing quality control personnel with detailed diagnostic reports containing quantitative data and confidence levels, rather than simple binary "present / absent" conclusions, which greatly enhances the practicality and decision support value of the detection system.
[0042] 4. This machine vision-based intelligent burr recognition method for metal parts establishes a set of clear joint judgment conditions. Only when a non-master path simultaneously meets three strict criteria—"belonging to an independent branch set," "possessing self-continuous generation characteristics," and "possessing temporal consistency"—is it ultimately judged as a burr. The pixel sets of all paths judged as burrs are merged, ultimately outputting a clear binary burr region map. By designing rigorous "AND" logic joint judgment conditions, a high-confidence burr decision portal is constructed, ensuring extremely high accuracy and reliability of detection conclusions, minimizing false positives and false negatives, and ultimately generating standardized defect region information that can be directly used for subsequent automated processing. In a defect detection system, the final judgment rule is the last and most important hurdle to ensure result quality. This invention does not use common single threshold judgments or loose "OR" condition judgments, but creatively requires potential defects to cross three consecutive technical thresholds. The first threshold, "belonging to a non-master branch set," ensures that the target is completely detached from the main body of the workpiece in spatial relation, and is an independent anomaly. The second hurdle, "possessing self-continuous generation characteristics," imposes constraints based on the physical logic of material and structural growth. It requires that the anomaly possess a certain degree of internal coherence and independent extension, consistent with the physical formation mechanism of burrs, thus filtering out discrete, scattered, non-structural anomalies. The third hurdle, "possessing temporal consistency," confirms this through observational stability, requiring the anomaly to persist continuously throughout the production cycle, rather than being a fleeting disturbance. These three conditions examine candidate objects from three orthogonal dimensions: spatial independence, structural rationality, and temporal stability. Only when all three conditions are met simultaneously can it be proven that it is a genuine, structurally specific, and persistent burr defect attached to the workpiece. This multi-dimensional joint criterion significantly reduces the space for false positives, ensuring high reliability for every "burr" alarm output by the system. Finally, the pixels contained in all identified burr paths are combined to generate a complete "burr region" image. This image clearly marks the precise location of the defect in the original image, and the pixel-level segmentation accuracy greatly facilitates subsequent processes. For example, the result can directly drive a robotic arm for precise positioning and grinding, or be combined with a 3D model for quality assessment and process traceability. The entire decision-making process is logically clear, with stringent conditions and definite results. It integrates various characteristic indicators and value judgments calculated in the preceding steps into a stable, reliable, and executable final detection conclusion, fully realizing a closed loop from the original image to actionable commands. This fully demonstrates the completeness and practicality of this patented method in industrial applications. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the structure of the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Example 1, see Figure 1 A machine vision-based intelligent recognition method for burrs on metal parts includes:
[0046] The grayscale image of the metal part is acquired and preprocessed. A reference image representing the structural consistency is obtained by calculating the continuity index of pixels.
[0047] An evolutionary path mapping describing the direction of structure generation is established based on the benchmark image, and all possible generation path sequences are constructed.
[0048] Select the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths;
[0049] By calculating the pixel intersection ratio between each path and the main structure path, non-master paths are distinguished, and their generation deviation intensity is further calculated to quantify their abnormality.
[0050] The non-master path is analyzed for its generation stability and self-duration length to assess whether it has the characteristic of continuous abnormal growth.
[0051] Track the same non-master path in multiple consecutive frames of images, and determine its temporal evolution consistency by analyzing the temporal changes in its length and deviation.
[0052] By combining non-master attributes, self-continuous generation characteristics, and time sequence consistency, paths that simultaneously meet multiple anomaly judgment conditions are merged, and finally, the spike region is output.
[0053] The process of acquiring grayscale images of metal parts and preprocessing them, and then calculating pixel continuity indices to obtain a benchmark image characterizing structural consistency, includes:
[0054] After acquiring the grayscale image of the metal part, the absolute value of the difference between each pixel and the median grayscale of its neighbors is calculated to obtain an initial index characterizing the consistency of the pixel generation state.
[0055] The index is enhanced by neighborhood maxima to preserve continuous structural features, and then smoothing is applied to generate the final structural generation benchmark image.
[0056] The process involves establishing an evolutionary path mapping based on the reference image to describe the direction of structure generation, and constructing all possible generation path sequences, including:
[0057] To characterize the direction of structure generation, a neighborhood set for each pixel is defined, and by comparing the numerical differences between pixels in the structure generation reference image and their neighboring pixels, a generation path mapping relationship is established from each pixel to its most similar neighboring pixel.
[0058] The process of selecting the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths includes:
[0059] Based on the path mapping relationship, start from any pixel and iteratively trace its predecessor pixel to form a path generation sequence;
[0060] By performing closed-loop determination and continuity calculation on the path sequence, paths that meet the closed-loop conditions and have continuous consistency are identified, classified, and constructed into a main structure generated path set.
[0061] The process of distinguishing non-master paths by calculating the pixel intersection ratio between each path and the main structure path, and further calculating their generation deviation intensity to quantify their abnormality, includes:
[0062] Calculate the pixel intersection ratio between each generated path and the main structure path set, and define it as the path master participation rate;
[0063] Paths with zero master control participation rate and continuous path itself are classified as non-master control paths;
[0064] To further filter the data, the minimum distance from the end of each non-master path to the main structure is calculated, and the deviation intensity is generated by combining the path length itself to quantify the degree of anomaly.
[0065] The analysis of non-master-controlled paths to determine their generation stability and self-duration length, in order to assess whether they possess the characteristic of continuous abnormal growth, includes:
[0066] For each non-master path, calculate the generation variation between adjacent pixels within it, and evaluate the overall generation stability of the path accordingly.
[0067] Calculate the self-continuation length based on the path length and its distance to the main structure;
[0068] Branches with a self-continuing length greater than zero and whose generation stability is continuous on the path are considered to have self-continuing generation characteristics.
[0069] The step of tracking the same non-master path in multiple consecutive frames of images and determining its temporal evolution consistency by analyzing the temporal changes in its length and deviation includes:
[0070] A time consistency index is defined by comparing the length change and deviation change of the same non-master path in consecutive time frames.
[0071] If the metric does not show an increasing trend between consecutive frames, then the path is determined to have temporal consistency and is a genuine structural defect rather than instantaneous noise.
[0072] The combined non-master attributes, self-continuous generation characteristics, and time sequence consistency are used to merge paths that simultaneously meet multiple anomaly judgment conditions, ultimately outputting a spike region, including:
[0073] The final burr determination must meet three conditions simultaneously:
[0074] It belongs to a non-master-controlled path, has self-continuous generation characteristics, and has time consistency;
[0075] Merge all pixels contained in non-master paths that simultaneously meet the above conditions to output the final glitch region.
[0076] Example 2: A machine vision-based intelligent burr recognition method for metal parts, comprising:
[0077] The grayscale image of the metal part is acquired and preprocessed. A reference image representing the structural consistency is obtained by calculating the continuity index of pixels.
[0078] An evolutionary path mapping describing the direction of structure generation is established based on the benchmark image, and all possible generation path sequences are constructed.
[0079] Select the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths;
[0080] By calculating the pixel intersection ratio between each path and the main structure path, non-master paths are distinguished, and their generation deviation intensity is further calculated to quantify their abnormality.
[0081] The non-master path is analyzed for its generation stability and self-duration length to assess whether it has the characteristic of continuous abnormal growth.
[0082] Track the same non-master path in multiple consecutive frames of images, and determine its temporal evolution consistency by analyzing the temporal changes in its length and deviation.
[0083] By combining non-master attributes, self-continuous generation characteristics, and time sequence consistency, paths that simultaneously meet multiple anomaly judgment conditions are merged, and finally, the spike region is output.
[0084] The process of acquiring grayscale images of metal parts and preprocessing them, and then calculating pixel continuity indices to obtain a benchmark image characterizing structural consistency, includes:
[0085] Acquire a grayscale image of the metal part, denoted as . ;
[0086] in, The horizontal coordinate index of the pixel in the image is determined by the camera imaging array. This is the vertical coordinate index of the pixel in the image;
[0087] Constructing the pixel generation continuity index: ;
[0088] in, A continuity index is generated for each pixel to represent the degree of consistency between the current pixel and the generated states of its surroundings. This is a calculation of the median gray level in the neighborhood. Let be the neighborhood offset, satisfying And they are not all zero at the same time;
[0089] For generating continuous index Enhancement: ;
[0090] in, A continuity index is generated for the enhanced pixels to preserve small but continuous structural changes;
[0091] The enhanced pixel generation continuity index is smoothed to obtain the structural generation reference image. : .
[0092] By calculating the median difference in grayscale values of a pixel's neighborhood, a continuity index reflecting the consistency of local generation states is constructed. Subsequently, a neighborhood maximum enhancement strategy is employed to strengthen the subtle but continuous structural change features. Finally, smoothing processing yields a stable structural generation benchmark image, establishing a high-quality data foundation for subsequent analysis. This innovative generation continuity index calculation and enhancement mechanism effectively solves the key problem in traditional machine vision inspection where minute burr features are easily obscured by noise. In metal processing, burrs often manifest as subtle, continuous structural anomalies, with grayscale features highly similar to background noise and texture fluctuations. Traditional edge detection or gradient algorithms typically face a dilemma between sensitivity and noise resistance when dealing with such scenarios: increasing the detection threshold misses minute defects, while decreasing the threshold generates numerous false alarms. The generation continuity index proposed in this invention fundamentally changes the logical basis of feature extraction. It does not examine the grayscale value of a single pixel in isolation, but rather quantifies the degree of anomaly of each pixel in its local context from the perspective of "generation state consistency" by calculating the difference between the median grayscale values of a pixel and its surrounding areas. This design enables the algorithm to keenly detect pixel clusters that, while subtle, violate the overall generation rules, laying the theoretical foundation for identifying low-contrast glitch patterns. Further enhancement processing showcases the ingenuity of the algorithm design. By taking the maximum value of the continuity index between the current pixel and its neighborhood, the algorithm achieves targeted enhancement of continuous structural features. Mathematically, this operation is equivalent to a dilation operation targeting feature intensity rather than brightness, connecting and highlighting previously discontinuous and weak glitch signals to form more complete and significant feature regions, while avoiding the equal amplification of isolated noise points. The final smoothing process is not a simple blurring but is performed on the enhanced feature map. Its purpose is to suppress local extremum jitter caused by inherent noise in the image sensor or slight uneven lighting, thereby obtaining a stable and reliable "structure generation baseline image." This image strips away the original grayscale information and instead encodes the structural "compliance" strength at each pixel location, transforming the complex glitch identification problem into a search problem for "non-compliant" structural patterns in the image. This preprocessing process significantly improves the quality of input data for subsequent processing steps, enabling the system to maintain a high detection rate of minute defects even under harsh imaging conditions, providing crucial front-end support for high-precision and high-reliability intelligent burr recognition.
[0093] The process involves establishing an evolutionary path mapping based on the reference image to describe the direction of structure generation, and constructing all possible generation path sequences, including:
[0094] To characterize the generation and propagation direction of the metal structure in the image, a structural evolution path is established, specifically as follows:
[0095] Define pixel neighborhood set : ;
[0096] Construct the function to generate path mappings: ;
[0097] in, For pixels The preceding pixel coordinates of the generation path, The coordinates of the candidate predecessor pixel in the neighborhood.
[0098] The process of selecting the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths includes:
[0099] Based on the path mapping function From any pixel Starting from here, construct the generated path sequence according to the following rules: ;
[0100] Form a path set : ;
[0101] in, The starting pixel of the path. The path termination pixel, The path length represents the number of propagation steps.
[0102] Define the closed-loop determination criteria: ;
[0103] Construct path continuity index: ;
[0104] in, This is a path continuity index, representing the overall consistency of path generation.
[0105] For path set Each path in the process undergoes a closed-loop determination. A path is determined to be a main structure generation path when it meets the following conditions:
[0106] Closed-loop determination conditions It is established, and the path continuity index is valid. It exists continuously during path propagation;
[0107] Collect all paths identified as main structure generation paths to construct a main structure path set. : ;
[0108] in, Indicates the first A main structure path that satisfies the closed-loop generation condition. The number of main structure paths.
[0109] By establishing a generation path mapping function, the evolutionary precursors of each pixel in terms of structure are characterized, and the generation dependencies between pixels are defined. Then, by tracing these mapping relationships, a large number of potential generation path sequences are constructed, and a dual criterion based on closed-loop conditions and continuity indices is designed to intelligently filter out the set of main structure generation paths representing the main contour and main structure of the metal part from a massive number of paths. Through a path analysis method that simulates the logic of structure generation and evolution, model-free and adaptive identification of the main structure of the metal part is achieved, overcoming the excessive reliance on prior knowledge and initial conditions in traditional template matching or contour tracking methods. The main structure in a metal part image is essentially a set of pixels determined by the processing technology and conforming to specific generation rules and spatial relationships. This invention creatively transforms the grayscale relationship between pixels into a "generation direction" relationship, defining a virtual "path" for each pixel by finding the pixel with the most similar structural benchmark in the neighborhood as a precursor. This transformation dynamically transforms the static image analysis problem into a path tracing problem. By systematically tracing these generation paths, the algorithm can spontaneously generate a large number of path chains of varying lengths, loops, or terminations. The path representing the main structure typically possesses two inherent characteristics: first, it forms a spatial closed loop, corresponding to the continuity and closure of the physical structure; second, the structural generation benchmark values at each point on the path change smoothly, exhibiting a high "continuity index," reflecting the consistency of properties of homogeneous materials within compliant processing areas. This invention proposes a dual criterion that precisely captures these two characteristics. By using a closed-loop determination, it ensures the physical integrity of the area described by the path; by using a continuity index, it ensures the uniformity of material and processing status in the area traversed by the path. This allows for efficient and accurate separation of paths describing the main structure from those describing noise, texture, and defects. This method of structural identification based on the emergent features of the data itself possesses strong robustness and versatility. It does not rely on a specific workpiece geometry model, thus adapting to metal parts of different shapes and sizes; it is insensitive to image rotation and translation, requiring no precise initial registration; and it starts from the relative relationships between pixels, exhibiting good stability to overall changes in illumination. The final set of main structural paths is not a simple outline, but a deep description of the skeleton of the main structure, providing a clear and reliable reference for accurately distinguishing between "compliant main bodies" and "abnormal branches (burrs)". This technology elevates machine vision's understanding of objects from the surface pixels to the level of structural generation relationships, representing a key breakthrough in achieving highly intelligent defect recognition.
[0110] The process of distinguishing non-master paths by calculating the pixel intersection ratio between each path and the main structure path, and further calculating their generation deviation intensity to quantify their abnormality, includes:
[0111] Read all path sets : ;
[0112] in, Indicates the first Generate a path, This represents the number of pixels contained in the path.
[0113] For any path Calculate its path set with the main structure. Pixel intersection: ;
[0114] in, Representing a path The set of pixels that participate in the generation of the main structure;
[0115] Construction path master control participation rate : ;
[0116] in, Represents a set of pixels Number of internal elements;
[0117] For any path At the same time, read its master control participation rate. and path continuity index ;
[0118] When path A path is considered a non-master path if it meets the following combined conditions: ;
[0119] Wherein, "the path exists continuously" means the path Path continuity index No abrupt breaks caused by isolated noise or acquisition anomalies were observed in the path pixel sequence;
[0120] All non-master paths are entered into the non-master branch set. : ;
[0121] To avoid misjudging occasional noise as a branch, a generation deviation is introduced;
[0122] For each non-master path Take its end pixel And calculate its set of paths to the main structure. Minimum Manhattan distance : ;
[0123] Constructing the deviation strength : ;
[0124] in, Non-master path The number of pixels contained;
[0125] Generate deviation intensity The larger the value, the more likely it is to be a non-master path. The longer and farther it is, the less it is constrained by the laws governing the generation of the main structure. The smaller the value, the shorter and closer the branch is, and the more likely it is to be a normal processing disturbance.
[0126] The analysis of non-master-controlled paths to determine their generation stability and self-duration length, in order to assess whether they possess the characteristic of continuous abnormal growth, includes:
[0127] Read each non-master path and its deviation strength ;
[0128] For path Calculate the change in adjacent pixels: ;
[0129] in, Representing a path The generation change of pixel number k;
[0130] Define branch generation stability : ;
[0131] Build branch self-continuation length: ;
[0132] in, This indicates the generation length that the non-master path can maintain without reverting to the master structure;
[0133] like and If a branch exists continuously during its propagation along a path, it is determined that the branch has the property of self-continuous generation.
[0134] Output the set of all branches that have the property of generating continuity. : .
[0135] The step of tracking the same non-master path in multiple consecutive frames of images and determining its temporal evolution consistency by analyzing the temporal changes in its length and deviation includes:
[0136] In three consecutive grayscale images of the metal part, the non-master paths at the same spatial location are numbered and aligned, and denoted as follows: ;
[0137] Calculate the change in length of the non-master path : ;
[0138] Calculate the deviation change of the non-master path : ;
[0139] Define time consistency metrics : ;
[0140] Specifically, the following conditions must be met: ;
[0141] If the structural evolution of the non-master path does not change drastically in consecutive time frames and has temporal consistency, it is considered a real structural defect.
[0142] By calculating the intersection ratio between the path and the main structure, completely independent non-master-controlled paths are screened out. Then, multi-dimensional metrics such as generation deviation intensity, generation stability, and self-sustaining length are introduced to quantitatively evaluate the spatial characteristics, internal consistency, and independent growth ability of non-master-controlled paths. Finally, by analyzing the temporal stability of the feature metrics of the same suspected branch in multiple frames of images, it is confirmed whether it is a real and stable structural defect. By constructing a hierarchical, multi-dimensional branch feature quantification system, a step-by-step confirmation of abnormal structures such as burrs is achieved from coarse screening to fine judgment, greatly improving the accuracy and reliability of the identification results and effectively reducing the probability of misjudging processing textures, stains, and noise as defects. In complex industrial scenarios, the causes of non-master-controlled structural regions in images are diverse, and not all are burrs. This invention does not use a single threshold for arbitrary classification, but designs a progressive analysis process. First, the master-controlled participation rate is used for initial screening to separate those regions that have no intersection with the main structure on the generation path. This step efficiently eliminates a large number of normal transition regions that are not the main body but are attached to it. Subsequently, the selected independent branches are dissected from multiple angles: the generated deviation intensity combines the branch length and distance from the main structure, quantifying the degree and scale of its anomaly; the generated stability measures the uniformity of the internal structure of the branch; real burrs often have a certain degree of material continuity and their stability is high, while noise clusters have low stability; the self-sustaining length assesses the branch's ability to extend independently without returning to the main structure, which is a characterization of the self-sustaining growth characteristics of the abnormal area and an important indicator for distinguishing point defects from linear and whisker-like burrs. The most innovative aspect is the introduction of a temporal dimension verification mechanism. Real burrs are physical structures on the workpiece, and their features in consecutive frame images should be relatively stable. However, pseudo-defects formed by instantaneous reflections, floating particles, or random noise lack temporal consistency. By calculating the changes and stability of branch feature indicators in three consecutive frames, the algorithm can ultimately confirm which are persistent real structural anomalies. This dual insurance mechanism of "spatial feature analysis + temporal consistency verification" makes the overall anti-interference capability of this method reach an extremely high level. It can not only identify obvious burrs, but also make reliable judgments on subtle and suspected defects, providing quality control personnel with detailed diagnostic reports containing quantitative data and confidence levels, rather than simple binary "present / absent" conclusions, which greatly enhances the practicality and decision support value of the detection system.
[0143] The combined non-master attributes, self-continuous generation characteristics, and time sequence consistency are used to merge paths that simultaneously meet multiple anomaly judgment conditions, ultimately outputting a spike region, including:
[0144] If a non-master path simultaneously meets the following anomaly criteria, it is identified as a glitch. The specific anomaly criteria are as follows: ;
[0145] Combine all non-master path pixels that meet the anomaly detection criteria into a glitch region: ;
[0146] in, This is the burr area.
[0147] By establishing a clear set of joint judgment conditions, a non-master path is only ultimately judged as a glitch when it simultaneously meets three strict criteria: "belonging to an independent branch set," "possessing self-continuous generation characteristics," and "possessing time consistency." The pixel sets of all paths judged as glitch are merged, ultimately outputting a clear binary glitch region map. Through the design of rigorous "AND" logic joint judgment conditions, a high-confidence glitch decision portal is constructed, ensuring extremely high accuracy and reliability of detection conclusions, minimizing false positives and false negatives, and ultimately generating standardized defect region information that can be directly used for subsequent automated processing. In a defect detection system, the final judgment rule is the last and most important checkpoint to ensure result quality. This invention does not employ common single threshold judgments or loose "OR" condition judgments, but creatively requires potential defects to cross three consecutive technical thresholds. The first threshold, "belonging to a non-master branch set," ensures that the target is completely detached from the workpiece body in spatial relation and is an independent anomaly. The second hurdle, "possessing self-continuous generation characteristics," imposes constraints based on the physical logic of material and structural growth. It requires that the anomaly possess a certain degree of internal coherence and independent extension, consistent with the physical formation mechanism of burrs, thus filtering out discrete, scattered, non-structural anomalies. The third hurdle, "possessing temporal consistency," confirms this through observational stability, requiring the anomaly to persist continuously throughout the production cycle, rather than being a fleeting disturbance. These three conditions examine candidate objects from three orthogonal dimensions: spatial independence, structural rationality, and temporal stability. Only when all three conditions are met simultaneously can it be proven that it is a genuine, structurally specific, and persistent burr defect attached to the workpiece. This multi-dimensional joint criterion significantly reduces the space for false positives, ensuring high reliability for every "burr" alarm output by the system. Finally, the pixels contained in all identified burr paths are combined to generate a complete "burr region" image. This image clearly marks the precise location of the defect in the original image, and the pixel-level segmentation accuracy greatly facilitates subsequent processes. For example, the result can directly drive a robotic arm for precise positioning and grinding, or be combined with a 3D model for quality assessment and process traceability. The entire decision-making process is logically clear, with stringent conditions and definite results. It integrates various characteristic indicators and value judgments calculated in the preceding steps into a stable, reliable, and executable final detection conclusion, fully realizing a closed loop from the original image to actionable commands. This fully demonstrates the completeness and practicality of this patented method in industrial applications.
[0148] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0149] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A machine vision-based intelligent recognition method for burrs on metal parts, characterized in that, include: The grayscale image of the metal part is acquired and preprocessed. A reference image representing the structural consistency is obtained by calculating the continuity index of pixels. An evolutionary path mapping describing the direction of structure generation is established based on the benchmark image, and all possible generation path sequences are constructed. Select the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths; By calculating the pixel intersection ratio between each path and the main structure path, non-master paths are distinguished, and their generation deviation intensity is further calculated to quantify their abnormality. The non-master path is analyzed for its generation stability and self-duration length to assess whether it has the characteristic of continuous abnormal growth. Track the same non-master path in multiple consecutive frames of images, and determine its temporal evolution consistency by analyzing the temporal changes in its length and deviation. By combining non-master attributes, self-continuous generation characteristics, and time sequence consistency, paths that simultaneously meet multiple anomaly judgment conditions are merged, and finally, the spike region is output.
2. The intelligent recognition method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The process of acquiring grayscale images of metal parts and preprocessing them, and then calculating pixel continuity indices to obtain a benchmark image characterizing structural consistency, includes: After acquiring the grayscale image of the metal part, the absolute value of the difference between each pixel and the median grayscale of its neighbors is calculated to obtain an initial index characterizing the consistency of the pixel generation state. The index is enhanced by neighborhood maxima to preserve continuous structural features, and then smoothing is applied to generate the final structural generation benchmark image.
3. The intelligent recognition method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The process involves establishing an evolutionary path mapping based on the reference image to describe the direction of structure generation, and constructing all possible generation path sequences, including: To characterize the direction of structure generation, a neighborhood set for each pixel is defined, and by comparing the numerical differences between pixels in the structure generation reference image and their neighboring pixels, a generation path mapping relationship is established from each pixel to its most similar neighboring pixel.
4. The intelligent recognition method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The process of selecting the set of main structure generation paths that satisfy the conditions of closed loop and continuity from all paths includes: Based on the path mapping relationship, start from any pixel and iteratively trace its predecessor pixel to form a path generation sequence; By performing loop closure determination and continuity calculation on the path sequence, paths that meet the loop closure condition and have continuous consistency are identified, classified, and constructed into a main structure generated path set.
5. The intelligent recognition method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The process of distinguishing non-master paths by calculating the pixel intersection ratio between each path and the main structure path, and further calculating their generation deviation intensity to quantify their abnormality, includes: Calculate the pixel intersection ratio between each generated path and the main structure path set, and define it as the path master participation rate; Paths with zero master control participation rate and continuous path itself are classified as non-master control paths; To further filter the data, the minimum distance from the end of each non-master path to the main structure is calculated, and the deviation intensity is generated by combining the path length itself to quantify the degree of anomaly.
6. The intelligent recognition method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The analysis of non-master paths to determine their generation stability and self-duration length, in order to assess whether they possess the characteristic of continuous abnormal growth, includes: For each non-master path, calculate the generation variation between adjacent pixels within it, and evaluate the overall generation stability of the path accordingly. Calculate the self-continuation length based on the path length and its distance to the main structure; Branches with a self-continuing length greater than zero and whose generation stability is continuous on the path are considered to have self-continuing generation characteristics.
7. The intelligent identification method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The step of tracking the same non-master path in multiple consecutive frames of images and determining its temporal evolution consistency by analyzing the temporal changes in its length and deviation includes: A time consistency index is defined by comparing the length change and deviation change of the same non-master path in consecutive time frames. If the metric does not show an increasing trend between consecutive frames, then the path is determined to have temporal consistency and is a genuine structural defect rather than instantaneous noise.
8. The intelligent recognition method for burrs on metal parts based on machine vision according to claim 1, characterized in that: The combined non-master attributes, self-continuous generation characteristics, and time sequence consistency are used to merge paths that simultaneously meet multiple anomaly judgment conditions, ultimately outputting a spike region, including: The final burr determination must meet three conditions simultaneously: It belongs to a non-master-controlled path, has self-continuous generation characteristics, and has time consistency; Merge all pixels contained in non-master paths that simultaneously meet the above conditions to output the final glitch region.