CN115170853B - Glass bottle surface spraying quality detection method - Google Patents

Glass bottle surface spraying quality detection method Download PDF

Info

Publication number
CN115170853B
CN115170853B CN202211087502.3A CN202211087502A CN115170853B CN 115170853 B CN115170853 B CN 115170853B CN 202211087502 A CN202211087502 A CN 202211087502A CN 115170853 B CN115170853 B CN 115170853B
Authority
CN
China
Prior art keywords
window
pixel point
image
pixel
side length
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
CN202211087502.3A
Other languages
Chinese (zh)
Other versions
CN115170853A (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.)
Nantong Yttrium Glass Products Co ltd
Original Assignee
Nantong Yttrium Glass Products 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 Nantong Yttrium Glass Products Co ltd filed Critical Nantong Yttrium Glass Products Co ltd
Priority to CN202211087502.3A priority Critical patent/CN115170853B/en
Publication of CN115170853A publication Critical patent/CN115170853A/en
Application granted granted Critical
Publication of CN115170853B publication Critical patent/CN115170853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Quality & Reliability (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The invention relates to the field of spraying quality classification, in particular to a glass bottle surface spraying quality detection method; acquiring an image of a glass bottle paint spraying position, and preprocessing the image to obtain a gray image; according to the more complex image and the flocculent characteristics of the powder accumulation areas, improving a measurement method of similarity in the clustering process and dividing a plurality of areas; and inputting the side images of the glass cup divided into different areas into a neural network, and analyzing the surface spraying quality of the glass bottle. The scheme of the invention can give a looser comparison area and standard to the area with powder accumulation problem in the spraying process, and solves the problem of low quality classification and identification precision of the sprayed complex pattern.

Description

Glass bottle surface spraying quality detection method
Technical Field
The invention relates to the field of spraying quality classification, in particular to a glass bottle surface spraying quality detection method.
Background
The glass bottle has good corrosion resistance, heat resistance, pressure resistance and attractive appearance, and is widely used in beverage packaging, cosmetic shells, artistic ornaments and other aspects. Meanwhile, because the glass bottle has high transparency, a colorant needs to be added before firing for realizing coloring, but factors such as temperature, time and the like can influence the color presentation, and it is not easy to realize that a relatively complex pattern is presented on a finished product. However, in reality, due to the personalized demands of different companies and products on the appearance of the glass bottle and the high-frequency update of the products, it is not practical to obtain the glass product with the target image by firing glass completely, so the pattern on the glass bottle is often obtained by spraying. Therefore, the individualized requirement on the appearance of the glass bottle is realized, and the sprayed paint can also protect the glass bottle. Although painting is performed by automatic painting devices, various complex and various drawbacks exist, and the quality of painting needs to be classified and identified.
Since floating, suspended matter, etc. in the spraying process can cause irreversible effects on the health of people, the use of machine vision to accomplish classification of the spraying quality is a trend. The existing classification of the spraying quality is mainly based on template matching and threshold values, the classification effect of the spraying pattern with a single color is good, but the accuracy of the pattern with more complexity is low, and the spraying quality is easily influenced by more diversified defects.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a glass bottle surface spraying quality detection method, which adopts the following technical scheme:
the invention discloses a glass bottle surface spraying quality detection method, which comprises the following steps:
acquiring an image of a glass bottle paint spraying position, and preprocessing the image to obtain a gray image;
according to the complexity of the image and the flocculent characteristics of the powder accumulation areas, improving a measurement method of similarity in the clustering process and dividing a plurality of areas;
and (4) inputting the side images of the glass cup divided into different areas into a neural network, and analyzing the surface spraying quality of the glass bottle.
Preferably, the process of dividing the plurality of regions is:
respectively establishing 5 × 5,7 × 7 and 9 × 9 windows by taking each pixel point in the image as a center; in each window, the gray value of each pixel point is obtained, and the maximum value of the gray values is recorded as
Figure 828794DEST_PATH_IMAGE001
Minimum value is recorded as
Figure 781313DEST_PATH_IMAGE002
Standard deviation is recorded as
Figure 776951DEST_PATH_IMAGE003
Taking the average value of the gray values, dividing the pixels with the gray values of the pixels in the window being larger than or equal to the average value into one class according to the size relation between the gray value corresponding to each pixel point and the average value, and dividing the rest pixels into another class, so that the pixels in each window can be divided into two classes according to the rules;
in each type of pixel point, if one pixel point is in the four neighborhoods of the other pixel point, the pixel points are called to be adjacent, all the adjacent pixel points are divided into a family, and at least one family can be obtained from the type of pixel points;
within each family obtained respectively from two classes within the calculation windowThe number of contained pixel points is respectively recorded as the number of the pixel points in the family with the most pixel points in each class
Figure 304885DEST_PATH_IMAGE004
Figure 626145DEST_PATH_IMAGE005
Establishing window side length emittance
Figure 678676DEST_PATH_IMAGE006
Figure DEST_PATH_IMAGE007
In the formula
Figure 337060DEST_PATH_IMAGE008
Is a coefficient of a threshold value for the value,
Figure 149858DEST_PATH_IMAGE009
the number of pixel points in the window; each window with each pixel point as the center can obtain a corresponding window side length radiance
Figure 376440DEST_PATH_IMAGE006
When it satisfies
Figure 477120DEST_PATH_IMAGE010
Then, the gray values near the pixel points are uniformly distributed; when it is satisfied with
Figure 814561DEST_PATH_IMAGE011
Then, namely the gray value distribution near the pixel point has difference, and the pixel point is positioned in the area where the powder accumulation occurs or near the connected area between different color blocks;
obtaining the corresponding window side length radiance according to the selected three windows of 5X 5, 7X 7 and 9X 9
Figure 756234DEST_PATH_IMAGE006
When there is a window with side length radiance less than
Figure 216035DEST_PATH_IMAGE012
If so, considering that the gray values near the pixel points are uniformly distributed, and determining the size of a window; otherwise, according to the three window side length radiation degrees corresponding to the pixel point
Figure 476115DEST_PATH_IMAGE006
Determining the side length of a window; each pixel point in the image corresponds to a determined window side length;
establishing a window by taking each pixel point in the image as a center and taking the side length of the corresponding window as the side length; acquiring gray values corresponding to all pixel points in the window, arranging the gray values into a group of number columns according to the positions of the window from left to right and from top to bottom, and recording the group of number columns as
Figure 381360DEST_PATH_IMAGE013
Wherein the content of the first and second substances,
Figure 738392DEST_PATH_IMAGE014
the corresponding coordinate position of the point in the image;
to be provided with
Figure 306777DEST_PATH_IMAGE015
For clustering center numbers, uniform selection among images
Figure 319732DEST_PATH_IMAGE015
Each pixel point is taken as a clustering center, and the clustering center is recorded as
Figure 766019DEST_PATH_IMAGE016
The number sequence corresponding to the cluster center is recorded as
Figure 711979DEST_PATH_IMAGE017
Calculate the sequence of numbers
Figure 451265DEST_PATH_IMAGE018
And arrays of numbers
Figure 252648DEST_PATH_IMAGE017
The similarity coefficient of (2);
to be selected
Figure 1161DEST_PATH_IMAGE015
And taking the clustering similarity coefficient corresponding to each pixel point as the similarity coefficient corresponding to each pixel point, carrying out fuzzy C-means clustering on the pictures, and dividing different color blocks in the images into different regions.
Preferably, the similarity coefficient is:
Figure 4889DEST_PATH_IMAGE019
where the dtw () function is the dtw distance in two series in parentheses,
Figure 180656DEST_PATH_IMAGE020
to adjust the coefficients.
Preferably, the cluster similarity coefficient:
Figure 466406DEST_PATH_IMAGE021
in the formula
Figure 487452DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE023
The coefficients are adjusted for the range of values,
Figure 968855DEST_PATH_IMAGE024
is a similarity coefficient.
Preferably, the neural network employs a convolutional neural network.
The invention has the beneficial effects that:
according to the spraying quality classification method for the complex spraying patterns, when different color lumps in the images are divided, the distribution characteristics near the pixel points are also used as the measurement indexes, the area sizes of the distribution characteristics near the pixel points corresponding to different areas are selected in a self-adaptive mode, on the basis that the same color lump is accurately divided, the area with the powder accumulation problem in the spraying process is provided with a looser comparison area and standard, and the problem that the quality classification and identification accuracy of the complex spraying patterns are low is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for detecting the quality of a glass bottle surface coating according to the present invention;
FIG. 2 is a top view of the relative position of the camera acquiring an image of the vial;
FIG. 3 is a schematic illustration of powder build-up that may occur during spraying;
FIG. 4 is a schematic representation of selected classes and families after spraying.
Detailed Description
The present invention will be described in detail with reference to examples.
In order to realize the content of the invention, the invention designs a glass bottle surface spraying quality detection method, which is shown in fig. 1 and comprises the following steps:
the method comprises the following steps: and acquiring an image of a glass bottle paint spraying position, and preprocessing the image to obtain a gray image.
In this embodiment, the non-spraying position above the glass bottle is mechanically fixed, and the glass bottles after being sprayed are sequentially placed on the same white background, as shown in fig. 2, images of the side surfaces of the glass cup are acquired by a camera in four directions perpendicular to the bottle body, and the images of the side surfaces of the glass cup are RGB images.
In order to avoid the influence of noise caused by environmental factors and the like, gaussian filtering is used for performing convolution on three channels of the RGB image respectively to eliminate the noise in the image. And converting the side image of the glass cup into a gray image.
Step two: according to the more complex image and the flocculent characteristic of the powder accumulation area, a measurement method of similarity in the clustering process is improved, and a plurality of areas are divided.
The existing algorithm has a good classification effect on the spraying patterns of single color, but has low precision on more complex patterns, so the algorithm takes camouflage spraying as an example for analysis. Because the covering power of different paints is different, when the patterns are sprayed, the patterns can be sprayed from light to dark, the soil color is firstly sprayed to be used as the ground color, and then light green, medium green and dark green are sprayed in sequence. When adding new color in turn, because the new color of adding often the hiding power is stronger, when the spray gun powder deposit, supply powder inequality, spray gun atomization scheduling problem appear, can produce the powder deposit problem as shown in figure 3. The powder accumulation area is flocculent, the surface is rough, the structure is open and loose, and a plurality of point-shaped gaps are formed inside the powder accumulation area. Because the spraying pattern is complex and powder accumulation problems may exist at different positions, when the image is clustered and divided into different color blocks by directly using the conventional clustering algorithm, the powder accumulation position structure is open and loose, so that the difference of pixel points at different positions is large, and one powder accumulation area can be divided into a plurality of different areas, so that the number of the identified powder accumulation greatly exceeds the actual number, and the subsequent judgment on the spraying quality of the surface of the glass bottle is influenced. Therefore, when clustering is performed, the classification cannot be performed only according to the relationship between the pixel points, and the related information near the pixel points should be considered, so as to ensure that the positions where the powder accumulation problem occurs are completely classified into the same region. Meanwhile, because the colors in the patterns are relatively similar, the color blocks with different colors are also guaranteed to be divided into different areas in the clustering process, namely, the division of the pixel points is more strict near the adjacent boundary positions of the color blocks.
Therefore, the embodiment provides a method for adaptively matching each pixel point to select the corresponding window side length, and the pixel points inside the color block correspond to the smaller window side length so as to ensure the accuracy of the pixel points corresponding to the clustering center; and at the border position of the color block and the pixel points in the region where the powder accumulation occurs, the matching degree of the peripheral conditions of the pixel points is considered more corresponding to the side length of a larger window so as to prevent the same region from being divided into a plurality of regions.
The method comprises the following specific steps:
and respectively establishing 5 × 5,7 × 7 and 9 × 9 windows by taking each pixel point in the image as a center. In each window, the gray value of each pixel point is obtained, and the maximum value of the gray values is recorded as
Figure 112260DEST_PATH_IMAGE001
Minimum value is noted
Figure 321525DEST_PATH_IMAGE002
Standard deviation is recorded as
Figure 647726DEST_PATH_IMAGE003
. And taking the average value of the gray values, dividing the pixels with the gray values of the pixels in the window being larger than or equal to the average value into one class according to the size relationship between the gray value corresponding to each pixel point and the average value, and dividing the rest pixels into another class, so that the pixels in each window can be divided into two classes according to the rules. In each type of pixel point, if one pixel point is in the four neighborhoods of the other pixel point, the pixel points are called to be adjacent, all the adjacent pixel points are divided into one family, at least one family can be obtained from one type of pixel point, and the number of the specific families is different according to the position of the pixel point.
Calculating the number of pixel points contained in each group respectively obtained in two classes in the window, and respectively recording the number of the pixel points in the group with the largest number of pixel points contained in each class as the number of the pixel points in the group
Figure 891626DEST_PATH_IMAGE004
Figure 205932DEST_PATH_IMAGE025
(wherein the content of the first and second components,
Figure 168072DEST_PATH_IMAGE004
class corresponding to gray value greater than average). Each window corresponding to each pixel point can obtain a group of indexes. As shown in fig. 4, the schematic diagram is 5*5 window, the pixels corresponding to the two classes are represented by squares filled with white and dark backgrounds, respectively, and the white corresponds to the class whose gray value is greater than the average value. The class represented by white filling comprises two families, and the number of pixels in each family is 8,3; the class represented by the dark filling has three groups, and the number of pixel points in each group is 8,5,1. I.e. correspond in the figure
Figure 47034DEST_PATH_IMAGE004
Is a mixture of a water-soluble polymer and a water-soluble polymer, wherein the water-soluble polymer is 8,
Figure 942177DEST_PATH_IMAGE025
corresponding parts are marked with a right-lower direction oblique line and a left-lower direction oblique line, respectively, at 8.
According to the related indexes, the side length radiance of the window is constructed
Figure 365069DEST_PATH_IMAGE006
Figure 847128DEST_PATH_IMAGE026
In the formula
Figure 13667DEST_PATH_IMAGE008
Is a threshold coefficient, the empirical value is 7;
Figure 232159DEST_PATH_IMAGE009
the number of pixels in the window. Each window with each pixel point as the center can obtain a corresponding window side length radiance
Figure 386803DEST_PATH_IMAGE006
When it is satisfied with
Figure 57956DEST_PATH_IMAGE010
And then, namely the gray value near the pixel point is distributed more uniformly without obvious difference, the pixel point is positioned inside a color block with good spraying quality, and a stricter standard is adopted when the similarity degree between super pixel blocks is compared subsequently. When it is satisfied
Figure 762607DEST_PATH_IMAGE011
And then, the gray value distribution near the pixel point is obviously different, the pixel point is positioned in an area where the powder accumulation occurs or near an area where different color blocks are connected, and a proper fuzzy interval is given when the similarity degree between super pixel blocks is compared subsequently.
When the gray value distribution in the window corresponding to the pixel point is more uniform, the difference between the maximum value and the minimum value is smaller, and the number of the pixel points in the family is smaller, the side length radiance of the window corresponding to the pixel point is smaller
Figure 835605DEST_PATH_IMAGE006
The smaller.
When a pixel point is in the sprayed pattern and a certain color block deviates to the inside of the center, the gray value difference between the pixel points in the window corresponding to the pixel point is smaller, namely the side length radiance of the window corresponding to the pixel point
Figure 164080DEST_PATH_IMAGE006
Is small; when the pixel point is near the boundary position of different color blocks in the sprayed pattern or near the position of accumulated powder, the gray value difference between the pixel points in the window corresponding to the pixel point is larger, namely the side length radiance of the window corresponding to the pixel point
Figure 56950DEST_PATH_IMAGE006
Is relatively large.
Because three windows of 5X 5, 7X 7 and 9X 9 are respectively selected for each pixel point, when the side length radiance of the windows corresponding to the three windows is measured
Figure 830871DEST_PATH_IMAGE006
Wherein there is a window side length emittance less than
Figure 325087DEST_PATH_IMAGE012
When (1)
Figure 526261DEST_PATH_IMAGE012
Is a threshold coefficient, and the empirical value is 7), the gray value distribution near the pixel point is considered to be uniform, the window corresponding to the pixel point is selected to be 5*5, otherwise, the radiance of the side lengths of the three windows corresponding to the pixel point is determined
Figure 640848DEST_PATH_IMAGE006
Determining window side length
Figure 15197DEST_PATH_IMAGE027
Figure 298673DEST_PATH_IMAGE028
In the formula
Figure 201907DEST_PATH_IMAGE029
Respectively taking 5 × 5,7 × 7 and 9 × 9 windows with the pixel point as the center to correspond to the window side length radiancy;
Figure 866107DEST_PATH_IMAGE030
is a value function and has the function of taking the maximum value in brackets; the ln () function is a logarithmic function with e as the base, i.e., taking the e of the value in brackets as the base logarithm; in the formula
Figure 214786DEST_PATH_IMAGE031
Figure 913621DEST_PATH_IMAGE032
The value range adjustment coefficients are used for adjusting corresponding function values, and the empirical values are 2,4 respectively. In the formula, A [, ]]For value function, the function is to output 5,7 according to the value in the bracketThe value closest to the value in the parentheses in the three 9 digits, that is, the output value is one of 5,9,11; if the value in the bracket is the same as the distance between two values, outputting a larger value; for example, if the value in parentheses is 5.8, since the value closest to 5.8 of the three numbers 5,7,9 is 5, the corresponding value of the output is 5.
When the pixel point corresponds to three window side length radiances
Figure 987756DEST_PATH_IMAGE006
The larger the medium-maximum value is, the longer the window side length corresponding to the pixel point is
Figure 109558DEST_PATH_IMAGE027
The larger. So far, each pixel point in the image corresponds to a determined window side length.
And establishing a window by taking each pixel point in the image as a center and the side length of the corresponding window as the side length. Acquiring gray values corresponding to all pixel points in the window, arranging the gray values into a group of number columns according to the positions of the window from left to right and from top to bottom, and recording the group of number columns as
Figure 497814DEST_PATH_IMAGE018
Figure 316734DEST_PATH_IMAGE033
The corresponding coordinates of the point in the image).
To be provided with
Figure 257709DEST_PATH_IMAGE015
Figure 896501DEST_PATH_IMAGE015
Is a constant coefficient, and the empirical value is 30) is the number of clustering centers, and is uniformly selected in the image
Figure 354027DEST_PATH_IMAGE015
Each pixel point is used as a clustering center. Recording the center of the cluster as
Figure 965137DEST_PATH_IMAGE016
The number sequence corresponding to the cluster center is recorded as
Figure 148119DEST_PATH_IMAGE017
Figure 211890DEST_PATH_IMAGE034
For the corresponding coordinate of the point in the image, different letters are adopted for distinguishing due to the appearance in the same formula), and the similarity coefficient of the spraying point is constructed according to the related indexes
Figure 473107DEST_PATH_IMAGE035
Figure 499575DEST_PATH_IMAGE036
In the formula, the dtw () function is dtw distance of two number series in brackets, so that the similarity of the two number series can be obtained, and the larger the similarity is, the smaller the dtw distance is, which is a known technology. In the formula
Figure 289677DEST_PATH_IMAGE020
To adjust the coefficients, the effect is to prevent the denominator from being 0 and the empirical value from being 1.
So far, each pixel point and each clustering center have a spraying point similarity coefficient
Figure 903061DEST_PATH_IMAGE035
. And for each pixel point, taking the minimum one of the spraying point similarity coefficients of the pixel point as the final spraying point similarity coefficient of the point. When the similarity coefficient of the spraying point of a certain pixel point
Figure 203854DEST_PATH_IMAGE035
And when the gray value distribution characteristic is larger, the gray value distribution characteristic near the pixel point is closer to the distribution characteristic near the cluster center.
Each pixel point in the image has a corresponding final spraying point similarityThe coefficient is used as the basis to normalize the final spraying point similarity coefficient corresponding to each pixel point, and the normalized value is recorded as
Figure 586294DEST_PATH_IMAGE024
Further obtain the cluster similarity coefficient corresponding to each pixel point
Figure 812876DEST_PATH_IMAGE037
Figure 851239DEST_PATH_IMAGE021
In the formula
Figure 755391DEST_PATH_IMAGE022
Figure 930021DEST_PATH_IMAGE023
The empirical values are 2,0.5, respectively, for the value range adjustment coefficient, which is used to adjust the corresponding function value.
Clustering similarity coefficient corresponding to each pixel point in image
Figure 389821DEST_PATH_IMAGE037
Value range of
Figure 151366DEST_PATH_IMAGE038
Cluster similarity coefficient
Figure 354814DEST_PATH_IMAGE037
The effect of (c) is only a regulatory range.
To be selected
Figure 383950DEST_PATH_IMAGE015
The cluster centers are cluster centers, and the cluster similarity coefficient corresponding to each pixel point is used
Figure 513186DEST_PATH_IMAGE037
As a coefficient of similarity corresponding to each pixel point, the picture is processedAnd (4) line fuzzy C-means clustering (similarity is originally defined in the original algorithm, and other steps in the original algorithm are unchanged, so that the method is a known technology). The algorithm can divide different color blocks in the image into different areas, the same color block corresponds to the same area, and the position where the accumulated powder appears corresponds to one area.
Adding a clustering similarity coefficient into an original algorithm
Figure 260562DEST_PATH_IMAGE037
The coefficient used as the similarity can consider the gray value distribution condition near each pixel point in the clustering process, and on the premise of ensuring that the pixel points in the same color block are divided into the same region, the phenomenon that the positions where the accumulated powder appears are divided into different regions due to the loose structure of the flaws is avoided.
Step three: and (4) inputting the side images of the glass cup divided into different areas into a neural network, and analyzing the surface spraying quality of the glass bottle.
And inputting the side images of the glass cup divided into different areas into a neural network, and analyzing whether each area corresponds to a powder accumulation area. The neural network adopts a convolution neural network, such as ResNet34 and SEnet, the loss function adopts a cross entropy loss function, and the optimization algorithm adopts Adam; the network output is the spraying quality of the surface of the glass bottle corresponding to the image, and the label data of the network is artificially marked and comprises two areas, namely a flawless area and a powder accumulation flawed area.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (4)

