CN107543828B - Workpiece surface defect detection method and system - Google Patents

Workpiece surface defect detection method and system Download PDF

Info

Publication number
CN107543828B
CN107543828B CN201710742244.0A CN201710742244A CN107543828B CN 107543828 B CN107543828 B CN 107543828B CN 201710742244 A CN201710742244 A CN 201710742244A CN 107543828 B CN107543828 B CN 107543828B
Authority
CN
China
Prior art keywords
image
detected
unit
defect
workpiece
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.)
Expired - Fee Related
Application number
CN201710742244.0A
Other languages
Chinese (zh)
Other versions
CN107543828A (en
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.)
Guangdong University of Technology
Original Assignee
Guangdong 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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201710742244.0A priority Critical patent/CN107543828B/en
Publication of CN107543828A publication Critical patent/CN107543828A/en
Application granted granted Critical
Publication of CN107543828B publication Critical patent/CN107543828B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a workpiece surface defect detection method and a system, wherein the method comprises the following steps: segmenting the workpiece image to be detected according to the texture period characteristics of the workpiece image to be detected to obtain a unit atlas to be detected; comparing each unit picture to be detected in the unit picture set to be detected with a corresponding preset standard unit picture respectively to obtain a defect unit picture set corresponding to the unit picture set to be detected; splicing the defect unit atlas to obtain a corresponding spliced image; and detecting the defects on the spliced image to obtain corresponding workpiece surface defect information. The workpiece surface defect detection method and the workpiece surface defect detection system reasonably divide the image of the workpiece to be detected, compare the unit image to be detected with the preset standard unit image to obtain the defect unit image, and then splice the defect unit image to finally obtain the defect information of the workpiece. Because the smaller unit diagrams are used for comparison, the processing speed of the industrial personal computer is increased, and the defect detection speed is improved.

Description

