CN116664540A - Rubber sealing ring surface defect detection method based on Gaussian line detection - Google Patents

Rubber sealing ring surface defect detection method based on Gaussian line detection Download PDF

Info

Publication number
CN116664540A
CN116664540A CN202310709850.8A CN202310709850A CN116664540A CN 116664540 A CN116664540 A CN 116664540A CN 202310709850 A CN202310709850 A CN 202310709850A CN 116664540 A CN116664540 A CN 116664540A
Authority
CN
China
Prior art keywords
training
detection
image
gaussian
sealing ring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310709850.8A
Other languages
Chinese (zh)
Inventor
李德健
赵洪恩
李绍丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang University of Technology
Original Assignee
Shenyang University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang University of Technology filed Critical Shenyang University of Technology
Priority to CN202310709850.8A priority Critical patent/CN116664540A/en
Publication of CN116664540A publication Critical patent/CN116664540A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention belongs to the technical field of machine vision, and particularly relates to a method for detecting surface defects of a rubber sealing ring based on Gaussian line detection. The surface defect detection method based on Gaussian line detection is used for detecting the defects of the rubber sealing ring, and has a better recognition effect on surface scratches and crack defects. The method comprises a preparation work, a training stage and a detection stage; preparation: collecting rubber seal ring images as training data; training phase: manufacturing a training sample, performing data dimension reduction, and finally sending the training sample set subjected to dimension reduction treatment into a Support Vector Machine (SVM) taking a Radial Basis Function (RBF) as a kernel function for supervised training; and (3) detection: and (5) manufacturing a detection sample and outputting a detection result.

Description

Rubber sealing ring surface defect detection method based on Gaussian line detection
Technical Field
The invention belongs to the technical field of machine vision, and particularly relates to a method for detecting surface defects of a rubber sealing ring based on Gaussian line detection.
Background
Nowadays, the rubber rings and related products are detected manually, but the manual detection speed of the rubber sealing ring products can not be adapted to the production speed of the products, and hundreds of workers are often required for detection. For inexpensive rubber rings, so much labor is required for detection, which is certainly a huge waste of human resources.
With the improvement of labor cost and the increase of market requirements on quality control of industrial products, the process is inevitably turned to high-level production automation, so that the development of visual detection technology is promoted. The method has the advantages that the product quality detection can be well matched with the production speed of an automatic production line by using computer vision, pattern recognition and artificial intelligence technology to replace manual work, false detection and missing detection phenomena caused by fatigue in manual detection can be avoided, the adverse effect of subjective factors of people on product standard mastering can be overcome, and labor force can be effectively liberated, so that automatic detection of rubber sealing ring products is imperative.
At present, some sealing rubber ring manufacturers already use machine vision technology to detect the defects of the rubber sealing rings. However, the method for classifying the surface cracks and the scratch defects of the rubber sealing ring is less in the market.
Disclosure of Invention
The invention provides a method for detecting surface defects of a rubber sealing ring based on Gaussian line detection aiming at the defects in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme that the method comprises a preparation work, a training stage and a detection stage.
Preparation: and acquiring images of the rubber sealing ring as training data.
Training phase: and (3) manufacturing a training sample, performing data dimension reduction, and finally sending the training sample set subjected to dimension reduction treatment into a Support Vector Machine (SVM) taking a Radial Basis Function (RBF) as a kernel function for supervised training.
And (3) detection: and (5) manufacturing a detection sample and outputting a detection result.
Further, in the training phase, the making training samples includes:
marking the position of the defect to form a marking file; then reading the labeling file and cutting the ROI area; firstly carrying out graying treatment on the cut ROI region, and then carrying out space domain linear gray level conversion to scale the gray level value of the image;
image defects are extracted using a gaussian line detection algorithm: firstly, carrying out Gaussian filtering on an image, discretizing a Gaussian function, and obtaining a template of the Gaussian filter, wherein the obtained Gaussian function value is used as a coefficient of the template; the Steger algorithm obtains the direction vector and the second-order direction derivative of any point, and finally the extraction of the lines is realized according to the setting of parameters in the Steger algorithm.
And calculating characteristic values (comprising length, concave-convex degree, compactness, roundness, equivalent ellipse parameters, area, distance of the farthest point, shape coefficient of the ellipse parameters, left line width, right line width, contrast, line width mean value, standard deviation of a contour line to a regression line, ratio of line width to distance of the farthest point and contrast mean value) of the extracted defects, and concatenating the characteristic values and image labels (namely defect types and defect-free) to form a training sample.
Further, in the training phase, the performing data dimension reduction further includes performing data dimension reduction on the training sample by using principal component analysis PCA, and screening and recording a sample principal component (the sample principal component is a component with a duty ratio exceeding a set threshold value x, preferably x=85%).
Further, in the training stage, the step of sending the training sample set after the dimension reduction processing into a support vector machine SVM using a radial basis function RBF as a kernel function for supervised training includes adopting a one-to-one strategy in training: the problem of n possible classification results is converted into n (n-1)/2 classification problems, namely n types are included in the training samples, namely, each type is compared with the rest (n-1) types, n (n-1)/2 classifiers are needed to be created, the optimal decision hyperplane of each bi-classifier is further solved, and the finally obtained training result is the saved training parameters of each bi-classifier.
Further, in the detection stage, the making of the detection sample, outputting the detection result includes that the industrial camera collects the image and returns the image to the computer, and then processing is performed, wherein the processing process includes:
and graying the picture, separating the rubber ring from the background image by using a maximum inter-class variance threshold segmentation (OTSU) method, reducing the image processing area and improving the processing speed.
A spatial domain linear gray scale transformation is performed to scale the gray value of the image.
And calculating the characteristics of the image based on the dimension reduction result of the previous stage, and manufacturing a detection sample.
And (3) sending the detection sample in the last step into a trained support vector machine model, and outputting the model as a detection result.
Further, the collected rubber seal ring image comprises a defective rubber seal ring image and a non-defective rubber seal ring image; wherein, the overlooking image of the rubber sealing ring should appear in the visual field completely, show a complete ring with clear surface texture.
Compared with the prior art, the invention has the beneficial effects.
The surface defect detection method based on Gaussian line detection detects the defects of the rubber sealing ring, and has a better recognition effect on surface scratches and crack defects.
Drawings
The invention is further described below with reference to the drawings and the detailed description. The scope of the present invention is not limited to the following description.
FIG. 1, a schematic view of a rubber seal ring;
FIG. 2 is a schematic diagram after linear gray scale conversion;
FIG. 3, a schematic diagram of Gaussian line detection;
FIG. 4 is a schematic diagram of defect labeling;
FIG. 5, training phase flow diagram;
fig. 6, a detection phase flow chart.
Detailed Description
As shown in fig. 1 to 6, the method for detecting the surface defect of the rubber sealing ring based on gaussian line detection comprises the following steps:
1. and (5) preprocessing an image.
1.1 extraction of the rubber ring area.
In order to reduce the processing area and increase the running speed, the area where the rubber sealing ring is located in the image is selected (as shown in fig. 1). The invention separates the rubber ring and the background image by using a maximum inter-class variance threshold segmentation (OTSU) method, and the method is a classical non-parameter and unsupervised self-adaptive filtering method, and has good treatment effect when the image histogram is unimodal or bimodal. The gray histogram of the rubber seal ring image used in the invention is bimodal, so the method is selected.
The basic idea of the OTSU method is: the histogram of the image is divided into two groups with a certain gray level as a threshold value, and the variance is calculated, and when the variance between the two groups is maximum, the image is divided with the gray level value as the threshold value. Since variance is a measure of the uniformity of the gray level distribution, the larger the variance value, which means that the larger the difference between the two parts constituting the image, the smaller the difference between the two parts will be when a part of the object is divided into the background by mistake or when a part of the object is divided into the object by mistake, so that the division with the largest variance between classes means that the probability of erroneous division is minimized.
The algorithm process is as follows: let the image pixel be M and the gray scale range be [0, N-1 ]]The number of pixels corresponding to the gray level I is m i ;p i =m i M, i=1, …, N-1. Dividing pixels in an image into two classes according to gray values by using a threshold T, R 1 And R is 2 Wherein R is 1 Is in the range of [0, T ]],R 2 In the range of [ T+1, N-1 ]]The method comprises the steps of carrying out a first treatment on the surface of the The average value of the whole image is as follows:R 1 the group mean is:wherein: />R 2 The group mean is: />Wherein:thereby:
α=μ 1 α 12 α 2
the inter-class variance is defined as:
x 2 =μ 11 -α) 222 -α) 2
let T be [0, N-1 ]]Sequentially taking values within the range so that x 2 The maximum T value is the optimal threshold value of the OTSU method.
1.2, selecting a region to be detected by combining morphological closing operation and filling cavity treatment.
1.3 image enhancement.
The sealing rubber ring can be interfered by external environment, illumination condition and the like in the shooting process, so that noise interference appears in the picture. Before surface defect detection, the images acquired by the industrial camera are firstly processed to remove noise, so that the edge of the sealing ring is clearer, the surface texture is more obvious, and the contrast ratio of the defect part and the peripheral area is higher. The invention adopts the space domain linear gray level transformation to scale the gray level value of the image, and the formula is as follows:
wherein: GMin is the maximum gray value of the image and GMax is the minimum gray value of the image. Scaling of the image gray values is achieved by setting parameters of Mult and Add, and the purpose of highlighting defect textures is achieved (as shown in fig. 2).
2. Gaussian line detection extracts defects and calculates features.
2.1 Gaussian line detection.
The classical Steger algorithm is a line detection method based on a Hessian matrix, and can realize the accurate positioning of the center sub-pixel of the light bar. The first step is to determine parameters of taylor quadratic polynomials of each point in the image in the x-direction and the y-direction by partial derivatives of convolution of the image with a gaussian template, further obtain the maximum value of the line direction and the second derivative of the point, and then extract the required pixel point according to the definition of the double threshold (as shown in fig. 3).
Firstly, gaussian filtering is carried out on an image, the Gaussian filtering is widely applied to a noise reduction process of image processing, each pixel in the image is scanned by a template (or convolution and mask), and the weighted average gray value of the pixels in the neighborhood determined by the template is used for replacing the value of the central pixel point of the template. For images, a two-dimensional discrete gaussian function is commonly used as a smoothing filter, and the function expression is as follows.
In the formula, sigma is the standard deviation of Gaussian distribution, x and y enable the distance from the current point to the corresponding target point, and a two-dimensional zero-mean discrete Gaussian function is commonly used as a smoothing filter.
After discretizing the Gaussian function, a template of the Gaussian filter can be obtained, and the obtained Gaussian function value is used as a coefficient of the template. The partial derivative r is obtained after the convolution of the image and the Gaussian template function x ,r y ,r xx ,r xy ,r yy Wherein r is yy Representing the second partial derivative of the image along y, and other parameters are similar.
The second taylor expansion of the image from the partial derivative is:
for any point (x, y) in the image, the Hessian matrix can be expressed as.
The eigenvector corresponding to the largest eigenvalue of the Hessian matrix corresponds to the normal direction of the line, using (n xy ,n y ) Expressed in terms of points (x 0 ,y 0 ) As a reference point, the subpixel coordinates of the line are: (p) x ,p y )=(x 0 +tn x ,y 0 +tn y ) Bringing it into the taylor expansion.
If (tn) x ,tn y )∈[-0.5,0.5]×[-0.5,0.5]I.e. the point where the first derivative is zero, is within the current pixel, i.e. it is fulfilled that the first directional derivative along the edge direction is zero. By introducing a Hessian matrix, the edge direction n and the second derivative of this direction can be calculated.
The Steger algorithm can obtain the direction vector and the second-order direction derivative of any point, and finally, the extraction of the lines is realized according to the setting of parameters in the algorithm. Parameters of the gaussian line detection algorithm include: sigma, low, high, where sigma determines the parameters of the gaussian convolution (degree of smoothness), low and high are the high and Low threshold parameters of the algorithm. If the second partial derivative of the marked point is greater than the parameter high, it is determined to be a point on the line and immediately accepted, if it is lower than the parameter Low, it is considered to be a point on a non-line and immediately rejected, if it is between Low and high, these points will be accepted only if the point can be connected to the already accepted point by a certain path. With respect to the selection of parameters, the larger the σ, the smoother the image, the smaller the value of the second derivative, and therefore the greater the smoothness, the smaller the selected Hight and Low values when the high and Low threshold values are selected.
2.2 feature extraction and computation.
The invention uses 15 kinds of characteristic values, wherein 12 kinds of characteristic values are common characteristics (length, concave-convex degree, compactness and the like) for describing the lines, and 3 kinds of characteristic values which are calculated according to the characteristics of the lines extracted by the invention are respectively: standard deviation of Euclidean distance from the contour line to the regression line, ratio of line width to distance of the farthest point, and average value of line contrast. Wherein the standard deviation of the Euclidean distance from the contour line to the regression line is used for representing the line
The ratio of the strip bending degree, the line width and the distance of the farthest point is used for distinguishing the long scratch from the crack, and the average value of the line contrast is a characteristic which is obvious in distinguishing.
The Euclidean distance formula is:
the standard deviation formula of the Euclidean distance is:
3. feature dimension reduction technology.
The extracted features have higher dimensions, and if the features are directly sent into a classifier for training and classifying, the computational complexity is conceivable. The redundant features not only increase training time but also affect the real-time performance of detection, and the detection effect is not necessarily better than that of the latitude. We have introduced principal component analysis (principal component analysis, PCA) by minimizing the dimensions of features while preserving the main content of the features. The principal component analysis method is the most widely used data dimension reduction algorithm. The main idea of PCA is to map n-dimensional features onto k-dimensions, which are completely new orthogonal features, also called principal components, and are k-dimensional features reconstructed on the basis of the original n-dimensional features.
And calculating a principal component analysis method.
1. The original data are formed into an n-row m-column matrix X by columns.
2. Each row of X is zero-averaged, i.e. the average value of this row is subtracted.
3. Solving a covariance matrix:
4. calculating eigenvalues and eigenvectors of the covariance matrix: c- λE.
5. The eigenvectors are arranged into a matrix according to the corresponding eigenvalue from top to bottom, and the first k rows are taken to form a matrix P.
6.Y =px is the data after the dimension is reduced to k dimension.
4. Support vector machines (Support Vector Machine, SVM).
After the features subjected to the dimension reduction treatment are obtained, whether defects exist and what defects exist can be judged according to the features. The present invention uses a Support Vector Machine (SVM) to classify image features.
The support vector machine (support vector machines, SVM) is a two-class model that maps feature vectors of an instance to points in space, the purpose of the SVM is to draw a line to "best" distinguish between the two classes of points so that the line can be classified well if new points are later found. The SVM is suitable for small and medium data samples, nonlinear and high-dimensional classification problems.
The support vector machine is the most effective means for solving the two classification problems, in order to find the optimal decision hyperplane, ω·x+b=0 is made to be the optimal decision hyperplane, the points in the ω·x+b > 0 region are classified as class i, and the points in the ω·x+b < 0 region are classified as class ii. The mathematical expression of the maximization of the distance between two sides of the optimal solution decision hyperplane is as follows:
the constraint is as follows:
for the problem of multi-sample classification, the most commonly adopted strategy is to construct a multi-class classifier supporting a vector machine in a one-to-one voting mode. The training samples are n types, namely each type is compared with the other (n-1) types, n (n-1)/2 classifiers are needed to be created, the optimal decision hyperplane of each bi-classifier is further solved, and the finally obtained training result is the saved training parameters of each bi-classifier.
In order to realize nonlinear mapping, the invention selects a Gaussian kernel function (radial basis function, radial Basis Function, RBF) with the expression:
wherein sigma is the width parameter of the function, xc is the kernel function center, and the radial action range of the function is controlled.
Specifically, (1) preparation.
Hardware environment: the real-time monitoring system of the rubber sealing ring meets the following hardware requirements: computer, high accuracy industrial camera, conveying platform, annular LED light source. In order to minimize the influence of external light sources on the shooting environment, a darkroom should be provided. The camera and the light source are arranged above the conveying platform, when the rubber ring is conveyed to the position right below the camera and the light source, the external trigger mechanism gives a signal to the camera, the camera immediately shoots after receiving the signal given by the external trigger mechanism, and the camera successfully collects the image of the rubber sealing ring and then transmits the image to the computer, and the computer carries out the next image processing algorithm.
Data preparation: the method needs to train the support vector machine in advance, so that a plurality of rubber seal ring pictures with various defects are prepared in advance.
(2) The method flow.
The invention is divided into two stages of training and detection.
2.1 training phase.
2.1.1 firstly, marking a rectangular area where the defect is located by using a marking tool (as shown in fig. 4) to form a marking file. And reading the annotation file, reading the dictionary information of the annotation file, framing the ROI region on the original image according to the rectangular coordinate information in the dictionary information, and cutting off the ROI region to prepare for processing the image.
2.1.2 graying treatment is firstly carried out on the cut ROI area, then space domain linear gray level conversion is carried out to zoom the gray level value of the image, and the defect is highlighted. Defects are extracted using a gaussian line detection algorithm: firstly, gaussian filtering is carried out on an image, and the Gaussian filtering is widely applied to a noise reduction process of image processing. After discretizing the Gaussian function, a template of the Gaussian filter can be obtained, and the obtained Gaussian function value is used as a coefficient of the template. The Steger algorithm can obtain the direction vector and the second-order direction derivative of any point, and finally, the extraction of the lines is realized according to the setting of parameters in the algorithm.
When selecting the parameters High and Low, it should be noted that the second partial derivative is affected by the line amplitude and width, and also by the parameter sigma. The second partial derivative responds approximately linearly to the line amplitude (i.e., the larger the amplitude value, the larger the second partial derivative). Whereas the response to the line width is more or less inversely proportional (i.e. the wider the line width, the smaller the second partial derivative), which is more or less responsive to the magnitude of the parameter sigma (i.e. the larger the sigma, the smaller the resulting second partial derivative). This means that for a large sigma value a relatively small High value and Low value should be chosen.
2.1.3 calculating characteristic values of the extracted defects, and 15 characteristics are extracted altogether according to the invention. These feature values are concatenated with image labels (i.e., defect type and defect free) into a training sample.
2.1.4 after training samples were prepared, the samples were subjected to data dimension reduction by Principal Component Analysis (PCA), and those portions which could be the principal components of the samples (in a proportion exceeding the set 85%) were screened and recorded.
And 2.1.5, finally, sending the training sample set after the dimension reduction treatment into a Support Vector Machine (SVM) taking a Radial Basis Function (RBF) as a kernel function for supervised training. In the training, a one-to-one strategy is adopted, n types are in the training sample, each type is compared with the other (n-1) types, n (n-1)/2 classifiers are needed to be created, the optimal decision hyperplane of each two-classifier is further solved, and the finally obtained training result is the saved training parameter of each two-classifier.
2.2 detection phase.
After the industrial camera collects the image and transmits the image back to the computer, the following procedure is performed.
2.2.1 firstly graying the picture, then separating the rubber ring from the background image by using a maximum inter-class variance threshold segmentation (0 TSU) method, reducing the image processing area and improving the processing speed.
2.2.2 performing a spatial domain linear gray scale transformation to scale the gray values of the image.
2.2.3, calculating the characteristics of the image based on the dimension reduction result of the previous stage, and manufacturing a detection sample.
2.2.4, sending the detection sample into a trained support vector machine model, outputting a detection result, namely a defect-free or defect specific name, and storing the picture to a corresponding address for subsequent reference.
It should be understood that the foregoing detailed description of the present invention is provided for illustration only and is not limited to the technical solutions described in the embodiments of the present invention, and those skilled in the art should understand that the present invention may be modified or substituted for the same technical effects; as long as the use requirement is met, the invention is within the protection scope of the invention.