1. The glass bottle surface spraying quality detection method is characterized by comprising the following steps:
acquiring an image of a glass bottle paint spraying position, and preprocessing the image to obtain a gray image;
according to the complexity of the image and the flocculent characteristics of the powder accumulation areas, improving a measurement method of similarity in the clustering process and dividing a plurality of areas;
inputting the side images of the glass cup divided into different areas into a neural network, and analyzing the surface spraying quality of the glass bottle;
the process of dividing the plurality of regions is as follows:
respectively establishing 5 × 5,7 × 7 and 9 × 9 windows by taking each pixel point in the image as a center; in each window, the gray value of each pixel point is obtained, and the maximum value of the gray values is recorded as
Figure DEST_PATH_IMAGE002
Minimum value is noted
Figure DEST_PATH_IMAGE004
And the standard deviation is recorded as S;
taking the average value of the gray values, dividing the pixels with the gray values of the pixels in the window being larger than or equal to the average value into one class according to the size relationship between the gray value corresponding to each pixel and the average value, and dividing the rest pixels into another class, so that the pixels in each window can be divided into two classes according to the rules;
in each type of pixel point, if one pixel point is in the four neighborhoods of the other pixel point, the pixel points are called to be adjacent, all the adjacent pixel points are divided into a family, and at least one family can be obtained from the type of pixel points;
calculating the number of pixel points contained in each group respectively obtained in two classes in the window, and respectively recording the number of the pixel points in the group with the largest number of pixel points contained in each class as the number of the pixel points in the group
Figure DEST_PATH_IMAGE006
Figure DEST_PATH_IMAGE008
Establishing window side length emittance
Figure DEST_PATH_IMAGE010
Figure DEST_PATH_IMAGE012
In the formula
Figure DEST_PATH_IMAGE014
Is a coefficient of a threshold value for the value,
Figure DEST_PATH_IMAGE016
the number of pixel points in the window is; each window with each pixel point as the center can obtain a corresponding window side length radiance
Figure 242565DEST_PATH_IMAGE010
When it satisfies
Figure DEST_PATH_IMAGE018
Then, the gray values near the pixel points are uniformly distributed; when it is satisfied with
Figure DEST_PATH_IMAGE020
Then, the gray value distribution near the pixel point is different, and the pixel point is positioned in the area where the powder accumulation occurs or in the vicinity of the connected area among different color blocks;
obtaining the corresponding window side length radiance according to the selected three windows of 5X 5, 7X 7 and 9X 9
Figure 500984DEST_PATH_IMAGE010
When there is a window with side length radiance less than
Figure DEST_PATH_IMAGE022
Then, the gray value near the pixel point is considered to be uniformly distributed, and a window is determinedSize; otherwise, according to the side length radiance of three windows corresponding to the pixel point
Figure 687246DEST_PATH_IMAGE010
Determining the side length of a window; each pixel point in the image corresponds to a determined window side length;
establishing a window by taking each pixel point in the image as a center and taking the side length of the corresponding window as the side length; acquiring gray values corresponding to all pixel points in the window, arranging the gray values into a group of number columns according to the positions of the window from left to right and from top to bottom, and recording the group of number columns as
Figure DEST_PATH_IMAGE024
Wherein, in the step (A),
Figure DEST_PATH_IMAGE026
the corresponding coordinate position of the point in the image;
to be provided with
Figure DEST_PATH_IMAGE028
For clustering the center number, selecting uniformly in the image
Figure 285717DEST_PATH_IMAGE028
Each pixel point is taken as a clustering center, and the clustering center is recorded as
Figure DEST_PATH_IMAGE030
The number sequence corresponding to the cluster center is recorded as
Figure DEST_PATH_IMAGE032
Calculate the sequence of numbers
Figure 444297DEST_PATH_IMAGE024
And arrays of numbers
Figure 94458DEST_PATH_IMAGE032
The similarity coefficient of (2);
to selectIs taken out
Figure 158228DEST_PATH_IMAGE028
And taking the clustering similarity coefficient corresponding to each pixel point as the similarity coefficient corresponding to each pixel point, carrying out fuzzy C-means clustering on the pictures, and dividing different color blocks in the images into different regions.
2. The glass bottle surface spraying quality detection method according to claim 1, wherein the similarity coefficient is:
Figure DEST_PATH_IMAGE034
where the dtw () function is the dtw distance in two series in parentheses,
Figure DEST_PATH_IMAGE036
to adjust the coefficients.
3. The glass bottle surface spraying quality detection method as claimed in claim 2, wherein the clustering similarity coefficient:
Figure DEST_PATH_IMAGE038
in the formula
Figure DEST_PATH_IMAGE040
Figure DEST_PATH_IMAGE042
The coefficients are adjusted for the range of values,
Figure DEST_PATH_IMAGE044
is a similarity coefficient.
4. The method for detecting the spraying quality of the surface of the glass bottle as claimed in claim 1, wherein the neural network is a convolutional neural network.
CN202211087502.3A 2022-09-07 2022-09-07 Glass bottle surface spraying quality detection method Active CN115170853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211087502.3A CN115170853B (en) 2022-09-07 2022-09-07 Glass bottle surface spraying quality detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211087502.3A CN115170853B (en) 2022-09-07 2022-09-07 Glass bottle surface spraying quality detection method

Publications (2)

Publication Number Publication Date
CN115170853A CN115170853A (en) 2022-10-11
CN115170853B true CN115170853B (en) 2022-11-25

Family

ID=83482075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211087502.3A Active CN115170853B (en) 2022-09-07 2022-09-07 Glass bottle surface spraying quality detection method

Country Status (1)

Country Link
CN (1) CN115170853B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115641331B (en) * 2022-11-18 2023-03-28 山东天意装配式建筑装备研究院有限公司 Intelligent detection method for spraying effect of wallboard film
CN116399267A (en) * 2023-04-12 2023-07-07 宁波天一华邦粉末涂料有限公司 System for identifying surface uniformity grade of polyester powder coating product
CN116703893B (en) * 2023-08-01 2023-09-29 四川深山农业科技开发有限公司 Konjak gel measurement and control method based on machine vision
CN117058142B (en) * 2023-10-11 2023-12-19 贵州省畜牧兽医研究所 Goose house killing spray liquid image detection method based on machine vision

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446914A (en) * 2016-09-28 2017-02-22 天津工业大学 Road detection based on superpixels and convolution neural network
CN108520274B (en) * 2018-03-27 2022-03-11 天津大学 High-reflectivity surface defect detection method based on image processing and neural network classification
CN113724231B (en) * 2021-09-01 2023-12-29 广东工业大学 Industrial defect detection method based on semantic segmentation and target detection fusion model