Workpiece surface defect detection method and system
Technical Field
The invention relates to the field of automatic appearance detection, in particular to a method and a system for detecting surface defects of a workpiece.
Background
In the field of automated visual inspection, a linear Charge Coupled Device (CCD) camera is generally used to photograph and scan a workpiece.
However, when the size of the workpiece is large, the resolution of the image shot by the linear array CCD camera is extremely high, the size can reach hundreds of megabytes, and at the moment, the data of the image is too large, so that the processing speed of the automatic detection of the industrial personal computer is reduced, and the speed requirement of the automatic appearance defect detection cannot be met.
Disclosure of Invention
In view of the above, the present invention provides a method and a system for detecting surface defects of a workpiece, which can improve the speed of detecting the surface defects of the workpiece. The specific scheme is as follows:
a method of detecting surface defects of a workpiece, comprising:
segmenting the workpiece image to be detected according to the texture period characteristics of the workpiece image to be detected to obtain a unit atlas to be detected;
comparing each unit picture to be detected in the unit picture set to be detected with a corresponding preset standard unit picture respectively to obtain a defect unit picture set corresponding to the unit picture set to be detected;
splicing the defect unit atlas to obtain a corresponding spliced image;
and detecting the defects on the spliced image to obtain corresponding workpiece surface defect information.
Preferably, the process of segmenting the workpiece image to be measured according to the texture cycle characteristics of the workpiece image to be measured to obtain the unit atlas to be measured includes:
acquiring unit characteristics of repeated texture units of the workpiece image to be detected according to the texture period characteristics;
and segmenting the workpiece image to be detected according to the unit characteristics and the template matching algorithm to obtain the unit image set to be detected.
Preferably, the process of obtaining the unit features of the repeated texture units of the workpiece image to be detected according to the texture cycle characteristics includes:
acquiring size information of the repeated texture unit;
adding identification bits on the repeated texture units to obtain the position information of the texture units;
correspondingly, the process of segmenting the workpiece image to be detected according to the unit feature and template matching algorithm to obtain the unit atlas to be detected comprises the following steps:
according to the template matching algorithm, carrying out position correction on the workpiece image to be detected to obtain a horizontal workpiece image to be detected;
and segmenting the horizontal workpiece image to be detected according to the size information and the position information to obtain the unit image set to be detected.
Preferably, the process of comparing any unit under test in the set of unit under test maps with the corresponding preset standard unit map includes:
respectively carrying out binarization processing on the unit graph to be detected and a corresponding preset standard unit graph to obtain a corresponding binarization result to be detected and a standard binarization result;
performing difference value operation by using the binarization result to be detected and the standard binarization result to obtain a difference value image;
and judging whether the pixel value in the difference image exceeds a preset pixel threshold value or not, if so, determining the part of the difference image, of which the pixel value exceeds the preset pixel threshold value, as a defect part, and obtaining a corresponding defect unit map.
Preferably, before the process of stitching the defect cell atlas, the method further includes:
and performing morphological open operation on the defect unit atlas.
Preferably, the step of detecting the defects on the stitched image to obtain the corresponding workpiece surface defect information includes:
identifying and classifying the defects on the spliced image to obtain corresponding defect category information;
and positioning the defects on the spliced image to obtain corresponding defect position information.
Preferably, the process of identifying and classifying the defects on the stitched image to obtain corresponding defect category information includes:
acquiring characteristic information of defects on the spliced image according to a Blob analysis and gray histogram method;
forming a feature vector by the feature information, and inputting the feature vector into a trained model to obtain the defect category information output by the trained model;
the model after training is a model obtained by training a model to be trained constructed based on a neural network by using a training sample in advance, wherein the training sample comprises historical defect characteristic information and corresponding defect category information.
Preferably, the process of performing location processing on the defect on the stitched image to obtain the corresponding defect location information includes:
and acquiring the centroid coordinate of the connected domain of the defect on the spliced image to obtain the position information of the defect.
Correspondingly, the invention also provides a workpiece surface defect detection system, which comprises:
the segmentation module is used for segmenting the workpiece image to be detected according to the texture period characteristics of the workpiece image to be detected to obtain a unit atlas to be detected;
the comparison module is used for respectively comparing each unit picture to be detected in the unit picture set to be detected with a corresponding preset standard unit picture to obtain a defect unit picture set corresponding to the unit picture set to be detected;
the splicing module is used for splicing the defect unit atlas to obtain a corresponding spliced image;
and the detection module is used for detecting the defects on the spliced image to obtain corresponding workpiece surface defect information.
Preferably, the detection module includes:
the identification and classification submodule is used for identifying and classifying the defects on the spliced image to obtain corresponding defect category information;
and the positioning processing submodule is used for positioning the defects on the spliced image to obtain corresponding defect position information.
According to the workpiece surface defect detection method and system disclosed by the invention, the workpiece image to be detected is reasonably divided according to the texture period characteristics to obtain the corresponding unit image to be detected, the unit image to be detected is compared with the preset standard unit image to obtain the defect unit image, and then the defect unit images are spliced to obtain the spliced image. At the moment, the defects on the spliced images are the defects on the images of the workpieces to be detected, the detection rate of the defects is ensured, and the unit images smaller than the images of the workpieces to be detected are used for comparison, so that the automatic processing speed of the industrial personal computer is increased, and the detection speed of the defects on the surfaces of the workpieces is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method for detecting surface defects of a workpiece according to an embodiment of the present invention;
FIG. 2 is a flowchart of segmenting an image of a workpiece to be measured according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating comparing any one of the set of unit under test diagrams with a corresponding predetermined standard unit diagram according to an embodiment of the present invention;
FIG. 4 is a flowchart of detecting defects on a stitched image to obtain corresponding workpiece surface defect information, as disclosed in an embodiment of the present invention;
FIG. 5 is a block diagram of a system for detecting surface defects of a workpiece according to an embodiment of the present invention;
fig. 6 is a structural diagram of a detection module disclosed in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method for detecting surface defects of a workpiece, and as shown in figure 1, figure 1 is a flow chart of the method for detecting the surface defects of the workpiece, which comprises the following steps:
step S11: segmenting the workpiece image to be detected according to the texture period characteristics of the workpiece image to be detected to obtain a unit atlas to be detected;
specifically, according to the texture period characteristic, obtaining unit characteristics of repeated texture units of the workpiece image to be detected; and segmenting the workpiece image to be detected according to the unit characteristics and the template matching algorithm to obtain the unit image set to be detected.
According to the texture period characteristic of the workpiece image to be detected, the workpiece image to be detected is reasonably segmented, and detection errors caused by improper segmentation can be avoided.
Step S12: comparing each unit picture to be detected in the unit picture set to be detected with a corresponding preset standard unit picture respectively to obtain a defect unit picture set corresponding to the unit picture set to be detected;
the preset standard unit graph is obtained by a non-defective workpiece image corresponding to the workpiece image to be detected according to the same segmentation mode, and the defect unit graph set obtained by comparison is a unit graph only comprising defective part pixels.
Step S13: splicing the defect unit atlas to obtain a corresponding spliced image;
specifically, image stitching is performed according to an image fusion technique. The splicing process of any two unit graphs comprises the following steps: finding out corresponding characteristic points according to gray scale and relaxation matching by using the HARRIS angular points; and determining a group of optimal feature matching according to information such as gradient directions of the feature points, obtaining an initial estimation value of a transformation matrix between the two images by using the group of optimal data, and obtaining a final accurate transformation relation according to a recursive algorithm.
Step S14: and detecting the defects on the spliced image to obtain corresponding workpiece surface defect information.
In the embodiment of the present invention, the defect in the stitched image obtained in step S13 is a defect in the workpiece image to be detected, and the stitched image only includes a defect, so that the defect is detected by using the stitched image, and is easier to process.
The workpiece surface defect detection method disclosed by the invention reasonably divides the workpiece image to be detected according to the texture period characteristics to obtain a corresponding unit image to be detected, compares the unit image to be detected with a preset standard unit image to obtain a defect unit image, and then splices the defect unit images to obtain a spliced image. At the moment, the defects on the spliced images are the defects on the images of the workpieces to be detected, the detection rate of the defects is ensured, and the unit images smaller than the images of the workpieces to be detected are used for comparison, so that the automatic processing speed of the industrial personal computer is increased, and the detection speed of the defects on the surfaces of the workpieces is improved.
It should be noted that, before the embodiment of the present invention segments the workpiece image to be detected, median filtering and edge profile extraction may be performed on the workpiece image to be detected, so that the subsequent image processing effect is better.
Specifically, the median filtering process includes calculating an average value g (i, j) of an M × N window neighborhood of each pixel point in the workpiece image region to be measured, and the specific calculation formula is as follows:
Figure BDA0001389315730000051
in the formula, f (i, j) represents the gray value of each point of the image of the workpiece to be measured, g (i, j) represents the gray value of each point of the filtered image, and A represents the image area;
the edge contour extraction process comprises the step of extracting edge contour information of the workpiece graph to be detected by using a Laplace operator.
Referring to fig. 2, a more specific description is made below of a process of segmenting a workpiece image to be measured according to a texture cycle characteristic of the workpiece image to be measured, where fig. 2 is a flowchart of segmenting the workpiece image to be measured disclosed in an embodiment of the present invention, and includes the following steps:
step S21: acquiring size information of the repeated texture unit;
the size information of the repeated texture unit can be obtained by a manufacturer or can be obtained by dividing according to the image of the workpiece to be measured.
Step S22: adding identification bits on the repeated texture units to obtain the position information of the texture units;
in the embodiment of the invention, because the workpiece image to be detected needs to be divided into smaller unit graphs to be detected, each unit graph needs to be identified and positioned, and identification positions can be added to the repeated cultural units to determine the positions of the repeated cultural units. If the identification position is added at the fixed position of the unit, the detection of the identification position can be more convenient, and the embodiment of the invention is not limited.
Specifically, the process of obtaining the position information of the texture unit may be implemented as follows:
assuming that the size of the repeating unit in the workpiece image to be detected is M x N, and assigning the pixel gray value of the repeating unit to the divided unit image to be detected, the corresponding relationship between the unit image to be detected and the workpiece image to be detected is as follows:
p(x,y)=q(x+tm,y+tn);
in the formula, p (x, y) represents a unit image to be measured, q (x, y) represents a workpiece image to be measured, and (tm, tn) represents the position of the unit image to be measured in the workpiece image to be measured.
Step S23: according to the template matching algorithm, carrying out position correction on the workpiece image to be detected to obtain a horizontal workpiece image to be detected;
specifically, a template matching algorithm based on square error matching is adopted to find the positions of two identification patterns in the workpiece image to be detected, and the specific calculation formula is as follows:
Figure BDA0001389315730000061
in the formula, T (x ', y') represents a defect-free workpiece image corresponding to a workpiece image to be measured, I (x, y) represents the workpiece image to be measured, H (x, y) represents a matching result, when H (x, y) is 0, it represents that matching is optimal, the larger the value of H (x, y), the lower the matching degree is, and then all H (x, y) is 0, threshold judgment is performed to find a region meeting the requirement, and of course, the threshold may be reasonably adjusted according to actual requirements.
And comparing the heights of the two identification patterns in the workpiece image to be detected, identifying the deflection of the workpiece image to be detected if the heights are different, and rotating the workpiece image to be detected according to the deflection angle to enable the workpiece image to be detected to be horizontal so as to obtain a horizontal workpiece image to be detected.
Step S24: and segmenting the horizontal workpiece image to be detected according to the size information and the position information to obtain the unit image set to be detected.
Referring to fig. 3, fig. 3 is a flowchart illustrating a process of comparing any unit under test in a set of unit under test diagrams with a corresponding preset standard unit diagram, where the process includes the following steps:
step S31: respectively carrying out binarization processing on the unit graph to be detected and a corresponding preset standard unit graph to obtain a corresponding binarization result to be detected and a standard binarization result;
step S32: performing difference value operation by using the binarization result to be detected and the standard binarization result to obtain a difference value image;
in the embodiment of the invention, the position and the shape of the defect part are displayed by a difference calculation method.
Step S33: and judging whether the pixel value in the difference image exceeds a preset pixel threshold value or not, if so, determining the part of the difference image, of which the pixel value exceeds the preset pixel threshold value, as a defect part, and obtaining a corresponding defect unit map.
The preset pixel threshold value can be set according to actual precision requirements, and when the pixel value in the difference image is lower than the preset pixel threshold value, the defect is a pseudo defect and can be ignored.
It should be noted that before the process of stitching the defect cell atlas, morphological opening operation may be performed on the defect cell atlas, so as to optimize the outline of the defect portion, so that the subsequent defect information detection effect is better, including: firstly, performing morphological corrosion and then performing morphological expansion; wherein:
the morphological erosion is to perform minimum value calculation operation on a local area in the image, and a vector subtraction method is adopted to extract the pixel minimum value covered by the kernel B, wherein the specific calculation formula is as follows:
Figure BDA0001389315730000071
in the formula, f (x, y) represents the original image a of the defect cell map, (x ', y') represents the coordinates of the kernel B, and g (x, y) represents the post-etching image.
The morphological dilation is opposite to the morphological erosion, in order to carry out maximum value calculation on a local area in an image, a vector addition method is adopted to carry out convolution operation on the image A and an inner core B, and the specific calculation formula is as follows:
Figure BDA0001389315730000081
in the formula, f (x, y) represents the original image a after morphological erosion, (x ', y') represents the coordinates of the kernel B, and g (x, y) represents the image after dilation.
The following is a detailed description of a process of detecting defects on the stitched image to obtain corresponding workpiece surface defect information, and referring to fig. 4, fig. 4 is a flowchart of detecting defects on the stitched image to obtain corresponding workpiece surface defect information disclosed in the embodiment of the present invention, and the flowchart includes the following steps:
step S41: identifying and classifying the defects on the spliced image to obtain corresponding defect category information;
specifically, acquiring characteristic information of defects on the spliced image according to a Blob analysis and gray histogram method;
the characteristic information of the defect specifically includes: the area, the perimeter, the circularity, the width, the gray level mean value and the gray level variance, wherein, the calculation formula of the area S is as follows:
Figure BDA0001389315730000082
in the formula, m and n represent that the image area has m rows and n columns, and f (i, j) represents the pixel value at the pixel point (i, j);
wherein, the calculation formula of the circularity C is as follows:
Figure BDA0001389315730000083
wherein L represents a region perimeter and S represents a region area;
the calculation formula of the gray level mean value M is as follows:
Figure BDA0001389315730000084
in the formula, level represents the total number of gray levels, diRepresenting the ith gray level, R (d)i) Representing the statistical gray scale in the histogram as diThe number of pixels of (a);
wherein the gray variance σ2The calculation formula of (2) is as follows:
Figure BDA0001389315730000091
in the formula, f (x, y) represents the pixel value at the pixel (x, y), n represents the number of pixels, and M represents the gray level mean value.
Forming a feature vector by the feature information, and inputting the feature vector into a trained model to obtain the defect category information output by the trained model; the model after training is a model obtained by training a model to be trained constructed based on a neural network by using a training sample in advance, wherein the training sample comprises historical defect characteristic information and corresponding defect category information.
Specifically, the defect features input by the trained model comprise area, perimeter, circularity, width, gray mean and gray variance, the number of the input layer and the number of the output layer are respectively determined to be m and n according to the fact that the input layer of the neural network is equal to the selected main feature number and the output layer is equal to the number of the output defect types, and the number of nodes of the hidden layer is determined by adopting a formula, wherein the formula specifically comprises the following steps:
Figure BDA0001389315730000092
in the formula, hide represents the number of hidden layer nodes, and alpha is an integer between 1 and 10.
The excitation function calculation formula of the trained model is as follows:
Figure BDA0001389315730000093
where y represents the input, the domain is [ - ∞, + ∞ ], σ (y) represents the output, and the range is [0,1 ].
Step S42: and positioning the defects on the spliced image to obtain corresponding defect position information.
And acquiring the centroid coordinate of the connected domain of the defect on the spliced image to obtain the position information of the defect.
More specifically, the formula for calculating the centroid of the region is:
Figure BDA0001389315730000094
in the above formula, m and n represent that the image region has m rows and n columns, and xi、yiRespectively representing the coordinates of pixel points in the defect area.
Correspondingly, an embodiment of the present invention further provides a workpiece surface defect detecting system, as shown in fig. 5, fig. 5 is a structural diagram of a workpiece surface defect detecting system disclosed in an embodiment of the present invention, and the system includes:
the segmentation module 51 is configured to segment the workpiece image to be detected according to the texture cycle characteristics of the workpiece image to be detected, so as to obtain an atlas of units to be detected;
a comparison module 52, configured to compare each unit to be tested in the unit to be tested map set with a corresponding preset standard unit map, respectively, to obtain a defect unit map set corresponding to the unit to be tested map set;
the splicing module 53 is configured to splice the defect unit atlas to obtain a corresponding spliced image;
and the detection module 54 is configured to detect defects on the stitched image to obtain corresponding workpiece surface defect information.
Specifically, the above-mentioned division module 51 includes a size acquisition unit, a position acquisition unit, a correction unit, and a division unit; wherein:
a size obtaining unit for obtaining size information of the repeated texture unit;
a position obtaining unit, configured to add an identification bit to the repeated texture unit to obtain position information of the texture unit;
the correcting unit is used for correcting the position of the workpiece image to be detected according to the template matching algorithm to obtain a horizontal workpiece image to be detected;
and the segmentation unit is used for segmenting the horizontal workpiece image to be detected according to the size information and the position information to obtain the unit atlas to be detected.
Specifically, the comparing module 52 includes a binarization unit, a difference operation unit, and a defect determining unit; wherein:
the binarization unit is used for carrying out binarization processing on each unit graph to be tested and a corresponding preset standard unit graph to obtain a corresponding binarization result to be tested and a standard binarization result;
a difference value operation unit, configured to perform difference value operation using the binarization result to be detected and the standard binarization result to obtain a difference value image;
and the defect determining unit is used for judging whether the pixel value in the difference image exceeds a preset pixel threshold value or not, if so, determining the part of the difference image, of which the pixel value exceeds the preset pixel threshold value, as a defect part, and obtaining a corresponding defect unit map.
Specifically, referring to fig. 6, fig. 6 is a structural diagram of a detection module disclosed in an embodiment of the present invention, where the detection module 54 includes:
the identification and classification submodule 61 is used for identifying and classifying the defects on the spliced image to obtain corresponding defect category information;
and the positioning processing submodule 62 is configured to perform positioning processing on the defects on the stitched image to obtain corresponding defect position information.
More specifically, the recognition and classification submodule 61 includes a feature obtaining unit and a defect classification unit; wherein:
the characteristic obtaining unit is used for obtaining the characteristic information of the defects on the spliced image according to the Blob analysis and gray histogram method;
and the defect classification unit is used for forming a feature vector from the feature information and inputting the feature vector into the trained model to obtain the defect classification information output by the trained model.
More specifically, the positioning processing sub-module 62 includes a coordinate obtaining unit, configured to obtain a centroid coordinate of a connected domain of the defect on the stitched image, so as to obtain the defect position information.
For more specific working processes of each module, sub-module and unit in the workpiece surface defect detection system, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
According to the workpiece surface defect detection method and system disclosed by the embodiment of the invention, the workpiece image to be detected is reasonably divided according to the texture period characteristics to obtain the corresponding unit image to be detected, the unit image to be detected is compared with the preset standard unit image to obtain the defect unit image, and then the defect unit images are spliced to obtain the spliced image. At the moment, the defects on the spliced images are the defects on the images of the workpieces to be detected, the detection rate of the defects is ensured, and the unit images smaller than the images of the workpieces to be detected are used for comparison, so that the automatic processing speed of the industrial personal computer is increased, and the detection speed of the defects on the surfaces of the workpieces is improved.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and the system for detecting the surface defects of the workpiece provided by the invention are described in detail, a specific example is applied in the method to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for detecting surface defects of a workpiece, comprising:
segmenting the workpiece image to be detected according to the texture period characteristics of the workpiece image to be detected to obtain a unit atlas to be detected;
comparing each unit picture to be detected in the unit picture set to be detected with a corresponding preset standard unit picture respectively to obtain a defect unit picture set corresponding to the unit picture set to be detected;
splicing the defect unit atlas to obtain a corresponding spliced image; wherein the stitched image only contains defects;
and detecting the defects on the spliced image to obtain corresponding workpiece surface defect information.
2. The method according to claim 1, wherein the step of segmenting the workpiece image to be measured according to the texture cycle characteristics of the workpiece image to be measured to obtain the atlas of units to be measured comprises:
acquiring unit characteristics of repeated texture units of the workpiece image to be detected according to the texture period characteristics;
and segmenting the workpiece image to be detected according to the unit characteristics and the template matching algorithm to obtain the unit image set to be detected.
3. The method of claim 2, wherein the step of obtaining the unit features of the repeated texture units of the workpiece image to be tested according to the texture cycle characteristics comprises:
acquiring size information of the repeated texture unit;
adding identification bits on the repeated texture units to obtain the position information of the texture units;
correspondingly, the process of segmenting the workpiece image to be detected according to the unit feature and template matching algorithm to obtain the unit atlas to be detected comprises the following steps:
according to the template matching algorithm, carrying out position correction on the workpiece image to be detected to obtain a horizontal workpiece image to be detected;
and segmenting the horizontal workpiece image to be detected according to the size information and the position information to obtain the unit image set to be detected.
4. The method of claim 1, wherein the step of comparing any one of the set of charts with a corresponding predetermined standard chart comprises:
respectively carrying out binarization processing on the unit graph to be detected and a corresponding preset standard unit graph to obtain a corresponding binarization result to be detected and a standard binarization result;
performing difference value operation by using the binarization result to be detected and the standard binarization result to obtain a difference value image;
and judging whether the pixel value in the difference image exceeds a preset pixel threshold value or not, if so, determining the part of the difference image, of which the pixel value exceeds the preset pixel threshold value, as a defect part, and obtaining a corresponding defect unit map.
5. The method of claim 1, wherein the stitching the defective cell atlas further comprises:
and performing morphological open operation on the defect unit atlas.
6. The method according to any one of claims 1 to 5, wherein the step of detecting the defects on the stitched image to obtain the corresponding workpiece surface defect information comprises:
identifying and classifying the defects on the spliced image to obtain corresponding defect category information;
and positioning the defects on the spliced image to obtain corresponding defect position information.
7. The method according to claim 6, wherein the step of identifying and classifying the defects on the stitched image to obtain corresponding defect type information comprises:
acquiring characteristic information of defects on the spliced image according to a Blob analysis and gray histogram method;
forming a feature vector by the feature information, and inputting the feature vector into a trained model to obtain the defect category information output by the trained model;
the model after training is a model obtained by training a model to be trained constructed based on a neural network by using a training sample in advance, wherein the training sample comprises historical defect characteristic information and corresponding defect category information.
8. The method according to claim 6, wherein the step of locating the defect on the stitched image to obtain the corresponding defect location information comprises:
and acquiring the centroid coordinate of the connected domain of the defect on the spliced image to obtain the position information of the defect.
9. A workpiece surface defect detection system, comprising:
the segmentation module is used for segmenting the workpiece image to be detected according to the texture period characteristics of the workpiece image to be detected to obtain a unit atlas to be detected;
the comparison module is used for respectively comparing each unit picture to be detected in the unit picture set to be detected with a corresponding preset standard unit picture to obtain a defect unit picture set corresponding to the unit picture set to be detected;
the splicing module is used for splicing the defect unit atlas to obtain a corresponding spliced image; wherein the stitched image only contains defects;
and the detection module is used for detecting the defects on the spliced image to obtain corresponding workpiece surface defect information.
10. The system of claim 9, wherein the detection module comprises:
the identification and classification submodule is used for identifying and classifying the defects on the spliced image to obtain corresponding defect category information;
and the positioning processing submodule is used for positioning the defects on the spliced image to obtain corresponding defect position information.
CN201710742244.0A 2017-08-25 2017-08-25 Workpiece surface defect detection method and system Expired - Fee Related CN107543828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710742244.0A CN107543828B (en) 2017-08-25 2017-08-25 Workpiece surface defect detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710742244.0A CN107543828B (en) 2017-08-25 2017-08-25 Workpiece surface defect detection method and system

Publications (2)

Publication Number Publication Date
CN107543828A CN107543828A (en) 2018-01-05
CN107543828B true CN107543828B (en) 2020-09-11

Family

ID=60957633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710742244.0A Expired - Fee Related CN107543828B (en) 2017-08-25 2017-08-25 Workpiece surface defect detection method and system

Country Status (1)

Country Link
CN (1) CN107543828B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10832092B2 (en) * 2018-02-07 2020-11-10 Applied Materials Israel Ltd. Method of generating a training set usable for examination of a semiconductor specimen and system thereof
CN108416294B (en) * 2018-03-08 2022-04-01 上海天数智芯半导体有限公司 Fan blade fault intelligent identification method based on deep learning
KR20200123858A (en) * 2018-03-21 2020-10-30 케이엘에이 코포레이션 Machine Learning Model Training Using Composite Images
CN108776146B (en) * 2018-07-13 2021-02-26 珠海格力智能装备有限公司 Method and device for detecting silk-screen lines
CN108896567B (en) * 2018-08-06 2024-06-04 慧泉智能科技(苏州)有限公司 Method for detecting crush defect of surface of button cell
CN109472769A (en) * 2018-09-26 2019-03-15 成都数之联科技有限公司 A kind of bad image defect detection method and system
CN109374630A (en) * 2018-09-28 2019-02-22 新兴铸管股份有限公司 Ductile iron pipe casting flaw intelligent detecting method
CN109839385B (en) * 2019-03-04 2021-11-16 佛山市南海区广工大数控装备协同创新研究院 Self-adaptive PCB defect visual positioning detection and classification system
CN111972700B (en) * 2019-05-22 2023-04-25 上海烟草集团有限责任公司 Cigarette appearance detection method and device, equipment, system and medium thereof
CN112213314B (en) * 2019-07-12 2022-11-29 长鑫存储技术有限公司 Detection method and detection system for wafer side surface defects
CN110501344A (en) * 2019-08-30 2019-11-26 无锡先导智能装备股份有限公司 Battery material online test method
CN111127571B (en) * 2019-12-03 2023-12-29 歌尔股份有限公司 Small sample defect classification method and device
CN111060519A (en) * 2019-12-30 2020-04-24 研祥智能科技股份有限公司 LED support defect judgment method and system
CN111815621A (en) * 2020-07-27 2020-10-23 北京联想软件有限公司 Data processing method and device and electronic equipment
CN111739020B (en) * 2020-07-31 2020-12-01 成都数之联科技有限公司 Automatic labeling method, device, equipment and medium for periodic texture background defect label
CN112129700B (en) * 2020-09-01 2024-03-01 真贺科技(江苏)有限公司 Image detection method and device for flexible circuit board
CN112834518A (en) * 2021-01-06 2021-05-25 优刻得科技股份有限公司 Particle defect detection method, system, device and medium
CN112330678B (en) * 2021-01-07 2021-04-02 中科慧远视觉技术(北京)有限公司 Product edge defect detection method
CN112926437B (en) * 2021-02-22 2024-06-11 深圳中科飞测科技股份有限公司 Detection method and device, detection equipment and storage medium
CN112884743B (en) * 2021-02-22 2024-03-05 深圳中科飞测科技股份有限公司 Detection method and device, detection equipment and storage medium
CN112950563A (en) * 2021-02-22 2021-06-11 深圳中科飞测科技股份有限公司 Detection method and device, detection equipment and storage medium
CN114113112B (en) * 2021-11-29 2023-08-18 哈尔滨工业大学 Surface micro defect positioning and identifying method based on three-light-source microscopic system
CN115661026A (en) * 2022-09-07 2023-01-31 天津大学 Cylindrical mirror defect detection method and device
CN115952892B (en) * 2022-12-13 2023-07-18 广东工业大学 Branch iteration method and system for layout of plate with defects
CN117994257A (en) * 2024-04-07 2024-05-07 中国机械总院集团江苏分院有限公司 Fabric flaw analysis and detection system and analysis and detection method based on deep learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833762A (en) * 2010-04-20 2010-09-15 南京航空航天大学 Different-source image matching method based on thick edges among objects and fit
CN102385751A (en) * 2011-07-19 2012-03-21 中国科学院自动化研究所 Liver tumor region segmentation method based on watershed transform and classification through support vector machine
CN103530882A (en) * 2013-10-17 2014-01-22 南京大学 Improved image segmentation method based on picture and color texture features
CN106198569A (en) * 2016-08-03 2016-12-07 广东工业大学 A kind of LTPS/IGZO glass substrate broken hole method for quick
CN106855520A (en) * 2017-02-10 2017-06-16 南京航空航天大学 A kind of workpiece, defect detection method based on machine vision

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2929846A1 (en) * 1979-07-23 1981-03-12 Siemens AG, 1000 Berlin und 8000 München OPTO-ELECTRONIC TESTING SYSTEM FOR AUTOMATIC CHECKING OF CHARACTERISTICS, THEIR INTERMEDIATE PRODUCTS AND PRINTING TOOLS
EP1096249B1 (en) * 1999-10-26 2013-05-01 Hitachi-GE Nuclear Energy, Ltd. Nondestructive flaw inspection method and apparatus
CN101276472B (en) * 2008-04-08 2010-12-08 华南师范大学 Method and system for preprocessing sequence chart
CN103286081B (en) * 2013-05-07 2015-04-22 浙江工业大学 Monocular multi-perspective machine vision-based online automatic sorting device for steel ball surface defect
CN103674965B (en) * 2013-12-06 2017-06-06 大族激光科技产业集团股份有限公司 A kind of classification of wafer open defect and detection method
CN105181706B (en) * 2015-09-23 2018-02-13 电子科技大学 A kind of Chip-R bad defect inspection method on substrate
CN105389812B (en) * 2015-10-31 2018-09-11 重庆信息通信研究院 Board information terminal function automatic detection method based on computer vision
CN105445286A (en) * 2015-11-10 2016-03-30 沈阳建筑大学 Method and device for detecting quality defects of mark on glass fuse tube products
CN106127261B (en) * 2016-07-01 2019-08-30 深圳元启智能技术有限公司 A kind of fast multiresolution gray level image template matching method
CN106338520A (en) * 2016-09-18 2017-01-18 南京林业大学 Recognition method of surface defects of multilayer solid wood composite floor with surface board being jointed board

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833762A (en) * 2010-04-20 2010-09-15 南京航空航天大学 Different-source image matching method based on thick edges among objects and fit
CN102385751A (en) * 2011-07-19 2012-03-21 中国科学院自动化研究所 Liver tumor region segmentation method based on watershed transform and classification through support vector machine
CN103530882A (en) * 2013-10-17 2014-01-22 南京大学 Improved image segmentation method based on picture and color texture features
CN106198569A (en) * 2016-08-03 2016-12-07 广东工业大学 A kind of LTPS/IGZO glass substrate broken hole method for quick
CN106855520A (en) * 2017-02-10 2017-06-16 南京航空航天大学 A kind of workpiece, defect detection method based on machine vision

Also Published As

Publication number Publication date
CN107543828A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107543828B (en) Workpiece surface defect detection method and system
CN106803244B (en) Defect identification method and system
US8331650B2 (en) Methods, systems and apparatus for defect detection
CN109801267B (en) Inspection target defect detection method based on feature point detection and SVM classifier
CN113688807A (en) Self-adaptive defect detection method, device, recognition system and storage medium
CN113850749B (en) Method for training defect detector
CN108520514B (en) Consistency detection method for electronic elements of printed circuit board based on computer vision
CN110443791B (en) Workpiece detection method and device based on deep learning network
WO2024002187A1 (en) Defect detection method, defect detection device, and storage medium
CN115205223B (en) Visual inspection method and device for transparent object, computer equipment and medium
CN111612747B (en) Rapid detection method and detection system for product surface cracks
CN108665458A (en) Transparent body surface defect is extracted and recognition methods
CN113393426B (en) Steel rolling plate surface defect detection method
CN111127417B (en) Printing defect detection method based on SIFT feature matching and SSD algorithm improvement
CN111539927B (en) Detection method of automobile plastic assembly fastening buckle missing detection device
CN111489337A (en) Method and system for removing false defects through automatic optical detection
CN115937203A (en) Visual detection method, device, equipment and medium based on template matching
CN109584206B (en) Method for synthesizing training sample of neural network in part surface flaw detection
CN111462056A (en) Workpiece surface defect detection method, device, equipment and storage medium
CN113989196A (en) Vision-based earphone silica gel gasket appearance defect detection method
CN113822836B (en) Method for marking an image
CN117830623A (en) Image positioning area selection method, device, equipment and storage medium
CN115330705A (en) Skin paint surface defect detection method based on adaptive weighting template NCC
CN109215068B (en) Image magnification measuring method and device
CN110874837A (en) Automatic defect detection method based on local feature distribution

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200911

Termination date: 20210825