CN107564002A - Plastic tube detection method of surface flaw, system and computer-readable recording medium - Google Patents
Plastic tube detection method of surface flaw, system and computer-readable recording medium Download PDFInfo
- Publication number
- CN107564002A CN107564002A CN201710828657.0A CN201710828657A CN107564002A CN 107564002 A CN107564002 A CN 107564002A CN 201710828657 A CN201710828657 A CN 201710828657A CN 107564002 A CN107564002 A CN 107564002A
- Authority
- CN
- China
- Prior art keywords
- image
- plastic tube
- training
- defect
- model
- 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
Abstract
This application discloses a kind of plastic tube detection method of surface flaw and system and equipment and computer-readable recording medium, this method to include:Surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain defect characteristic to be measured;Model after the defect characteristic to be measured is inputted to the training being pre-created, obtain the surface defect type of model output after the training;Wherein, model is to advance with training sample to the model obtained after training pattern is trained that is built based on BP neural network algorithm after the training, wherein, the training sample includes history surface defects characteristic and corresponding surface defect type.Present invention utilizes the mapping relations of the input of BP neural network and output with nonlinearity, and good fault-tolerant ability, classification capacity and self-learning capability, the accuracy of detection of plastic tube surface defect is improved, and saves a large amount of human resources, drastically increases detection efficiency.
Description
Technical field
The present invention relates to defect detecting technique field, more particularly to a kind of plastic tube detection method of surface flaw and system and
Equipment and computer-readable recording medium.
Background technology
With Process of Urbanization Construction, the continuous propulsion of new industrialization, plastics kind is more and more, plastics-production technology also day
Benefit improves, and the application field of plastic tube is more and more extensive, and at the same time, requirement of each field to plastic tube performance and quality is also got over
Come higher.However, in injection moulding process, because injecting condition such as pressure, temperature and time etc. control bad, the change of sizing material
And the reason such as mould damage causes the defects of plastics pipe surface generation multi-form.
At present, detection of most of plastic tube manufacturer to plastic tube surface defect mostly uses artificial ocular estimate or biography
The nondestructive determination of system is realized.
Not only workload is big for artificial range estimation, and human eye works long hours easy fatigue, while easily examined personnel are subjective
The influence of factor, easily causes missing inspection to surface defects of products, greatly reduces the surface quality of product, so as to cannot be guaranteed
The efficiency and precision of detection.Traditional non-destructive testing technology is limited to the limitation of its Cleaning Principle, defect quantitative characterising parameter
Be extremely limited, the defects of can detecting species it is few, cause accuracy of detection not high, in addition, being also needed to further in detection process
The data detected, which are analyzed, can just obtain corresponding surface defects detection result, and traditional non-destructive testing technology is not
Defect can be realized and accurately classified, therefore the assessment that the surface quality of product can not be integrated.
Therefore, the accuracy of detection of plastic tube surface defect how is improved, while ensures that detection efficiency is urgently to be resolved hurrily at present
Technical problem.
The content of the invention
In view of this, it is an object of the invention to provide a kind of plastic tube detection method of surface flaw and system and equipment and
Computer-readable recording medium, the precision of plastic tube surface defects detection is significantly improved, while improve detection efficiency.It has
Body scheme is as follows:
A kind of plastic tube detection method of surface flaw, including:
Surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain defect characteristic to be measured;
Model after the defect characteristic to be measured is inputted to the training being pre-created, obtain what model after the training exported
Surface defect type;
Wherein, model is to advance with training sample to wait to train to what is built based on BP neural network algorithm after the training
The model that model obtains after being trained, wherein, the training sample includes history surface defects characteristic and corresponding surface
Defect type.
Preferably, after the training model foundation step, including:
Obtain the training sample;
Treat that training pattern is trained to described using the training sample, model after being trained.
Preferably, it is described using the training sample to it is described treat the step of training pattern is trained before, further
Including:
The training sample is normalized.
Preferably, further comprise:
Model after the training is tested using test sample.
Preferably, the step of acquisition training sample, including:
The surface image of plastic tube known to surface defect type is obtained, obtains history surface image;
The history surface image is handled, image after being handled;
Corresponding surface defects characteristic is extracted from image after the processing, obtains history surface defects characteristic, and to be somebody's turn to do
Group history surface defects characteristic marks corresponding surface defect type.
Preferably, it is described that the history surface image is handled, after being handled the step of image, including:
Image preprocessing is carried out to the history surface image, obtains corresponding pretreatment image;
Corresponding position is carried out to the pretreatment image using the edge detection method that Canny operators merge with Morphological Gradient
Reason, obtains initial edge image information;
Targets threshold is determined using improved maximum between-cluster variance algorithm, and using the targets threshold to the initial edge
Edge image information carries out binary segmentation, obtains binary edge map.
Preferably, described the step of determining targets threshold using improved maximum between-cluster variance algorithm, including:
All pixels point in the pretreatment image is traveled through, and preserves each non-zero pixels point, is obtained corresponding
Target prospect image;
Calculate accounting corresponding to every kind of gray value in the target prospect image;
Using accounting corresponding to every kind of gray value in the target prospect image, the targets threshold is determined.
Preferably, it is described using accounting corresponding to every kind of gray value in the target prospect image, determine the target
The step of threshold value, including:
Step A1:Determine threshold range;Wherein, the maximum of the threshold range is picture in the target prospect image
The maximum gradation value of vegetarian refreshments, the minimum value of the threshold range are the minimum gradation value of pixel in the target prospect image;
Step A2:The average gray of the target prospect image is calculated, obtains the first average gray;
Step A3:A threshold value is filtered out from all threshold values without selection of the threshold range as current threshold
Value;
Step A4:The threshold range is split according to present threshold value, obtains the first non-zero pixels region and second
Non-zero pixels region;
Step A5:The probability in the first non-zero pixels region and the second non-zero pixels region is calculated respectively, obtains current first
Probability and current second probability;
Step A6:The average gray in the first non-zero pixels region and the second non-zero pixels region is calculated respectively, is obtained current
Second average gray and current 3rd average gray;
Step A7:By current first probability, current second probability, first average gray, current second average gray
Population variance calculation formula is inputted with current 3rd average gray, obtains current population variance, and reenters step A3, until described
All threshold values in threshold range have been subjected to selection;Wherein, the population variance calculation formula is:
σ2=p0(u0-u)2+p1(u1-u)2;
In formula, σ2Represent current population variance, p0Represent current first probability, p1Current second probability is represented, described in u is represented
First average gray, u0Represent current second average gray, u1Represent current 3rd average gray;
Step A8:Threshold value corresponding to a maximum population variance of numerical value in all population variances is defined as the target threshold
Value.
Preferably, the surface defects characteristic includes gray feature and/or shape facility and/or textural characteristics.
The present invention further correspondingly discloses a kind of plastic tube surface defects detection system, including:
Feature acquisition module, for surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain to be measured
Defect characteristic;
Feature input module, for model after the defect characteristic to be measured is inputted to the training being pre-created, obtain institute
State the surface defect type that model exports after training;
Wherein, model is to advance with training sample to wait to train to what is built based on BP neural network algorithm after the training
The model that model obtains after being trained, wherein, the training sample includes history surface defects characteristic and corresponding surface
Defect type.
The present invention further correspondingly discloses a kind of plastic tube surface defects detection equipment, including:
Including processor, the processor is realized any as described above when being used to perform the computer program stored in memory
The step of item plastic tube detection method of surface flaw.
The present invention further correspondingly discloses a kind of computer-readable recording medium, is stored on the computer-readable recording medium
There is computer program, any one plastic tube surface defect inspection as described above is realized when the computer program is executed by processor
The step of survey method.
Plastic tube detection method of surface flaw disclosed by the invention, the surface image of the plastic tube to be measured got is corresponding
Surface defects characteristic as defect characteristic to be measured input to advance with training sample to based on BP neural network algorithm build
The training obtained after training pattern is trained after model, it is to be understood that model preserves history after above-mentioned establishment
The corresponding relation of surface defects characteristic and respective surfaces defect type, model can be by identifying that the defect to be measured is special after training
Sign can export corresponding surface defect type as testing result, and then complete the detection of plastic tube surface defect.This hair
Bright use is based on machine vision detection method, make use of the mapping of input and output with nonlinearity of BP neural network to close
System, meanwhile, there is good fault-tolerant ability, classification capacity and self-learning capability, realize the non-contact of plastic tube surface defect
Detection, has higher accuracy of detection, and can be worked with long-time stable, saves a large amount of human resources, is greatly enhanced
Detection efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of plastic tube detection method of surface flaw flow chart disclosed by the invention;
Fig. 2 is a kind of specific plastic tube detection method of surface flaw flow chart disclosed by the invention;
Fig. 3 is that the targets threshold in a kind of specific plastic tube detection method of surface flaw disclosed by the invention determines flow
Figure;
Fig. 4 is a kind of specific plastic tube surface defects detection system structure diagram disclosed by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of plastic tube detection method of surface flaw, shown in Figure 1, this method includes:
Step S11:Surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain defect characteristic to be measured.
In the present embodiment, the surface image of above-mentioned plastic tube to be measured can be the plastics being collected in advance using capture apparatus
Pipe surface image or need carry out plastic tube surface defects detection when, using capture apparatus to plastic tube to be measured
Surface is shot accordingly, so as to get corresponding plastic tube surface image to be measured, if for example, to be measured without what is gathered
The surface image of plastic tube, appropriate number of line-scan digital camera can be selected side by side according to the diameter of above-mentioned plastic tube to be measured
Place, complete the shooting to above-mentioned plastics pipe surface to be measured, and then get corresponding surface image.
It is understood that above-mentioned capture apparatus can be camera, naturally it is also possible to be the first-class equipment of shooting.The present embodiment
Any restriction is not done to the surface image for how obtaining plastic tube to be measured, as long as it is corresponding with the surface of the plastic tube to be measured
Image, likewise, being to gather in advance to surface image, or obtained again also not when carrying out plastic tube surface defects detection
Limit.
Step S12:Model after the defect characteristic to be measured is inputted to the training being pre-created, obtain the training rear mold
The surface defect type of type output.
Wherein, model is to advance with training sample to wait to train to what is built based on BP neural network algorithm after the training
The model that model obtains after being trained, wherein, the training sample includes history surface defects characteristic and corresponding surface
Defect type.
It is understood that the Nonlinear Mapping relation of input and output with height of BP neural network, can basis
Need to create and treat training pattern accordingly, then utilize known surface defect characteristic and its training sample pair of corresponding defect type
It is above-mentioned to treat that training pattern is trained, model after being trained accordingly, then defect characteristic to be measured is inputted to above-mentioned training
Model afterwards, model will export surface defect type corresponding with defect to be measured as testing result after above-mentioned training.
Plastic tube detection method of surface flaw disclosed by the invention, the surface image of the plastic tube to be measured got is corresponding
Surface defects characteristic as defect characteristic to be measured and input to advancing with training sample to based on BP neural network algorithm structure
Model after the training obtained after training pattern is trained built, it is to be understood that model, which is preserved, after above-mentioned establishment goes through
The corresponding relation of history surface defects characteristic and respective surfaces defect type, model can be by identifying the defect to be measured after training
Feature can export corresponding surface defect type as testing result, and then complete the detection of plastic tube surface defect.This
Invention make use of the mapping relations of input and output with nonlinearity of BP neural network, meanwhile, there is well fault-tolerant
Ability, classification capacity and self-learning capability, the non-contact detecting of plastic tube surface defect is realized, there is higher detection essence
Degree, and can be worked with long-time stable, a large amount of human resources are saved, drastically increase detection efficiency.
It is shown in Figure 2 the embodiment of the invention discloses a kind of specific plastic tube detection method of surface flaw, including with
Lower step:
Step S21:Obtain the training sample.
Wherein, the training sample can be the sample for being known a priori by surface defects characteristic and respective surfaces defect type,
Can also be that respective surfaces defect characteristic and its sample of corresponding surface defect type are obtained by certain detection method, change and
Yan Zhi, the requirement of the training sample is known its surface defects characteristic and respective surfaces defect type.It is understood that
The type and quantity of the training sample are more, and obtained surface defects characteristic and its corresponding defect kind is more accurate and more complete
Face.
Step S22:Training pattern is treated using the training sample to be trained, model after being trained.
Wherein, it is above-mentioned to treat that training pattern according to the actual requirements, advance with training sample to based on BP nerve nets
Network algorithm structure treats training pattern.
It is understood that training sample obtained by step S21 is treated into training pattern is trained to above-mentioned, can obtain
Model after to corresponding training.For example, 1200 sample graphs can be selected in sample image corresponding to above-mentioned training sample
Picture, wherein it is possible to which negative sample image including 200 positive sample images and 1000 all kinds of defects treats training pattern to above-mentioned
It is trained, with model after being trained accordingly.
Step S23:Surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain defect characteristic to be measured.
Step S24:The defect characteristic to be measured is inputted to treating training pattern using the training sample and is trained
The model obtained afterwards, the surface defect type exported.
That is, model enters to treat training pattern using the training sample after the training pre-established in the present embodiment
The model obtained after row training.
It should be noted that step S23 and step S24 related description can refer to above-described embodiment, will not be repeated here.
It should be noted that different surfaces defect characteristic often has different dimension and dimensional unit, such case is just
The result of data analysis can be influenceed, in order to eliminate the dimension impact between index, it is necessary to carry out data normalization processing, and then is solved
The certainly comparativity between data target so that for initial data after data normalization is handled, each surface defects characteristic is in same
One order of magnitude, it is appropriate for Comprehensive Correlation evaluation.
Therefore, before the step S22 of this implementation is performed, may further include:
The training sample is normalized.
Specifically, appropriate method for normalizing can be selected according to actual conditions, such as maximum-most small tenon can be selected
Above-mentioned surface defects characteristic is normalized quasi-ization method.Specifically, set maxAAnd minARespectively attribute A maximum
And minimum value, an attribute A value v is mapped to v ' ∈ [new_minA,new_maxA] in, the calculation formula specifically mapped is:
In formula, v represents an attribute A value, v ' expressions by v map out Lai a new data, maxAAnd minARespectively
For attribute A maximum and minimum value, new_maxAAnd new_minAV ' maximum and minimum value is represented respectively.
It is understood that the nonlinearity of model and recognition performance are higher after training, accessible accuracy of detection is got over
Height, therefore, after the step S22 of the present embodiment, it can also specifically include:
Model after the training is tested using test sample.
Wherein, test sample is equally sample known to surface defects characteristic and its corresponding surface defect type,
After to training after model, in order that the confidence level of model is higher after above-mentioned training, can by test sample to above-mentioned training after
Model is detected, it is to be understood that detects that quantity and the classification of sample are more, and testing time is more, test result more can
Lean on.
It may not be just to have in advance in view of training sample, but need just obtain by certain means, so,
In the above-described embodiments, the step of obtaining the training sample can specifically include:
Step S211:The surface image of plastic tube known to surface defect type is obtained, obtains history surface image.
Step S212:The history surface image is handled, image after being handled.
Specifically, image preprocessing can be carried out to the history surface image, corresponding pretreatment image is obtained, then
Respective handling is carried out to the pretreatment image using the edge detection method that Canny operators merge with Morphological Gradient, obtained
Initial edge image information, targets threshold is determined using improved maximum between-cluster variance algorithm, and utilize the targets threshold pair
The initial edge image information carries out binary segmentation, obtains binary edge map.
It should be noted that except above-mentioned edge detection method, other method, such as Prewitt operators can also be selected,
The present invention can select corresponding detection side to not limited using which kind of edge detection method according to specific actual conditions
Method.
Step S213:Corresponding surface defects characteristic is extracted from image after the processing, obtains history surface defect spy
Sign, and mark corresponding surface defect type for this group of history surface defects characteristic.
Specifically, in order to realize that surface defect positions, and then corresponding surface characteristics is extracted, above-mentioned two-value can obtained
After edge image, expansion process can be carried out to above-mentioned binary edge map, interrupted edge is connected, to form one
The profile of closing, filling processing then is done to the region of closing again, image after being filled accordingly, finally to above-mentioned filling after
Image progress corrosion treatment, image after being corroded accordingly, wherein, etch factor and the coefficient of expansion can be with identical, will be above-mentioned
Image connectivity after corrosion, and can be with corresponding means by the zone marker of connection, such as rectangle frame can be used to connect
Zone marker come out, obtain corresponding rectangular area, i.e., surface defect positioned, so as to obtain defect area.And then
The positional information for the pixel that each pixel value is 255 can be recorded, then again from original by traveling through above-mentioned rectangular area
Gray level image in access above-mentioned pixel, and extract corresponding surface defects characteristic.
It is well-known, it may be determined that the method for above-mentioned threshold value is not unique, and the embodiment of the present application selects improved maximum kind
Between variance algorithm determine targets threshold, its determination step can specifically include:
All pixels point in the pretreatment image is traveled through, and preserves each non-zero pixels point, is obtained corresponding
Target prospect image.
Calculate accounting corresponding to every kind of gray value in the target prospect image.
Using accounting corresponding to every kind of gray value in the target prospect image, the targets threshold is determined.
Specifically, shown in Figure 3, determining the flow of above-mentioned targets threshold can specifically include:
Step A1:Determine threshold range;Wherein, the maximum of the threshold range is picture in the target prospect image
The maximum gradation value of vegetarian refreshments, the minimum value of the threshold range are the minimum gradation value of pixel in the target prospect image;
Step A2:The average gray of the target prospect image is calculated, obtains the first average gray;
Step A3:A threshold value is filtered out from all threshold values without selection of the threshold range as current threshold
Value;
Step A4:The threshold range is split according to present threshold value, obtains the first non-zero pixels region and second
Non-zero pixels region;
Step A5:The probability in the first non-zero pixels region and the second non-zero pixels region is calculated respectively, obtains current first
Probability and current second probability;
Step A6:The average gray in the first non-zero pixels region and the second non-zero pixels region is calculated respectively, is obtained current
Second average gray and current 3rd average gray;
Step A7:By current first probability, current second probability, first average gray, current second average gray
Population variance calculation formula is inputted with current 3rd average gray, obtains current population variance, and reenters step A3, until described
All threshold values in threshold range have been subjected to selection;Wherein, the population variance calculation formula is:
σ2=p0(u0-u)2+p1(u1-u)2;
In formula, σ2Represent current population variance, p0Represent current first probability, p1Current second probability is represented, described in u is represented
First average gray, u0Represent current second average gray, u1Represent current 3rd average gray;
Step A8:Threshold value corresponding to a maximum population variance of numerical value in all population variances is defined as the target threshold
Value.
It should be noted that in all embodiments of the application, can be with the surface defects characteristic in drawbacks described above region substantially
Include gray feature, shape facility and textural characteristics.
Accordingly, above-mentioned gray feature specifically includes gray average, gray scale is most worth, entropy and variance, above-mentioned shape facility have
Body includes area, girth, circularity, flexibility and rectangular degree, and above-mentioned textural characteristics specifically include average standard variance, smooth
Degree, third moment and uniformity.
Based on described above, in all embodiments of the application, it is necessary to correspondingly extract when obtaining above-mentioned surface defects characteristic
Its each specific sign.
Wherein, the gray average of defect area, can be obtained by following calculation formula:
In formula,Represent gray average,SThe set of pixel, f in the defects of representing to be determined by defect area region
(x, y) represents the pixel value of gray level image, and N represents defect area area.
The gray scale of defect area is most worth, i.e. maximum gradation value and minimum gradation value, can be calculated by below equation
Obtain:
graymax=max (x, y) ∈ S | f (x, y) };
graymax=max (x, y) ∈ S | f (x, y) };
In formula, graymaxAnd grayminMaximum gradation value and minimum gradation value are represented respectively.
The entropy of defect area can carry out calculating acquisition by below equation:
In formula, g represents entropy, and p (i) represents the probability that gray level image corresponding grey scale level i occurs in defect area, niRepresent ash
The number that level i occurs is spent, N represents the total number of defect area pixel.
The variance of defect area can be calculated by below equation:
In formula, var2The variance of defect area is represented, N represents the total number of defect area pixel.
Wherein, the area of defect area can directly count target picture in above-mentioned defect area by following calculation formula
The number of vegetarian refreshments, and then obtain drawbacks described above region area:
In formula, A represents the area of defect area, and R represents defect area, and f (x, y) represents the gray scale of image, and its value is 0
Or 1.
The girth of defect area, defect area border can be tracked using Freeman chains code table by following calculation formula
Mode calculate its girth:
In formula, p represents the girth of defect area, N2nThe chain code for representing defect area edge is the number of even number, N2n-1Table
The chain code for showing defect area edge is the number of odd number.
The circularity of defect area can be obtained by following calculation formula:
In formula, C represents circularity, and p represents the girth of defect area, and π represents pi, and A represents defect area
Area.
When defect area is circular, circularity C is 1, and when defect area is other shapes, circularity C is more than 1.
It should be noted that width and high replacement of the embodiment of the present application from the minimum enclosed rectangle of defect area, then lack
Falling into the flexibility in region can be obtained by following calculation formula:
In formula, E represents the flexibility of defect area, and w represents that rectangle is wide, and h represents that rectangle is high.
Accordingly, the rectangular degree of defect area can be obtained by following calculation formula:
In formula, R represents the rectangular degree of defect area, and w represents that rectangle is wide, and h represents that rectangle is high, and A represents the area of defect.
Average in the textural characteristics of defect area can be obtained by following calculation formula:
It should be noted that the embodiment of the present application is selected obtains corresponding average by grey level histogram,
In formula, m represents average,Expression grey level histogram is ziProbability, ziRepresent i-th of ash
Level is spent, L represents gray level sum.
Standard variance in the textural characteristics of defect area can be obtained by following calculation formula:
In formula, σ represents the standard variance in the textural characteristics of defect area.
Smoothness in the textural characteristics of defect area can be obtained by following calculation formula:
In formula, R represents smoothness.
Uniformity in the textural characteristics of defect area can be obtained by following calculation formula:
In formula, uniformity represents the uniformity in the textural characteristics of defect area.
Third moment in the textural characteristics of defect area can be obtained by following calculation formula:
In formula, m3Represent the third moment in the textural characteristics of defect area.
Based on described above, the gray feature in above-described embodiment, shape facility and textural characteristics can each be corresponded to
Specific surface defects characteristic enter the characteristic vector that row set forms m dimension, in the embodiment of the present application, there is above-mentioned 14 altogether
Kind specific surface defects characteristic, i.e., above-mentioned m dimensional feature vectors are 14 dimensional feature vectors, above-mentioned 14 dimensional feature vector can be inputted to
Model is identified after above-mentioned training, can export the result after identification, in the application, to be exported be and surface defects characteristic
Corresponding surface defect type, for example, cut, crackle, pit, abrade, be mingled with, pitted skin, greasy dirt, pitting and area scratch etc..
It should be noted that the node in hidden layer of model can pass through input layer number and output after appeal training
Node layer number determines, wherein, input layer number for above-mentioned specific surface defects characteristic total characteristic number, for example, above-mentioned 14
The sum of the defects of individual specific surface defects characteristic corresponds to 14 input layers, and output layer nodes are above-mentioned output type,
For example, the corresponding 10 output node layer of above-mentioned 10 kinds of defect types is i.e., specifically, node in hidden layer can pass through below equation
To determine:
In formula, hide represents the number of hidden nodes, and m and n represent input layer number and output layer nodes respectively, and a represents 1
Constant between to 10.
It should be noted that the selection of initial value can randomly select between (- 1,1), learning rate η is arranged to 0.45,
In addition, in order to accelerate the convergence of network, the present embodiment can select to increase factor of momentum α and factor of momentum α value can be selected
Experience default value 0.5, meanwhile, corresponding excitation function can be selected as the case may be, for example, following excitation letter can be selected
Number formula:
In formula, y represents input, and domain is [0,1], and σ (y) represents output, and codomain is [0,1].
Accordingly, it is shown in Figure 4 the embodiment of the invention discloses a kind of plastic tube surface defects detection system, including:
Feature acquisition module 41, for surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, treated
Survey defect characteristic;
Feature input module 42, for model after the defect characteristic to be measured is inputted to the training being pre-created, obtain
The surface defect type that model exports after the training;
Wherein, model is to advance with training sample to wait to train to what is built based on BP neural network algorithm after the training
The model that model obtains after being trained, wherein, the training sample includes history surface defects characteristic and corresponding surface
Defect type.
Plastics pipe surface disclosed by the invention is refer on the specific work process between modules in the present embodiment
Defect inspection method, it will not be repeated here.
Accordingly, the embodiment of the invention discloses a kind of plastic tube surface defects detection equipment, including:
Including processor, the processor realizes such as above-mentioned plastics when being used to perform the computer program stored in memory
The step of pipe surface defect inspection method.
It should be noted that the particular content of the present embodiment technology segment can be found in hereinbefore embodiment, herein no longer
Repeat.
Accordingly, present invention also offers a kind of computer-readable recording medium, it is characterised in that described computer-readable
Computer program is stored with storage medium, is realized when the computer program is executed by processor as above-mentioned plastics pipe surface lacks
The step of falling into detection method.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaning
Covering including for nonexcludability, so that process, method, article or equipment including a series of elements not only include that
A little key elements, but also the other element including being not expressly set out, or also include for this process, method, article or
The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged
Except other identical element in the process including the key element, method, article or equipment being also present.
Above to plastic tube detection method of surface flaw provided by the present invention, system, equipment and computer-readable storage
Medium is described in detail, and specific case used herein is set forth to the principle and embodiment of the present invention, with
The explanation of upper embodiment is only intended to help the method and its core concept for understanding the present invention;Meanwhile for the general of this area
Technical staff, according to the thought of the present invention, there will be changes in specific embodiments and applications, in summary,
This specification content should not be construed as limiting the invention.
Claims (12)
- A kind of 1. plastic tube detection method of surface flaw, it is characterised in that including:Surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain defect characteristic to be measured;Model after the defect characteristic to be measured is inputted to the training being pre-created, obtain the surface of model output after the training Defect type;Wherein, model is to advance with training sample to treat training pattern to what is built based on BP neural network algorithm after the training The model obtained after being trained, wherein, the training sample includes history surface defects characteristic and corresponding surface defect Type.
- 2. plastic tube detection method of surface flaw according to claim 1, it is characterised in that the wound of model after the training Step is built, including:Obtain the training sample;Treat that training pattern is trained to described using the training sample, model after being trained.
- 3. plastic tube detection method of surface flaw according to claim 2, it is characterised in that described to utilize the training sample This to it is described treat the step of training pattern is trained before, further comprise:The training sample is normalized.
- 4. plastic tube detection method of surface flaw according to claim 2, it is characterised in that further comprise:Model after the training is tested using test sample.
- 5. plastic tube detection method of surface flaw according to claim 2, it is characterised in that described to obtain the training sample This step of, including:The surface image of plastic tube known to surface defect type is obtained, obtains history surface image;The history surface image is handled, image after being handled;Corresponding surface defects characteristic is extracted from image after the processing, obtains history surface defects characteristic, and go through for the group History surface defects characteristic marks corresponding surface defect type.
- 6. plastic tube detection method of surface flaw according to claim 5, it is characterised in that described to the history surface Image is handled, after being handled the step of image, including:Image preprocessing is carried out to the history surface image, obtains corresponding pretreatment image;Respective handling is carried out to the pretreatment image using the edge detection method that Canny operators merge with Morphological Gradient, Obtain initial edge image information;Targets threshold is determined using improved maximum between-cluster variance algorithm, and using the targets threshold to the initial edge figure As information progress binary segmentation, binary edge map is obtained.
- 7. plastic tube detection method of surface flaw according to claim 6, it is characterised in that described to utilize improved maximum The step of inter-class variance algorithm determines targets threshold, including:All pixels point in the pretreatment image is traveled through, and preserves each non-zero pixels point, obtains corresponding target Foreground image;Calculate accounting corresponding to every kind of gray value in the target prospect image;Using accounting corresponding to every kind of gray value in the target prospect image, the targets threshold is determined.
- 8. plastic tube detection method of surface flaw according to claim 7, it is characterised in that described using before the target Accounting corresponding to every kind of gray value in scape image, the step of determining the targets threshold, including:Step A1:Determine threshold range;Wherein, the maximum of the threshold range is pixel in the target prospect image Maximum gradation value, the minimum value of the threshold range is the minimum gradation value of pixel in the target prospect image;Step A2:The average gray of the target prospect image is calculated, obtains the first average gray;Step A3:A threshold value is filtered out from all threshold values without selection of the threshold range as present threshold value;Step A4:The threshold range is split according to present threshold value, obtains the first non-zero pixels region and the second non-zero Pixel region;Step A5:The probability in the first non-zero pixels region and the second non-zero pixels region is calculated respectively, obtains current first probability With current second probability;Step A6:The average gray in the first non-zero pixels region and the second non-zero pixels region is calculated respectively, obtains current second Average gray and current 3rd average gray;Step A7:By current first probability, current second probability, first average gray, current second average gray and work as Preceding 3rd average gray inputs population variance calculation formula, obtains current population variance, and reenters step A3, until the threshold value All threshold values in scope have been subjected to selection;Wherein, the population variance calculation formula is:σ2=p0(u0-u)2+p1(u1-u)2;In formula, σ2Represent current population variance, p0Represent current first probability, p1Current second probability is represented, u represents described first Average gray, u0Represent current second average gray, u1Represent current 3rd average gray;Step A8:Threshold value corresponding to a maximum population variance of numerical value in all population variances is defined as the targets threshold.
- 9. the plastic tube detection method of surface flaw according to claim 1 to 8 any one, it is characterised in that the table Planar defect feature includes gray feature and/or shape facility and/or textural characteristics.
- A kind of 10. plastic tube surface defects detection system, it is characterised in that including:Feature acquisition module, for surface defects characteristic corresponding to obtaining the surface image of plastic tube to be measured, obtain defect to be measured Feature;Feature input module, for model after the defect characteristic to be measured is inputted to the training being pre-created, obtain the instruction The surface defect type that model exports after white silk;Wherein, model is to advance with training sample to treat training pattern to what is built based on BP neural network algorithm after the training The model obtained after being trained, wherein, the training sample includes history surface defects characteristic and corresponding surface defect Type.
- A kind of 11. plastic tube surface defects detection equipment, it is characterised in that including:Including processor, the processor realizes such as claim 1 to 9 when being used to perform the computer program stored in memory The step of any one plastic tube detection method of surface flaw.
- 12. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium Program, realize that plastic tube surface defect is examined as described in any one of claim 1 to 9 when the computer program is executed by processor The step of survey method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710828657.0A CN107564002A (en) | 2017-09-14 | 2017-09-14 | Plastic tube detection method of surface flaw, system and computer-readable recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710828657.0A CN107564002A (en) | 2017-09-14 | 2017-09-14 | Plastic tube detection method of surface flaw, system and computer-readable recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107564002A true CN107564002A (en) | 2018-01-09 |
Family
ID=60981038
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710828657.0A Pending CN107564002A (en) | 2017-09-14 | 2017-09-14 | Plastic tube detection method of surface flaw, system and computer-readable recording medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107564002A (en) |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109087282A (en) * | 2018-07-02 | 2018-12-25 | 北京百度网讯科技有限公司 | Display screen peripheral circuit detection method, device, electronic equipment and storage medium |
CN109087281A (en) * | 2018-07-02 | 2018-12-25 | 北京百度网讯科技有限公司 | Display screen peripheral circuit detection method, device, electronic equipment and storage medium |
CN109444169A (en) * | 2019-01-17 | 2019-03-08 | 南昌航空大学 | A kind of bearing defect detection method and system |
CN109472783A (en) * | 2018-10-31 | 2019-03-15 | 湘潭大学 | A kind of nickel foam surface defect is extracted and classification method |
CN109596634A (en) * | 2018-12-30 | 2019-04-09 | 国网北京市电力公司 | The detection method and device of electric cable stoppage, storage medium, processor |
CN109886931A (en) * | 2019-01-25 | 2019-06-14 | 中国计量大学 | Gear ring of wheel speed sensor detection method of surface flaw based on BP neural network |
CN109886934A (en) * | 2019-01-28 | 2019-06-14 | 厦门理工学院 | Be carbonized bamboo chip defect inspection method and system |
CN110211102A (en) * | 2019-05-23 | 2019-09-06 | 杭州良淋电子科技股份有限公司 | A kind of racket wire break detection method of unmanned network renting and selling device |
CN110264447A (en) * | 2019-05-30 | 2019-09-20 | 浙江省北大信息技术高等研究院 | A kind of detection method of surface flaw of moulding, device, equipment and storage medium |
CN110458791A (en) * | 2018-05-04 | 2019-11-15 | 深圳市圆周率软件科技有限责任公司 | Mass defect detection method and detection device |
CN110796698A (en) * | 2019-11-07 | 2020-02-14 | 厦门市美亚柏科信息股份有限公司 | Vehicle weight removing method and device with maximum area and minimum length-width ratio |
CN110969620A (en) * | 2019-12-19 | 2020-04-07 | 中国农业大学 | Method and device for detecting magnetic shoe ripple defects |
CN110992329A (en) * | 2019-11-28 | 2020-04-10 | 上海微创医疗器械(集团)有限公司 | Product surface defect detection method, electronic device and readable storage medium |
CN111047576A (en) * | 2019-12-12 | 2020-04-21 | 珠海博明视觉科技有限公司 | Surface defect sample generation tool |
CN111145168A (en) * | 2019-12-31 | 2020-05-12 | 华东理工大学 | Method and system for detecting defects of carbon fiber composite material and storage medium |
CN111222445A (en) * | 2019-12-31 | 2020-06-02 | 江苏南高智能装备创新中心有限公司 | Straw detection system and method thereof |
CN111986195A (en) * | 2020-09-07 | 2020-11-24 | 北京凌云光技术集团有限责任公司 | Appearance defect detection method and system |
CN112102252A (en) * | 2020-08-21 | 2020-12-18 | 北京无线电测量研究所 | Method and device for detecting appearance defects of micro-strip antenna welding spot |
CN113053041A (en) * | 2021-03-18 | 2021-06-29 | 中国工商银行股份有限公司 | Method, device and system for identifying business process |
CN113379728A (en) * | 2021-07-02 | 2021-09-10 | 上海电气集团股份有限公司 | Method, system, equipment and readable storage medium for detecting defects on surface of rail |
CN113414927A (en) * | 2021-08-24 | 2021-09-21 | 江苏铭鹏装备有限公司 | Compression roller surface wear detection equipment |
CN113674176A (en) * | 2021-08-23 | 2021-11-19 | 北京市商汤科技开发有限公司 | Image restoration method and device, electronic equipment and storage medium |
CN113947598A (en) * | 2021-12-20 | 2022-01-18 | 昌亚新材料科技有限公司 | Plastic lunch box defect detection method, device and system based on image processing |
CN114324168A (en) * | 2022-01-04 | 2022-04-12 | 广东奥普特科技股份有限公司 | Surface defect detection method and system |
CN114782445A (en) * | 2022-06-22 | 2022-07-22 | 深圳思谋信息科技有限公司 | Object defect detection method and device, computer equipment and storage medium |
-
2017
- 2017-09-14 CN CN201710828657.0A patent/CN107564002A/en active Pending
Cited By (35)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110458791B (en) * | 2018-05-04 | 2023-06-06 | 圆周率科技(常州)有限公司 | Quality defect detection method and detection equipment |
CN110458791A (en) * | 2018-05-04 | 2019-11-15 | 深圳市圆周率软件科技有限责任公司 | Mass defect detection method and detection device |
CN109087282A (en) * | 2018-07-02 | 2018-12-25 | 北京百度网讯科技有限公司 | Display screen peripheral circuit detection method, device, electronic equipment and storage medium |
CN109087281A (en) * | 2018-07-02 | 2018-12-25 | 北京百度网讯科技有限公司 | Display screen peripheral circuit detection method, device, electronic equipment and storage medium |
CN109472783A (en) * | 2018-10-31 | 2019-03-15 | 湘潭大学 | A kind of nickel foam surface defect is extracted and classification method |
CN109472783B (en) * | 2018-10-31 | 2021-10-01 | 湘潭大学 | Method for extracting and classifying surface defects of foamed nickel |
CN109596634A (en) * | 2018-12-30 | 2019-04-09 | 国网北京市电力公司 | The detection method and device of electric cable stoppage, storage medium, processor |
CN109444169A (en) * | 2019-01-17 | 2019-03-08 | 南昌航空大学 | A kind of bearing defect detection method and system |
CN109444169B (en) * | 2019-01-17 | 2021-06-15 | 南昌航空大学 | Bearing defect detection method and system |
CN109886931A (en) * | 2019-01-25 | 2019-06-14 | 中国计量大学 | Gear ring of wheel speed sensor detection method of surface flaw based on BP neural network |
CN109886934A (en) * | 2019-01-28 | 2019-06-14 | 厦门理工学院 | Be carbonized bamboo chip defect inspection method and system |
CN110211102A (en) * | 2019-05-23 | 2019-09-06 | 杭州良淋电子科技股份有限公司 | A kind of racket wire break detection method of unmanned network renting and selling device |
CN110264447A (en) * | 2019-05-30 | 2019-09-20 | 浙江省北大信息技术高等研究院 | A kind of detection method of surface flaw of moulding, device, equipment and storage medium |
CN110796698B (en) * | 2019-11-07 | 2022-11-29 | 厦门市美亚柏科信息股份有限公司 | Vehicle weight removing method and device with maximum area and minimum length-width ratio |
CN110796698A (en) * | 2019-11-07 | 2020-02-14 | 厦门市美亚柏科信息股份有限公司 | Vehicle weight removing method and device with maximum area and minimum length-width ratio |
CN110992329B (en) * | 2019-11-28 | 2023-06-30 | 上海微创卜算子医疗科技有限公司 | Product surface defect detection method, electronic equipment and readable storage medium |
CN110992329A (en) * | 2019-11-28 | 2020-04-10 | 上海微创医疗器械(集团)有限公司 | Product surface defect detection method, electronic device and readable storage medium |
CN111047576A (en) * | 2019-12-12 | 2020-04-21 | 珠海博明视觉科技有限公司 | Surface defect sample generation tool |
CN110969620A (en) * | 2019-12-19 | 2020-04-07 | 中国农业大学 | Method and device for detecting magnetic shoe ripple defects |
CN111145168A (en) * | 2019-12-31 | 2020-05-12 | 华东理工大学 | Method and system for detecting defects of carbon fiber composite material and storage medium |
CN111222445A (en) * | 2019-12-31 | 2020-06-02 | 江苏南高智能装备创新中心有限公司 | Straw detection system and method thereof |
CN111145168B (en) * | 2019-12-31 | 2023-04-14 | 华东理工大学 | Method and system for detecting defects of carbon fiber composite material and storage medium |
CN112102252B (en) * | 2020-08-21 | 2023-11-28 | 北京无线电测量研究所 | Method and device for detecting appearance defects of welding spots of microstrip antenna |
CN112102252A (en) * | 2020-08-21 | 2020-12-18 | 北京无线电测量研究所 | Method and device for detecting appearance defects of micro-strip antenna welding spot |
CN111986195A (en) * | 2020-09-07 | 2020-11-24 | 北京凌云光技术集团有限责任公司 | Appearance defect detection method and system |
CN111986195B (en) * | 2020-09-07 | 2024-02-20 | 凌云光技术股份有限公司 | Appearance defect detection method and system |
CN113053041A (en) * | 2021-03-18 | 2021-06-29 | 中国工商银行股份有限公司 | Method, device and system for identifying business process |
CN113379728A (en) * | 2021-07-02 | 2021-09-10 | 上海电气集团股份有限公司 | Method, system, equipment and readable storage medium for detecting defects on surface of rail |
CN113674176A (en) * | 2021-08-23 | 2021-11-19 | 北京市商汤科技开发有限公司 | Image restoration method and device, electronic equipment and storage medium |
CN113674176B (en) * | 2021-08-23 | 2024-04-16 | 北京市商汤科技开发有限公司 | Image restoration method and device, electronic equipment and storage medium |
CN113414927A (en) * | 2021-08-24 | 2021-09-21 | 江苏铭鹏装备有限公司 | Compression roller surface wear detection equipment |
CN113947598A (en) * | 2021-12-20 | 2022-01-18 | 昌亚新材料科技有限公司 | Plastic lunch box defect detection method, device and system based on image processing |
CN114324168A (en) * | 2022-01-04 | 2022-04-12 | 广东奥普特科技股份有限公司 | Surface defect detection method and system |
CN114782445A (en) * | 2022-06-22 | 2022-07-22 | 深圳思谋信息科技有限公司 | Object defect detection method and device, computer equipment and storage medium |
CN114782445B (en) * | 2022-06-22 | 2022-10-11 | 深圳思谋信息科技有限公司 | Object defect detection method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107564002A (en) | Plastic tube detection method of surface flaw, system and computer-readable recording medium | |
Smith et al. | Segmentation and tracking of cytoskeletal filaments using open active contours | |
CN106251361B (en) | A kind of rail surface defects image self-adapting division method | |
CN113592845A (en) | Defect detection method and device for battery coating and storage medium | |
Liu et al. | A rail surface defect detection method based on pyramid feature and lightweight convolutional neural network | |
CN108956614A (en) | A kind of pit rope dynamic method for detection fault detection and device based on machine vision | |
CN105844621A (en) | Method for detecting quality of printed matter | |
CN108647583A (en) | A kind of face recognition algorithms training method based on multiple target study | |
CN105654121A (en) | Complex jacquard fabric defect detection method based on deep learning | |
CN107230203A (en) | Casting defect recognition methods based on human eye vision attention mechanism | |
CN108416774A (en) | A kind of fabric types recognition methods based on fine granularity neural network | |
CN114749342B (en) | Lithium battery pole piece coating defect identification method, device and medium | |
CN108346144A (en) | Bridge Crack based on computer vision monitoring and recognition methods automatically | |
CN112418130A (en) | Banana maturity detection method and device based on BP neural network | |
CN103048329A (en) | Pavement crack detecting method based on active contour model | |
CN108681689B (en) | Frame rate enhanced gait recognition method and device based on generation of confrontation network | |
Ni et al. | A Generative adversarial learning strategy for enhanced lightweight crack delineation networks | |
Zhang et al. | Efficient system of cracking-detection algorithms with 1-mm 3D-surface models and performance measures | |
CN109543693A (en) | Weak labeling data noise reduction method based on regularization label propagation | |
Dong et al. | Automatic inspection and evaluation system for pavement distress | |
CN106340007A (en) | Image processing-based automobile body paint film defect detection and identification method | |
CN110889338A (en) | Unsupervised railway track bed foreign matter detection and sample construction method and unsupervised railway track bed foreign matter detection and sample construction device | |
CN206897873U (en) | A kind of image procossing and detecting system based on detection product performance | |
CN113435460A (en) | Method for identifying brilliant particle limestone image | |
CN104899592A (en) | Road semi-automatic extraction method and system based on circular template |
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 |
Application publication date: 20180109 |
|
RJ01 | Rejection of invention patent application after publication |