Also Published As

Publication number Publication date
CN115170853A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
CN115170853B (en) Glass bottle surface spraying quality detection method
CN106295656B (en) Image outline characteristic extraction method and device based on image color lump content
US20210201535A1 (en) Systems and methods for matching color and appearance of target coatings
CN109147005B (en) Self-adaptive dyeing method and system for infrared image, storage medium and terminal
CN110610496B (en) Fluorescent glue defect segmentation method with robust illumination change
CN108596891A (en) A kind of method of counting towards multiple types mixing silk cocoon
CN110443778B (en) Method for detecting irregular defects of industrial products
US20230349765A1 (en) Apparatus and Method for Effect Pigment Identification
CN115311294B (en) Glass bottle body flaw identification and detection method based on image processing
MX2011003977A (en) Method and system for item identification.
WO2021098163A1 (en) Corner-based aerial target detection method
US11978233B2 (en) Systems and methods for matching color and appearance of target coatings
CN116912261B (en) Plastic mold injection molding surface defect detection method
CN110400278A (en) A kind of full-automatic bearing calibration, device and the equipment of color of image and geometric distortion
CN116805313B (en) Defect detection method for sprayer nozzle
CN109191429A (en) A kind of 3D printing nozzle detection method based on machine vision
CN116958125B (en) Electronic contest host power supply element defect visual detection method based on image processing
CN114092682A (en) Small hardware fitting defect detection algorithm based on machine learning
CN116485788B (en) Image processing method and mobile phone PET (polyethylene terephthalate) protective film priming process quality detection method
CN117522864A (en) European pine plate surface flaw detection method based on machine vision
CN109635809A (en) A kind of superpixel segmentation method towards vision degraded image
CN111105418A (en) High-precision image segmentation method for rectangular target in image
CN110322454B (en) High-resolution remote sensing image multi-scale segmentation optimization method based on spectrum difference maximization
CN117893531B (en) Intelligent detection method for clothing quality in clothing processing process
CN110499233A (en) A kind of light-source system, counter and method of counting for colonometer

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