CN110473201A - A kind of automatic testing method and device of disc surface defect - Google Patents
A kind of automatic testing method and device of disc surface defect Download PDFInfo
- Publication number
- CN110473201A CN110473201A CN201910851592.0A CN201910851592A CN110473201A CN 110473201 A CN110473201 A CN 110473201A CN 201910851592 A CN201910851592 A CN 201910851592A CN 110473201 A CN110473201 A CN 110473201A
- Authority
- CN
- China
- Prior art keywords
- image
- brake block
- value
- disc surface
- defect
- 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 48
- 238000012360 testing method Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 52
- 241000208340 Araliaceae Species 0.000 claims abstract description 16
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims abstract description 16
- 235000003140 Panax quinquefolius Nutrition 0.000 claims abstract description 16
- 235000008434 ginseng Nutrition 0.000 claims abstract description 16
- 239000002783 friction material Substances 0.000 claims abstract description 14
- 238000003709 image segmentation Methods 0.000 claims abstract description 12
- 238000005520 cutting process Methods 0.000 claims abstract description 11
- 238000007621 cluster analysis Methods 0.000 claims abstract description 5
- 238000001514 detection method Methods 0.000 claims description 20
- 238000000605 extraction Methods 0.000 claims description 14
- 238000005530 etching Methods 0.000 claims description 7
- 238000004519 manufacturing process Methods 0.000 claims description 7
- 230000001955 cumulated effect Effects 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 6
- 241000357293 Leptobrama muelleri Species 0.000 claims description 5
- 230000002146 bilateral effect Effects 0.000 claims description 5
- 238000009826 distribution Methods 0.000 claims description 5
- 238000007689 inspection Methods 0.000 claims description 5
- 230000009467 reduction Effects 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 7
- 238000012545 processing Methods 0.000 abstract description 6
- 230000000694 effects Effects 0.000 description 18
- 230000006870 function Effects 0.000 description 13
- 230000008901 benefit Effects 0.000 description 6
- 238000003708 edge detection Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000003044 adaptive effect Effects 0.000 description 3
- 230000007797 corrosion Effects 0.000 description 3
- 238000005260 corrosion Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 208000037656 Respiratory Sounds Diseases 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 238000000513 principal component analysis Methods 0.000 description 2
- 241001292396 Cirrhitidae Species 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 239000011230 binding agent Substances 0.000 description 1
- 238000013079 data visualisation Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 238000000227 grinding Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000010438 heat treatment Methods 0.000 description 1
- 238000007731 hot pressing Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 239000012764 mineral filler Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 239000012783 reinforcing fiber Substances 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 125000006850 spacer group Chemical group 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 230000031068 symbiosis, encompassing mutualism through parasitism Effects 0.000 description 1
- 238000009966 trimming Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- 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/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G06T5/70—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description of texture
- G06T7/44—Analysis of texture based on statistical description of texture using image operators, e.g. filters, edge density metrics or local histograms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20028—Bilateral filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
Abstract
The invention discloses the automatic testing methods and device of a kind of disc surface defect, belong to technical field of image processing.It include: to extract brake block friction material part;The relevant parameter for obtaining the minimum circumscribed rectangle of friction material part, cuts image according to minimum circumscribed rectangle;It is several wickets by the image segmentation after cutting, constructs gray level co-occurrence matrixes for each wicket and calculate characteristic ginseng value;PCA dimension-reduction treatment and clustering are carried out to the characteristic ginseng value of all wickets, judge brake block with the presence or absence of defect according to cluster analysis result.This method can be according to the texture situation of brake block rubbing surface itself, judge automatically out that whether there is or not rejected regions using gray level co-occurrence matrixes and clustering, it is not limited by brake block model, surface texture, it does not need to make template in advance simultaneously, avoid cumbersome template construct process, thus there is wide applicability, can quickly detect disc surface with the presence or absence of defect in real time.
Description
Technical field
The present invention relates to the automatic testing methods and device of a kind of disc surface defect, belong to image processing techniques neck
Domain.
Background technique
Brake spacer for automobile be commonly called as " brake block " be with heat-resisting reinforcing fiber, binder, frictional property regulator and
Mineral filler is raw material, is puddled, hot pressing, after heat treatment grinding, is made in bonding (or riveting) to steel back (or shoes).
Brake block is the component of most critical in brake system of car, and it is real that the brake of automobile leans on the friction of it and brake disc (drum) entirely
Existing, the quality of brake block directly influences vehicle safety performance, is directly related to autoist and the personal safety of pedestrian.
In brake block manufacturing process, the defects of friction material charge level will appear recess, crackle, notch.It is all at present manually
Visually inspect screening and reject underproof brake block, but to manually check that there are accuracys not high, real-time is poor, inefficiency,
Many drawbacks such as large labor intensity, and machine vision is a kind of contactless, undamaged automatic measurement technique, is to realize equipment certainly
Dynamicization, the effective means of intelligent and accurate control, have outstanding advantages of high real-time, high production efficiency.
It is scarce to describe a kind of brake block profile by Chinese patent literature CN201810535607, publication date 2018-11-27
Sunken automatic testing method, this method utilize method of the template matching method in conjunction with difference shadow method, detect the profile defects of brake block,
But the model of brake block is various on the market, makes template for each type of brake block, heavy workload and process is cumbersome;And
And brake block generation rejected region is random and defect kind is random, is not limited solely to profile defects, it is also possible in appearing in
Between part crackle, recess etc..Chinese patent literature CN201510662807, publication date 2016-02-03 describe brake
Piece open defect multistation on-line measuring device and method;Chinese patent literature CN201510661607, publication date 2015-
12-23 describes brake block open defect combined type multiple light courcess on-line measuring device and method, the inspection of the defects of this two patents
Whether survey method is equally first calibration for cameras, makes template, defective using template matching detection profile, then uses difference shadow method
Feature extraction, blob analysis are carried out, to judge whether disc surface flaw size is qualified;This method still has identical
Problem is required to make template in advance for the brake block of every kind of model, once and camera calibration happen variation, Jiu get Chong
New production template, work is time-consuming and process is cumbersome.
In conclusion existing at present had based on machine vision detection method based on template matching, the inspection of the defect of difference shadow method
Survey method, this method need to make the template of standard brake block in advance, the case where facing a large amount of brake block type and quantity
Under, the brake block produced cannot be quickly detected in real time;The also defect inspection method based on edge detection, image segmentation,
This method can only detect the brake block that model is single, surface texture situation is single, in the brake of detection surface texture situation complexity
When piece, detection effect is bad, is easy to cause false detection rate higher.For many kinds of of brake block on the market, model is different, surface
In the case that texture situation is complicated, the position of the type of defect and generation is different, existing defect inspection method can not be extensive
The industry spot that is applied to replace artificial detection completely, it is therefore desirable to one kind can be directed to different model, different surfaces texture
The automatic testing method that the brake block of situation is all used for quickly detecting.
Summary of the invention
In order to solve presently, there are exist when being detected for the brake block of different model, different surfaces texture situation
False detection rate it is higher, detect simultaneously before need to make standard form in advance, defect can not be carried out to the brake block produced in real time
The problem of detection, the present invention provide the automatic testing method and device of a kind of disc surface defect.
The first purpose of this invention is to provide a kind of automatic testing method of disc surface defect, the method packet
It includes:
The extraction that area-of-interest is carried out to pretreated brake picture, obtains extracting image, the region of interest
Domain is brake block friction material part, and the steel back of brake block and the gray value of background are set to 0 in the extraction image;
The central point for extracting the minimum circumscribed rectangle of friction material part in image, width, height and rotation angle are obtained,
And it is cut according to minimum circumscribed rectangle to image is extracted;
It is several wickets by the image segmentation after cutting, constructs gray level co-occurrence matrixes for each wicket and calculate feature
Parameter value;
PCA dimension-reduction treatment is carried out to the characteristic ginseng value of all wickets;
Clustering is carried out to the characteristic ginseng value after dimension-reduction treatment, judges whether brake block is deposited according to cluster analysis result
In defect.
Optionally, the characteristic ginseng value to after dimension-reduction treatment carries out clustering, is judged according to cluster analysis result
Brake block whether there is defect, comprising:
Clustering, the noise spot distribution situation of statistical straggling are carried out to the characteristic ginseng value after dimension-reduction treatment;
If there is adjacent point to be judged to brake block existing defects in noise spot;If there is not adjacent point, it is judged to stop
Defect is not present in vehicle piece;Wherein adjacent point includes four kinds of situations: horizontal direction is adjacent, vertically adjacent, 45 ° of directions are adjacent
It is adjacent with 135 ° of directions.
Optionally, the extraction that area-of-interest is carried out to pretreated brake picture, comprising:
The binaryzation of image is carried out using difference method between Otsu maximum kind;Then the function of OpenCV is utilized
GetStructuringElement () creates structural elements, recycles erode () function to be iterated etching operation, reuses
Dilate () function is iterated expansive working, size picture size being restored to before etching operation;Utilize function
FindContours () finds profile on image upon inflation, using function drawContours () by profile in original image
It draws, while with filled black, obtained image and original image is done into subtraction, obtain the image of friction material part.
Optionally, described to obtain the central point for extracting the minimum circumscribed rectangle of friction material part in image, width, height
And rotation angle, comprising:
The central point of minimum circumscribed rectangle, width, height and rotation angle are obtained using OpenCV function minAreaRect ()
Degree recycles function boxPoints () to obtain 4 vertex of minimum circumscribed rectangle, this 4 vertex constitute minimum external square.
Optionally, the image segmentation by after cutting is several wickets, constructs gray scale symbiosis square for each wicket
Battle array simultaneously calculates characteristic ginseng value, comprising:
By the image segmentation pixel after cutting having a size of 12 × 12 several wickets, from first piece of the upper left corner, window is compiled
Number for 1 start, by direction to the right, be followed successively by each piece of window and be numbered;
Gray level co-occurrence matrixes are constructed for each wicket and calculate characteristic parameter, wherein the structure of building gray level co-occurrence matrixes
Make the selection of the factor are as follows: step-length 1, direction are horizontal direction, gray level 16;
The selection of characteristic parameter are as follows: angular second moment, entropy, inverse difference moment, poor variance and entropy, poor entropy;
Calculate the characteristic ginseng value of each wicket.
Optionally, the characteristic ginseng value of described pair of all wickets carries out PCA dimension-reduction treatment, comprising:
Remove the point that data are zero, while to keep the number of each row of data constant, then carry out PCA dimensionality reduction, by sextuple number
According to dimensionality reduction at 2-D data.
Optionally, before the extraction that area-of-interest is carried out to pretreated brake picture, further includes:
The disposal of gentle filter is carried out using initial pictures of the bilateral filtering algorithm to collected brake block, removes noise,
Certain texture information is smoothed out simultaneously.
Optionally, between the maximum kind using Otsu difference method carry out image binaryzation, comprising:
The grey level histogram for first calculating image, is then normalized it, calculates zeroth order cumulated net rain and single order cumulated net rain,
Inter-class variance is calculated again, and finding makes the maximum value of inter-class variance, the threshold value as chosen, and the part gray value greater than threshold value is set to
255, the gray value less than threshold value is set to 0.
Second object of the present invention is to provide a kind of automatic detection device of disc surface defect, the brake block
The automatic detection device of surface defect carries out disc surface defect using the automatic testing method of above-mentioned disc surface defect
Automatic detection, described device includes brake block image collecting device and detection device, wherein brake block image collecting device packet
Include industrial camera, camera lens, light source and bracket.
Third object of the present invention is to provide the automatic testing method of above-mentioned disc surface defect and/or above-mentioned brake
Application of the automatic detection device of vehicle piece surface defect in brake block production.
The medicine have the advantages that
The present invention provides a kind of automatic testing method, can utilize gray scale according to the texture situation of brake block rubbing surface itself
Co-occurrence matrix and clustering judge automatically out whether there is or not rejected region, and this method is not limited by brake block model, surface texture,
It does not need to make template in advance simultaneously, avoids cumbersome template construct process, thus there is wide applicability, it can be quickly real
When detect disc surface with the presence or absence of defect.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is image processing process detail flowchart of the invention.
Fig. 2 is Image-capturing platform schematic diagram of the invention.
Fig. 3 is the Zhang Yuantu acquired in the present embodiment by Image-capturing platform.
Fig. 4 is the effect picture of image preprocessing in the present embodiment.
Fig. 5 is the binary map in the present embodiment after Otsu thresholding.
Fig. 6 is the effect picture in the present embodiment after iteration corrosion.
Fig. 7 is the effect picture in the present embodiment after iteration expansion.
Fig. 8 is the outline effect figure extracted in the present embodiment.
Fig. 9 is the effect picture in the present embodiment after region of interesting extraction.
Figure 10 is the effect picture after cutting in the present embodiment.
Figure 11 is Clustering Effect figure in the present embodiment.
Figure 12 is to outline the effect picture after noise spot in the present embodiment
Figure 13 is the testing result figure detected using existing edge detection method.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one:
The present embodiment provides a kind of automatic testing methods of disc surface defect, referring to FIG. 1, the described method includes:
Step 1: Image Acquisition;
The image that brake block is acquired by the Image-capturing platform built, uploads to PC machine, PC machine for acquired image
Image is handled;
Image-capturing platform as shown in Fig. 2, wherein the selection of camera be the self-produced MER-500-7UM model of company, Daheng
USB camera, the model camera price material benefit, using CMOS sensitive chip, shape extremely compact, and integrated I/O interface,
Cable locking device is provided, energy steady operation is under various adverse circumstances.The M0814-MP2 type for being selected as company, Daheng of camera lens
Number optical lens, the camera lens have high resolution, focusing speed is fast, the stable advantage of image quality.The selection model of light source
For the LED annular light source of DHO-RI12030;
Brake block direct picture is acquired by the Image-capturing platform of industrial camera, camera lens, light source, bracket composition;Attached drawing 3 is
A collected Zhang Yuantu, i.e. initial pictures.
Step 2: image preprocessing;
Collected initial pictures in read step 1 carry out at smothing filtering initial pictures using bilateral filtering algorithm
Reason removes noise, while smoothing out certain texture information.
The principle of bilateral filtering is the space length weight template and similarity weight mould by constructing image pixel positions
Plate using the product of the two as the weight template of the position, then with the corresponding position of the position neighborhood is multiplied and sums.
Treated that image is as shown in Fig. 4 for bilateral filtering, and template size is 21 × 21 at this time, space weight and similitude
Weight is manually set to 30.
Step 3: region of interesting extraction;
In order to remove the interference caused by subsequent detection of acquisition platform and steel back, need only to extract brake block friction material part
Image.Therefore the extraction of area-of-interest specifically includes:
(1) Otsu thresholding:
Binaryzation is carried out to image pretreated in step 2 using difference method between Otsu maximum kind, principle is first to count
The grey level histogram of nomogram picture, is then normalized it, calculates zeroth order cumulated net rain and single order cumulated net rain, then calculates side between class
Difference, finding makes that maximum value of variance, the threshold value as chosen, and the part gray value greater than threshold value is 255, less than threshold value
Gray value is 0, and obtaining that treated, binary map is as shown in Fig. 5.
(2) iteration is corroded:
Image after above-mentioned Otsu thresholding need to be further processed, the bad place of processing part Threshold segmentation effect,
The structural elements that the ellipse of 7 × 7 sizes is created using the function getStructuringElement () of OpenCV, are recycled
Erode () function is iterated etching operation, and the number of iterations is set as 5 times, and it is small substantially to completely eliminate non-interconnected white
Region, the image after being corroded is as shown in Fig. 6.
(3) iteration expands:
Since the size of image after etching operation changes, for the size before restoring, the corrosion of above-mentioned iteration is utilized
The identical structural elements created in the process on the image after corrosion, reuse dilate () function and are iterated expansion behaviour
Make, the number of iterations is also configured as 5 times, and size picture size being restored to before etching operation, the image after being expanded is such as
Shown in attached drawing 7.
(4) area-of-interest is extracted
Using OpenCv function findContours (), profile is found on the image after the expansion of above-mentioned iteration, utilizes letter
Number drawContours () draws profile on original image (i.e. the collected initial pictures of step 1), while with filled black,
Obtained image and original image are done into subtraction to get the image of friction material part, the gray value quilt of steel back and background is arrived
It is set to 0, the image of obtained friction material part is required area-of-interest.
Step 4: image cropping:
After extracting area-of-interest, due to there are many black regions around the area-of-interest of extraction, it is not easy to subsequent
Processing obtains minimum external square using OpenCV function minAreaRect () to remove most black region on flash trimming
The central point of shape, width, height and rotation angle recycle function boxPoints () to obtain 4 tops of minimum circumscribed rectangle
Point, this 4 vertex just constitute minimum external square, cut image according to this minimum external square, image such as 10 institute of attached drawing after cutting
Show.
Step 5: building gray level co-occurrence matrixes simultaneously calculate characteristic value:
Co-occurrence matrix is defined with the joint probability density of the pixel of two different locations, it not only reflects point of brightness
Cloth feature, it is related brightness of image that also reflection, which has same brightness or close to the position distribution characteristic between the pixel of brightness,
The second-order statistics feature of variation.Due to texture be occurred repeatedly on spatial position by gray scale and formed, thus image sky
Between in be separated by between two pixels of certain distance and can have certain gray-scale relation, i.e., the spatial correlation characteristic of gray scale in image.
Gray level co-occurrence matrixes are exactly a kind of to describe the common method of texture by studying the spatial correlation characteristic of gray scale.Structure
Make gray level co-occurrence matrixes it needs to be determined that structure requirement parameter, respectively step-length, direction, gray level, the size of sliding window.Step
It is separated by a distance that length is expressed as two pixels;Direction indicates the angular relationship between two pixels, when texture display goes out one
When fixed directionality, the gray level co-occurrence matrixes on different directions have larger difference, and common value includes 0 degree, 45 degree, 90 degree
With 135 degree etc..
Gray level is maximum pixel class after compression of images, and gray level is larger to will increase gray level co-occurrence matrixes dimension, from
And operation time is caused to increase, gray level is smaller, and will lead to the missing of data information;Sliding window size is traversal image
The size of window, the as subsequent window size that divide wicket, window size is smaller to make number of windows in image increase,
So as to cause operation time increase, and window is larger that will lead between each window characteristic parameter difference unobvious, is unfavorable for gathering
Alanysis.
The present embodiment by the image segmentation after being cut in step 4 at many a wickets, each small window size is 12 ×
12 pixels, and by since the upper left corner, by the sequence number consecutively row, gray level co-occurrence matrixes are constructed for each wicket.This
Embodiment provides that step-length is 1, and angle is 0 degree of direction, and gray-scale compression to 16, sliding window size is 12 × 12.The good ash of construction
After spending co-occurrence matrix, need to screen characteristic feature for subsequent clustering, characteristic feature have angular second moment, contrast,
Correlation, entropy, unfavourable balance away from, mean value and variance and and entropy, poor entropy, poor variance, variance this 11 features, these features be not
All it is suitable for the feature of the present embodiment, needs to filter out bigger difference and can be used for the feature of clustering, calculate this
Pearson (Pearson) related coefficient between 11 characteristic features, feature of the coefficient value greater than 0.85 is more suitable for being used to do
Clustering, according to statistical result, final choice angular second moment, entropy, inverse difference moment, poor variance and entropy, poor entropy six are typical special
Sign, calculates the value of this six characteristic parameters, in numerical order, the characteristic value of each wicket is stored in Excel table,
Subsequent clustering is supplied as data.
Step 6: data processing:
In order to improve Clustering Effect, before clustering, need to handle the data stored in step 5, due to
Some wickets contain the background parts that gray value is 0, and the characteristic value of this window is 0, and is not involved in cluster, therefore first have to
The point for being zero in data is removed, goes to keep the number of each row of data constant while zero point.
Then PCA packet is imported from Python third party library sklearn machine learning library, utilizes principal component analysis
(Principal Component Analysis, PCA) algorithm carries out dimension-reduction treatment to data, which is to store in step 8
Selection six characteristic features data, in order to remove the wherein data of redundancy and facilitate carry out data visualization analysis, will
Sextuple data are down to 2-D data, and then the data after dimensionality reduction are normalized, and to improve Clustering Effect, are returned
Data after one change.
Step 7: clustering:
It is one kind, DBSCAN (Density-Based that the main thought of clustering, which is exactly by similar aggregation of data,
Spatial Clustering of Applications with Noise, has noisy density clustering method) be
A kind of density-based spatial clustering algorithm.Region division with sufficient density is cluster by the algorithm, and noisy having
The cluster of arbitrary shape is found in spatial database, cluster is defined as the maximum set of the connected point of density by it.
DBSCAN algorithm is it needs to be determined that two parameters of Eps (radius of neighbourhood) and MinPts (neighborhood density threshold), cluster effect
Fruit is very sensitive to the two parameters, and the improper Clustering Effect that will lead to of value is deteriorated or even wrong cluster occurs, and the present embodiment is adopted
With improved adaptive DBSCAN algorithm, to treated in step 9, data carry out clustering.
From Python third party library sklearn machine learning library import DBSCAN packet, using k- be averaged nearest neighbor algorithm with
Mathematical Expectation Method generates Eps and MinPts parameter candidate list, the parameter value in candidate list is successively selected, in step 6
Data that treated carry out clustering, count the cluster number of clusters of each cluster result, when the convergence of the cluster number of clusters of generation, and
Noise spot number thinks that Eps and MinPts at this time is to think most at this time for the effect most preferably clustered when within ten
Good parameter, to achieve the purpose that adaptive setting Eps and MinPts parameter.
Thus using improved adaptive DBSCAN density clustering algorithm, to treated in step 6, data are gathered
Alanysis, can automatically determine Eps and MinPts parameter, and the result of cluster is as shown in Fig. 11, wherein dot indicates normal
Point, crunode indicate noise spot.
After the completion of cluster, the distribution situation of statistical noise point is found according to the number of the corresponding wicket of each noise spot
Position on its image after cutting in step 4, since the data point that rejected region generates only appears in noise spot, because
And outlined on the image after cutting the noise spot counted in step 4, the effect picture outlined is as shown in Fig. 12.
Rejected region is judged whether it is according to the distribution situation of the noise spot outlined, if there is adjacent point to sentence in noise spot
To be rejected region, if not occurring, it is judged to zero defect part;Wherein adjacent point is divided into four kinds of situations: horizontal direction phase
It is adjacent, vertically adjacent, 45 ° of directions are adjacent, 135 ° of directions are adjacent.It is leftmost in attached drawing 12 to be judged as defect sample
This, it is intermediate and right side to be then judged as zero defect sample.
The method of the present invention and existing image segmentation and edge detecting technology compare, existing image segmentation and edge detection
Technology can refer to Zuo Dongxiang, brake chip size and surface defects detection system [J] electronics technology of the Chen Xiaorong based on HALCON,
2016,29 (11), for the brake block of the model shown in the attached drawing 3, the effect picture of existing image segmentation and edge detecting technology
As shown in Fig. 13, white portion is the marginal information detected in figure, although rejected region has the marginal information detected,
But the texture of normal portions equally produces marginal information and is detected, this just produces interference to the extraction of rejected region,
Thus by marginal information to determine whether existing defects position will be easy to produce erroneous judgement, it is seen that edge detection method is for table
The brake block detection effect of face texture situation complexity is poor.
For the method for the present invention compared with template matching method, template matching method can refer to China Patent No. CN201810535607,
A kind of automatic testing method of brake block profile defects, the maximum advantage of the method for the present invention are kept away without template is made in advance
Exempt to consume a large amount of time and workload production template, and makes template and need to demarcate camera, once acquisition image
Camera change, it is necessary to remake template, process is extremely cumbersome, be not suitable for production line on quickly detect out in real time
Defect.
Part steps in the embodiment of the present invention, can use software realization, and corresponding software program can store can
In the storage medium of reading, such as CD or hard disk.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of automatic testing method of disc surface defect, which is characterized in that the described method includes:
The extraction that area-of-interest is carried out to pretreated brake picture, obtains extracting image, the area-of-interest is
Brake block friction material part, the steel back of brake block and the gray value of background are set to 0 in the extraction image;
Obtain the central point for extracting the minimum circumscribed rectangle of friction material part in image, width, height and rotation angle, and root
It is cut according to minimum circumscribed rectangle to image is extracted;
It is several wickets by the image segmentation after cutting, constructs gray level co-occurrence matrixes for each wicket and calculate characteristic parameter
Value;
PCA dimension-reduction treatment is carried out to the characteristic ginseng value of all wickets;
Clustering is carried out to the characteristic ginseng value after dimension-reduction treatment, judges brake block with the presence or absence of scarce according to cluster analysis result
It falls into.
2. the method according to claim 1, wherein the characteristic ginseng value to after dimension-reduction treatment clusters
Analysis judges brake block with the presence or absence of defect according to cluster analysis result, comprising:
Clustering, the noise spot distribution situation of statistical straggling are carried out to the characteristic ginseng value after dimension-reduction treatment;
If there is adjacent point to be judged to brake block existing defects in noise spot;If there is not adjacent point, it is judged to brake block
There is no defects;Wherein adjacent point includes four kinds of situations: horizontal direction is adjacent, vertically adjacent, 45 ° of directions are adjacent and
135 ° of directions are adjacent.
3. according to the method described in claim 2, it is characterized in that, described interested in the progress of pretreated brake picture
The extraction in region, comprising:
The binaryzation of image is carried out using difference method between Otsu maximum kind;Then the function of OpenCV is utilized
GetStructuringElement () creates structural elements, recycles erode () function to be iterated etching operation, reuses
Dilate () function is iterated expansive working, size picture size being restored to before etching operation;Utilize function
FindContours () finds profile on image upon inflation, using function drawContours () by profile in original image
It draws, while with filled black, obtained image and original image is done into subtraction, obtain the image of friction material part.
4. according to the method described in claim 3, it is characterized in that, described obtain the minimum for extracting friction material part in image
The central point of boundary rectangle, width, height and rotation angle, comprising:
The central point of minimum circumscribed rectangle, width, height and rotation angle are obtained using OpenCV function minAreaRect (),
Function boxPoints () is recycled to obtain 4 vertex of minimum circumscribed rectangle, this 4 vertex constitute minimum external square.
5. according to the method described in claim 4, it is characterized in that, the image segmentation by after cutting be several wickets,
Gray level co-occurrence matrixes are constructed for each wicket and calculate characteristic ginseng value, comprising:
By the image segmentation pixel after cutting having a size of 12 × 12 several wickets, from first piece of the upper left corner, window number is
1 starts, and by direction to the right, is followed successively by each piece of window and is numbered;
Construct gray level co-occurrence matrixes for each wicket and calculate characteristic parameter, wherein the construction of building gray level co-occurrence matrixes because
The selection of son are as follows: step-length 1, direction are horizontal direction, gray level 16;
The selection of characteristic parameter are as follows: angular second moment, entropy, inverse difference moment, poor variance and entropy, poor entropy;
Calculate the characteristic ginseng value of each wicket.
6. according to the method described in claim 5, it is characterized in that, the characteristic ginseng value of described pair of all wickets carries out PCA
Dimension-reduction treatment, comprising:
Remove the point that data are zero, while to keep the number of each row of data constant, then carry out PCA dimensionality reduction, sextuple data are dropped
Tie up into 2-D data.
7. according to the method described in claim 6, it is characterized in that, described interested in the progress of pretreated brake picture
Before the extraction in region, further includes:
The disposal of gentle filter is carried out using initial pictures of the bilateral filtering algorithm to collected brake block, removes noise, simultaneously
Smooth out certain texture information.
8. the method according to the description of claim 7 is characterized in that difference method carries out image between the maximum kind using Otsu
Binaryzation, comprising:
The grey level histogram for first calculating image, is then normalized it, calculates zeroth order cumulated net rain and single order cumulated net rain, then count
Inter-class variance is calculated, finding makes the maximum value of inter-class variance, the threshold value as chosen, and the part gray value greater than threshold value is set to 255,
Gray value less than threshold value is set to 0.
9. a kind of automatic detection device of disc surface defect, which is characterized in that the automatic inspection of the disc surface defect
The automatic detection that device carries out disc surface defect using any method of claim 1-8 is surveyed, described device includes
Brake block image collecting device and detection device, wherein brake block image collecting device includes industrial camera, camera lens, light source and branch
Frame.
10. the automatic testing method of any disc surface defect of claim 1-8 and/or as claimed in claim 9
Application of the automatic detection device of disc surface defect in brake block production.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910851592.0A CN110473201A (en) | 2019-09-10 | 2019-09-10 | A kind of automatic testing method and device of disc surface defect |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910851592.0A CN110473201A (en) | 2019-09-10 | 2019-09-10 | A kind of automatic testing method and device of disc surface defect |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110473201A true CN110473201A (en) | 2019-11-19 |
Family
ID=68515337
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910851592.0A Pending CN110473201A (en) | 2019-09-10 | 2019-09-10 | A kind of automatic testing method and device of disc surface defect |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110473201A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112950526A (en) * | 2019-11-25 | 2021-06-11 | 合肥欣奕华智能机器有限公司 | Display defect detection method and device |
CN113076773A (en) * | 2020-01-03 | 2021-07-06 | 广州汽车集团股份有限公司 | Target detection clustering method, system, computer device and readable storage medium |
CN113516619A (en) * | 2021-04-09 | 2021-10-19 | 重庆大学 | Product surface flaw identification method based on image processing technology |
CN113945888A (en) * | 2021-10-19 | 2022-01-18 | 江南大学 | Interval passive positioning method and system based on TDOA |
CN114034706A (en) * | 2021-10-29 | 2022-02-11 | 武汉理工大学 | Carbon fiber part surface defect detection device and method |
CN116310360A (en) * | 2023-05-18 | 2023-06-23 | 实德电气集团有限公司 | Reactor surface defect detection method |
CN116309561A (en) * | 2023-05-17 | 2023-06-23 | 威海赛宝工业信息技术研究院有限公司 | Surface defect identification method based on anti-creeping insulating material |
CN117094604A (en) * | 2023-10-18 | 2023-11-21 | 南通双耀冲压有限公司 | Surface quality management method and system for motor stator and rotor stamping die |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107688955A (en) * | 2016-08-03 | 2018-02-13 | 浙江工业大学 | A kind of city commercial circle group variety division methods based on adaptive DBSCAN Density Clusterings |
-
2019
- 2019-09-10 CN CN201910851592.0A patent/CN110473201A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107688955A (en) * | 2016-08-03 | 2018-02-13 | 浙江工业大学 | A kind of city commercial circle group variety division methods based on adaptive DBSCAN Density Clusterings |
Non-Patent Citations (3)
Title |
---|
崔吉 等: "《工业视觉实用教程》", 31 October 2018 * |
曾强: "基于机器视觉的刹车片缺陷检测方法研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 * |
黄永华等: "一种基于SVM的刹车片蹄块片摩擦块表面裂纹检测法", 《延边大学学报(自然科学版)》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112950526A (en) * | 2019-11-25 | 2021-06-11 | 合肥欣奕华智能机器有限公司 | Display defect detection method and device |
CN112950526B (en) * | 2019-11-25 | 2024-03-12 | 合肥欣奕华智能机器股份有限公司 | Display defect detection method and device |
CN113076773A (en) * | 2020-01-03 | 2021-07-06 | 广州汽车集团股份有限公司 | Target detection clustering method, system, computer device and readable storage medium |
CN113516619A (en) * | 2021-04-09 | 2021-10-19 | 重庆大学 | Product surface flaw identification method based on image processing technology |
CN113945888A (en) * | 2021-10-19 | 2022-01-18 | 江南大学 | Interval passive positioning method and system based on TDOA |
CN114034706A (en) * | 2021-10-29 | 2022-02-11 | 武汉理工大学 | Carbon fiber part surface defect detection device and method |
CN116309561A (en) * | 2023-05-17 | 2023-06-23 | 威海赛宝工业信息技术研究院有限公司 | Surface defect identification method based on anti-creeping insulating material |
CN116310360A (en) * | 2023-05-18 | 2023-06-23 | 实德电气集团有限公司 | Reactor surface defect detection method |
CN116310360B (en) * | 2023-05-18 | 2023-08-18 | 实德电气集团有限公司 | Reactor surface defect detection method |
CN117094604A (en) * | 2023-10-18 | 2023-11-21 | 南通双耀冲压有限公司 | Surface quality management method and system for motor stator and rotor stamping die |
CN117094604B (en) * | 2023-10-18 | 2023-12-26 | 南通双耀冲压有限公司 | Surface quality management method and system for motor stator and rotor stamping die |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110473201A (en) | A kind of automatic testing method and device of disc surface defect | |
CN110148130B (en) | Method and device for detecting part defects | |
US6983065B1 (en) | Method for extracting features from an image using oriented filters | |
CN105447512B (en) | A kind of detection method and device for the beauty defect that essence slightly combines | |
Mathavan et al. | Use of a self-organizing map for crack detection in highly textured pavement images | |
Wang et al. | Research on crack detection algorithm of the concrete bridge based on image processing | |
CN106600600A (en) | Wafer defect detection method based on characteristic matching | |
CN113240626A (en) | Neural network-based method for detecting and classifying concave-convex flaws of glass cover plate | |
CN113221881B (en) | Multi-level smart phone screen defect detection method | |
Daniel et al. | Automatic road distress detection and analysis | |
Tolba et al. | Multiscale image quality measures for defect detection in thin films | |
CN111681213A (en) | Light guide plate line scratch defect detection method based on deep learning | |
CN114881998A (en) | Workpiece surface defect detection method and system based on deep learning | |
CN117392042A (en) | Defect detection method, defect detection apparatus, and storage medium | |
CN114612418A (en) | Method, device and system for detecting surface defects of mouse shell and electronic equipment | |
CN113393414A (en) | Deep learning-based method and system for detecting roll mark defects of cold-rolled strip after steel grinding | |
Zhang et al. | Fabric defect detection based on visual saliency map and SVM | |
CN110458231B (en) | Ceramic product detection method, device and equipment | |
CN116664565A (en) | Hidden crack detection method and system for photovoltaic solar cell | |
Chow et al. | Automated visual inspection system for mass production of hard disk drive media | |
Singh et al. | Segmentation technique for the detection of Micro cracks in solar cell using support vector machine | |
CN114092441A (en) | Product surface defect detection method and system based on dual neural network | |
CN112767365A (en) | Flaw detection method | |
CN112179846A (en) | Prefabricated convex window defect detection system based on improved Faster R-CNN | |
CN117593301B (en) | Machine vision-based memory bank damage rapid detection method and system |
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: 20191119 |