CN114612384B - Method and system for detecting defects of appearance material of sport protector - Google Patents
Method and system for detecting defects of appearance material of sport protector Download PDFInfo
- Publication number
- CN114612384B CN114612384B CN202210114855.1A CN202210114855A CN114612384B CN 114612384 B CN114612384 B CN 114612384B CN 202210114855 A CN202210114855 A CN 202210114855A CN 114612384 B CN114612384 B CN 114612384B
- Authority
- CN
- China
- Prior art keywords
- edge
- point
- noise
- points
- pixel
- 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.)
- Active
Links
- 230000001012 protector Effects 0.000 title claims abstract description 69
- 230000007547 defect Effects 0.000 title claims abstract description 49
- 239000000463 material Substances 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000001914 filtration Methods 0.000 claims abstract description 76
- 230000001681 protective effect Effects 0.000 claims abstract description 29
- 238000009826 distribution Methods 0.000 claims abstract description 20
- 238000001514 detection method Methods 0.000 claims abstract description 15
- 230000004927 fusion Effects 0.000 claims abstract description 14
- 238000005457 optimization Methods 0.000 claims abstract description 9
- 238000012216 screening Methods 0.000 claims abstract description 9
- 239000013598 vector Substances 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 230000002950 deficient Effects 0.000 abstract description 4
- 238000005259 measurement Methods 0.000 abstract description 3
- 238000004519 manufacturing process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000005299 abrasion Methods 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000007499 fusion processing Methods 0.000 description 1
- 238000010438 heat treatment Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 210000003127 knee Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000002269 spontaneous effect Effects 0.000 description 1
- 239000004753 textile Substances 0.000 description 1
- 210000000707 wrist Anatomy 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30124—Fabrics; Textile; Paper
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of defect detection of new material products, in particular to a method and a system for detecting the defect of an appearance material of a sports protector. The method includes the steps that preliminary screening is conducted through a first sliding window, and a first noise point is obtained. And adjusting the size of the first sliding window according to the number of the first noise points to obtain a second sliding window, and further obtaining second noise points through the distribution of the first noise points in the second sliding window. And setting a specific edge filtering window for filtering second noise points on the gradient edge, and performing common filtering on other common noise points to obtain a protector optimized image. And performing grouping fusion according to the pixel values and distribution of the pixel points in the protective tool optimized image, and judging a defective pixel point group according to a quantity threshold value. According to the invention, the image characteristics of the new material are amplified by visible light, denoising optimization is carried out, defect pixel points are detected, and the defect detection and measurement of the new material protector can be realized according to the defect pixel points.
Description
Technical Field
The invention relates to the technical field of defect detection of new material products, in particular to a method and a system for detecting the defect of an appearance material of a sports protector.
Background
With the development of new material industry, more and more new materials are put into practical production. The new material has wide application in the production of protective clothing. The sports protective equipment has important function for the safety protection of human body, for example, the knee pad and the wrist pad can reduce the abrasion of joint parts in strenuous exercise and prevent accidents. The protective clothing made of the new material has obvious effect in protection performance and comfort performance, can improve comfort and safety protection capability of the protective clothing, and can add other beneficial effects to human bodies, such as heat preservation, moisture protection, spontaneous heating and the like.
In the process of producing the protective clothing by using a new material, the material can have the defects of color difference and defects on the surface of the protective clothing or dirt caused by pollution of the production environment after being processed. This type of defect has influenced the quality of protective equipment product, influences the sale of product.
The accessible carries out visible light irradiation to the protective equipment product among the prior art, acquires the image information of protective equipment product. And judging the surface defects according to the pixel point types in the image information. But because the production environment is complicated, appear a large amount of noisy points in the image easily, if the simplex carries out filtering to the noisy point, can make the protective equipment lose the texture information of self, influence defect detection.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method and a system for detecting the defects of the appearance material of the sports protector, and the adopted technical scheme is as follows:
the invention provides a method for detecting the defects of an appearance material of a sports protector, which comprises the following steps:
collecting a protector image of the protector made of the new material by using a camera with a visible light source; setting a first sliding window on the protector image, and taking pixel points corresponding to the maximum pixel value and the minimum pixel value in the first sliding window as first noise points; adjusting the size of the first sliding window according to the number of the first noise points to obtain a second sliding window; screening the first noise points according to the distribution information of the first noise points in the second sliding window to obtain second noise points;
taking the second noise point on the gradient edge in the protector image as an edge noise point, and taking the other noise points as common noise points; obtaining the edge line direction according to the gradient direction of the edge noise point; extending along the edge line direction by taking the edge noise point as a center, and obtaining a plurality of extension points according to a preset extension quantity; the extension points are all gradient edge points; the extension point and the edge noise point form an edge filtering window; filtering the edge noise points according to the edge filtering window, and filtering the common noise points according to a filtering window with a preset size to obtain a protective equipment optimization image;
grouping pixel points in the protective tool optimized image according to the pixel value to obtain a plurality of pixel point groups; fitting a Gaussian model according to the pixel value in each pixel point group and the number of elements in the group; constructing a feature vector of the pixel point group according to the mean and variance of each Gaussian model; fusing the pixel point groups with the similarity of the feature vectors larger than a preset similarity threshold value to obtain fused pixel point groups; and taking the fusion pixel point group with the number of the elements in the group smaller than a preset number threshold value as a defect pixel point group.
Further, the acquiring the protector image of the new material protector by using the camera with the visible light source comprises:
collecting an initial protector image of the protector made of the new material; and removing the background information in the initial protector image to obtain the protector image only containing the protector information.
Further, the adjusting the size of the first sliding window according to the number of the first noise points and obtaining a second sliding window includes:
obtaining the size of the second sliding window according to a window size adjusting model, wherein the window size adjusting model comprises:
wherein w is the size of the second sliding window, w 0 Is the initial size of the first sliding window, M is the number of the first noise points in the protector image, M is the total number of pixel points in the protector image, k is a model fitting parameter,is a rounding down function.
Further, the screening the first noise point according to the distribution information of the first noise point in the second sliding window to obtain a second noise point includes:
counting pixel values of pixel points in the second sliding window, and if the pixel value of the first noise point in the second sliding window is the maximum pixel value or the minimum pixel value in the second sliding window, and the maximum pixel value or the minimum pixel value in the second sliding window is equal to the median of the pixel values, taking the corresponding first noise point as a normal pixel point; and if not, taking the corresponding first noise point as the second noise point.
Further, the obtaining the edge line direction according to the gradient direction of the edge noise point includes:
and taking two vertical directions of the gradient direction as the edge line directions of the edge noise points.
Further, the extending along the edge line direction with the edge noise point as the center, and obtaining a plurality of extending points according to a preset extending number includes:
extending along the edge line direction by taking the edge noise point as a center; when each extension point is obtained, continuing to extend according to the edge line direction of the extension point; if the point in the edge line direction of the extension point is not the gradient edge point, shifting the edge line direction along the gradient direction of the previous extension point, and taking the gradient edge point obtained after shifting as the corresponding extension point.
Further, the filtering the edge noise point according to the edge filtering window includes:
if the number of the non-edge noise points in the edge filtering window is not less than a preset number threshold, taking the median of the pixel values of the non-edge noise points as the pixel value of the edge noise points in the edge filtering window;
if the non-edge noise points exist in the edge filtering window and the number of the non-edge noise points is smaller than a preset number threshold, taking the mean value of the pixel values of the non-edge noise points as the pixel value of the edge noise points in the edge filtering window;
if the non-edge noise point does not exist in the edge filtering window, taking the average value of the maximum pixel value and the minimum pixel value in the edge filtering window as the pixel value of the edge noise point in the edge filtering window.
Further, the filtering the common noise point according to a filtering window with a preset size includes:
taking the common noise point as the center of the filtering window; obtaining the density of the common noise points in the filtering window; if the density is smaller than a preset density threshold value, taking an average pixel value in the filtering window as a pixel value of the common noise point; otherwise, expanding the filtering window according to a preset step length until the density is smaller than the density threshold value.
Further, the grouping the pixels in the tool optimized image according to the pixel values to obtain a plurality of pixel groups includes:
and classifying the pixel points in the protective tool optimization image by using a density clustering algorithm according to the pixel value to obtain a plurality of pixel point groups.
The invention also provides a system for detecting the defects of the appearance materials of the sports protectors, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes any step of the method for detecting the defects of the appearance materials of the sports protectors when executing the computer program.
The invention has the following beneficial effects:
1. according to the embodiment of the invention, the image of the protector made of the new material is acquired by the camera with the visible light source. The surface information of the new material protective tool is amplified through visible light, so that the image characteristics are more obvious, and the subsequent defect detection is facilitated.
2. According to the embodiment of the invention, the noise points are divided into edge noise points and common noise points according to the positions of the noise points. And designing a specific edge filtering window for each edge noise point according to the distribution of the edge noise points and the trend of edge lines, so as to prevent damage to the edge texture of the protector in the image. And further combining conventional filtering of common noise to obtain a protective equipment optimized image without noise points, and performing defect detection on the protective equipment optimized image to obtain an accurate detection result.
3. According to the embodiment of the invention, the pixels in the optimized image of the protective tool are classified according to the pixel values, gaussian fitting is carried out, different pixel groups are fused through parameters of a Gaussian model, and because the number of normal pixels in the optimized image of the protective tool is large, the normal pixel groups can be fused into one or more fusion pixel groups through fusion, and the defective pixel groups are fused into one or more fusion pixel groups. Because the number of the pixels of the normal pixel group is far larger than that of the pixels of the defect pixel group, the defect pixel group can be accurately identified according to the threshold value of the number of the pixels, and the defect detection of the new material protector is accurate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for detecting defects in an appearance material of a sport pad according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given of a method and a system for detecting defects of an appearance material of a sports protector according to the present invention, and the detailed implementation, structure, features and effects thereof with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of a method and a system for detecting defects of an appearance material of a sports protector in detail by combining with the accompanying drawings.
Referring to fig. 1, a flow chart of a method for detecting defects in an appearance material of a sport pad according to an embodiment of the present invention is shown, where the method includes:
step S1: collecting a protector image of the protector made of the new material by using a camera with a visible light source; setting a first sliding window on the protector image, and taking pixel points corresponding to the maximum pixel value and the minimum pixel value in the first sliding window as first noise points; adjusting the size of the first sliding window according to the number of the first noise points to obtain a second sliding window; and screening the first noise points according to the distribution information of the first noise points in the second sliding window to obtain second noise points.
In order to enhance the image characteristics and facilitate subsequent defect detection, in the embodiment of the invention, a camera with a visible light source is used for collecting the image information of the protector made of the new material. In actual operation, the brace needs to be turned over so that the camera can capture all information of the entire brace. According to the embodiment of the invention, the manipulator capable of executing the turning action is arranged on the detection table, and the manipulator is used for turning the protector by fixing the position of the camera, so that the whole information of the protector is acquired. It should be noted that after the images of the protector at multiple angles are acquired, the images can be spliced and fused according to the overlapping area to obtain the overall image data, and image splicing and fusion are common technical means for those skilled in the art and are not described herein again.
The type of the visible light source may be set by itself according to the color and material of the protector, and is not limited herein. In addition, in order to facilitate subsequent analysis of pixel value information of pixel points in the protector image, the protector image is converted into a corresponding gray image in the embodiment of the invention.
In the image acquisition process, protective equipment information not only can be gathered, the extraneous information in the production environment still can be gathered, and protective equipment information is the information that detects needs, and extraneous information is the background information that does not need. Therefore, it is necessary to remove background information in the acquired initial pad image, retain only pad information, and obtain a pad image including only pad information. It should be noted that, the background information can be removed by using an image segmentation technique, such as a neural network and a threshold segmentation technique, which is not described herein again.
Noise is easily present in the brace image due to light or production environment effects. The noise affects subsequent defect detection, and therefore, the noise needs to be identified and removed. Because the noise point formed by illumination is usually a black point with a small pixel value or a white point with a large pixel value in the image, a first sliding window is arranged on the protector image, the whole image is traversed through the first sliding window, and the pixel point corresponding to the maximum pixel value and the minimum pixel value in the first sliding window is taken as the first noise point.
It should be noted that the first noise point is a pixel point obtained in the preliminary screening process, and includes not only a noise point, but also a normal pixel point. Further screening of the first noise points is therefore required.
Because in the protector image, normal pixel point is more than noise point distribution, namely in a window region, if first noise point distribution is more, it indicates that this type of first noise point is the normal pixel point of misclassification, needs to reject it. Therefore, the first noise point can be screened according to the distribution information of the first noise point.
In order to better utilize the distribution information to screen the first noise points, the size of the first sliding window needs to be adjusted according to the number of the first noise points. Because the more the first noise points are, the more the current misclassification result is, a large number of normal pixel points exist in the first noise points, the size of the first sliding window needs to be increased, and the analysis of the distribution information of the first noise points in the window area is facilitated. Adjusting the size of the first window specifically includes:
obtaining the size of a second sliding window according to a window size adjusting model, wherein the window size adjusting model comprises the following steps:
wherein w is the size of the second sliding window, w 0 Is the initial size of the first sliding window, M is the number of first noise points in the protector image, M is the total number of pixel points in the protector image, k is a model fitting parameter,is a rounded down function.
In an embodiment of the present invention, the initial size of the first sliding window is set to 3, i.e. the first sliding window is a window with a size of 3 × 3. The model fitting parameters are set to 1.
The first noise points can be screened through distribution information of the first noise points in the second sliding window with a larger size, so that second noise points are obtained, and the method specifically comprises the following steps:
counting pixel values of pixel points in a second sliding window, and if the pixel value of a first noise point in the second sliding window is the maximum pixel value or the minimum pixel value in the second sliding window, and the maximum pixel value or the minimum pixel value in the second sliding window is equal to the median of the pixel values, indicating that the number of the pixel points corresponding to the maximum pixel value or the minimum pixel value at the moment is large, taking the corresponding first noise point as a normal pixel point; and if not, taking the corresponding first noise point as a second noise point.
And accurate noise point information in the protector image can be obtained through multiple traversals of the second sliding window to the protector image, and a second noise point is obtained.
Step S2: taking a second noise point on the gradient edge in the protector image as an edge noise point, and taking the other noise points as common noise points; obtaining the edge line direction according to the gradient direction of the edge noise points; extending along the edge line direction by taking the edge noise point as a center, and obtaining a plurality of extension points according to a preset extension quantity; the extension points are all gradient edge points; the extension points and the edge noise points form an edge filtering window; and filtering the edge noise points according to the edge filtering window, and filtering the common noise points according to the filtering window with the preset size to obtain the optimized image of the protective tool.
And performing targeted filtering according to the position of the second noise point, and performing reassignment on the noise point by analyzing the pixel value information of other pixel points in the neighborhood range of the noise point by using the traditional filtering method to realize noise filtering. Because the protector product is a textile product, a large number of texture edges exist in the protector image, if the noise points on the edges are filtered conventionally, the texture information of the part is lost, and the detail information such as the texture edges in the image is incomplete, so that the subsequent defect detection is influenced.
Special filter window designs for noise points on the edges are therefore required. Firstly, gradient edges are obtained by obtaining gradient information in the protector image. And taking the second noise point on the gradient edge as an edge noise point, and taking the other noise points as common noise points.
It should be noted that obtaining gradient information of an image is a technical means well known to those skilled in the art, and is not described herein.
The direction of the edge line at each position, i.e., the trend of the edge line, can be obtained from the gradient direction of the pixel points on the edge line. Two directions perpendicular to the gradient direction are taken as the edge line directions of the edge noise point. And performing extension search along the edge line direction by taking the edge noise point as a center, obtaining an extension point by each extension, finishing the extension when the extension point reaches a preset extension number, and obtaining a plurality of extension points according to the preset extension number. The extension points are gradient edge points. The extension points and the edge noise points form a special edge filtering window, namely the edge filtering window is a curve.
In the embodiment of the present invention, the number of extensions is set to 6, that is, 3 extension points are respectively extended to both sides with the edge noise point as the center, and the length of the edge filter window is 7.
Wherein, the specific extending process of the extending point comprises the following steps:
extending along the edge line direction by taking the edge noise point as a center; when each extension point is obtained, continuing to extend according to the edge line direction of the extension point; if the point in the edge line direction of the extension point is not the gradient edge point, which indicates that an inflection point appears in the trend of the edge line at this time, the edge line direction is shifted along the gradient direction of the previous extension point, and the gradient edge point obtained after the shift is taken as the corresponding extension point.
Through the trend information of the edge line at which each edge pixel point is located, a corresponding edge filtering window is obtained, and the edge noise points can be filtered according to the pixel value information of the pixel points in the edge filtering window, and the method specifically comprises the following steps:
and if the number of the non-edge noise points in the edge filtering window is not less than the preset number threshold, taking the median of the pixel values of the non-edge noise points as the pixel value of the edge noise points in the edge filtering window.
And if the non-edge noise points exist in the edge filtering window and the number of the non-edge noise points is smaller than a preset number threshold, taking the average value of the pixel values of the non-edge noise points as the pixel value of the edge noise points in the edge filtering window.
And if the non-edge noise point does not exist in the edge filtering window, taking the average value of the maximum pixel value and the minimum pixel value in the edge filtering window as the pixel value of the edge noise point in the edge filtering window.
In the embodiment of the present invention, the number threshold is set to 3.
By optimizing the adaptive filtering window of each edge noise point, the integrity of edge texture information can be ensured, and the loss of detail information in the image is avoided. For the common noise point, common filtering can be performed according to a filtering window with a preset size, which specifically includes:
the common noise point is taken as the center of the filtering window. And obtaining the density of common noise points in the filtering window. And if the density is smaller than the preset density threshold value, taking the average pixel value in the filtering window as the pixel value of the common noise point. Otherwise, expanding the filtering window according to a preset step length until the density is smaller than the density threshold.
The pixel value information of normal pixel points can be increased by adjusting the size of the filtering window, so that assignment has higher referential property, and the noise-free protector optimized image can be finally obtained by filtering the common pixel points through the filtering window.
In an embodiment of the present invention, the density threshold is set to 0.75. The step size is set to 2, i.e. the size of the filter window is increased by 2 pixel levels each time.
And step S3: grouping pixel points in the protective tool optimization image according to the pixel value size to obtain a plurality of pixel point groups; fitting a Gaussian model according to the pixel value in each pixel point group and the number of elements in the group; constructing a feature vector of a pixel point group according to the mean value and the variance of each Gaussian model; fusing the pixel point groups with the similarity of the feature vectors larger than a preset similarity threshold value to obtain fused pixel point groups; and taking the fusion pixel point group with the number of the elements in the group smaller than a preset number threshold as a defect pixel point group.
In the protective tool optimization image, normal pixel points are distributed uniformly and in a large quantity, so that the pixel points can be grouped according to the pixel values and the distribution conditions of the pixel points.
And classifying the pixel points in the protective tool optimization image by using a density clustering algorithm according to the pixel values to obtain a plurality of pixel point groups, wherein the pixel values of the pixel points in each pixel point group are similar.
And performing Gaussian fitting according to the size and the number of the pixel points in each pixel point group to obtain a corresponding Gaussian model. I.e. one pixel group corresponds to one gaussian model. The mean value in the Gaussian model represents the pixel value information of the pixel group, and the variance represents the distribution information of the pixel group, so that the feature vector H of the corresponding pixel group can be constructed according to the mean value and the variance of each Gaussian model i I.e. H i =[σ i ,μ i ]In which H i Is the feature vector, σ, of the ith pixel group i The variance of Gaussian model, mu, for the ith pixel group i Is the mean value of the Gaussian model of the ith pixel point group.
And fusing the pixel point groups with the similarity of the feature vectors larger than a preset similarity threshold value to obtain fused pixel point groups. In the embodiment of the invention, the similarity calculation method adopts cosine similarity, the threshold value of the similarity is set to be 0.85, namely when cosine pixel points of two characteristic vectors are greater than 0.85, the pixel values and the distribution characteristics of the two characteristic vectors are considered to be similar, and the fusion process is completed through iterative analysis and fusion until the cosine similarity between any two characteristic vectors is less than 0.85, so that a fusion pixel point group is obtained.
In the protective tool optimized image, the number of the pixels of the normal pixels is large, and the distribution is rich, so that the fusion pixel group with the large number of the pixels can be regarded as the normal pixel group, and the fusion pixel group with the small number of the pixels can be regarded as the defect pixel group, and therefore the fusion pixel group with the number of the elements in the group smaller than the preset number threshold value is used as the defect pixel group.
In the embodiment of the invention, in order to make the classification of the defective pixel group more accurate, the number threshold is set to be one tenth of the number of pixels in the optimized image of the protector.
The type number of the current protector surface defects can be obtained according to the number of the defect pixel point groups. The defect degree of the current defect type can be obtained according to the number of the pixel points in the defect pixel point group, namely the more the defect pixel points are, the larger the defect degree is. Therefore, the defect detection and the measurement of the protector made of the new material are realized.
In summary, in the embodiment of the present invention, the first noise point is obtained by performing the preliminary screening through the first sliding window. And adjusting the size of the first sliding window according to the number of the first noise points to obtain a second sliding window, and further obtaining second noise points through the distribution of the first noise points in the second sliding window. And setting a specific edge filtering window for filtering second noise points on the gradient edge, and performing common filtering on other common noise points to obtain a protector optimized image. And performing grouping fusion according to the pixel values and distribution of the pixel points in the protective tool optimized image, and judging a defective pixel point group according to a quantity threshold value. According to the embodiment of the invention, the image characteristics of the new material are amplified through visible light, denoising optimization is carried out, the defect pixel points are detected, and the defect detection and measurement of the new material protector can be realized according to the defect pixel points.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. The processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A method for detecting defects of an appearance material of a sports protector is characterized by comprising the following steps:
collecting a protector image of the protector made of the new material by using a camera with a visible light source; setting a first sliding window on the protector image, and taking pixel points corresponding to the maximum pixel value and the minimum pixel value in the first sliding window as first noise points; adjusting the size of the first sliding window according to the number of the first noise points to obtain a second sliding window; screening the first noise points according to the distribution information of the first noise points in the second sliding window to obtain second noise points;
taking the second noise point on the gradient edge in the protector image as an edge noise point, and taking the other noise points as common noise points; obtaining the edge line direction according to the gradient direction of the edge noise point; extending along the edge line direction by taking the edge noise point as a center, and obtaining a plurality of extension points according to a preset extension quantity; the extension points are all gradient edge points; the extension point and the edge noise point form an edge filtering window; filtering the edge noise points according to the edge filtering window, and filtering the common noise points according to a filtering window with a preset size to obtain a protective equipment optimization image;
grouping the pixel points in the protector optimized image according to the pixel value to obtain a plurality of pixel point groups; fitting a Gaussian model according to the pixel value in each pixel point group and the number of elements in the group; constructing a feature vector of the pixel point group according to the mean and variance of each Gaussian model; fusing the pixel point groups with the similarity of the feature vectors larger than a preset similarity threshold value to obtain fused pixel point groups; and taking the fusion pixel point group with the number of the elements in the group smaller than a preset number threshold as a defect pixel point group.
2. The method of claim 1 wherein the capturing of the protector image of the new material protector with a camera having a visible light source comprises:
collecting an initial protector image of the protector made of the new material; and removing the background information in the initial protector image to obtain the protector image only containing the protector information.
3. The method of claim 1, wherein the adjusting the size of the first sliding window according to the number of the first noise points to obtain a second sliding window comprises:
obtaining the size of the second sliding window according to a window size adjustment model, wherein the window size adjustment model comprises:
4. The method for detecting the defects of the appearance material of the sports supporter according to claim 1, wherein the step of screening the first noise points according to the distribution information of the first noise points in the second sliding window to obtain second noise points comprises:
counting pixel values of pixel points in the second sliding window, and if the pixel value of the first noise point in the second sliding window is the maximum pixel value or the minimum pixel value in the second sliding window, and the maximum pixel value or the minimum pixel value in the second sliding window is equal to the median of the pixel values, taking the corresponding first noise point as a normal pixel point; and if not, taking the corresponding first noise point as the second noise point.
5. The method of claim 1 wherein the obtaining the edge line direction from the gradient direction of the edge noise points comprises:
and taking two directions perpendicular to the gradient direction as the edge line directions of the edge noise points.
6. The method of claim 5 wherein the step of extending the edge noise point along the edge line direction to obtain a plurality of extension points according to a predetermined number of extensions comprises:
extending along the edge line direction by taking the edge noise point as a center; when each extension point is obtained, continuing to extend according to the edge line direction of the extension point; if the point in the edge line direction of the extension point is not the gradient edge point, shifting the edge line direction along the gradient direction of the previous extension point, and taking the gradient edge point obtained after shifting as the corresponding extension point.
7. The method of claim 1, wherein the filtering the edge noise points according to the edge filter window comprises:
if the number of the non-edge noise points in the edge filtering window is not less than a preset number threshold, taking the median of the pixel values of the non-edge noise points as the pixel value of the edge noise points in the edge filtering window;
if the non-edge noise points exist in the edge filtering window and the number of the non-edge noise points is smaller than a preset number threshold, taking the mean value of the pixel values of the non-edge noise points as the pixel value of the edge noise points in the edge filtering window;
if the non-edge noise point does not exist in the edge filtering window, taking the average value of the maximum pixel value and the minimum pixel value in the edge filtering window as the pixel value of the edge noise point in the edge filtering window.
8. The method of claim 1 wherein the filtering the common noise points according to a preset size of a filter window comprises:
taking the common noise point as the center of the filtering window; obtaining the density of the common noise points in the filtering window; if the density is smaller than a preset density threshold value, taking an average pixel value in the filtering window as a pixel value of the common noise point; otherwise, expanding the filtering window according to a preset step length until the density is smaller than the density threshold.
9. The method of claim 1, wherein the grouping pixels in the brace optimized image according to pixel value size to obtain a plurality of pixel groups comprises:
and classifying the pixel points in the protective tool optimization image by using a density clustering algorithm according to the pixel value to obtain a plurality of pixel point groups.
10. A sports brace appearance material defect detection system comprising a memory, a processor and a computer program stored in said memory and executable on said processor, wherein said processor when executing said computer program implements the steps of the method of any of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210114855.1A CN114612384B (en) | 2022-01-30 | 2022-01-30 | Method and system for detecting defects of appearance material of sport protector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210114855.1A CN114612384B (en) | 2022-01-30 | 2022-01-30 | Method and system for detecting defects of appearance material of sport protector |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114612384A CN114612384A (en) | 2022-06-10 |
CN114612384B true CN114612384B (en) | 2023-04-07 |
Family
ID=81859218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210114855.1A Active CN114612384B (en) | 2022-01-30 | 2022-01-30 | Method and system for detecting defects of appearance material of sport protector |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114612384B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115170576B (en) * | 2022-09-09 | 2022-12-06 | 山东中发新材料科技有限公司 | Aluminum pipe surface defect detection method based on machine vision |
CN118710645A (en) * | 2024-08-28 | 2024-09-27 | 佛山市艾凯控股集团有限公司 | Refrigerator part appearance detection method and system based on machine vision |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6747697B1 (en) * | 2000-07-12 | 2004-06-08 | Koninklijke Philips Electronics, N.V. | Method and apparatus for digital image defect correction and noise filtering |
JP2008070242A (en) * | 2006-09-14 | 2008-03-27 | Seiko Epson Corp | Noise-removing method and apparatus, unevenness defect inspecting method and apparatus |
CN107133952A (en) * | 2017-05-26 | 2017-09-05 | 浙江工业大学 | A kind of alligatoring recognition methods for merging time-frequency characteristics |
CN109255785A (en) * | 2018-09-26 | 2019-01-22 | 深圳源广安智能科技有限公司 | A kind of bearing open defect detection system |
CN112712512A (en) * | 2021-01-05 | 2021-04-27 | 余波 | Hot-rolled strip steel scab defect detection method and system based on artificial intelligence |
CN112950618B (en) * | 2021-03-25 | 2023-03-21 | 深圳市华汉伟业科技有限公司 | Appearance defect detection method and system |
-
2022
- 2022-01-30 CN CN202210114855.1A patent/CN114612384B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114612384A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114612384B (en) | Method and system for detecting defects of appearance material of sport protector | |
CN103530878B (en) | A kind of edge extracting method based on convergence strategy | |
CN114972357A (en) | Roller surface defect detection method and system based on image processing | |
CN114418957A (en) | Global and local binary pattern image crack segmentation method based on robot vision | |
CN109978848B (en) | Method for detecting hard exudation in fundus image based on multi-light-source color constancy model | |
CN108563979B (en) | Method for judging rice blast disease conditions based on aerial farmland images | |
CN107220649A (en) | A kind of plain color cloth defects detection and sorting technique | |
CN108830832A (en) | A kind of plastic barrel surface defects detection algorithm based on machine vision | |
CN115330795B (en) | Cloth burr defect detection method | |
CN110717922A (en) | Image definition evaluation method and device | |
CN103310439B (en) | The most steady extremal region detection method of a kind of image based on metric space | |
CN110889837A (en) | Cloth flaw detection method with flaw classification function | |
CN108710832B (en) | Reference-free iris image definition detection method | |
CN109871900A (en) | The recognition positioning method of apple under a kind of complex background based on image procossing | |
CN105719275A (en) | Parallel combination image defect segmentation method | |
CN112883824A (en) | Finger vein feature recognition device for intelligent blood sampling and recognition method thereof | |
CN105741244A (en) | Method for removing shadows and halos under weak light through indoor polling robot | |
CN115760696A (en) | Surface scratch detection method | |
CN113706521A (en) | Carbon fiber surface hairiness detection method and device, storage medium and electronic equipment | |
CN111681181A (en) | Method for evaluating fabric surface pilling degree | |
CN112991326B (en) | Cleaning quality evaluation method | |
CN114708165A (en) | Edge perception texture filtering method combining super pixels | |
CN110458042B (en) | Method for detecting number of probes in fluorescent CTC | |
Giusto et al. | A fast algorithm for video segmentation and object tracking | |
CN109145875A (en) | Black surround glasses minimizing technology and device in a kind of facial image |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |