CN111539939A - Defect detection method and device based on machine vision - Google Patents
Defect detection method and device based on machine vision Download PDFInfo
- Publication number
- CN111539939A CN111539939A CN202010343094.8A CN202010343094A CN111539939A CN 111539939 A CN111539939 A CN 111539939A CN 202010343094 A CN202010343094 A CN 202010343094A CN 111539939 A CN111539939 A CN 111539939A
- Authority
- CN
- China
- Prior art keywords
- image
- detected
- defective
- defect detection
- machine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000007547 defect Effects 0.000 title claims abstract description 92
- 238000001514 detection method Methods 0.000 title claims abstract description 55
- 239000013598 vector Substances 0.000 claims abstract description 39
- 238000012545 processing Methods 0.000 claims abstract description 29
- 230000011218 segmentation Effects 0.000 claims abstract description 21
- 238000012706 support-vector machine Methods 0.000 claims abstract description 19
- 239000011159 matrix material Substances 0.000 claims abstract description 16
- 230000009466 transformation Effects 0.000 claims abstract description 12
- 230000002950 deficient Effects 0.000 claims description 71
- 238000000034 method Methods 0.000 claims description 18
- 238000009826 distribution Methods 0.000 claims description 13
- 238000003860 storage Methods 0.000 claims description 11
- 238000012549 training Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 5
- 238000002591 computed tomography Methods 0.000 description 88
- 230000006870 function Effects 0.000 description 12
- 238000004519 manufacturing process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000002708 enhancing effect Effects 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000004438 eyesight Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000005481 NMR spectroscopy Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001066 destructive effect Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 229940079593 drug Drugs 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 230000002526 effect on cardiovascular system Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000009659 non-destructive testing Methods 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000002604 ultrasonography Methods 0.000 description 1
- 238000011179 visual inspection Methods 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
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N23/00—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
- G01N23/02—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
- G01N23/04—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and forming images of the material
- G01N23/046—Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and forming images of the material using tomography, e.g. computed tomography [CT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- 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/10—Image acquisition modality
- G06T2207/10072—Tomographic images
- G06T2207/10081—Computed x-ray tomography [CT]
-
- 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/20081—Training; Learning
Abstract
In order to solve the problem that the accuracy of the current defect detection needs to be further improved, the invention provides a defect detection method based on machine vision, which comprises the following steps: acquiring a to-be-detected CT image of at least one workpiece; carrying out feature enhancement on the CT image to be detected through a white Top-Hat transformation algorithm; performing edge segmentation processing and binarization on the CT image to be detected after the characteristics are enhanced based on a Sobel operator; extracting a feature vector of the binarized CT image to be detected by using a gray level co-occurrence matrix in the texture features; and the support vector machine judges whether the CT image to be detected has defects or not according to the characteristic vector of the CT image to be detected. The defect detection method and device improve the accuracy of defect detection.
Description
Technical Field
The invention relates to the field of defect detection, in particular to a defect detection method and device based on machine vision.
Background
Traditionally, enterprises usually rely on manual detection in the defect detection link, and the operation mode is high in working intensity and serious in damage to human eyesight. The requirement of production efficiency cannot be met by manual visual inspection, and the manual detection method also has the problems of low detection precision, strong subjectivity, missed detection due to wrong picking and the like. Although some automatic workpiece defect detection methods exist at present, the accuracy of defect detection needs to be further improved.
Disclosure of Invention
In order to solve the problem that the accuracy of the current defect detection needs to be further improved, the embodiment of the application provides a method and a device for detecting the defects based on machine vision, and the accuracy of the defect detection is improved.
In a first aspect, an embodiment of the present application provides a defect detection method based on machine vision, including the steps of: acquiring a to-be-detected CT image of at least one workpiece;
carrying out feature enhancement on the CT image to be detected through a white Top-Hat transformation algorithm;
performing edge segmentation processing and binarization on the CT image to be detected after the features are enhanced based on a Sobel operator;
extracting a feature vector of the to-be-detected CT image after binarization by using a gray co-occurrence matrix in the texture features;
and the support vector machine judges whether the CT image to be detected has defects or not according to the characteristic vector of the CT image to be detected.
Wherein, still include: acquiring a defective CT image;
reading the value of the defective CT image pixel point; performing binarization processing on the defective CT image based on threshold segmentation;
filling the defective hole area in the defective CT image to obtain a non-defective CT image; extracting the feature vector of the non-defective CT image to obtain a non-defective sample set;
extracting the feature vector of the defective CT image to obtain a defective sample set;
training the support vector machine using the non-defective sample set and the defective sample set.
Wherein, still include: and when the CT image to be detected has defects, determining the defect severity level according to the proportion of the pixel points of the defect connected region in the whole CT image to be detected.
Wherein, the extracted feature vector of the to-be-detected CT image comprises: entropy and autocorrelation of gray level co-occurrence matrix of gray level distribution, gradient distribution, texture feature analysis.
The kernel function of the support vector machine is a Radial Basis Function (RBF).
In a second aspect, an embodiment of the present application provides a defect detecting apparatus based on machine vision, including: the acquisition unit is used for acquiring a to-be-detected CT image of at least one workpiece;
the characteristic enhancement unit is used for carrying out characteristic enhancement on the CT image to be detected through a white Top-Hat transformation algorithm;
the edge segmentation unit is used for carrying out edge segmentation processing and binarization on the CT image to be detected after the features are enhanced based on a Sobel operator;
the characteristic extraction unit is used for extracting a feature vector of the to-be-detected CT image after binarization by using a gray level co-occurrence matrix in the texture characteristics;
and the judging unit is used for judging whether the CT image to be detected has defects or not by the support vector machine according to the characteristic vector of the CT image to be detected.
Wherein, still include training unit, be used for: acquiring a defective CT image;
reading the value of the defective CT image pixel point; performing binarization processing on the defective CT image based on threshold segmentation;
filling the defective hole area in the defective CT image to obtain a non-defective CT image; extracting the feature vector of the non-defective CT image to obtain a non-defective sample set;
extracting the feature vector of the defective CT image to obtain a defective sample set;
training the support vector machine using the non-defective sample set and the defective sample set.
Wherein the discrimination unit is further configured to: and when the CT image to be detected has defects, determining the defect severity level according to the proportion of the pixel points of the defect connected region in the whole CT image to be detected.
In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is used for implementing the steps of any one of the above methods when executed by a processor.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a storage unit, a processing unit, and a computer program stored on the storage unit and executable on the processing unit, where the processing unit implements the steps of any one of the methods when executing the program.
The defect detection method and device based on machine vision in the embodiment of the application have the following beneficial effects:
the embodiment of the application provides a defect detection method based on machine vision, which is used for carrying out feature enhancement, edge segmentation and feature extraction on a CT image to be detected, judging whether defects exist according to a feature vector of the CT image, extracting a peak value, namely a bright feature, smaller than the size of a structural element in the image through white Top-Hat transformation, effectively enhancing the contrast between the background and a target, and improving the accuracy of defect detection.
Drawings
FIG. 1 is a schematic flowchart illustrating a defect detection method based on machine vision according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating a process of obtaining a training sample set according to an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a defect detection method based on machine vision according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a defect detection apparatus based on machine vision according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the following figures and examples.
In the following description, the terms "first" and "second" are used for descriptive purposes only and are not intended to indicate or imply relative importance. The following description provides embodiments of the invention, which may be combined or substituted for various embodiments, and this application is therefore intended to cover all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then this application should also be considered to include an embodiment that includes one or more of all other possible combinations of A, B, C, D, even though this embodiment may not be explicitly recited in text below.
The following description provides examples, and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. For example, the described methods may be performed in an order different than the order described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
The embodiment of the application provides a defect detection method based on machine vision, which comprises the following steps: acquiring a to-be-detected CT image of at least one workpiece; carrying out feature enhancement on the CT image to be detected through a white Top-Hat transformation algorithm; performing edge segmentation processing and binarization on the CT image to be detected after the characteristics are enhanced based on a Sobel operator; extracting a feature vector of the binarized CT image to be detected by using a gray level co-occurrence matrix in the texture features; and the support vector machine judges whether the CT image to be detected has defects or not according to the characteristic vector of the CT image to be detected.
The embodiment of the application provides a defect detection method based on machine vision, which is used for carrying out feature enhancement, edge segmentation and feature extraction on a CT image to be detected, judging whether defects exist according to a feature vector of the CT image, extracting a peak value, namely a bright feature, smaller than the size of a structural element in the image through white Top-Hat transformation, effectively enhancing the contrast between the background and a target, and improving the accuracy of defect detection.
Fig. 1 is a schematic flowchart of a defect detection method based on machine vision according to an embodiment of the present disclosure, and as shown in fig. 1, the defect detection method based on machine vision according to the embodiment of the present disclosure includes step S101 of acquiring a to-be-detected CT image of at least one workpiece; step S103, performing feature enhancement on the CT image to be detected through a white Top-Hat transformation algorithm; step S105, performing edge segmentation processing and binarization on the CT image to be detected after the features are strengthened based on a Sobel operator; s107, extracting a feature vector of the binarized CT image to be detected by using a gray level co-occurrence matrix in the texture features; and step S109, the support vector machine judges whether the CT image to be detected has defects according to the characteristic vector of the CT image to be detected. Each step is described below.
Step S101, acquiring a CT image to be detected of at least one workpiece.
CT (Computed Tomography) is a radiation detection technique, a tomographic imaging method based on the attenuation mechanism of X-rays in a material. The CT technique, which visually shows the structure and shape of the inside of an object to be examined by the form of an image, is commonly used for diagnosis of medical diseases and non-destructive examination of industrial precision parts. The method provided by the application is designed based on the nondestructive testing characteristics of the CT image. In some embodiments, the CT images are, for example, in DICOM (digital imaging and Communications in Medicine) format, which is an international standard for medical images and related information (ISO 12052), which is widely used in radiology, cardiovascular imaging, and radiodiagnostic devices (X-ray, CT, nuclear magnetic resonance, ultrasound, etc.).
Machine vision is very active in various application fields of industrial on-line detection, and is increasingly replacing people to complete many jobs, which undoubtedly increases the level of production automation and the level of intelligence of detection systems to a great extent. The machine vision detection system adopts a CCD camera to convert a detected target workpiece into an image signal, and transmits the image signal to a special image processing system for processing. The machine vision detection system comprises an illuminating device, a lens, a high-speed camera, an image acquisition card and a vision processor.
And S103, performing feature enhancement on the CT image to be detected through a white Top-Hat transformation algorithm.
The Top-Hat transform is the difference between the original image and the image after the on or off operation, respectively. The image obtained by subtracting the opening operation from the original image is white Top-Hat transformation, and the transformation can extract the peak value, namely the bright characteristic, smaller than the size of the structural element in the image, and effectively enhance the contrast between the background and the target brightness and darkness.
Let f (x, y) and b (i, j) be two discrete functions in a two-dimensional discrete space, where f (x, y) is the gray value of the pixel where the image is located at (x, y), and b (i, j) is a structural element with a certain shape and size.
And S105, performing edge segmentation processing and binarization on the CT image to be detected after the features are strengthened based on a Sobel operator.
In the application, edge segmentation based on a Sobel operator is adopted, the Sobel operator has good single-pixel edge characteristics, the general background of the binarized image is set to be '0', and the target is set to be '1'. The processed image has small calculated amount and pure characteristics, and is suitable for subsequent single mode identification.
And S107, extracting the feature vector of the binarized CT image to be detected by using the gray co-occurrence matrix in the texture features.
Since the texture is formed by the repeated appearance of the gray scale distribution at a spatial position, a certain gray scale relationship, i.e., a spatial correlation characteristic of the gray scale in the image, exists between two pixels spaced apart from each other in the image space. The gray level co-occurrence matrix is a method for describing texture by studying the spatial correlation characteristics of gray levels.
The gray level co-occurrence matrix is a matrix function of pixel distance and angle, and reflects the comprehensive information of the image on the direction, interval, change amplitude and speed by calculating the correlation between two points of gray levels in a certain distance and a certain direction in the image.
In some embodiments, the extracted feature vectors of the CT images to be detected include: entropy and autocorrelation of gray level co-occurrence matrix of gray level distribution, gradient distribution, texture feature analysis. The gray distribution can represent the distribution of the background and the target, the gradient feature can represent the distribution of the target edge and the defect edge, the entropy in the texture feature can represent the complexity of the image texture, and the self-correlation can represent the uniformity of the image texture.
Entropy is a measure of randomness of the amount of information an image contains. When all values in the co-occurrence matrix are equal or the pixel value shows the maximum randomness, the entropy is the maximum; therefore, the entropy value indicates the complexity of the image gray level distribution, and the larger the entropy value, the more complex the image. The correlation, also called homogeneity, is used to measure how similar the grey levels of an image are in the row or column direction, so the magnitude of the value reflects the local grey level correlation, the larger the value, the larger the correlation. The four kinds of feature vectors of entropy and autocorrelation of gray level co-occurrence matrixes of gray level distribution, gradient distribution and texture feature analysis can be used as effective input of a support vector machine. The support vector machine designs parameters according to practical application problems.
And step S109, the support vector machine judges whether the CT image to be detected has defects according to the characteristic vector of the CT image to be detected.
Fig. 3 is another schematic flow chart of the defect detection method based on machine vision according to the embodiment of the present application, as shown in fig. 3, in some embodiments, the present application further includes: and step S111, if the CT image to be detected has no defect, the workpiece has no defect. And step S113, if the CT image to be detected has defects, the workpiece has defects. And S115, when the CT image to be detected has defects, determining the serious level of the defects according to the proportion of the pixel points of the defect connected region in the whole CT image to be detected, wherein the higher the proportion is, the more serious the defects are.
Fig. 2 is a schematic flowchart of a process of obtaining a training sample set according to an embodiment of the present application, and as shown in fig. 2, the process of obtaining the training sample set includes step S201, obtaining a defective CT image; step S203, reading the values of defective CT image pixel points, and unifying the values into an 8-bit bitmap; performing binarization processing on the defective CT image based on threshold segmentation; step S205, filling the defect hole area in the defective CT image to obtain a non-defective CT image; extracting the feature vector of the non-defective CT image based on the feature operator to obtain a non-defective sample set comprising the feature vector and the category corresponding to the CT image; step S207, extracting the feature vectors of the defective CT images processed in step 203 based on the feature operators to obtain a defective sample set, including the corresponding feature vectors and categories of the CT images; step S209, train the support vector machine using the non-defective sample set and the defective sample set.
The application provides a symmetry design of a defect sample set, for the defect sample set, a corresponding non-defect sample set is output after a normal pixel point is used for filling a defect area, so that the influence of the defect on a characteristic vector can be effectively highlighted, and the defect identification accuracy is improved.
The method is based on a white Top-Hat transform algorithm, and is based on the symmetry design of the defect sample set and the like to process effective reinforced characteristics, so that the accuracy of SVM pattern recognition defect detection is improved.
In some embodiments, the kernel function of the support vector machine is a radial basis function, RBF, which is some sort of radially symmetric scalar function, typically defined as a monotonic function of the radial distance (typically euclidean distance) between the sample and the data center (since the distance is radially uniform).
The defect detection method based on machine vision can replace manual visual detection to realize automatic defect detection and analysis; secondly, images can be processed in batches, so that the detection efficiency is improved, and the requirement of high-speed production efficiency of enterprises is met; and finally, the algorithm has high detection precision and meets the high-precision production requirement of enterprises.
Fig. 4 is a schematic structural diagram of a defect detecting apparatus based on machine vision according to an embodiment of the present application, and as shown in fig. 4, the defect detecting apparatus based on machine vision according to the present application includes: an acquiring unit 301, configured to acquire a to-be-detected CT image of at least one workpiece; a feature enhancing unit 302, configured to perform feature enhancement on the CT image to be detected through a white Top-Hat transform algorithm; an edge segmentation unit 303, configured to perform edge segmentation processing and binarization on the feature-enhanced CT image to be detected based on a Sobel operator; the feature extraction unit 304 is configured to extract a feature vector of the binarized CT image to be detected by using the gray level co-occurrence matrix in the texture features; the determining unit 305 is configured to determine whether there is a defect in the CT image to be detected according to the feature vector of the CT image to be detected.
Wherein, this application defect detection device based on machine vision still includes training unit for: acquiring a defective CT image; reading the value of the defective CT image pixel point; performing binarization processing on the defective CT image based on threshold segmentation; filling a defective hole area in the defective CT image to obtain a non-defective CT image; extracting the feature vector of the non-defective CT image to obtain a non-defective sample set; extracting the feature vector of the defective CT image to obtain a defective sample set; the support vector machine is trained using the non-defective sample set and the defective sample set.
Wherein, the discriminating unit 305 is further configured to: and when the CT image to be detected has defects, determining the defect severity level according to the proportion of the pixel points of the defect connected region in the whole CT image to be detected.
The application provides a defect detection device based on machine vision, machine vision and artificial intelligence fully combine, carry out defect automatic analysis based on the image to the measured object and detect, replace artifical visual detection, effectively improve production efficiency and detection precision, can satisfy the high-speed high accuracy production requirement of domestic enterprise, have higher practical value.
In the present application, embodiments of a defect detecting apparatus based on machine vision are substantially similar to embodiments of a defect detecting method based on machine vision, and reference is made to the description of the embodiments of the defect detecting method based on machine vision for relevant points.
It is clear to a person skilled in the art that the solution according to the embodiments of the invention can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, an FPGA (Field-Programmable Gate Array), an IC (Integrated Circuit), or the like.
Each processing unit and/or module according to the embodiments of the present invention may be implemented by an analog circuit that implements the functions described in the embodiments of the present invention, or may be implemented by software that executes the functions described in the embodiments of the present invention.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the defect detection method steps based on the machine vision. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
The embodiment of the invention also provides electronic equipment which comprises a storage unit, a processing unit and a computer program which is stored on the storage unit and can run on the processing unit, wherein the processing unit realizes the steps of the defect detection method based on the machine vision when executing the program. In the embodiment of the present invention, the processing unit and the storage unit may be integrated into one device, or may be located in two devices.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
All functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A defect detection method based on machine vision is characterized by comprising the following steps:
acquiring a to-be-detected CT image of at least one workpiece;
carrying out feature enhancement on the CT image to be detected through a white Top-Hat transformation algorithm;
performing edge segmentation processing and binarization on the CT image to be detected after the features are enhanced based on a Sobel operator;
extracting a feature vector of the to-be-detected CT image after binarization by using a gray co-occurrence matrix in the texture features;
and the support vector machine judges whether the CT image to be detected has defects or not according to the characteristic vector of the CT image to be detected.
2. The machine-vision-based defect detection method of claim 1, further comprising:
acquiring a defective CT image;
reading the value of the defective CT image pixel point; performing binarization processing on the defective CT image based on threshold segmentation;
filling the defective hole area in the defective CT image to obtain a non-defective CT image; extracting the feature vector of the non-defective CT image to obtain a non-defective sample set;
extracting the feature vector of the defective CT image to obtain a defective sample set;
training the support vector machine using the non-defective sample set and the defective sample set.
3. The machine vision-based defect detection method of claim 1 or 2, further comprising:
and when the CT image to be detected has defects, determining the defect severity level according to the proportion of the pixel points of the defect connected region in the whole CT image to be detected.
4. The machine vision-based defect detection method according to claim 1 or 2, wherein the extracted feature vectors of the CT images to be detected comprise: entropy and autocorrelation of gray level co-occurrence matrix of gray level distribution, gradient distribution, texture feature analysis.
5. The machine-vision-based defect detection method of claim 1 or 2, wherein the kernel function of the support vector machine is a Radial Basis Function (RBF).
6. A defect detection device based on machine vision, comprising:
the acquisition unit is used for acquiring a to-be-detected CT image of at least one workpiece;
the characteristic enhancement unit is used for carrying out characteristic enhancement on the CT image to be detected through a white Top-Hat transformation algorithm;
the edge segmentation unit is used for carrying out edge segmentation processing and binarization on the CT image to be detected after the features are enhanced based on a Sobel operator;
the characteristic extraction unit is used for extracting a feature vector of the to-be-detected CT image after binarization by using a gray level co-occurrence matrix in the texture characteristics;
and the judging unit is used for judging whether the CT image to be detected has defects or not by the support vector machine according to the characteristic vector of the CT image to be detected.
7. The machine-vision-based defect detection apparatus of claim 6, further comprising a training unit for:
acquiring a defective CT image;
reading the value of the defective CT image pixel point; performing binarization processing on the defective CT image based on threshold segmentation;
filling the defective hole area in the defective CT image to obtain a non-defective CT image; extracting the feature vector of the non-defective CT image to obtain a non-defective sample set;
extracting the feature vector of the defective CT image to obtain a defective sample set;
training the support vector machine using the non-defective sample set and the defective sample set.
8. The machine-vision-based defect detection apparatus of claim 6 or 7, wherein the discrimination unit is further configured to:
and when the CT image to be detected has defects, determining the defect severity level according to the proportion of the pixel points of the defect connected region in the whole CT image to be detected.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
10. An electronic device comprising a storage unit, a processing unit and a computer program stored on the storage unit and executable on the processing unit, characterized in that the steps of the method according to any of claims 1-5 are implemented when the program is executed by the processing unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010343094.8A CN111539939A (en) | 2020-04-27 | 2020-04-27 | Defect detection method and device based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010343094.8A CN111539939A (en) | 2020-04-27 | 2020-04-27 | Defect detection method and device based on machine vision |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111539939A true CN111539939A (en) | 2020-08-14 |
Family
ID=71967696
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010343094.8A Pending CN111539939A (en) | 2020-04-27 | 2020-04-27 | Defect detection method and device based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111539939A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113112458A (en) * | 2021-03-27 | 2021-07-13 | 上海工程技术大学 | Metal surface defect detection method based on support vector machine |
CN116797590A (en) * | 2023-07-03 | 2023-09-22 | 深圳市拓有软件技术有限公司 | Mura defect detection method and system based on machine vision |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101210890A (en) * | 2006-12-28 | 2008-07-02 | 夏普株式会社 | Defect detecting device and method, image sensor device and module |
US20110026804A1 (en) * | 2009-08-03 | 2011-02-03 | Sina Jahanbin | Detection of Textural Defects Using a One Class Support Vector Machine |
CN103258206A (en) * | 2012-11-28 | 2013-08-21 | 河海大学常州校区 | Silicon solar cell surface defect detection and identification method |
CN104680492A (en) * | 2015-03-11 | 2015-06-03 | 浙江工业大学 | Image repairing method based on sample structure consistency |
CN107895372A (en) * | 2017-11-14 | 2018-04-10 | 易思维(天津)科技有限公司 | A kind of adhesive tape skeleton line automatic teaching method and system for robot coating detection |
CN109187567A (en) * | 2018-08-07 | 2019-01-11 | 华侨大学 | A kind of composite polycrystal-diamond surface white-spot defects detection system |
CN109444169A (en) * | 2019-01-17 | 2019-03-08 | 南昌航空大学 | A kind of bearing defect detection method and system |
CN109829906A (en) * | 2019-01-31 | 2019-05-31 | 桂林电子科技大学 | It is a kind of based on the workpiece, defect of the field of direction and textural characteristics detection and classification method |
-
2020
- 2020-04-27 CN CN202010343094.8A patent/CN111539939A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101210890A (en) * | 2006-12-28 | 2008-07-02 | 夏普株式会社 | Defect detecting device and method, image sensor device and module |
US20110026804A1 (en) * | 2009-08-03 | 2011-02-03 | Sina Jahanbin | Detection of Textural Defects Using a One Class Support Vector Machine |
CN103258206A (en) * | 2012-11-28 | 2013-08-21 | 河海大学常州校区 | Silicon solar cell surface defect detection and identification method |
CN104680492A (en) * | 2015-03-11 | 2015-06-03 | 浙江工业大学 | Image repairing method based on sample structure consistency |
CN107895372A (en) * | 2017-11-14 | 2018-04-10 | 易思维(天津)科技有限公司 | A kind of adhesive tape skeleton line automatic teaching method and system for robot coating detection |
CN109187567A (en) * | 2018-08-07 | 2019-01-11 | 华侨大学 | A kind of composite polycrystal-diamond surface white-spot defects detection system |
CN109444169A (en) * | 2019-01-17 | 2019-03-08 | 南昌航空大学 | A kind of bearing defect detection method and system |
CN109829906A (en) * | 2019-01-31 | 2019-05-31 | 桂林电子科技大学 | It is a kind of based on the workpiece, defect of the field of direction and textural characteristics detection and classification method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113112458A (en) * | 2021-03-27 | 2021-07-13 | 上海工程技术大学 | Metal surface defect detection method based on support vector machine |
CN116797590A (en) * | 2023-07-03 | 2023-09-22 | 深圳市拓有软件技术有限公司 | Mura defect detection method and system based on machine vision |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5710842A (en) | Method for identifying objects using data processing techniques | |
WO2019144469A1 (en) | Image quality classification method, system and terminal device | |
CN104169945B (en) | To the two-stage classification of the object in image | |
Lyashenko et al. | The methodology of wavelet analysis as a tool for cytology preparations image processing | |
JP2021518025A (en) | Focus-weighted machine learning classifier error prediction for microscope slide images | |
JP6791245B2 (en) | Image processing device, image processing method and image processing program | |
KR20140018748A (en) | Apparatus and method for lesion analysis in medical images | |
CN112200793B (en) | Real-time monitoring method and system for digital pathological section quality and computer equipment | |
JP2013255656A (en) | Image processing apparatus, image processing method, and image processing program | |
CN111539939A (en) | Defect detection method and device based on machine vision | |
CN111932492A (en) | Medical image processing method and device and computer readable storage medium | |
CN113012086A (en) | Cross-modal image synthesis method | |
JP2006507579A (en) | Histological evaluation of nuclear polymorphism | |
CN111754454A (en) | Method and device applied to industrial CT image defect detection | |
WO2013022688A1 (en) | Automated detection of diagnostically relevant regions in pathology images | |
CN114399764A (en) | Pathological section scanning method and system | |
Niazi et al. | An automated method for counting cytotoxic T-cells from CD8 stained images of renal biopsies | |
CN112132781A (en) | Texture defect detection method and device | |
CN115131355B (en) | Intelligent method for detecting waterproof cloth abnormity by using electronic equipment data | |
TW202001797A (en) | Internal edge detection system and method thereof for processing medical images | |
CN116152253B (en) | Cardiac magnetic resonance mapping quantification method, system and storage medium | |
Pavel et al. | Cancer detection using image processing techniques based on cell counting, cell area measurement and clump detection | |
Upadhyay et al. | An Implementation of Image Processing Technique for Bone Fracture Detection Including Classification | |
JPH09245166A (en) | Pattern matching device | |
Aulia et al. | A Novel Digitized Microscopic Images of ZN-Stained Sputum Smear and Its Classification Based on IUATLD Grades |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200814 |