Claims (6)

1. The surface defect detection method of the rubber sealing ring based on Gaussian line detection comprises a preparation work, a training stage and a detection stage; the method is characterized in that: preparation: collecting rubber seal ring images as training data;
training phase: manufacturing a training sample, performing data dimension reduction, and finally sending the training sample set subjected to dimension reduction treatment into a Support Vector Machine (SVM) taking a Radial Basis Function (RBF) as a kernel function for supervised training;
and (3) detection: and (5) manufacturing a detection sample and outputting a detection result.
2. The method for detecting the surface defects of the rubber sealing ring based on Gaussian line detection according to claim 1, wherein the method comprises the following steps: in the training phase, the making training samples includes:
marking the position of the defect to form a marking file; then reading the labeling file and cutting the ROI area; firstly carrying out graying treatment on the cut ROI region, and then carrying out space domain linear gray level conversion to scale the gray level value of the image;
image defects are extracted using a gaussian line detection algorithm: firstly, carrying out Gaussian filtering on an image, discretizing a Gaussian function, and obtaining a template of the Gaussian filter, wherein the obtained Gaussian function value is used as a coefficient of the template; the Steger algorithm obtains a direction vector and a second-order direction derivative of any point, and finally, the extraction of the lines is realized according to the setting of parameters in the Steger algorithm;
and calculating a characteristic value of the extracted defect, and connecting the characteristic value with the image label in series to form a training sample.
3. The method for detecting the surface defects of the rubber sealing ring based on Gaussian line detection according to claim 1, wherein the method comprises the following steps: in the training stage, the data dimension reduction comprises the steps of adopting Principal Component Analysis (PCA) to perform data dimension reduction on the training sample, and screening and recording the principal components of the sample.
4. The method for detecting the surface defects of the rubber sealing ring based on Gaussian line detection according to claim 1, wherein the method comprises the following steps: in the training stage, the step of sending the training sample set after the dimension reduction treatment into a Support Vector Machine (SVM) taking a Radial Basis Function (RBF) as a kernel function for supervised training comprises the steps of adopting a one-to-one strategy in training: the problem of n possible classification results is converted into n (n-1)/2 classification problems, namely n types are included in the training samples, namely, each type is compared with the rest (n-1) types, n (n-1)/2 classifiers are needed to be created, the optimal decision hyperplane of each bi-classifier is further solved, and the finally obtained training result is the saved training parameters of each bi-classifier.
5. The method for detecting the surface defects of the rubber sealing ring based on Gaussian line detection according to claim 1, wherein the method comprises the following steps: in the detection stage, the manufacturing detection sample, outputting detection results, wherein the detection results comprise that an industrial camera collects images and sends the images back to a computer for processing, and the processing process comprises the following steps:
graying the picture, then separating the rubber ring from the background image by using a maximum inter-class variance threshold segmentation method, reducing the image processing area and improving the processing speed;
performing spatial domain linear gray level conversion to scale gray level values of the image;
calculating the characteristics of the image based on the dimension reduction result of the previous stage, and manufacturing a detection sample;
and (3) sending the detection sample in the last step into a trained support vector machine model, and outputting the model as a detection result.
6. The method for detecting the surface defects of the rubber sealing ring based on Gaussian line detection according to claim 1, wherein the method comprises the following steps: the collected rubber seal ring images comprise defective rubber seal ring images and non-defective rubber seal ring images; wherein, the overlooking image of the rubber sealing ring should appear in the visual field completely, show a complete ring with clear surface texture.
CN202310709850.8A 2023-06-15 2023-06-15 Rubber sealing ring surface defect detection method based on Gaussian line detection Pending CN116664540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310709850.8A CN116664540A (en) 2023-06-15 2023-06-15 Rubber sealing ring surface defect detection method based on Gaussian line detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310709850.8A CN116664540A (en) 2023-06-15 2023-06-15 Rubber sealing ring surface defect detection method based on Gaussian line detection

