Edge burr detection method based on multi-scale features and adaptive segmentation

By employing multi-scale feature enhancement and adaptive segmentation methods, the problems of insufficient detection of small, low-contrast burrs, weak anti-interference ability, and poor adaptability to morphological diversity in straight-line edge burr detection are solved, achieving efficient and accurate burr detection and parameter adaptation.

CN121921319BActive Publication Date: 2026-06-09HANGZHOU HUICUI INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU HUICUI INTELLIGENT TECH CO LTD
Filing Date
2026-03-26
Publication Date
2026-06-09

Smart Images

  • Figure CN121921319B_ABST
    Figure CN121921319B_ABST
Patent Text Reader

Abstract

The application discloses an edge burr detection method based on multi-scale features and adaptive segmentation, and comprises the following steps: S10, image acquisition; S20, pretreatment and ROI extraction; S30, multi-scale feature enhancement; S40, adaptive segmentation; S50, feature extraction and classification; S60, detection result optimization and output. The application improves the detection capability of micro and low-contrast burrs, enhances the anti-interference capability and detection stability, adapts to the diversity of burr morphology, and accurately distinguishes burrs from normal geometric changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision positioning technology and relates to an edge burr detection method based on multi-scale features and adaptive segmentation. Background Technology

[0002] In numerous industrial sectors such as precision machining, electronic component manufacturing, and automotive parts production, the quality of straight edges directly impacts product functionality, safety, and lifespan. Burrs, one of the most common edge defects, are tiny protrusions or irregular excess material generated during processing such as cutting, stamping, and injection molding. Traditional burr detection relies primarily on manual visual inspection or contact measurement. This method is not only inefficient and labor-intensive but also highly susceptible to the subjective factors of the inspectors, making it difficult to standardize inspection criteria. Especially on high-volume, high-speed production lines, the rate of missed detection for tiny burrs is very high.

[0003] With the rapid development of machine vision technology, automatic burr detection based on image processing has gradually become a research hotspot. The core challenge of burr detection on straight edges is that burrs are usually tiny (maybe only tens of micrometers) in size, irregular in shape, and have low contrast with the background. Furthermore, the straight edges themselves may have normal chamfers, rounded corners, or slight processing marks, all of which make it difficult to accurately distinguish and locate burrs.

[0004] Existing technical solutions include the following:

[0005] 1. A method based on edge extraction and geometric analysis

[0006] This is currently the most common method in industrial applications. Its basic process is as follows: First, edges in the image are extracted using operators such as Canny, Sobel, or Laplacian. Then, the mathematical equation of the straight edge is fitted using the Hough Transform or least squares method. After determining the line position, the geometric features of the edge contour are analyzed along the edge normal direction. A typical implementation involves calculating the distance deviation sequence from the edge point to the fitted line:

[0007] Let the equation of the fitted line be: ;

[0008] For the detected edge point set Calculate the directed distance from each point to the line:

[0009] ;

[0010] Then the distance sequence Perform statistical analysis. Spikes typically manifest as "abnormal peaks" in the distance sequence. This can be addressed by setting a threshold. ,when Furthermore, if the abnormal area meets certain continuity conditions, it is determined to be a burr.

[0011] This method is relatively simple and computationally inexpensive, but it requires high image quality. In practical applications, edge extraction is often incomplete or inaccurate due to factors such as uneven lighting, material surface reflection, and background texture interference, resulting in insufficient stability and reliability of burr detection.

[0012] 2. Methods based on morphological operations and region segmentation

[0013] This method treats spur detection as an image segmentation problem. First, it obtains regions of interest (ROIs) containing edges through edge detection or thresholding. Then, it utilizes morphological operations (such as erosion, dilation, opening, and closing operations) to enhance spur features or suppress background noise. A typical workflow is as follows:

[0014] (1) Preprocess the image (filtering, enhancement)

[0015] (2) Obtain binarized edge images using adaptive thresholding or edge detection.

[0016] (3) Apply morphological gradient operations to highlight grayscale changes near the edges:

[0017] ;

[0018] in For image, As a structural element, and These represent expansion and erosion operations, respectively.

[0019] (4) Perform thresholding again on the gradient image to extract possible spur regions.

[0020] (5) Perform feature analysis on the extracted region (area, aspect ratio, shape factor, etc.) and determine whether it is a burr based on empirical rules.

[0021] This method is effective for burrs with obvious contrast, but for small, low-contrast burrs, morphological operations may filter them out along with noise. Furthermore, the choice of structuring element size has a significant impact on the detection results and lacks adaptability.

[0022] 3. Methods based on template matching and difference analysis

[0023] For straight edges of specific shapes and fixed positions, template matching can be used. First, a "gold standard" image with burr-free edges is obtained as a template. Then, the image to be examined is registered and compared with the template. Difference analysis can be performed through the following steps:

[0024] Let the template image be The image to be inspected is The difference image after registration is as follows:

[0025] ;

[0026] in It is the registered image to be inspected.

[0027] In difference images, spiky regions exhibit significant grayscale differences. Spiky areas can be detected by analyzing the projection or cross-section of the difference image along the edge direction.

[0028] ;

[0029] However, this method requires extremely high image registration accuracy; even a small registration error can lead to false positives. Furthermore, for products in mass production, variations in processing conditions can cause fluctuations in the normal appearance of edges, making it difficult for a fixed template to adapt to these changes.

[0030] 4. Feature classification methods based on machine learning

[0031] In recent years, some studies have attempted to transform spur detection into a classification problem. First, various features are extracted from the image, including grayscale features, texture features (such as LBP and GLCM), shape features, and frequency domain features. Then, traditional machine learning classifiers such as Support Vector Machines (SVM) and Random Forests are used for training and prediction.

[0032] Feature extraction is typically performed around edge regions. For each candidate region, a set of feature vectors is computed:

[0033] ;

[0034] This may include: area, perimeter, density, Hu moment, gray mean, variance, etc.

[0035] The classifier establishes the decision boundary by learning from a large number of labeled samples (with / without spurs). This method overcomes the limitations of manually setting rules to some extent, but feature engineering requires expertise, and features need to be redesigned and selected for different application scenarios, resulting in limited generalization ability.

[0036] Through in-depth analysis of the above-mentioned existing technical solutions, we can summarize their main drawbacks in the detection of burrs on straight edges:

[0037] 1. Insufficient ability to detect small, low-contrast burrs: Edge extraction and morphology-based methods rely on obvious grayscale or geometric changes. When the burr size is small or the contrast with the background is low, these changes may be drowned out by noise, leading to missed detection.

[0038] 2. Weak anti-interference ability and poor stability: Real-world industrial environments present various interference factors such as changes in lighting, surface reflection, oil stains, and scratches. Existing methods lack robustness to these interferences and are prone to false detections. In particular, methods based on fixed thresholds require frequent parameter adjustments to adapt to environmental changes.

[0039] 3. Lack of adaptability to the diversity of burr morphology: Burrs vary greatly in shape, size, and direction, and rule-based methods (such as setting fixed geometric thresholds) or methods based on fixed templates are difficult to cover all possible burr morphologies.

[0040] 4. Misjudgment of normal geometric changes at the edges: Processed edges usually have normal chamfers, rounded corners, or slight waviness. These normal geometric changes are easily misjudged as burrs, especially when the detection sensitivity is set high.

[0041] 5. The contradiction between computational efficiency and detection accuracy: Although some complex feature extraction and machine learning methods can improve detection accuracy, they require a large amount of computation and are difficult to meet the real-time requirements of high-speed production lines.

[0042] 6. Parameter settings rely on experience and lack adaptability: Most methods require manual setting of multiple parameters (such as threshold, structuring element size, feature selection, etc.). Optimization of these parameters requires rich experience and a lot of experimentation, and once set, they are difficult to adapt to changing production conditions. Summary of the Invention

[0043] To address the aforementioned shortcomings of existing technologies, the purpose of this invention is to provide a visual detection method for straight-line edge burrs based on multi-scale feature enhancement and adaptive segmentation. This method aims to achieve the following objectives:

[0044] Improve the detection capability for small, low-contrast burrs: Through multi-scale feature enhancement technology, enhance the feature representation of burrs without amplifying noise, making them easier to detect.

[0045] Enhance anti-interference capability and detection stability: Design a robust feature extraction and decision-making mechanism to reduce the impact of interference factors such as illumination changes and surface defects.

[0046] Adapting to the diversity of burr morphologies: Through multi-feature fusion and adaptive learning mechanisms, the system is able to identify burrs of various morphologies without relying on fixed morphology assumptions.

[0047] Accurately distinguish between burrs and normal geometric changes: Establish a discriminative model based on statistical learning and contextual analysis to learn the statistical characteristics of normal edges, thereby accurately identifying abnormal burrs.

[0048] Balancing computational efficiency and detection accuracy: Designing an efficient algorithm architecture that meets the real-time requirements of industrial sites while ensuring detection accuracy.

[0049] Achieve parameter self-adaptation and system self-learning: reduce manual parameter adjustment, enabling the system to automatically optimize parameters based on actual test results and adapt to different production conditions.

[0050] To address the above problems, the technical solution of this invention is an edge burr detection method based on multi-scale features and adaptive segmentation, comprising the following steps:

[0051] S10, Image Acquisition;

[0052] S20, Pretreatment and ROI extraction;

[0053] S30, multi-scale feature enhancement;

[0054] S40, adaptive segmentation;

[0055] S50, Feature Extraction and Classification;

[0056] S60, Optimization and output of detection results.

[0057] Preferably, the ring-shaped LED light source used in S10 emits light at an angle of 10°-30° to the surface of the sample to be tested, and an area array industrial camera combined with a telecentric lens is used to acquire images.

[0058] Preferably, step S20 includes the following steps:

[0059] S21, Noise Suppression: Adaptive median filtering is used, and its window size is dynamically adjusted according to the local noise level;

[0060] S22, Lighting Equalization: Lighting compensation is performed using Retinex to eliminate the effects of uneven lighting;

[0061] S23, Contrast Enhancement: Adaptive Histogram Equalization;

[0062] S24, Edge detection and line fitting;

[0063] S25, ROI region definition.

[0064] Preferably, in S24, edge detection and line fitting, edges are first detected using an improved Canny operator, which employs an adaptive dual threshold:

[0065] ;

[0066] in, and These are the mean and standard deviation of the image gradient magnitudes, respectively. This is an empirical coefficient;

[0067] For the detected edge points, a random sampling consensus algorithm is used to fit a straight line. Let the equation of the fitted line be:

[0068] ;

[0069] in, The distance from the origin to the line is denoted as . The angle between the normal to the line and the x-axis.

[0070] Preferably, in step S25, the ROI region is defined by centered on the fitted straight line, forming a strip-shaped ROI region with a width of [missing information]. Determined based on the expected maximum burr size and positioning error at the edge:

[0071] ;

[0072] in, The expected maximum burr size, To allow for edge positioning error tolerance, For safety boundaries;

[0073] Within the ROI, establish a local coordinate system based on the straight line: the u-axis is along the direction of the straight line, and the v-axis is perpendicular to the straight line. Transform each pixel within the ROI into this local coordinate system.

[0074] Preferably, S30, multi-scale feature enhancement, includes the following steps:

[0075] S31, Multi-scale Gaussian difference filtering: Applying multi-scale Gaussian difference filtering to the ROI image to extract edge features at different scales:

[0076] ;

[0077] in, For Gaussian kernel, Scale factor;

[0078] Choose 3-5 different scales Multi-scale DoG response maps were obtained. ;

[0079] S32, Scale-space Feature Fusion: Defining the Scale-space Response Matrix ,in ;

[0080] For each position Calculate the scale-space saliency measure:

[0081] ;

[0082] in, These are weighting coefficients used to suppress noise that has a uniform response across multiple scales;

[0083] S33, Direction Selectivity Enhancement: Define a set of directional filters ,in The filter direction angle;

[0084] Each directional filter consists of two orthogonal Gabor filters:

[0085] ;

[0086] in, For direction Gabor filters;

[0087] Convolve the ROI image with filters of each direction to obtain the directional response map.

[0088] Preferably, step S40 includes the following steps:

[0089] S41, Local threshold segmentation;

[0090] S42, Segmentation optimization based on active contour model.

[0091] Preferably, S50 includes the following steps:

[0092] S51, multi-dimensional feature extraction, including geometric features, grayscale features, texture features and contextual features;

[0093] S52 is a classifier based on ensemble learning, specifically employing a gradient boosting decision tree.

[0094] Preferably, S52 specifically includes:

[0095] Let the training dataset be... ,in For feature vectors, The label indicates that 0 represents normal operation and 1 represents burrs.

[0096] Gradient boosting decision trees approximate the objective function by iteratively building multiple weak learners. The model for the t-th iteration is:

[0097] ;

[0098] in, For the t-th weak learner, The learning rate;

[0099] The loss function uses logarithmic loss:

[0100] ;

[0101] in, ;

[0102] The final ensemble model is obtained by minimizing the loss function through gradient descent.

[0103] Preferably, S60 includes the following steps:

[0104] S61, Results Fusion and Verification;

[0105] S62, Quantitative Assessment and Report Generation.

[0106] The present invention has at least the following beneficial effects:

[0107] 1. Significantly improved detection sensitivity: Through multi-scale feature enhancement techniques, especially the introduction of scale-space saliency measurement, the signal of small, low-contrast burrs can be effectively enhanced while suppressing noise. Experiments show that for small burrs (smaller than 50 micrometers) that are difficult to detect by traditional methods, the detection rate of this method is improved by more than 30%.

[0108] 2. Enhanced anti-interference capability and robustness: Adaptive local threshold segmentation and RANSAC-based linear fitting enhance the system's resistance to interference factors such as illumination changes and surface defects. Enhanced direction selectivity further reduces interference from non-perpendicular features.

[0109] 3. Adaptability to Diverse Burr Morphologies: The use of multi-dimensional feature extraction and ensemble learning classifiers enables the system to learn feature representations of various burr morphologies without relying on fixed morphological assumptions. Through training, the system can adapt to various types of burrs generated by different materials and processing techniques.

[0110] 4. Accurately distinguishing between burrs and normal geometric changes: The introduction of contextual features and a statistical learning-based discriminant model enable the system to understand the normal geometric characteristics of edges (such as chamfers and rounded corners), thereby reducing false positives. Experimental data show that while maintaining a high detection rate, the false positive rate is reduced by more than 40%.

[0111] 5. Optimized computational efficiency: Through modular design and algorithm optimization, the processing speed is increased by approximately 50% compared to traditional complex methods while maintaining detection accuracy. For a typical 5-megapixel image, the processing time per frame can be controlled within 200ms, meeting the real-time requirements of most industrial sites.

[0112] 6. Parameter Adaptation and Learning Capabilities: The system incorporates parameter adaptation mechanisms, such as adaptive median filtering windows and adaptive local thresholds, reducing the workload of manual parameter tuning. The machine learning-based classifier possesses continuous learning capabilities, allowing for ongoing performance optimization using new samples.

[0113] 7. Comprehensive quantitative assessment capabilities: It can not only determine the presence or absence of burrs, but also provide detailed quantitative data (size, location, type, severity) to provide data support for process improvement.

[0114] 8. Excellent scalability: The system's modular design facilitates functional expansion and adaptation to different application scenarios. By adjusting the feature set and retraining the classifier, it can quickly adapt to new detection tasks. Attached Figure Description

[0115] Figure 1 This is a flowchart illustrating the steps of the edge burr detection method based on multi-scale features and adaptive segmentation according to an embodiment of the present invention.

[0116] Figure 2 This is a schematic diagram of the S30 multi-scale feature enhancement process of the edge burr detection method based on multi-scale features and adaptive segmentation in an embodiment of the present invention.

[0117] Figure 3 This is a schematic diagram of the S40 adaptive segmentation process of the edge burr detection method based on multi-scale features and adaptive segmentation in an embodiment of the present invention.

[0118] Figure 4 This is a schematic diagram of the S50 feature extraction and classification process of the edge burr detection method based on multi-scale features and adaptive segmentation in an embodiment of the present invention.

[0119] Figure 5 This is a visualization diagram of the S60 detection results of the edge burr detection method based on multi-scale features and adaptive segmentation according to an embodiment of the present invention. Detailed Implementation

[0120] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0121] Conversely, this invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of the invention as defined in the claims. Furthermore, to provide a better understanding of the invention, certain specific details are described in detail below. However, those skilled in the art will fully understand the invention even without these detailed descriptions.

[0122] See Figure 1 The flowchart of an embodiment of the method of the present invention includes the following steps:

[0123] S10, Image Acquisition;

[0124] S20, Pretreatment and ROI extraction;

[0125] S30, multi-scale feature enhancement;

[0126] S40, adaptive segmentation;

[0127] S50, Feature Extraction and Classification;

[0128] S60, Optimization and output of detection results.

[0129] The ring-shaped LED light source used in the S10 emits light at an angle of 10°-30° to the surface of the sample under test. An area array industrial camera, combined with a telecentric lens, is used to acquire images.

[0130] S20 includes the following steps:

[0131] S21, Noise Suppression: Adaptive median filtering is used, and its window size is dynamically adjusted according to the local noise level.

[0132] ;

[0133] in, The standard deviation of gray levels in a local area;

[0134] S22, Light Equalization: Light compensation is performed using Retinex theory to eliminate the effects of uneven lighting.

[0135] ;

[0136] in, For the original image, It is a Gaussian filter kernel. This represents the convolution operation;

[0137] S23, Contrast Enhancement: Adaptive Histogram Equalization (CLAHE) is used to enhance edge contrast while avoiding excessive noise enhancement;

[0138] S24, Edge detection and line fitting: First, an improved Canny operator is used to detect edges, which employs an adaptive double threshold.

[0139] ;

[0140] in, and These are the mean and standard deviation of the image gradient magnitudes, respectively. Empirical coefficient (usually taken as...) );

[0141] For the detected edge points, a random sampling consensus algorithm is used to fit a straight line. Let the equation of the fitted line be:

[0142] ;

[0143] in, The distance from the origin to the line is denoted as . The angle between the normal to the line and the x-axis.

[0144] S25, ROI region definition: Define a strip-shaped ROI region centered on the fitted line, specifying the width of the ROI. Determined based on the expected maximum burr size and positioning error at the edge:

[0145] ;

[0146] in, The expected maximum burr size, To allow for edge positioning error tolerance, For safety boundaries;

[0147] Within the ROI, establish a local coordinate system based on the straight line: the u-axis is along the direction of the straight line, and the v-axis is perpendicular to the straight line. Transform each pixel within the ROI into this local coordinate system.

[0148] See Figure 2 S30, Multi-scale Feature Enhancement, includes the following steps:

[0149] S31, Multi-scale Gaussian difference filtering: Applying multi-scale Gaussian difference filtering to the ROI image to extract edge features at different scales:

[0150] ;

[0151] in, For Gaussian kernel, Scale factor;

[0152] Choose 3-5 different scales Multi-scale DoG response maps were obtained. ;

[0153] S32, Scale-space Feature Fusion: Defining the Scale-space Response Matrix ,in ;

[0154] For each position Calculate the scale-space saliency measure:

[0155] ;

[0156] in, These are weighting coefficients used to suppress noise that has a uniform response across multiple scales;

[0157] S33, Direction Selectivity Enhancement: Define a set of directional filters ,in The filter direction angle;

[0158] Each directional filter consists of two orthogonal Gabor filters:

[0159] ;

[0160] in, For direction Gabor filters;

[0161] The ROI image is convolved with filters in each direction to obtain the directional response map. Since burrs mainly appear in the direction of the vertical edges, the response in the vertical direction is particularly enhanced.

[0162] See Figure 3 S40 includes the following steps:

[0163] S41, Local thresholding segmentation: Traditional global thresholding segmentation is sensitive to uneven illumination. This invention employs adaptive local thresholding segmentation.

[0164] For each pixel in the ROI Consider its local neighborhood (Typically a 15×15 window), calculate the local threshold:

[0165] ;

[0166] in and Neighborhood The mean and standard deviation of gray levels, For control parameters,

[0167] The splitting decision is:

[0168] ;

[0169] in, The image after feature enhancement;

[0170] S42, Segmentation optimization based on active contour model: For complex burr regions, an improved active contour model is used for accurate segmentation, and an energy function is defined:

[0171] ;

[0172] in For the contour curve, Controlling the elasticity and rigidity of the profile, Image force weights;

[0173] The precise burr boundary is obtained by minimizing the energy function.

[0174] See Figure 4 S50 includes the following steps:

[0175] S51, Multi-dimensional feature extraction: For the segmented candidate spur regions, the following four types of features are extracted:

[0176] Geometric features: Area: ;perimeter: Density: Aspect Ratio: Calculated based on the minimum bounding rectangle of the region; Direction: The angle between the principal axis of the region and the edge normal;

[0177] Gray-level characteristics: mean, variance, skewness, and kurtosis of gray levels within the region; gray-level contrast with the background region. Gradient statistical characteristics;

[0178] Texture features: Local Binary Pattern (LBP) histogram; Gray-Level Co-occurrence Matrix (GLCM) features: contrast, correlation, energy, homogeneity;

[0179] Contextual features: distance to the edge line; distribution characteristics along the edge direction; association characteristics with adjacent regions;

[0180] S52 is a classifier based on ensemble learning. It uses ensemble learning methods to build a classifier, improving classification accuracy and robustness. Specifically, it employs Gradient Boosting Decision Tree (GBDT).

[0181] Let the training dataset be... ,in For feature vectors, The label indicates that 0 represents normal operation and 1 represents burrs.

[0182] Gradient boosting decision trees approximate the objective function by iteratively building multiple weak learners. The model for the t-th iteration is:

[0183] ;

[0184] in, For the t-th weak learner, The learning rate;

[0185] The loss function uses logarithmic loss:

[0186] ;

[0187] in, ;

[0188] The final ensemble model is obtained by minimizing the loss function through gradient descent.

[0189] S60 includes the following steps:

[0190] S61, Result Fusion and Validation: For each detected candidate glitch, the following information is used to make a final determination:

[0191] 1. Confidence score of the classifier;

[0192] 2. Check the rationality of geometric features;

[0193] 3. Spatial context consistency verification;

[0194] 4. Comparative analysis with historical test results.

[0195] Set a comprehensive judgment threshold, and only areas that meet all the conditions will be identified as burrs.

[0196] S62, Quantitative Assessment and Report Generation: Quantitative assessment of confirmed burrs:

[0197] Burr dimensions (length, height, area);

[0198] Location (coordinates along the edge);

[0199] Severity rating (based on size and location scores);

[0200] Type classification (spiky, rolled edge, clump, etc.).

[0201] Generate a detailed inspection report, including: burr distribution diagram, statistical charts, pass / fail determination, and improvement suggestions. See also Figure 5 This is a visual diagram of the test results.

[0202] The scope of protection of this invention is defined by the claims, and its core innovations and key protection points include:

[0203] 1. Feature Enhancement Method Based on Multi-Scale Difference of Gaussian and Scale-Space Significance Measurement: This paper preserves the specific algorithm flow and mathematical expression for enhancing glitch features and suppressing noise through multi-scale DoG filtering and scale-space analysis, especially the scale-space significance measurement. The calculation method.

[0204] 2. Directional Selectivity Feature Enhancement Techniques: Protecting the use of directional filter banks, especially orthogonal directional filter pairs built based on Gabor filters, and specific implementation methods for enhancing the vertical direction response.

[0205] 3. Adaptive Local Threshold Segmentation Algorithm: This algorithm preserves an adaptive threshold calculation method based on local statistical characteristics, including the calculation of local mean and standard deviation, and the threshold formula. Specific applications.

[0206] 4. Robust Line Fitting and ROI Definition Method Based on RANSAC: Protects the use of RANSAC for line fitting in the presence of spurs, and provides a specific method for defining a banded ROI based on the fitted line and the expected spur size.

[0207] 5. Multi-dimensional feature extraction and selection scheme: Protects the complete extraction scheme of four types of features (geometry, grayscale, texture, and context) specially designed for burr detection, especially the innovative design of context features.

[0208] 6. Spur Classifier Based on Ensemble Learning: This paper describes the specific implementation of spur classification using ensemble learning algorithms such as GBDT, combined with multi-dimensional features, including the construction of feature vectors, model training, and inference processes.

[0209] 7. Detection result fusion and verification mechanism: A decision fusion method that protects multiple aspects of information such as the confidence of the comprehensive classifier, geometric feature inspection, and contextual consistency verification for final judgment.

[0210] 8. Complete system implementation architecture: Protects the complete system architecture and collaborative workflow between modules from image acquisition, preprocessing, feature enhancement, segmentation, classification to result output.

[0211] 9. Parameter Adaptation and Optimization Methods: Protecting the adaptive adjustment and learning optimization mechanism of key system parameters (such as filter window size, threshold coefficient, classifier parameters, etc.).

[0212] 10. Burr Quantitative Assessment System: Protects a complete quantitative assessment method for detecting burrs, including size measurement, location identification, type classification, and severity rating.

[0213] Without departing from the core concept of this invention, those skilled in the art can conceive of the following alternative solutions, which should also be considered within the scope of protection of this invention:

[0214] 1. Alternatives to feature enhancement methods: Multi-scale DoG filtering can be replaced by other multi-scale analysis tools such as wavelet transform and curvelet transform. Scale-space saliency measures can also be calculated in other forms, such as measures based on energy concentration or information entropy.

[0215] 2. Alternatives to Direction-Selective Filtering: Gabor filters can be replaced by Log-Gabor filters, direction-controlled filters, or other direction-selective filters. Direction enhancement strategies can also employ weighted fusion methods, rather than simply selecting the vertical direction.

[0216] 3. Algorithm Alternatives: Adaptive local thresholding segmentation can be replaced by other segmentation algorithms such as region growing, level set methods, and graph cut. Active contour models can also employ different energy function forms, such as hybrid models based on boundary and region information.

[0217] 4. Alternatives to Feature Extraction: In addition to the geometric, grayscale, texture, and contextual features mentioned above, deep features can be introduced, such as high-level semantic features extracted through pre-trained convolutional neural networks (CNNs). Feature selection methods can employ dimensionality reduction techniques such as principal component analysis (PCA) and linear discriminant analysis (LDA).

[0218] 5. Classifier replacements: GBDT ensemble learning can be replaced by other machine learning algorithms such as random forests, support vector machines (SVMs), and neural networks. For scenarios with extremely high real-time requirements, lightweight classifiers can be considered.

[0219] 6. Alternatives to linear fitting methods: RANSAC can be replaced by other robust estimation methods such as Hough transform and minimum median square. For glitch detection at curve edges, the linear model can be extended to a curve model.

[0220] 7. Optical Configuration Alternatives: The low-angle ring light source can be replaced with other illumination methods such as coaxial light or backlighting, depending on the material and surface characteristics of the object being measured. A line scan camera can also be used in conjunction with a motion platform to achieve high-speed scanning.

[0221] 8. System Architecture Alternatives: Centralized processing can be replaced by distributed processing, deploying different modules on different computing units to improve processing speed. For embedded applications, the optimized algorithm can be deployed on an FPGA or a dedicated vision processor.

[0222] 9. Alternatives to learning methods: Supervised learning can be extended to semi-supervised learning or online learning, using a small number of labeled samples and a large number of unlabeled samples for training, or continuously updating the model based on new data.

[0223] 10. Expansion of application areas: Although this invention is mainly aimed at the detection of burrs on straight edges, its core method can be extended to the detection of defects on other types of edges such as curved edges, hole edges, and weld seams.

[0224] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An edge burr detection method based on multi-scale features and adaptive segmentation, characterized in that, Includes the following steps: S10, Image Acquisition; S20, Pretreatment and ROI extraction; S30, multi-scale feature enhancement; S40, adaptive segmentation; S50, Feature Extraction and Classification; S60, Detection result optimization and output; S20 includes the following steps: S21, Noise Suppression: Adaptive median filtering is used, and its window size is dynamically adjusted according to the local noise level; S22, Lighting Equalization: Lighting compensation is performed using Retinex to eliminate the effects of uneven lighting; S23, Contrast Enhancement: Adaptive Histogram Equalization; S24, Edge detection and line fitting; S25, ROI region definition; S30, multi-scale feature enhancement, includes the following steps: S31, Multi-scale Gaussian difference filtering: Apply multi-scale Gaussian difference filtering to the ROI image to extract edge features at different scales; S32, Scale-Space Feature Fusion; S33, enhanced directional selectivity; S40 includes the following steps: S41, Local threshold segmentation; S42, segmentation optimization based on active contour model; S50 includes the following steps: S51, multi-dimensional feature extraction, including geometric features, grayscale features, texture features and contextual features; S52 is a classifier based on ensemble learning, specifically employing a gradient boosting decision tree. S60 includes the following steps: S61, Results Fusion and Verification; S62, Quantitative Assessment and Report Generation; The ring-shaped LED light source used in S10 emits light at an angle of 10°-30° to the surface of the sample to be tested, and uses an area array industrial camera combined with a telecentric lens to acquire images. In step S24, edge detection and line fitting first use an improved Canny operator to detect edges, which employs an adaptive dual threshold: ; in, and These are the mean and standard deviation of the image gradient magnitudes, respectively. This is an empirical coefficient; For the detected edge points, a random sampling consensus algorithm is used to fit a straight line. Let the equation of the fitted line be: ; in, The distance from the origin to the line is denoted as . The angle between the normal to the line and the x-axis; In step S25, the ROI region is defined by centered on the fitted straight line, forming a strip-shaped ROI region with a width of [missing information]. Determined based on the expected maximum burr size and positioning error at the edge: ; in, The expected maximum burr size, To allow for edge positioning error tolerance, For safety boundaries; Within the ROI, establish a local coordinate system based on the straight line: the u-axis is along the direction of the straight line, and the v-axis is perpendicular to the straight line. Transform each pixel within the ROI into this local coordinate system. S31, multi-scale Gaussian difference filtering: Apply multi-scale Gaussian difference filtering to the ROI image to extract edge features at different scales: ; in, For Gaussian kernel, Scale factor; Choose 3-5 different scales Multi-scale DoG response maps were obtained. ; S32, Scale-space feature fusion: Define the scale-space response matrix ,in ; For each position Calculate the scale-space saliency measure: ; in, is a weighting coefficient used to suppress noise that has a uniform response across multiple scales.

2. The edge burr detection method based on multi-scale features and adaptive segmentation according to claim 1, characterized in that, S33, Direction Selectivity Enhancement: Define a set of directional filters ,in The filter direction angle; Each directional filter consists of two orthogonal Gabor filters: ; in, For direction Gabor filters; Convolve the ROI image with filters of each direction to obtain the directional response map.

3. The edge burr detection method based on multi-scale features and adaptive segmentation according to claim 1, characterized in that, Specifically, S52 includes: Let the training dataset be... ,in For feature vectors, The label indicates that 0 represents normal operation and 1 represents burrs. Gradient boosting decision trees approximate the objective function by iteratively building multiple weak learners. The model for the t-th iteration is: ; in, For the t-th weak learner, The learning rate; The loss function uses logarithmic loss: ; in, ; The final ensemble model is obtained by minimizing the loss function through gradient descent.