A machine learning-based oil filler neck defect detection method and system

By using machine learning-based dual-center detection and polar coordinate transformation, combined with improved filters and ELM models, the problem of low efficiency in detecting oil injection port defects on sintering trolley wheels was solved, achieving efficient and accurate detection of multiple types of defects.

CN122156167APending Publication Date: 2026-06-05ANHUI UNIVERSITY OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI UNIVERSITY OF TECHNOLOGY
Filing Date
2026-03-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies are inefficient at detecting defects at the oil injection port of the sintering trolley wheel, especially in accurately detecting minute cracks in the sealing ball and scratches and dents on the outer wall. Furthermore, traditional methods are prone to false detections or missed detections due to noise interference.

Method used

A machine learning-based approach is adopted, which uses dual center detection and polar coordinate transformation, combined with improved Gaussian filtering and composite filters for image preprocessing, and uses the ELM model for defect detection to achieve accurate localization and feature extraction of the sealing sphere and outer wall area, and to construct a targeted classification and labeling system.

Benefits of technology

It enables automatic detection of various types of defects in sealed spheres, such as micro-cracks, breakage and detachment, and scratches and dents on the outer wall, under single image acquisition conditions, which significantly improves detection efficiency and accuracy and reduces the probability of false detection and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156167A_ABST
    Figure CN122156167A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on machine learning oil port defect detection method and system, it is related to defect detection: the image of sintering trolley wheel oil port is obtained;Image is carried out edge detection, and the edge feature of oil port is extracted;Based on edge feature, double circle center detection is carried out, and the outer circle contour parameter and inner circle contour parameter of oil port are obtained;Based on outer circle contour parameter and inner circle contour parameter, region segmentation is carried out to image, and the sealed ball region image and outer wall region image are obtained;And polar coordinate conversion is carried out to outer wall region image, and rectangular development image is generated;The gray scale distribution features of sealed ball region image and rectangular development image are extracted respectively, and the corresponding feature vector is constructed according to gray scale distribution feature;Feature vector is input into pre-trained ELM model and carries out defect detection.For single perspective image is difficult to detect oil port sealed ball crack, the application effectively avoids the problem of low efficiency of traditional multi-angle shooting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of defect detection, and more specifically, to a machine learning-based method and system for detecting defects in oil filling ports. Background Technology

[0002] As one of the core pieces of equipment in the sintering process of the steel industry, the operating status of the sintering trolley directly affects the output and quality of sintered ore, as well as the energy consumption and cost of the entire production line. As the main carrier of sintering raw materials, the bearings of the sintering trolley wheels are subjected to harsh conditions such as high temperature, heavy load, impact vibration, dust, and saturation during sintering operations. Therefore, frequent replenishment of lubricating oil is required to ensure the normal operation of the sintering trolley.

[0003] Due to the large number of wheels on the sintering trolleys in steel plants, manual refueling operations are labor-intensive and inefficient. With the popularization of industrial automation technology and the maturity of machine vision and sensing technology, industrial robots, machine vision and other technologies have begun to be introduced to realize automated refueling operations.

[0004] Because the sintering trolley operates under complex conditions for extended periods, the complex working environment of steel plants can introduce errors into the automated lubrication system during the lubrication process. This can cause the lubrication head to sometimes not directly contact the sealing ball during lubrication, instead touching the outer wall of the lubrication port first and sliding down it to the sealing ball. While both direct contact and sliding down the outer wall complete the lubrication process, the mechanical collisions and friction between the lubrication head and the lubrication port during these processes cause wear on both the outer wall and the sealing ball. Over long-term operation, this increased wear can lead to surface defects such as scratches and dents on the outer wall, and the sealing ball may crack or even break off due to material fatigue. All of these negatively impact the completion of the lubrication process and the sealing performance of the lubricating grease. Summary of the Invention

[0005] To address the difficulty in detecting cracks in the sealing ball of the oil filler port using single-view images, this application provides a machine learning-based method and system for detecting defects in the oil filler port. This method automatically detects various types of defects in the sealing ball of the oil filler port, such as micro-cracks, broken pieces, and scratches and dents on the outer wall, under single-image acquisition conditions, effectively avoiding the inefficiency of traditional multi-angle shooting.

[0006] One aspect of this application provides a machine learning-based method for detecting defects in oil injection ports, comprising: acquiring an image of an oil injection port on a sintering trolley wheel; performing edge detection on the image to extract edge features of the oil injection port; performing dual center detection based on the edge features to obtain outer and inner circle contour parameters of the oil injection port; performing region segmentation on the image based on the outer and inner circle contour parameters to obtain an image of a sealing sphere region and an image of an outer wall region; performing polar coordinate transformation on the outer wall region image to generate a rectangular unfolded image; extracting grayscale distribution features from the sealing sphere region image and the rectangular unfolded image respectively, and constructing corresponding feature vectors based on the grayscale distribution features; and inputting the feature vectors into a pre-trained ELM model for defect detection.

[0007] The oil inlet is a lubricating oil replenishment inlet device for the sintering trolley wheel bearing. It consists of an annular outer wall structure and an internal sealing ball. The sealing ball is kept closed by a spring mechanism to prevent lubricating oil leakage. During oil injection, the oil inlet head opens the sealing ball to inject lubricating oil.

[0008] Dual-center detection: This application presents a two-stage circular profile detection method designed for the double-circular structure features inside and outside the oil injection port. The first step involves using a Hough circle transform to detect the circular profile of the inner sealing sphere, obtaining the coordinates and radius of the inner circle's center. The second step, within the tolerance region constrained by the inner circle's center, utilizes a weighted Scharr operator to enhance the edge gradient before performing a Hough circle transform to detect the circular profile of the outer wall.

[0009] The sealing ball area refers to the circular image area where the spherical sealing structure at the center of the oil inlet is located, which is obtained by cropping using the inner circle contour parameters.

[0010] The outer wall area refers to the annular area formed by the metal wall surrounding the oil injection port, located between the inner and outer circles.

[0011] ELM stands for Extreme Learning Machine, a fast learning algorithm for a single-hidden-layer feedforward neural network. In this scheme, it is used to classify and identify the extracted gray-scale distribution feature vectors, achieving three-class classification (normal, defective, missing) for the sealed sphere region and two-class classification (normal, defective) for the outer wall region.

[0012] Furthermore, after acquiring the image of the oil injection port of the sintering trolley wheel, before performing edge detection, the image undergoes preprocessing: denoising is performed using a composite filter. This composite filter consists of a weighted combination of Gaussian filtering, median filtering, and bilateral filtering. The weighted combination formula is as follows: ;in, The image is after weighted composite filtering; Gaussian filtering; Median filtering; This is a bilateral filter; This represents the weight percentage corresponding to the filter.

[0013] In particular, the sintering trolley operates in a harsh environment, and the oil injection port image is affected by various factors such as high-temperature fumes, oil contamination, and uneven lighting, resulting in complex noise interference including Gaussian noise, salt-and-pepper noise, and edge blurring. A single filter is insufficient to handle these different types of noise simultaneously. However, this solution leverages the advantages of three weighted filters: Gaussian filtering to smooth high-frequency noise, median filtering to remove salt-and-pepper noise, and bilateral filtering to preserve edge features while denoising. This effectively suppresses complex noise while preserving the edge details of minor defects such as cracks in the sealing ball and scratches on the outer wall to the greatest extent possible. This lays the foundation for accurate localization and precise extraction of defect features in subsequent dual-center detection, avoiding missed or false detections of defects caused by noise interference.

[0014] Furthermore, the edge features of the oil injection port are extracted, including: smoothing the input image using an improved Gaussian filter to obtain a denoised image; performing convolution operations on the denoised image using the Sobel operator to obtain a gradient magnitude image and a gradient direction image; applying non-maximum suppression to the gradient magnitude image using the gradient direction image to obtain an edge image; and calculating the globally optimal threshold T based on the gray-level distribution of the edge image using the Otsu's maximum inter-class variance method. Based on the globally optimal threshold T Set a first threshold Thigh and a second threshold Tlow; mark pixels with gradient magnitudes greater than the first threshold Thigh as defined edge pixels, mark pixels with gradient magnitudes between the first threshold Thigh and the second threshold Tlow as candidate edge pixels, and mark pixels with gradient magnitudes less than the second threshold Tlow as non-edge pixels; divide the edge image according to the first threshold Thigh and the second threshold Tlow, and perform connected component analysis on the divided image to obtain edge features.

[0015] Specifically, the sealing ball and outer ring of the oil inlet have different edge strength characteristics—the edge of the sealing ball is relatively distinct due to its material and light reflection, while the edge of the outer ring may become blurred due to surface wear and oil contamination. This solution uses Otsu adaptive calculation of the globally optimal threshold and sets dual thresholds (Thigh and Tlow) to classify edge pixels into three categories: defined edges, candidate edges, and non-edges. Then, through connected component analysis, candidate edges connected to defined edges are retained, effectively solving the problem of weak edge breakage that may occur with fixed thresholds. This adaptive dual-threshold strategy can simultaneously ensure the integrity of strong edges (the contour of the sealing ball) and the continuity of weak edges (the contour of the worn outer ring), providing complete and reliable edge features for subsequent dual-center detection. This avoids the failure of circular contour detection due to missing edges, thus affecting the accurate segmentation of defect areas.

[0016] Furthermore, the input image is smoothed using an improved Gaussian filter, including defining a grayscale constraint function:

[0017] ;in, The current window center pixel Pixels in the neighborhood grayscale value; Represents the center pixel of the current window grayscale value; This indicates a custom grayscale threshold. The grayscale constraint function is represented; the Gaussian kernel function is improved based on the grayscale constraint function; the image is then subjected to Gaussian filtering using the improved Gaussian kernel function to obtain a denoised image.

[0018] In particular, defects such as micro-cracks on the surface of the sealed sphere and minor scratches on the outer wall often manifest as subtle grayscale changes and edge information. Traditional Gaussian filtering blurs these crucial defect edges when smoothing noise. This solution introduces a grayscale constraint function... The filter adaptively adjusts its weights based on the grayscale difference between the center pixel and its neighboring pixels. When the grayscale values ​​of neighboring pixels are similar to those of the center pixel (e.g., in flat areas), a larger weight is assigned for thorough smoothing. When the grayscale difference is large (e.g., at the edges of defects), a smaller weight is assigned to preserve edge features. This improvement allows the filter to effectively retain edge details of minute defects such as cracks in the sealing ball and scratches on the outer wall while removing image noise, avoiding the loss of defect features caused by over-smoothing.

[0019] Furthermore, the improved Gaussian kernel function expression is as follows: ;in, This represents the image after Gaussian filtering based on grayscale constraints. It is represented as a Gaussian filter function.

[0020] Furthermore, dual center detection is performed based on edge features, including: performing a first Hough circle transform on the edge features to detect the center contour of the oil injection port sealing ball, obtaining the inner circle center coordinates and inner circle radius r1; setting a tolerance region for the outer circle center based on the inner circle center coordinates, the tolerance region is used to constrain the center range of the outer circle detection; enhancing the edge gradient of the edge features using the weighted Scharr operator; and performing a second Hough circle transform within the tolerance region based on the edge features after enhancing the edge gradient, detecting the center contour of the outer wall of the oil injection port, obtaining the outer circle center coordinates and outer circle radius r2; r2 is greater than r1.

[0021] Furthermore, polar coordinate transformation is performed on the outer wall region image, including: cropping the input image based on the coordinates of the inner circle center and the inner circle radius r1, and the coordinates of the outer circle center and the outer circle radius r2, to obtain a circular sealed sphere region image and an annular outer wall region image; polar coordinate transformation of the outer wall region image is performed using bilinear interpolation to obtain a rectangular unfolded image.

[0022] Furthermore, the polar coordinate transformation is as follows: ;in, Let be the coordinates of the center of the inner circle of the annulus in a rectangular coordinate system. The radius of the inner circle; The coordinates of the center of the outer circle of the annulus in a rectangular coordinate system are: The radius of the outer circle; The angle is in polar coordinates; Represents the rectangular coordinate system of the rectangle after the difference is expanded. coordinate; The expression represents the rectangle in the Cartesian coordinate system after the difference is expanded. coordinate.

[0023] Furthermore, the gray-level distribution features of the sealed sphere region image and the rectangular unfolded image are extracted respectively, and corresponding feature vectors are constructed based on the gray-level distribution features, including: calculating the gray-level histograms of the sealed sphere region image and the rectangular unfolded image respectively; constructing a gray-level co-occurrence matrix based on the gray-level histograms; performing dimensionality reduction processing on the gray-level co-occurrence matrix to obtain the feature vector of the sealed sphere region; classifying and labeling the feature vectors, labeling the feature vectors of the outer wall region as binary labels, including normal and defective; labeling the feature vectors of the sealed sphere region as ternary labels, including normal, defective, and missing.

[0024] Another aspect of this application provides a machine learning-based oil injection port defect detection system, comprising: an image acquisition module for acquiring an image of the oil injection port of a sintering trolley wheel; an edge detection module for extracting edge features of the oil injection port; a dual-circle detection module for performing dual-circle center detection based on the edge features to obtain the coordinates of the inner circle center and the inner circle radius r1, and the coordinates of the outer circle center and the outer circle radius r2; a region segmentation module for performing region segmentation on the image based on the coordinates of the inner circle center and the inner circle radius r1, and the coordinates of the outer circle center and the outer circle radius r2, to obtain a circular sealing region image and a ring-shaped outer wall region image; a feature extraction module for extracting the gray-level distribution features of the sealing region image and the ring-shaped outer wall region image respectively, and constructing a feature vector with the gray-level distribution features; and a defect detection module for inputting the feature vector into a pre-trained ELM model for defect detection.

[0025] Compared to existing technologies, the advantages of this application are: (1) This application uses dual-center detection technology to accurately locate the inner and outer circle contour parameters, accurately divides the oil injection port image into the sealing ball area and the outer wall area, and innovatively uses polar coordinate transformation to expand the annular outer wall area into a rectangular image, so that the outer wall circumferential surface defects that originally required multiple angles to be fully detected can be fully presented in a single image. Combined with targeted feature extraction and ELM classification model, it realizes comprehensive automatic detection of various types of defects such as micro-cracks, breakage and detachment of sealing ball and scratches and dents on outer wall under single image acquisition conditions, which significantly improves detection efficiency.

[0026] (2) This application effectively suppresses image noise under harsh working conditions of sintering trolley by improving Gaussian filtering and composite filter preprocessing, enhances edge gradient by weighted Scharr operator to improve the accuracy of circular contour detection, and designs three-class (normal, defective, missing) and two-class (normal, defective) label systems for different defect features of sealing ball and outer wall respectively. In particular, the missing sealing ball is identified as an independent category, avoiding the problem of traditional methods misjudging the missing state as a serious defect. Attached Figure Description

[0027] Figure 1 This is a flowchart of a machine vision-based metal defect detection system for the oil injection port surface of a sintering trolley wheel, as described in this application. Figure 2 This is the confusion matrix and result diagram of defect detection of the oil injection port outer wall region sample by a trained ELM neural network in Embodiment 1 of this application; Figure 3 This is the confusion matrix and result diagram of defect detection of the sealed sphere region sample using a trained ELM neural network in Embodiment 1 of this application. Detailed Implementation

[0028] The present application will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0029] like Figure 1 As shown, the machine vision-based metal defect detection system for the oil injection port surface of a sintering trolley wheel includes the following steps: S1: Collect images of normal and defective oil injection ports on the wheels of the sintering trolley as experimental samples, and perform preprocessing operations on the sample images, including filtering and noise reduction and image enhancement.

[0030] S101: Image denoising is achieved by weighted composite filters composed of Gaussian filtering, median filtering, and bilateral filtering. The weighted composite formula is as follows: ;in, The image is after weighted composite filtering; Let be the weight percentage corresponding to the filter, and satisfy . ; The filtering results are for different filters. For Gaussian filtering, the formula for calculating the Gaussian function is: ;in, These are the pixel coordinates currently being processed. The standard deviation controls the width of the distribution, i.e., the smoothness. Image filtering essentially involves convolution operations: ;Right now: ;in, ; The kernel size; To the pixel center point distance, The weights are discrete Gaussian kernel weights.

[0031] For median filtering, the formula for calculating the median filter function is: ;in, For The local area centered on the filter window is the filtering window.

[0032] For bilateral filtering, the formula for calculating the bilateral filter function is: ;in, For spatial scale parameters, This refers to the grayscale scale parameter; Spatial weights, Grayscale weight; The normalization factor is expressed as: .

[0033] S102: Image enhancement is achieved by adjusting the contrast of the denoised image in S101 using CLAHE processing.

[0034] S2: The image is edge detected using an improved Canny edge detection algorithm. The improved Canny edge detection algorithm includes: improving the Gaussian filter using a Gaussian function combined with gray-level constraints, and calculating double thresholds using the Otsu adaptive thresholding method.

[0035] S201: An improved Gaussian filter is used to process the input image, eliminating noise and preventing it from causing erroneous responses in subsequent gradient calculations that could lead to the detection of false edges. Drawing on the theory of gray-level similarity and simplifying it into a gray-level constraint, the improved Gaussian filter formula is as follows.

[0036] S2011: Define the grayscale constraint function: ;in, The current window center pixel Pixels in the neighborhood The grayscale value.

[0037] S2012: The improved Gaussian filter formula is: .

[0038] in, ; Custom threshold.

[0039] S202: The Soble operator is used to find regions with drastic gray-scale changes by calculating the gradient magnitude and direction in the horizontal and vertical directions, and to obtain image edge intensity and direction information.

[0040] S203: Perform non-maximum suppression (NMS) on the gradient magnitude image. By determining the local maximum value of the gradient magnitude along the gradient direction, compare it with two adjacent pixels along the gradient direction. If the pixel has the largest gradient value, then the pixel is judged as an edge.

[0041] S204: Adaptive thresholding segmentation using the Otsu's maximum class variance method. This method adaptively calculates the gradient distribution of each image and computes a global threshold, dividing the image into foreground and background to maximize the difference between foreground and background while minimizing intra-class differences. The Otsu's formula is as follows: ;in, This indicates that the pixel is below the threshold. The probability, Indicates that the pixel is above the threshold The probability, that is, the proportion of foreground and background in the image; and Below the threshold The average gray value of the pixels, For values ​​above the threshold The average gray value of the pixels, i.e., the average gray value of the foreground and background. Optimal threshold. for: ; Traverse according to the formula The inter-class variance of each gray level is taken as the maximum value. The optimal threshold is set to 0.5, and experiments show that this ratio is the best when the high and low thresholds are combined.

[0042] S205: Examine pixels adjacent to strong edges, retain connected or adjacent valid weak edge pixels, and discard noise that is not connected to any strong edge pixels to eliminate edge discontinuities.

[0043] S3: A circle detection method is designed by using a double Hough gradient transformation method to detect the circular edges of the outer wall region (outer circle) and the sealing ball region (inner circle) of the oil injection port. The specific method includes: using Hough circle to detect the inner circle and calculate the coordinates of the inner circle center, setting the outer circle center range based on the inner circle center coordinates, and using Hough gradient transformation combined with weighted Schaar operator to detect the outer circle.

[0044] S301: Perform the first Hough transform on the image, detect the circular edge of the sealing ball region in the binary image of the oil inlet after edge detection, and calculate the coordinates of the center of the region.

[0045] S302: Based on the center coordinates of the sealing sphere region obtained in S301, a tolerance is set to constrain the center voting range when detecting the circular edge region of the outer wall of the oil inlet. The tolerance region is represented as follows: ;in, The center of the circle detected by the first Hough transform. This is the tolerance parameter. When the gradient Hough transform accumulator votes to select candidate circles, the center of the candidate circle... Applying constraints is represented as: S303: Perform a second Hough gradient transform based on the weighted Schauer operator on the image to detect the circular edge of the outer wall of the oil injection port.

[0046] S3031: The gradient direction on the edge is calculated using the weighted Schaar operator, expressed as: Horizontal gradient: .

[0047] Vertical gradient: ;in, These represent the elements of the horizontal convolution kernel. Represents the vertical convolution kernel element. Represents the convolution kernel element The corresponding set of pixel values ​​in the local image neighborhood. The weighted gradient operator, using the template's weighting factors, considers more neighborhood information, making it more sensitive to the gradient direction. A more precise gradient direction means a more accurate center vote. Represented as: .

[0048] S3032: Construct an accumulator based on the gradient direction calculated in S3031 to select candidate circles by voting on the center, and calculate the coordinates of the candidate circle centers.

[0049] S3033: Calculate the radius of the circle by voting on the radius of the candidate circles in S3032.

[0050] S4: The detected inner and outer circular regions are cropped to obtain the circular sealing ball region image and the eccentric annular oil inlet outer wall region image. Based on the center coordinates and radius of each circle calculated in S3, the annular image of the outer wall region is expanded into a rectangular image by using polar coordinate transformation combined with bilinear difference.

[0051] S401: Based on the circle detected in S3, cut to obtain the image of the circular sealing ball area and the image of the outer wall area of ​​the eccentric annular oil inlet.

[0052] S402: The image of the outer wall region of the eccentric annular oil inlet is expanded using bilinear interpolation polar coordinate transformation. The transformation formula after interpolation is expressed as: ;in, Let be the coordinates of the center of the inner circle of the annulus in a rectangular coordinate system. The radius of the inner circle; The coordinates of the center of the outer circle of the annulus in a rectangular coordinate system are: The radius of the outer circle; The angle is in polar coordinates.

[0053] S5: Images of different defect categories have significant differences in grayscale distribution. The features of the grayscale distribution are used as feature vectors to classify and label the feature vectors of samples of different defects.

[0054] S501: Calculate the gray-level distribution histograms of the two regions obtained in S4 and calculate the gray-level distribution matrix. Then, perform dimensionality reduction on the gray-level distribution matrix to convert it into a one-dimensional vector.

[0055] S502: Classify and label the samples in the outer wall area of ​​the oil filling port and the sealing ball area respectively. Label the classification attributes of the sample feature values ​​of the outer wall of the oil filling port as normal and defective respectively. Label the classification attributes of the sample feature values ​​of the outer wall of the oil filling port as normal, defective and missing respectively. Use the classification attributes as the expected output of the corresponding samples.

[0056] S6: Input the feature vectors obtained in S5 into the ELM model to train the neural network. The trained ELM neural network can identify surface defects of the oil injection port.

[0057] S601: The feature vector represents the sample feature value as the input value. 70% of the samples are randomly selected as the training set, and the remaining 30% of the samples are used as the test set.

[0058] S602: Iterative testing adjusts ELM parameters. The hidden layer nodes of the ELM model for detecting defects on the outer wall of the oil injection port are set to 475, and the Tanh function is selected as the excitation function. The hidden layer nodes of the ELM model for detecting defects on the sealing ball are set to 30, and the Sigmoid function is selected as the excitation function.

[0059] S603: Train the ELM model for detecting defects on the outer wall of the oil filling port and the ELM model for detecting defects in the sealing ball, respectively. Train the ELM neural network with the input value and the expected output to obtain two ELM neural networks that can identify the defect conditions of the outer wall of the oil filling port and the sealing ball area.

[0060] S604: Input the test sample into the oil injection port defect classification network trained in S603 for testing, and compare the output result with the expected output to verify the detection effect of the ELM neural network.

[0061] This invention first performs image preprocessing such as filtering, denoising, and image enhancement on the image. Then, it uses an improved Canny edge detection algorithm to detect edges in the processed image. The proposed dual Hough gradient transform algorithm is used to detect and crop the image of the outer wall region of the oil injection port and the image of the sealing ball region from the oil injection port image. The outer wall region image is expanded into a rectangular image by bilinear interpolation polar coordinates. The gray-level distribution histograms of the two processed images are calculated separately, and the gray-level distribution matrix is ​​calculated. The matrix is ​​reduced to a one-dimensional vector and used as a feature vector. The input is then fed into a trained ELM defect detection network. The result is the defect classification label, thereby determining whether defects exist in the outer wall of the oil injection port and the sealing ball region. This invention can perform defect detection and classification very well.

[0062] Experimental verification: This experiment uses an industrial camera to capture images of oil injection ports with different defect states. The acquired images are processed using machine vision image processing technology and divided into two regions: the outer wall region of the oil injection port and the sealing ball region. The image processing is carried out according to the methods in Examples S1-S4. The outer wall region of the oil injection port includes two types: normal and defective. The sealing ball region image is divided into three different defect types: normal, defective, and missing. The trained ELM neural network model is used for defect classification and detection. The defect detection is carried out according to the methods in Examples S5-S6.

[0063] Experimental Results: The ELM defect detection model yielded the following results for defects on the outer wall of the oil injection port and the sealing ball: Figure 2 and Figure 3 As shown, Figure 2 (a) is the confusion matrix of the ELM model for defect detection in the outer wall area of ​​the oil injection port, and 2(b) is the result diagram of the ELM model for defect detection in the outer wall area of ​​the oil injection port. Figure 3(a) shows the confusion matrix of the ELM model for defect detection in the sealing ball region, and (b) shows the result of the ELM model for defect detection in the sealing ball region. As can be seen from the figures, when using the trained ELM model to classify the outer wall region of the oil injection port, the defect detection accuracy is 97.22%, while when classifying the sealing ball region, the defect detection accuracy is 99.44%. The total defect detection time for the test set is 14ms and 10ms respectively. The experimental data demonstrates that the image processing technology of machine vision and the image grayscale distribution matrix dimensionality reduction not only reduce the probability of missed and false detections but also greatly improve computational efficiency and training speed, indicating that the oil injection port defect detection algorithm and system of this invention have practical application value.

[0064] The foregoing illustrative description of the present application and its embodiments is not restrictive and can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. The accompanying drawings are only one embodiment of the present application, and the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present application, such designs should fall within the scope of protection of this application. Furthermore, the word "comprising" does not exclude other elements or steps, and the word "a" preceding an element does not exclude the inclusion of "a plurality" of that element. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.

Claims

1. A method for detecting defects in oil injection ports based on machine learning, characterized in that, include: Acquire an image of the oil injection port on the wheel of the sintering trolley; Edge detection is performed on the image to extract the edge features of the oil injection port; Dual circle center detection is performed based on edge features to obtain the outer circle contour parameters and inner circle contour parameters of the oil injection port; The image is segmented based on the outer and inner circle contour parameters to obtain the sealed sphere region image and the outer wall region image; then, the outer wall region image is transformed into polar coordinates to generate a rectangular unfolded image. Extract the grayscale distribution features of the sealed sphere region image and the rectangular unfolded image respectively, and construct the corresponding feature vector based on the grayscale distribution features; The feature vectors are input into a pre-trained ELM model for defect detection.

2. The method for detecting defects in oil injection ports based on machine learning according to claim 1, characterized in that: After acquiring the image of the oil injection port of the sintering trolley wheel, and before performing edge detection on the image, preprocessing of the image is also included: Image denoising is achieved through a composite filter, which consists of a weighted combination of Gaussian filtering, median filtering, and bilateral filtering. The weighted combination formula is as follows: in, The image is after weighted composite filtering; Gaussian filtering; Median filtering; This is a bilateral filter; This represents the weight percentage corresponding to the filter.

3. The method for detecting defects at oil injection ports based on machine learning according to claim 2, characterized in that: Extract the edge features of the oil injection port, including: An improved Gaussian filter is used to smooth the input image, resulting in a denoised image. The Sobel operator is used to perform convolution operations on the denoised image to obtain gradient magnitude image and gradient direction image; Non-maximum suppression is performed on the gradient magnitude image using the gradient direction image to obtain the edge image; Based on the gray-level distribution of the edge image, the globally optimal threshold T is calculated using the Otsu method (maximum inter-class variance). ; Based on the globally optimal threshold T Set a first threshold Thigh and a second threshold Tlow; The edge image is divided according to the first threshold Thigh and the second threshold Tlow, and the edge features are obtained by performing connected component analysis on the divided image.

4. The machine learning-based oil injection port defect detection method according to claim 3, characterized in that: The input image is smoothed using an improved Gaussian filter, including: Define the grayscale constraint function: ;in, The current window center pixel Pixels in the neighborhood grayscale value; Represents the center pixel of the current window grayscale value; This indicates a custom grayscale threshold. Represents the grayscale constraint function; Improve the Gaussian kernel function based on the grayscale constraint function; The image is denoised by applying Gaussian filtering to the improved Gaussian kernel function.

5. The method for detecting defects in oil injection ports based on machine learning according to claim 4, characterized in that: The improved Gaussian kernel function expression is as follows: ;in, This represents the image after Gaussian filtering based on grayscale constraints. It is represented as a Gaussian filter function.

6. The machine learning-based oil injection port defect detection method according to any one of claims 2 to 5, characterized in that: Dual circle center detection based on edge features includes: Perform the first Hough circle transformation on the edge features, detect the center profile of the oil inlet sealing ball, and obtain the coordinates of the inner circle center and the inner circle radius r1; The tolerance region of the outer circle center is set according to the coordinates of the inner circle center. The tolerance region is used to constrain the range of the outer circle center for detection. Enhance edge gradients of edge features using the weighted Scharr operator; Based on the edge features after enhancing the edge gradient, a second Hough circle transformation is performed within the tolerance region to detect the center profile of the outer wall of the oil injection port, and to obtain the coordinates of the outer circle center and the outer circle radius r2; r2 is greater than r1.

7. The method for detecting defects at oil injection ports based on machine learning according to claim 6, characterized in that: Polar coordinate transformation of the outer wall region image is performed, including: Based on the coordinates of the inner circle's center and radius r1, and the coordinates of the outer circle's center and radius r2, the input image is cropped to obtain an image of the circular sealed sphere region and an image of the annular outer wall region. The polar coordinate transformation of the outer wall region image is performed using bilinear interpolation to obtain a rectangular unfolded image.

8. The method for detecting defects in oil injection ports based on machine learning according to claim 7, characterized in that: The polar coordinate transformation is as follows: ;in, Let be the coordinates of the center of the inner circle of the annulus in a rectangular coordinate system. The radius of the inner circle; The coordinates of the center of the outer circle of the annulus in a rectangular coordinate system are: The radius of the outer circle; The angle is in polar coordinates; Indicates the interpolation parameters; Represents the rectangular coordinate system of the rectangle after the difference is expanded. coordinate; The expression represents the rectangle in the Cartesian coordinate system after the difference is expanded. coordinate.

9. The method for detecting defects at oil injection ports based on machine learning according to claim 7, characterized in that: The grayscale distribution features of the sealed sphere region image and the unfolded rectangular image are extracted respectively. Based on these grayscale distribution features, corresponding feature vectors are constructed, including: Calculate the grayscale histograms of the sealed sphere region image and the unfolded rectangular image, respectively; Construct a gray-level co-occurrence matrix based on the gray-level histogram; The gray-level co-occurrence matrix is ​​reduced in dimension to obtain the feature vector of the sealed sphere region; The feature vectors are classified and labeled. The feature vectors of the outer wall region are labeled with binary labels, which include normal and defective. The feature vectors of the sealed sphere region are labeled with ternary labels, which include normal, defective and missing.

10. A machine learning-based oil injection port defect detection system, characterized in that, include: The image acquisition module acquires images of the oil injection port on the wheel of the sintering trolley; The edge detection module extracts the edge features of the oil injection port; The dual circle detection module performs dual circle center detection based on edge features to obtain the coordinates of the inner circle center and the inner circle radius r1, as well as the coordinates of the outer circle center and the outer circle radius r2. The region segmentation module performs region segmentation on the image based on the coordinates of the inner circle's center and radius r1, as well as the coordinates of the outer circle's center and radius r2, to obtain an image of the circular sealed region and an image of the annular outer wall region. The feature extraction module extracts the grayscale distribution features of the sealed area image and the annular outer wall area image respectively, and constructs a feature vector with the grayscale distribution features; The defect detection module inputs the feature vectors into the pre-trained ELM model to detect defects.