Publications (1)

Publication Number Publication Date
CN116664540A true CN116664540A (en) 2023-08-29

Family

ID=87716946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310709850.8A Pending CN116664540A (en) 2023-06-15 2023-06-15 Rubber sealing ring surface defect detection method based on Gaussian line detection

Country Status (1)

Country Link
CN (1) CN116664540A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117746000A (en) * 2023-12-27 2024-03-22 广东瑞福密封科技有限公司 Classifying and positioning method for multiple types of surface defects of rubber sealing ring

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117746000A (en) * 2023-12-27 2024-03-22 广东瑞福密封科技有限公司 Classifying and positioning method for multiple types of surface defects of rubber sealing ring

Similar Documents

Publication Publication Date Title
CN109829914B (en) Method and device for detecting product defects
CN115082683B (en) Injection molding defect detection method based on image processing
CN109961049B (en) Cigarette brand identification method under complex scene
CN108305243B (en) Magnetic shoe surface defect detection method based on deep learning
CN108918536B (en) Tire mold surface character defect detection method, device, equipment and storage medium
EP3379491A1 (en) Surface defect detection
CN111145165A (en) Rubber seal ring surface defect detection method based on machine vision
CN113724231B (en) Industrial defect detection method based on semantic segmentation and target detection fusion model
CN113592845A (en) Defect detection method and device for battery coating and storage medium
CN112907519A (en) Metal curved surface defect analysis system and method based on deep learning
CN108764361B (en) Working condition identification method of indicator diagram of beam-pumping unit based on integrated learning
CN111598856A (en) Chip surface defect automatic detection method and system based on defect-oriented multi-point positioning neural network
CN111965197B (en) Defect classification method based on multi-feature fusion
CN113393426A (en) Method for detecting surface defects of rolled steel plate
CN116012291A (en) Industrial part image defect detection method and system, electronic equipment and storage medium
CN116664540A (en) Rubber sealing ring surface defect detection method based on Gaussian line detection
CN110533083B (en) Casting defect recognition method based on Adaboost model of SVM
CN113205511B (en) Electronic component batch information detection method and system based on deep neural network
CN112396580B (en) Method for detecting defects of round part
CN111968115B (en) Method and system for detecting orthopedic consumables based on rasterization image processing method
Kamani et al. Car body paint defect inspection using rotation invariant measure of the local variance and one-against-all support vector machine
CN112686872A (en) Wood counting method based on deep learning
CN111950556A (en) License plate printing quality detection method based on deep learning
CN108985294B (en) Method, device and equipment for positioning tire mold picture and storage medium
CN115937095A (en) Printing defect detection method and system integrating image processing algorithm and deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination