CN114445386B - PVC pipe quality detection and evaluation method and system based on artificial intelligence - Google Patents

PVC pipe quality detection and evaluation method and system based on artificial intelligence Download PDF

Info

Publication number
CN114445386B
CN114445386B CN202210109663.1A CN202210109663A CN114445386B CN 114445386 B CN114445386 B CN 114445386B CN 202210109663 A CN202210109663 A CN 202210109663A CN 114445386 B CN114445386 B CN 114445386B
Authority
CN
China
Prior art keywords
gradient
wavelet
pvc pipe
sequence
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210109663.1A
Other languages
Chinese (zh)
Other versions
CN114445386A (en
Inventor
徐云松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Siyang Sanjiang Rubber & Plastic Co ltd
Original Assignee
Siyang Sanjiang Rubber & Plastic Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Siyang Sanjiang Rubber & Plastic Co ltd filed Critical Siyang Sanjiang Rubber & Plastic Co ltd
Priority to CN202210109663.1A priority Critical patent/CN114445386B/en
Publication of CN114445386A publication Critical patent/CN114445386A/en
Application granted granted Critical
Publication of CN114445386B publication Critical patent/CN114445386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20064Wavelet transform [DWT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a PVC pipe fitting quality detection and evaluation method and system based on artificial intelligence, which comprises the following steps: collecting the surface elevation of a normal PVC pipe fitting, dividing the surface elevation into a plurality of areas of w multiplied by w, and performing n-layer wavelet transform on each area; respectively obtaining the frequency domain indexes of each region according to the frequency of the occurrence of the values of different wavelet coefficients in each region, and obtaining a first sequence number sequence according to the frequency domain indexes of each region; obtaining a second sequence number sequence corresponding to the PVC pipe fitting to be detected so as to obtain a first similarity value by combining the first sequence number sequence; obtaining gradient characteristic parameters of each pixel point according to the gradient amplitude and the gradient direction of the pixel point in the surface elevation and the eight-neighborhood pixel points, and forming the gradient characteristic parameters of each pixel point into a first gradient characteristic sequence; obtaining a second gradient characteristic sequence corresponding to the PVC pipe fitting to be detected so as to obtain a second similarity value by combining the first gradient characteristic sequence; and obtaining a quality evaluation result of the PVC pipe fitting to be detected according to the first similarity value and the second similarity value.

Description

PVC pipe quality detection and evaluation method and system based on artificial intelligence
Technical Field
The application relates to the technical field of product detection, in particular to a PVC pipe fitting quality detection and evaluation method and system based on artificial intelligence.
Background
The tubular product is the essential material of building engineering, it has the feed pipe to use always, the drain pipe, the gas pipe, the ground heating coil, wire conduit, downspout etc. PVC is one of them common tubular product, various surperficial unusual problems can appear in the PVC pipe fitting in the manufacture process, lead to the pipe fitting quality to descend, not only influence the quality on pipe fitting surface, will increase the man-hour of personnel's rework simultaneously, the waste of material and resource, cause harmful effects to the sealing quality of pipe fitting, consequently, to the surface quality detection aassessment of pipe fitting, be the basis of guaranteeing the follow-up high-efficient use of pipe fitting.
At present, most of related workers with quite abundant experience detect and evaluate the surface quality of the PVC pipe, but the inventor of the present application finds that the above-mentioned technology has at least the following technical problems in the process of implementing the technical solution of the present application embodiment:
this kind of mode is higher to staff's eyesight requirement, and long-time measuring will cause harm to staff's eyesight, and simultaneously, the tubulose quality testing of PVC based on manual work requires higher to staff, and is consuming time fairly long, detects precision and inefficiency to can not guarantee the comprehensiveness of testing process.
Disclosure of Invention
Aiming at the technical problems, the invention provides a PVC pipe fitting quality detection and evaluation method and system based on artificial intelligence, which are used for realizing the quality evaluation of the PVC pipe fitting to be detected by analyzing and processing the surface image of the PVC pipe fitting to be detected and combining the characteristic indexes of the normal PVC pipe fitting image to obtain the quality evaluation index of the pipe fitting to be detected, have the advantages of no contact, high detection speed, high precision and the like, and avoid visual errors and visual fatigue caused by artificial inspection.
In a first aspect, an embodiment of the present invention provides a method for detecting and evaluating quality of a PVC pipe based on artificial intelligence, including:
the method comprises the steps of collecting a surface front view of a normal PVC pipe fitting, dividing the surface front view into a plurality of areas w x w, and carrying out n-layer wavelet transformation on each area to obtain 3n +1 wavelet sub-bands of each area respectively, wherein w is a preset first positive integer, and n is a preset second positive integer.
Respectively obtaining the frequency domain indexes of each region according to the frequency of the values of different wavelet coefficients in each region, arranging the frequency domain indexes of all the regions into a first frequency domain sequence, sequencing the first frequency domain sequence to obtain a second frequency domain sequence, and forming the sequence number of each frequency domain index in the second frequency domain sequence in the first frequency domain sequence into a first sequence number sequence.
According to the similarity of the pixel points in the surface elevation and the eight neighborhood pixel points in the gradient amplitude and the gradient direction, respectively obtaining the gradient difference vector of each pixel point to obtain the gradient characteristic parameters of each pixel point, and forming the gradient characteristic parameters of each pixel point into a first gradient characteristic sequence.
And respectively obtaining a second sequence number sequence and a second gradient characteristic sequence corresponding to the PVC pipe fitting to be detected according to the first sequence number sequence corresponding to the normal PVC pipe fitting and the method for obtaining the first gradient characteristic sequence.
And obtaining a first similarity value of the first sequence number sequence and the second sequence number sequence and a second similarity value of the first gradient characteristic sequence and the second gradient characteristic sequence.
And according to the first similarity value and the second similarity value, obtaining a quality evaluation value to evaluate the quality of the PVC pipe fitting to be detected.
In one possible embodiment, obtaining the first similarity value of the first sequence number sequence and the second sequence number sequence includes:
first similarity value
Figure BDA0003494724060000021
Wherein D t Is the difference value between the t-th data in the first sequence number sequence and the t-th data in the second sequence number sequence, and N is the number of the regions.
In a possible embodiment, obtaining a gradient difference vector of each pixel point according to similarity between the pixel point in the surface elevation and the eight neighborhood pixel points in the gradient amplitude and the gradient direction to obtain a gradient feature parameter of each pixel point respectively includes:
respectively obtaining the gradient descriptor of each pixel point in the surface elevation, wherein the gradient descriptor of each pixel point comprises the gradient amplitude and the gradient direction of each pixel point, and the gradient difference vector of each pixel point respectively consists of the cosine similarity of the gradient descriptor of each pixel point and the gradient descriptors of eight neighborhood pixel points.
And respectively establishing corresponding gradient distribution matrixes for the pixel points, obtaining each element in the gradient distribution matrixes according to the difference value of each element in the gradient difference vector, and taking the mean value of all the elements in the gradient distribution matrixes of the pixel points as the gradient characteristic parameter of the pixel points.
In a possible embodiment, before obtaining the frequency domain index of each region respectively, the method further includes processing each region by using the wavelet subband in each region, where the processing specifically includes:
determining a coefficient threshold corresponding to the wavelet sub-band X according to the value of the wavelet coefficient in the wavelet sub-band X and the total number of the wavelet coefficients, and taking the wavelet coefficient of which the value of the wavelet coefficient in the wavelet sub-band X is greater than the coefficient threshold corresponding to the wavelet sub-band X as a non-noise wavelet coefficient, wherein the wavelet sub-band X is any small sub-band in any region.
And fusing wavelet sub-bands with different scales in the same direction in each region by using the quantity of the wavelet coefficients in each small sub-band of each region and the quantity of the non-noise wavelet coefficients, respectively performing up-sampling on the wavelet sub-bands with small scales in each region in the fusion process, wherein the sampling size is the same as the size of the fused wavelet sub-band with large scale in the same direction.
In one possible embodiment, the average value of the values of all wavelet coefficients in the wavelet subband X is used as the coefficient threshold corresponding to the wavelet subband X.
In one possible embodiment, obtaining a quality evaluation value to evaluate the quality of the PVC pipe to be tested according to the first similarity value and the second similarity value includes:
the quality evaluation value
Figure BDA0003494724060000031
And Q is the first similarity value, epsilon is the second similarity value, c1 is a first preset parameter, and c2 is a second preset parameter, when the quality evaluation value F is greater than a preset first threshold value, the quality of the PVC pipe fitting to be detected is qualified, otherwise, the quality of the PVC pipe fitting to be detected is unqualified.
In one possible embodiment, before dividing the front surface view into a plurality of w × w regions, the method further comprises: the surface elevation is pre-treated. The pretreatment specifically comprises: and carrying out image filtering denoising and image enhancement processing.
In a second aspect, an embodiment of the present invention further provides a technical solution of a PVC pipe quality detection and evaluation system based on artificial intelligence, including a memory and a processor, where the processor executes a computer program stored in the memory to implement the PVC pipe quality detection and evaluation method based on artificial intelligence.
Compared with the prior art, the method and the device have the advantages that the quality evaluation index of the to-be-detected PVC pipe fitting is obtained by analyzing and processing the surface image of the to-be-detected PVC pipe fitting and combining the characteristic index of the normal PVC pipe fitting image, so that the quality of the to-be-detected PVC pipe fitting is evaluated, the method and the device have the advantages of no contact, high detection speed, high precision and the like, and visual errors and visual fatigue caused by manual inspection are avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a PVC pipe quality detection and evaluation method based on artificial intelligence according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a wavelet sub-band of a PVC pipe after a surface elevation of the pipe is subjected to 3-layer wavelet transform according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; in the description of the present embodiment, the meaning of "a plurality" is two or more unless otherwise specified.
The embodiment of the invention provides a PVC pipe fitting quality detection and evaluation method based on artificial intelligence, which comprises the following steps of:
s101, collecting a surface front view of a normal PVC pipe, dividing the surface front view into a plurality of areas w multiplied by w, and performing n-layer wavelet transformation on each area to obtain 3n +1 wavelet sub-bands of each area respectively.
Firstly, the surface front view of the PVC pipe to be detected is collected, the front view in this embodiment refers to a side capable of reflecting complete information of the PVC surface, the PVC pipe may be rotated in the axial direction to obtain a surface image including the whole PVC pipe in a specific implementation process, or the surface image including the whole PVC pipe may be obtained in a multi-frame synthesis manner, and the specific manner of collecting the surface front view of the PVC pipe to be detected in this embodiment is not limited.
Preferably, in consideration of the fact that the manufacturing, processing or storage environment of the PVC pipe is complex, a large amount of image noise will be generated in the image acquisition process, which affects the high-quality acquisition of the surface image of the mechanical part, and therefore, in order to improve the system detection accuracy, the embodiment of the present invention preprocesses the acquired image. The pretreatment specifically comprises: and carrying out image filtering and denoising and image enhancement processing. The image data can be subjected to preliminary preprocessing operation in the step, so that the image data with higher quality can be obtained, and the surface quality of the PVC pipe fitting can be evaluated more accurately in the follow-up process.
It should be noted that the noise is generated because the gray values of some pixels in the image are mutated, so that the noise is not harmonious with the surrounding area. Denoising actually removes high-frequency noise, so that the gray value of a noise pixel in an image is less abrupt. The noise removal method comprises two methods, namely convolution (Gaussian filtering, mean filtering, median filtering and the like) and morphology (open operation and closed operation), and the image noise removal can help eliminate sharp noise in an image.
Image enhancement is achieved by adding some information or transformation data to the original image by some means to selectively highlight features of interest in the image or to suppress (mask) some unwanted features in the image to match the image to the visual response characteristics. In the image enhancement process, the reason of image degradation is not analyzed, and the processed image is not necessarily close to the original image. Image enhancement techniques can be classified into two categories, namely, algorithms based on a spatial domain and algorithms based on a frequency domain, according to different spaces where enhancement processing processes are located.
Preferably, for image enhancement, the present embodiment enhances contrast by increasing local gray-scale differences: firstly, smoothing an image f (x, y), acquiring a smoothed image f '(x, y), establishing an enhancement model g (x, y) = f (x, y) -f' (x, y), and enhancing the image based on the enhancement model, wherein the main processing procedures comprise: f (x, y) = k x g (x, y) + F (x, y), wherein k is a weight factor, k is more than or equal to 0, the operator can set the weight factor according to the actual situation of the image, and F (x, y) is the image obtained after processing.
Because the surface of the pipe fitting may have cracks, scratches and other damages, the texture characteristics of the obtained PVC pipe fitting surface image cannot be completely highlighted only by the spatial domain data in the image, so that the frequency domain transformation is performed on the image data, the filtering model is set, the high-frequency information in the image is more highlighted, the frequency domain characteristic parameters are extracted, and the extraction of the characteristic data for characterizing the surface damage of the pipe fitting is realized.
It should be noted that wavelet transform (wavelet analysis) is also called wavelet analysis (wavelet transform), and refers to an oscillating waveform called "mother wavelet" with a finite length or fast attenuation to represent a signal. The waveform is scaled and translated to match the input signal. Wavelet transforms fall into two broad categories: discrete Wavelet Transform (DWT) and Continuous Wavelet Transform (CWT). The main difference between the two is that the continuous transform operates on all possible scales and translations, whereas the discrete transform employs a specific subset of all scale and translation values. The wavelet transform is carried out on a given signal, namely the signal is expanded according to a certain wavelet function cluster, namely the signal is represented as a linear combination of a series of wavelet functions with different scales and different time shifts, wherein the coefficient of each term is called a wavelet coefficient, each wavelet sub-band after the wavelet decomposition contains the wavelet coefficients under different scales, and each wavelet coefficient has a corresponding value.
After 1-time wavelet transformation is carried out on the surface front view of the PVC pipe fitting, 1 approximate sub-band and 3 detail sub-bands are obtained; the 2 nd wavelet transform of the surface front view of the PVC pipe fitting specifically is to perform wavelet transform on the approximation sub-band after the first wavelet transform, and obtain an approximation sub-band and three detail sub-bands corresponding to the approximation sub-band after the first wavelet transform, so that 1 approximation sub-band and 6 detail sub-bands are obtained in total; the 3 rd wavelet transformation is carried out on the surface front view of the PVC pipe fitting, specifically, the wavelet transformation is carried out on the approximate sub-band obtained by the 2 nd wavelet transformation, and one approximate sub-band and three detail sub-bands corresponding to the approximate sub-band obtained by the 2 nd wavelet transformation can be obtained, so that 1 approximate sub-band and 9 detail sub-bands are obtained. By analogy, after n times of wavelet transformation, 1 approximate sub-band and 3n detail sub-bands are obtained, namely, 3n +1 wavelet sub-bands.
S102, respectively obtaining frequency domain indexes of each region according to the frequency of the values of different wavelet coefficients in each region, arranging the frequency domain indexes of all regions into a first frequency domain sequence, sequencing the first frequency domain sequence to obtain a second frequency domain sequence, and forming the sequence numbers of the frequency domain indexes in the second frequency domain sequence in the first frequency domain sequence into a first sequence number sequence.
In particular, the frequency f of occurrence of the values of the wavelet coefficients in each region in the values of all the wavelet coefficients in that region is dependent on the value of each wavelet coefficient in that region k Respectively obtaining the frequency domain indexes of the regions
Figure BDA0003494724060000061
In the formula, K is the number of types of values of all wavelet coefficients contained, the number of types can be obtained by performing statistics on each region after wavelet transformation, γ is a frequency domain index corresponding to each region and used for representing texture information on the surface of a pipe fitting image in the following process, and ln is a natural logarithm.
Preferably, each of the regions may be further processed by using the wavelet sub-band in each of the regions, where the processing specifically includes: the wavelet subband X is any small subband in any region, and a coefficient threshold corresponding to the wavelet subband X is determined according to the value of the wavelet coefficient in the wavelet subband X and the total number of the wavelet coefficients. Taking the wavelet coefficient of which the value of the wavelet coefficient in the wavelet sub-band X is larger than the coefficient threshold value corresponding to the wavelet sub-band X as a non-noise wavelet coefficient; and fusing wavelet sub-bands with different scales in the same direction in each region by using the number of wavelet coefficients in each small sub-band of each region and the number of non-noise wavelet coefficients, and respectively performing up-sampling on the wavelet sub-bands with small scales in each region in the fusion process, wherein the sampling size is the same as the size of the fused wavelet sub-band with large scale in the same direction.
Illustratively, when the number of transform layers of wavelet transform is 3, as shown in fig. 2, which is a schematic diagram of wavelet sub-bands after the surface front view of the PVC pipe is subjected to 3-layer wavelet transform, according to the embodiment, the wavelet sub-bands with different scales in the same direction in each region are fused, and the wavelet sub-band b in the diagram is obtained 2 And b 5 Perform fusion, wavelet sub-band b 3 And b 6 Fused, wavelet sub-band b 4 And b 7 Performing fusion and combining the wavelet sub-band b 8 、b 9 、b 10 The wavelet sub-band with small scale is retained and upsampled in the fusion process, the sampling size is the same as the size of the sub-band in the same direction of fusion, and the step can be used for realizing the up-sampling of the wavelet sub-band with small scale in the subsequent feature extraction processWavelet information of high-frequency sub-bands is utilized to extract image detail textures.
It should be noted that, in the above-mentioned process of fusing wavelet sub-bands, weights need to be set for each wavelet sub-band to be fused, and the process of setting weights often needs to combine with a threshold of a value of a wavelet coefficient, and in consideration of that when a difference of wavelet coefficients between different wavelet sub-bands is large, a noise wavelet coefficient in an image cannot be accurately identified only by a fixed wavelet coefficient threshold set by a person, in order to improve a processing effect of the wavelet sub-bands and improve an accuracy of image feature extraction, in this embodiment, corresponding wavelet coefficient thresholds are set for each wavelet sub-band.
The present embodiment establishes a setting model of wavelet coefficient threshold values for different wavelet subbands
Figure BDA0003494724060000062
For calculating wavelet coefficient thresholds corresponding to different wavelet sub-bands, where,
Figure BDA0003494724060000063
a wavelet coefficient threshold corresponding to the ith wavelet sub-band, M total number of wavelet coefficients in that wavelet sub-band,
Figure BDA0003494724060000064
is the value of the mth wavelet coefficient in that wavelet subband. Meanwhile, for image data, the wavelet coefficient of noise data is lower than that of other information in the image, so the number of wavelet coefficients of each subband with wavelet coefficients higher than a preset threshold, that is, the number of non-noise wavelet coefficients, is counted, and the fusion model of wavelet subbands in this embodiment includes:
Figure BDA0003494724060000071
in the formula, b ij As wavelet sub-band b i And wavelet sub-bands b j And (5) performing fusion processing on the wavelet sub-bands. A
Finally, arranging the frequency domain indexes of all the regions into a first frequency domain sequence, sequencing the first frequency domain sequence to obtain a second frequency domain sequence, and forming the serial numbers of all the frequency domain indexes in the second frequency domain sequence in the first frequency domain sequence into a first serial number sequence, so that the precision of the quality evaluation of the pipe fitting to be analyzed can be improved; in this embodiment, the sorting process of the first frequency domain sequence may be performed from large to small or from small to large according to the frequency domain index included in the first frequency domain sequence, so that the representation of the surface image of the normal PVC pipe on the frequency domain may be obtained, so as to evaluate the quality of the PVC pipe to be detected in the following.
S103, respectively obtaining a gradient difference vector of each pixel point according to the similarity of the pixel point in the surface front view and the eight neighborhood pixel points thereof in the gradient amplitude and the gradient direction so as to obtain the gradient characteristic parameters of each pixel point, and forming the gradient characteristic parameters of each pixel point into a first gradient characteristic sequence.
In order to improve the evaluation precision of the surface quality of the PVC pipe to be detected, the quality of the PVC pipe to be detected is detected by the gradient information of the pixel points in the surface image, the gradient descriptor is extracted firstly, each pixel point of the image data of the PVC pipe is taken as a central pixel point, the gradient amplitude and the gradient direction of the pixel points in eight neighborhoods of the PVC pipe are obtained, each pixel point in the eight neighborhoods of each pixel point is provided with one gradient descriptor, the gradient descriptor comprises the gradient amplitude and the gradient direction of the pixel point, and the gradient descriptor can reflect the gradient condition of the pixel points in the eight neighborhoods.
Then, the gradient descriptors of the eight-neighborhood pixels of each pixel are analyzed, and the gradient distribution condition of the eight-neighborhood pixels of each pixel is analyzed, in this embodiment, the cosine similarity is used to obtain the similarity between the gradient descriptors of each pixel and the gradient descriptors of the eight-neighborhood pixels of each pixel, the smaller the cosine similarity value is, the higher the gradient change difference degree between each pixel and other pixels in the eight-neighborhood of each pixel is, the cosine similarity values of the gradient descriptors of each pixel and the gradient descriptors of adjacent pixels in the eight-neighborhood of each pixel are respectively obtained and are sequentially arranged to obtain the gradient difference vector corresponding to each pixel, and the gradient difference vector corresponding to each pixel can be respectively used for analyzing the neighborhood gradient distribution condition of each pixel.
Finally, the step ofAccording to the gradient difference vector corresponding to each pixel point in the surface front view of the PVC pipe fitting to be measured, the similarity among the elements in the gradient difference vector of each pixel point is respectively obtained, and the obtaining process of the similarity among the elements in the gradient difference vector comprises the following steps: h u,v =exp(-|r u -r v L) wherein r u 、r v Respectively representing the u-th element and the v-th element in the gradient difference vector, obtaining the similarity value between any two elements in the gradient difference vector corresponding to each pixel point, and respectively taking the mean value of the similarity values between the elements in the gradient difference vector corresponding to each pixel point as the gradient characteristic parameter of each pixel point, wherein the gradient characteristic parameter can reflect the gradient characteristic of the pixel point; or respectively establishing a gradient distribution matrix corresponding to each pixel point for each pixel point, wherein the gradient distribution matrix corresponding to each pixel point respectively comprises the similarity value between any two elements in the gradient difference vector corresponding to each pixel point, and then taking the mean value of all the elements in the gradient distribution matrix of each pixel point as the gradient characteristic parameter of each pixel point. And arranging the gradient characteristic parameters corresponding to each pixel point in the surface front view of the PVC pipe fitting to be detected to obtain a first gradient characteristic sequence.
S104, respectively obtaining a second sequence number sequence and a second gradient characteristic sequence corresponding to the PVC pipe to be detected according to the method for obtaining the first sequence number sequence and the first gradient characteristic sequence corresponding to the normal PVC pipe. And obtaining a first similarity value of the first sequence number sequence and the second sequence number sequence and a second similarity value of the first gradient characteristic sequence and the second gradient characteristic sequence.
Specifically, according to the method for acquiring the first sequence number sequence corresponding to the normal PVC pipe in S104, the second sequence number sequence corresponding to the PVC pipe to be detected is acquired, the similarity between the first sequence number sequence and the second sequence number sequence is the first similarity value, and the difference degree between the PVC pipe to be detected and the normal PVC pipe in the frequency domain can be reflected by using the first similarity value.
The calculation process of the first similarity value comprises
Figure BDA0003494724060000081
Wherein D is t Calculating the difference value of the tth data in the first sequence number sequence and the tth data in the second sequence number sequence, wherein N is the total number of areas in the surface image of the normal PVC pipe fitting; the larger the first similarity value Q, the higher the surface quality of the PVC pipe to be analyzed, and the first similarity value is used for subsequent further evaluation of the quality of the PVC pipe.
And obtaining the gradient characteristic parameters of each pixel point in the surface image of the PVC pipe to be detected according to the method for obtaining the gradient characteristic parameters corresponding to each pixel point in the surface front view of the normal PVC pipe in the S104, and arranging the gradient characteristic parameters of each pixel point in the surface image of the normal PVC pipe to obtain a second gradient characteristic sequence.
And then, obtaining the difference degree epsilon of the first gradient characteristic sequence corresponding to the normal PVC pipe fitting and the second gradient characteristic sequence corresponding to the PVC pipe fitting to be detected. It should be noted that the difference degree epsilon can be obtained by an equidistance formula of mahalanobis distance and euclidean distance, and the larger the difference degree epsilon is, the lower the quality of the PVC pipe fitting to be analyzed is. Both mahalanobis distance and euclidean distance are common distance indicators used as similarity indicators between evaluation data.
And S105, obtaining a quality evaluation value according to the first similarity value and the second similarity value to evaluate the quality of the PVC pipe fitting to be detected.
In the embodiment, the surface quality evaluation value of the PVC pipe fitting is obtained by establishing a quality evaluation model
Figure BDA0003494724060000082
Wherein, F is the surface quality index of the corresponding PVC pipe, exp (Exponential curve) is an Exponential function with a natural constant e as a base, c1 is a first preset parameter, c2 is a second preset parameter, which can be set by an implementer, one preferable value of c1 is 0.6, and one preferable value of c2 is 0.4. The quality evaluation value F is larger, the quality of the surface of the PVC pipe fitting to be detected is higher, when the quality evaluation value F is larger than a preset first threshold value, the quality of the PVC pipe fitting to be detected is qualified, otherwise, the quality of the PVC pipe fitting to be detected is unqualified, the industrial application condition is not met, and the method needs to be carried outAnd (5) processing and repairing again to ensure the subsequent use effect of the PVC pipe fitting.
The artificial intelligence based PVC pipe quality detection and evaluation system of this embodiment comprises a memory and a processor, the processor executes the computer program stored in the memory to implement the method for detecting and evaluating the surface quality of the PVC pipe to be detected as described in the artificial intelligence based PVC pipe quality detection and evaluation method embodiment.
Because the embodiment of the method for detecting and evaluating the quality of the PVC pipe fitting based on artificial intelligence has been described, the method for detecting and evaluating the surface quality of the PVC pipe fitting to be detected is not described herein again.
To sum up, this embodiment obtains the quality evaluation index of waiting to detect the pipe fitting through treating to detect PVC pipe fitting surface image and analyzing and handling, combines the characteristic index of normal PVC pipe fitting image, realizes treating the evaluation of detecting PVC pipe fitting quality, has contactless, detects fast and precision advantage such as high, and has avoided visual error and visual fatigue that manual inspection brought.
The use of words such as "including," "comprising," "having," and the like in this disclosure is an open-ended term that means "including, but not limited to," and is used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that the various components or steps may be broken down and/or re-combined in the methods and systems of the present invention. Such decomposition and/or recombination should be considered as equivalents of the present disclosure.
The above-mentioned embodiments are merely examples for clearly illustrating the present invention and do not limit the scope of the present invention. It will be apparent to those skilled in the art that other variations and modifications may be made in the foregoing description, and it is not necessary or necessary to exhaustively enumerate all embodiments herein. All designs identical or similar to the present invention are within the scope of the present invention.

Claims (7)

1. A PVC pipe fitting quality detection and evaluation method based on artificial intelligence is characterized by comprising the following steps:
collecting a surface elevation of a normal PVC pipe, dividing the surface elevation into a plurality of
Figure 59020DEST_PATH_IMAGE001
And performing n-layer wavelet transform on each region to obtain 3n +1 wavelet sub-bands of each region respectively, where the wavelet transform is performed on each region
Figure 172469DEST_PATH_IMAGE002
Is a preset first positive integer, and n is a preset second positive integer;
respectively obtaining the frequency domain index of each region according to the frequency of the values of different wavelet coefficients in each region;
wherein the values of the wavelet coefficients in each region occur at the values of all wavelet coefficients in that region according to the frequency with which the values of the wavelet coefficients in that region occur
Figure 160017DEST_PATH_IMAGE003
Respectively obtaining the frequency domain index and the frequency domain index of each region
Figure 948107DEST_PATH_IMAGE004
In the formula (I), wherein,
Figure 71921DEST_PATH_IMAGE005
the number of the wavelet coefficient values is obtained by performing statistics on each region after wavelet transformation,
Figure 356271DEST_PATH_IMAGE006
the frequency domain indexes respectively corresponding to the areas are used for representing the texture information of the surface of the image of the pipe fitting subsequently,
Figure 893432DEST_PATH_IMAGE007
is a natural logarithm; arranging the frequency domain indexes of all the regions into a first frequency domain sequence, sequencing the first frequency domain sequence to obtain a second frequency domain sequence, and forming sequence numbers of the frequency domain indexes in the first frequency domain sequence in the second frequency domain sequence into a first sequence number sequence;
according to the similarity of the pixel points in the surface front view and the eight neighborhood pixel points thereof in the gradient amplitude and the gradient direction, respectively obtaining the gradient difference vector of each pixel point so as to obtain the similarity between each element in the gradient difference vector of each pixel point, wherein the obtaining process of the similarity between each element in the gradient difference vector comprises the following steps:
Figure 547529DEST_PATH_IMAGE008
wherein, in the step (A),
Figure 853746DEST_PATH_IMAGE009
respectively represent the second in the gradient difference vector
Figure 607201DEST_PATH_IMAGE010
A first and a second
Figure 569340DEST_PATH_IMAGE011
Obtaining the similarity value between any two elements in the gradient difference vector of each pixel point, taking the mean value of the similarity values between the elements in the gradient difference vector of each pixel point as the gradient characteristic parameter of each pixel point, and forming the gradient characteristic parameters of each pixel point into a first gradient characteristic sequence;
respectively obtaining a second sequence number sequence and a second gradient characteristic sequence corresponding to the PVC pipe fitting to be detected according to the first sequence number sequence corresponding to the normal PVC pipe fitting and the method for obtaining the first gradient characteristic sequence;
obtaining a first similarity value of the first sequence number sequence and the second sequence number sequence, wherein the first similarity value
Figure 197768DEST_PATH_IMAGE012
Wherein
Figure 187852DEST_PATH_IMAGE013
Is the difference value of the t-th data in the first sequence number sequence and the t-th data in the second sequence number sequence,
Figure 236841DEST_PATH_IMAGE014
is the number of said regions;
and a second similarity value of the first gradient signature sequence and the second gradient signature sequence;
and according to the first similarity value and the second similarity value, obtaining a quality evaluation value to evaluate the quality of the PVC pipe fitting to be detected.
2. The artificial intelligence based PVC pipe quality detection and evaluation method of claim 1, wherein the step of obtaining the gradient feature parameters of each pixel point by obtaining the gradient difference vector of each pixel point according to the similarity of the pixel point in the surface elevation and the eight neighborhood pixel points in the gradient amplitude and the gradient direction comprises:
respectively obtaining a gradient descriptor of each pixel point in the surface elevation, wherein the gradient descriptor of each pixel point comprises a gradient amplitude and a gradient direction of each pixel point, and the gradient difference vector of each pixel point respectively consists of cosine similarities of the gradient descriptor of each pixel point and the gradient descriptors of eight neighborhood pixel points;
and respectively establishing corresponding gradient distribution matrixes for the pixel points, wherein each element in the gradient distribution matrixes is obtained according to the difference value of each element in the gradient difference vector, and the mean value of all elements in the gradient distribution matrixes of the pixel points is used as the gradient characteristic parameter of the pixel points.
3. The method for detecting and evaluating the quality of the PVC pipe fitting based on the artificial intelligence as claimed in claim 1, wherein before the frequency domain indexes of the regions are respectively obtained according to the frequency of the values of the different wavelet coefficients in the regions, the method further comprises the step of respectively processing the regions by using wavelet sub-bands in the regions, and the processing process specifically comprises the following steps:
from wavelet sub-bands
Figure 748594DEST_PATH_IMAGE015
The value of the medium wavelet coefficient and the total number of the wavelet coefficients, determining the wavelet sub-band
Figure 180712DEST_PATH_IMAGE015
Corresponding coefficient threshold value, dividing the wavelet sub-band
Figure 635090DEST_PATH_IMAGE015
The value of the medium wavelet coefficient being greater than the wavelet sub-band
Figure 494461DEST_PATH_IMAGE015
Wavelet coefficients of corresponding coefficient thresholds as non-noise wavelet coefficients, said wavelet sub-bands
Figure 165614DEST_PATH_IMAGE015
For any of said wavelet subbands in any of said regions;
and fusing the wavelet sub-bands with different scales in the same direction in each region by using the quantity of the wavelet coefficients in each wavelet sub-band of each region and the quantity of the non-noise wavelet coefficients, wherein the wavelet sub-bands with small scales in each region are respectively subjected to upsampling in the fusion process, and the sampling size is the same as the size of the fused wavelet sub-band with large scales in the same direction.
4. The artificial intelligence based PVC pipe quality detection and evaluation method according to claim 3, wherein the wavelet is sub-banded
Figure 339107DEST_PATH_IMAGE016
Taking the average value of all wavelet coefficients as the wavelet sub-band
Figure 412105DEST_PATH_IMAGE017
A corresponding coefficient threshold.
5. The artificial intelligence based PVC pipe quality detection and evaluation method according to claim 1, wherein the obtaining of the quality evaluation value to evaluate the quality of the PVC pipe to be detected according to the first similarity value and the second similarity value comprises:
the quality evaluation value
Figure 943843DEST_PATH_IMAGE018
In which
Figure 39975DEST_PATH_IMAGE019
Is a value of the first similarity value and is,
Figure 813895DEST_PATH_IMAGE020
is a value for the second similarity value, and,
Figure 741400DEST_PATH_IMAGE021
is a first pre-set parameter of the system,
Figure 880257DEST_PATH_IMAGE022
is a second preset parameter when the quality evaluation value is
Figure 526002DEST_PATH_IMAGE023
And when the quality of the PVC pipe fitting to be detected is greater than a preset first threshold value, the quality of the PVC pipe fitting to be detected is qualified, otherwise, the quality of the PVC pipe fitting to be detected is unqualified.
6. The artificial intelligence based PVC pipe quality detection and evaluation method according to any one of claims 1 to 5, wherein the surface front view is divided into a plurality of sections
Figure 351219DEST_PATH_IMAGE024
Before, the method further comprises: pre-treating the surface elevation; the pretreatment specifically comprises: and carrying out image filtering denoising and image enhancement processing.
7. A PVC pipe fitting quality detection evaluation system based on artificial intelligence includes: comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the artificial intelligence based PVC pipe quality detection and assessment method of any one of claims 1 to 5.
CN202210109663.1A 2022-01-29 2022-01-29 PVC pipe quality detection and evaluation method and system based on artificial intelligence Active CN114445386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210109663.1A CN114445386B (en) 2022-01-29 2022-01-29 PVC pipe quality detection and evaluation method and system based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210109663.1A CN114445386B (en) 2022-01-29 2022-01-29 PVC pipe quality detection and evaluation method and system based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN114445386A CN114445386A (en) 2022-05-06
CN114445386B true CN114445386B (en) 2023-02-24

Family

ID=81370932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210109663.1A Active CN114445386B (en) 2022-01-29 2022-01-29 PVC pipe quality detection and evaluation method and system based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN114445386B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114742831B (en) * 2022-06-10 2022-08-16 南通博鎏机电科技有限公司 Artificial intelligence-based quality detection method for electric batch head
CN115371567B (en) * 2022-09-22 2023-03-21 江特科技股份有限公司 Quality detection device for PE gas hot melting pipe fitting
CN115375588B (en) * 2022-10-25 2023-02-07 山东旗胜电气股份有限公司 Power grid transformer fault identification method based on infrared imaging
CN116681702B (en) * 2023-08-03 2023-10-17 山东华光新材料技术有限公司 One-time stretching evaluation method and system for optical fiber preform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103454282A (en) * 2013-08-30 2013-12-18 陕西科技大学 Gray-gradient-based measurement method of mottle of printed product
WO2018058090A1 (en) * 2016-09-26 2018-03-29 University Of Florida Research Foundation Incorporated Method for no-reference image quality assessment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100559881C (en) * 2008-05-09 2009-11-11 中国传媒大学 A kind of method for evaluating video quality based on artificial neural net
KR101092650B1 (en) * 2010-01-12 2011-12-13 서강대학교산학협력단 Method and apparatus of assessing of image quality using quantization encoding
RU2562414C1 (en) * 2014-09-24 2015-09-10 Закрытое акционерное общество "Элекард наноДевайсез" Method for fast selection of spatial prediction mode in hevc coding system
CN104318518A (en) * 2014-09-26 2015-01-28 北京航空航天大学 Projection-onto-convex-sets image reconstruction method based on SURF matching and edge detection
CN106028026B (en) * 2016-05-27 2017-09-05 宁波大学 A kind of efficient video assessment method for encoding quality based on space-time domain structure
EP3545467A4 (en) * 2016-12-28 2019-12-18 Zhejiang Dahua Technology Co., Ltd. Methods, systems, and media for evaluating images

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103454282A (en) * 2013-08-30 2013-12-18 陕西科技大学 Gray-gradient-based measurement method of mottle of printed product
WO2018058090A1 (en) * 2016-09-26 2018-03-29 University Of Florida Research Foundation Incorporated Method for no-reference image quality assessment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Image Quality Assessment Based on Gradient Similarity";A. Liu等;《IEEE Transactions on Image Processing》;20120430;第21卷(第4期);全文 *
"基于梯度幅度和梯度方向直方图的全参考图像质量评价算法";王同罕等;《东南大学学报(自然科学版)》;20180331;第48卷(第02期);全文 *

Also Published As

Publication number Publication date
CN114445386A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN114445386B (en) PVC pipe quality detection and evaluation method and system based on artificial intelligence
CN109767422B (en) Pipeline detection and identification method based on deep learning, storage medium and robot
CN111340787B (en) Method and device for detecting and identifying wire defects of power transmission line and computer equipment
Zahran et al. Automatic weld defect identification from radiographic images
CN116168026A (en) Water quality detection method and system based on computer vision
CN111044570A (en) Defect identification and early warning method and device for power equipment and computer equipment
CN112668527A (en) Ultrasonic guided wave semi-supervised imaging detection method
CN116958036A (en) Method for inspecting pollution state of insulator by unmanned aerial vehicle based on hyperspectral technology
CN115359064A (en) Industrial defect detection method and device
CN115526885A (en) Product image defect detection method, system, device and medium
CN116630329A (en) Online visual detection method for multi-axis multi-channel numerical control system
CN114820438A (en) Method and system for detecting surface material defects of silencer
CN114972202A (en) Ki67 pathological cell rapid detection and counting method based on lightweight neural network
CN111563455B (en) Injury identification method based on time sequence signals and compressed convolutional neural network
CN103455986B (en) Random noise point detecting method based on fractional order differential gradient
CN116883987A (en) Pointer instrument reading identification method for unmanned inspection of transformer substation
CN117173145A (en) Method, device, equipment and storage medium for detecting surface defects of power equipment
CN117252818A (en) PCB defect detection method based on improved YOLOv5
CN111310839A (en) Method and system for detecting nipple position in molybdenum target image
CN115761606A (en) Box electric energy meter identification method and device based on image processing
CN115564705A (en) Burr detection precision enhancing method and system for precision standard part
CN113723461A (en) Ultrasound apparatus and ultrasound image analysis method
Wang et al. SSD-faster net: A hybrid network for industrial defect inspection
CN112365489A (en) Ultrasonic image blood vessel bifurcation detection method
CN116311086B (en) Plant monitoring method, training method, device and equipment for plant monitoring model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant