CN115641331B - Intelligent detection method for spraying effect of wallboard film - Google Patents
Intelligent detection method for spraying effect of wallboard film Download PDFInfo
- Publication number
- CN115641331B CN115641331B CN202211442339.8A CN202211442339A CN115641331B CN 115641331 B CN115641331 B CN 115641331B CN 202211442339 A CN202211442339 A CN 202211442339A CN 115641331 B CN115641331 B CN 115641331B
- Authority
- CN
- China
- Prior art keywords
- pixel point
- sub
- pixel
- target
- region
- 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
Links
- 238000005507 spraying Methods 0.000 title claims abstract description 114
- 230000000694 effects Effects 0.000 title claims abstract description 70
- 238000001514 detection method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims abstract description 13
- 230000002159 abnormal effect Effects 0.000 claims description 9
- 239000007921 spray Substances 0.000 claims description 5
- 230000004069 differentiation Effects 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 abstract description 12
- 239000012528 membrane Substances 0.000 description 11
- 239000000463 material Substances 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 5
- 238000005259 measurement Methods 0.000 description 4
- 238000003064 k means clustering Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000012216 screening Methods 0.000 description 3
- 230000002146 bilateral effect Effects 0.000 description 2
- 239000004809 Teflon Substances 0.000 description 1
- 229920006362 Teflon® Polymers 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000004035 construction material Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000003973 paint Substances 0.000 description 1
- 229920006395 saturated elastomer Polymers 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to an intelligent detection method for the spraying effect of a wallboard film. The method comprises the following steps: segmenting the image to obtain each subregion; obtaining each target subregion according to the hue, saturation and brightness corresponding to each pixel point in each subregion; obtaining characteristic indexes of all pixel points in all target sub-regions according to neighborhood pixel points of all pixel points in all target sub-regions; for any pixel point in any target sub-region, obtaining the attraction degree of the pixel point in each target sub-region to each corresponding first pixel point according to the similarity between the pixel point and each corresponding first pixel point; obtaining a probability index corresponding to each pixel point in each target subregion according to the characteristic index and the attraction degree; obtaining each initial clustering central point according to the possibility index; and obtaining the spraying effect of the sprayed wallboard film according to the initial clustering central point. The invention can reduce the calculation amount.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an intelligent detection method for a spraying effect of a wallboard film.
Background
The film is a process device for producing industrial products, is mainly suitable for manufacturing industry and processing industry, is widely used due to the advantages of high working efficiency, simple and clear use mode, construction material saving and the like, and generally, after the production of the wallboard film is finished, the surface of the wallboard film needs to be sprayed according to production requirements or the adaptive environment of the wallboard, the spraying material comprises but is not limited to spray paint, anticorrosive material, teflon and the like, after the spraying of the wallboard film, the processed wallboard is more attractive, more importantly, the rejection rate of products can be reduced, namely, the use of the spraying material can help the wallboard to be demoulded from the film more easily, and the improvement of yield is facilitated. However, the spraying of the wallboard film is currently performed by an automatic spraying machine, which accelerates the spraying speed, but frequently generates wrong phenomena such as missing spraying when some non-flat wallboard film materials are sprayed, and these phenomena will directly affect the quality and the aesthetic property of each piece of wallboard after forming processing if the phenomena are not identified and detected for further processing, so that the detection of the spraying effect of the wallboard film is very important.
In the prior art, a detection method for realizing the spraying effect of a wallboard film generally utilizes a traditional clustering algorithm to segment an acquired image, and then realizes the detection of the spraying effect of the wallboard film based on a segmented result, but the traditional clustering algorithm adopts random selection on the processing of an initial clustering center point, and because the clustering result has higher dependency on the initial clustering center point, the randomly selected initial clustering center point can cause more iterations to occur in a clustering process, i.e. the calculation period is very easy to be overlong, and the calculation amount is larger, so that the problem to be solved is to ensure the precision of the detection of the spraying effect of the wallboard film on the basis of reducing the calculation amount.
Disclosure of Invention
In order to solve the problems, the invention provides an intelligent detection method for the spraying effect of a wallboard film, which adopts the following technical scheme:
the embodiment of the invention provides an intelligent detection method for the spraying effect of a wallboard film, which comprises the following steps:
acquiring a target image of the sprayed wallboard film;
segmenting the wallboard film target image to obtain each subarea corresponding to the wallboard film target image; obtaining a spraying difference index corresponding to each subregion according to the hue, saturation and brightness corresponding to each pixel point in each subregion; obtaining each target subarea according to the spraying difference index;
obtaining the similarity between any two pixel points in each target sub-region according to the hue, saturation, brightness and coordinates corresponding to any two pixel points in each target sub-region; obtaining characteristic indexes of all pixel points in all target sub-regions according to neighborhood pixel points of all pixel points in all target sub-regions;
for any pixel point in any target sub-region, according to the similarity between the pixel point and each corresponding first pixel point, obtaining the attraction degree of the pixel point to each corresponding first pixel point in each target sub-region, wherein the first pixel point is other pixel points except the pixel point in the target sub-region; according to the characteristic indexes and the attraction degree, possibility indexes corresponding to all pixel points in all target sub-regions are obtained;
obtaining each initial clustering central point according to the possibility index; obtaining each clustering cluster according to the initial clustering central point; and obtaining the spraying effect of the sprayed wallboard film according to each cluster.
Preferably, obtaining the spraying difference index corresponding to each sub-region according to the hue, saturation and brightness corresponding to each pixel point in each sub-region includes:
calculating to obtain the square of the difference value between the tone corresponding to each pixel in each sub-region and the tone mean value of the corresponding sub-region, and recording as a first difference value corresponding to each pixel in each sub-region;
calculating to obtain the square of the difference between the saturation corresponding to each pixel in each sub-area and the saturation mean value of the corresponding sub-area, and recording as a second difference value corresponding to each pixel in each sub-area;
calculating to obtain the square of the difference between the brightness corresponding to each pixel in each sub-area and the brightness mean value of the corresponding sub-area, and recording as a third difference value corresponding to each pixel in each sub-area;
and obtaining the spraying difference index corresponding to each subarea according to the first difference value, the corresponding second difference value and the corresponding third difference value corresponding to each pixel point in each subarea.
Preferably, for any sub-area, the spraying difference index corresponding to the sub-area is calculated according to the following formula:
wherein,for the spray differentiation index corresponding to this sub-region, <' >>For the number of pixels in the sub-area>For the normalized first difference value corresponding to the ith pixel point in the sub-area, based on the difference value in the sub-area>For the normalized second difference value corresponding to the ith pixel point in the sub-region, be->And the normalized third difference value corresponding to the ith pixel point in the sub-area.
Preferably, obtaining each target sub-area according to the spraying difference index includes:
and judging whether the spraying difference index corresponding to each subregion is larger than a preset first threshold, and if so, recording the corresponding subregion as a target subregion.
Preferably, for any target sub-region, the similarity between any two pixel points in the target sub-region is calculated according to the following formula:
wherein,for the a-th image in the target sub-regionThe similarity between a pixel point and the b-th pixel point is->For the normalized hue corresponding to the a-th pixel point in the target sub-region, < > H>For the normalized hue corresponding to the b-th pixel point in the target sub-region, < > H>For the normalized saturation corresponding to the a-th pixel point in the target sub-region, <' > H>For the normalized saturation corresponding to the b-th pixel point in the target subregion>For the normalized luminance corresponding to the a-th pixel point in the target sub-region>For the normalized brightness, corresponding to the b-th pixel point in the target sub-region, is->For the abscissa value corresponding to the a-th pixel point in the target subregion, <>For the abscissa value corresponding to the b-th pixel point in the target subregion, <' >>Is the longitudinal coordinate value corresponding to the a-th pixel point in the target subregion>And the ordinate value corresponding to the b-th pixel point in the target subregion. />
Preferably, obtaining the characteristic index of each pixel point in each target sub-region according to the neighborhood pixel point of each pixel point in each target sub-region includes:
and calculating the mean value of the similarity between the pixel and each corresponding neighborhood pixel for any pixel in any target subregion, and recording the mean value as the characteristic index of the pixel.
Preferably, for any pixel point in any target sub-region, obtaining the attraction degree of the pixel point to each corresponding first pixel point in each target sub-region according to the similarity between the pixel point and each corresponding first pixel point, including:
recording the maximum value of the similarity between the pixel point and each corresponding first pixel point as a first characteristic value corresponding to the pixel point;
and recording the ratio of the similarity between the pixel point and each corresponding first pixel point to the first characteristic value corresponding to the pixel point as the attraction degree of the pixel point to each corresponding first pixel point.
Preferably, obtaining a probability index corresponding to each pixel point in each target sub-region according to the characteristic index and the attraction degree includes:
for any pixel point in any target sub-region:
recording the maximum value of the attraction degree of the pixel point to each corresponding first pixel point as a second characteristic value corresponding to the pixel point;
obtaining the probability index corresponding to the pixel point according to the following formula:
wherein,corresponding to the pixel pointLikelihood indicator->Is the characteristic index corresponding to the pixel point, Q is the number of the first pixel point corresponding to the pixel point, and is greater than or equal to>For a second characteristic value corresponding to this pixel point, is selected>The attraction degree of the pixel point to the q-th first pixel point corresponding to the pixel point.
Preferably, obtaining each initial clustering center point according to the probability index includes:
constructing a pixel point set based on all pixel points in all target sub-regions;
sequencing all the pixel points in the pixel point set according to the sequence of the probability indexes from large to small to obtain a pixel point sequence;
and recording the pixel points of the preset number in the pixel point sequence as initial clustering center points.
Preferably, the spraying effect of the sprayed wallboard film is obtained according to each cluster, and the spraying effect comprises the following steps:
calculating to obtain the sum of the normalized saturation mean value, the normalized hue mean value and the normalized brightness mean value corresponding to each cluster, and recording as a first judgment index corresponding to each cluster;
calculating to obtain the sum of the saturation variance, the hue variance and the brightness variance corresponding to each cluster, and recording as a second judgment index corresponding to each cluster;
recording the cluster with the largest number of pixel points as a normal cluster; recording other cluster clusters except the normal cluster as cluster clusters to be judged; for any cluster to be judged:
calculating to obtain an absolute value of a difference value between a first judgment index corresponding to the cluster to be judged and a first judgment index corresponding to a normal cluster, and recording the absolute value as a characteristic judgment index corresponding to the cluster to be judged;
recording the sum of the characteristic judgment index corresponding to the cluster to be judged and the second judgment index corresponding to the cluster to be judged as a comprehensive judgment index;
judging whether the comprehensive judgment index after the normalization processing is larger than a preset second threshold value or not, and if so, marking the comprehensive judgment index as an abnormal cluster;
and when the ratio of the sum of the areas of the regions corresponding to the abnormal clusters to the area of the target image of the wallboard film is greater than a preset third threshold value, determining that the spraying effect is unqualified.
Has the beneficial effects that: the method comprises the steps of firstly obtaining a target image of the sprayed wallboard film, then segmenting the target image of the wallboard film to obtain each sub-region corresponding to the target image of the wallboard film, screening the sub-regions according to the hue, saturation and brightness corresponding to each pixel point in each sub-region to obtain the target sub-region, subsequently analyzing the characteristics of the pixel points in the target sub-region, and obtaining an initial clustering center point based on the analysis result. Then, based on hue, saturation, brightness and coordinates corresponding to any two pixel points in the target sub-region, the similarity between any two pixel points in each target sub-region is obtained, and according to neighborhood pixel points of each pixel point in each target sub-region, a characteristic index of each pixel point in each target sub-region is obtained, wherein the characteristic index is a basis for obtaining a possibility index subsequently; then, for any pixel point in any target sub-region, according to the similarity between the pixel point and each corresponding first pixel point, obtaining the attraction degree of the pixel point to each corresponding first pixel point in each target sub-region; and then, according to the characteristic indexes and the attraction degree, obtaining possibility indexes corresponding to all pixel points in all target sub-regions, wherein the possibility indexes are reference bases for obtaining initial clustering center points subsequently, namely the initial clustering center points obtained based on the possibility indexes can not only reduce the calculation period during subsequent clustering, but also enable the clustering effect to be better. Finally, obtaining each clustering cluster according to the initial clustering central point; and obtaining the spraying effect of the sprayed wallboard film according to each cluster.
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 embodiments or the description of 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 an intelligent detection method for the spraying effect of a wallboard film in the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments of the present invention belong to the protection scope of the embodiments of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment provides an intelligent detection method for spraying effect of a wallboard film, which comprises the following steps:
as shown in fig. 1, the intelligent detection method for the spraying effect of the wallboard film comprises the following steps:
and S001, acquiring a target image of the sprayed wallboard film.
The spraying of the wallboard film is finished by an automatic spraying machine at present, the spraying mode of the machine frequently generates wrong phenomena such as missing spraying and the like when some non-flat wallboard film materials are sprayed, and the quality and the aesthetic property of each wallboard formed and processed can be directly influenced if the phenomena are not identified and detected for further treatment; the method for detecting the spraying effect of the wallboard film in the prior art generally utilizes a traditional clustering algorithm to segment an acquired image, and then realizes the detection of the spraying effect of the wallboard film based on a segmented result, but the traditional clustering algorithm adopts random selection in the processing of an initial clustering center point, and because the clustering result has higher dependency on the initial clustering center point, the randomly selected initial clustering center point may cause a plurality of iterations to occur in a clustering process, i.e., the calculation period is very easy to be too long, and the calculation amount is large, therefore, the main purpose of the embodiment is to analyze the surface image of the wallboard film after spraying, select the initial clustering center point, and ensure the precision of the detection of the spraying effect of the wallboard film on the basis of reducing the calculation amount by the selected initial clustering center point.
The embodiment utilizes the industry CCD camera to carry out the wallboard membrane surface image after the spraying to automatic spraying machine and gathers, and the image of gathering is the RGB image, and the parameter of camera when carrying out image acquisition and arranging the position and need set up according to actual conditions to the image of gathering should cover the surface of wallboard membrane completely. However, in the process of acquiring an image by an industrial CCD camera, the image quality is easily affected by processing environmental noise, and subsequent analysis is affected, so that the embodiment performs denoising processing on the acquired surface image of the wallboard film, and the embodiment performs denoising processing on the image by using a bilateral filter to obtain a denoised surface image of the wallboard film, which is recorded as an initial image of the wallboard film after spraying; moreover, bilateral filtering and denoising are known technologies, and the detailed process is not described in detail herein.
Since the initial clustering center point is selected in the area with poor spraying effect and normal spraying effect, the method for selecting the initial clustering center point can ensure that the selected initial clustering center point has both good spraying effect and poor spraying effect, and can reduce the calculation period compared with the method for randomly selecting the clustered initial clustering center point, after the wallboard membrane is sprayed, the color on the surface of the wallboard membrane can be covered by the color of the spraying material, a certain color difference can exist between the surface area with poor spraying effect and the area with good spraying effect, namely when all the areas have good spraying effect or all the areas have poor spraying effect, the areas at the moment have the characteristic of consistent color, when the areas both have good spraying effect and poor spraying effect, the areas at the moment can have the characteristic of inconsistent color, and after the initial image of the wallboard membrane is subjected to HSV color space conversion, the color characteristics can be analyzed, so that the obtained initial image of the wallboard membrane is converted into HSV color space, the converted initial image of the wallboard is recorded as a saturated color image, and the target brightness of the wallboard corresponds to three target pixels.
Thus, a target image of the sprayed wallboard film is obtained.
Step S002, segmenting the wallboard film target image to obtain each subarea corresponding to the wallboard film target image; obtaining a spraying difference index corresponding to each subregion according to the hue, saturation and brightness corresponding to each pixel point in each subregion; and obtaining each target subarea according to the spraying difference index.
In the embodiment, the initial clustering center point is selected in the area with poor spraying effect so as to reduce the iteration times during clustering, namely reduce the calculation period; therefore, the method analyzes the target image of the wallboard film to obtain sub-areas with poor spraying effect; the method specifically comprises the following steps:
firstly, uniformly dividing the target image of the wallboard film tool by using the size of a preset area to obtain each subarea corresponding to the target image of the wallboard film tool; the size of each sub-area is equal to that of the preset area, and the size of the preset area can be set according to actual conditions in specific application; since the three parameters corresponding to each pixel point on the target image of the wallboard film tool need to be combined for analysis subsequently, the embodiment needs to normalize the three parameters corresponding to each pixel point on the target image of the wallboard film tool, so that the value ranges are all 0 to 1, and calculate to obtain the normalized hue mean value, the normalized saturation mean value and the normalized brightness mean value of each subregion; when the local area has both good spraying effect and poor spraying effect, the area at the moment can have the characteristic of inconsistent color, so that whether the color in the sub-area is consistent or not is measured by utilizing the difference between the hue, the saturation and the brightness corresponding to each pixel point in each sub-area and the hue mean value, the saturation mean value and the brightness mean value of the corresponding sub-area.
Therefore, the square of the difference between the hue corresponding to each pixel in each sub-region and the hue mean value of the corresponding sub-region is calculated and obtained, and is recorded as the first difference value corresponding to each pixel in each sub-region; calculating to obtain the square of the difference between the saturation corresponding to each pixel in each sub-area and the saturation mean value of the corresponding sub-area, and recording as a second difference value corresponding to each pixel in each sub-area; calculating to obtain the square of the difference between the brightness corresponding to each pixel in each sub-area and the brightness mean value of the corresponding sub-area, and recording as a third difference value corresponding to each pixel in each sub-area; the difference value can reflect color characteristics; therefore, the spraying difference index corresponding to each subarea is obtained according to the first difference value, the corresponding second difference value and the corresponding third difference value corresponding to each pixel point in each subarea; the spraying difference index is used for reflecting the color characteristics corresponding to the subareas; for any subarea, calculating the spraying difference index corresponding to the subarea according to the following formula:
wherein,for the spray differentiation index corresponding to this sub-region, <' >>For the number of pixels in the sub-area>For the normalized first difference value corresponding to the ith pixel point in the sub-area, based on the difference value in the sub-area>For the normalized second difference value corresponding to the ith pixel point in the sub-region, be->And the normalized third difference value corresponding to the ith pixel point in the sub-area.
When all the pixel points in the sub-region are pixel points with good spraying effect, the value of the spraying difference index corresponding to the sub-region in the condition is smaller, because the parameter difference between the pixel points is not large; when one part of the pixels in the sub-region is the pixels with poor spraying effect and the other part of the pixels with good spraying effect, the value of the spraying difference index corresponding to the sub-region is larger under the condition, because the parameter difference between the pixels is more obvious; when all the pixel points in the sub-region are pixel points with poor spraying effect, the value of the spraying difference index corresponding to the sub-region in the condition is small, and the parameter difference between the pixel points is not large; thus, the deviceThe smaller the size is, the more consistent the color in the sub-area is, namely, the more possible all the pixel points with good spraying effect or all the pixel points with poor spraying effect in the sub-area are; />The larger the area is, the more inconsistent the color in the sub-area is, namely, the more possible pixel points with good spraying effect and poor spraying effect exist in the sub-area; and isFor the sum of the normalized first difference value, the normalized second difference value and the normalized third difference value corresponding to the ith pixel point in the sub-area>The smaller, the greater the number of cells>The smaller.
In the embodiment, the initial clustering center point of the clustering is selected in the area where the spraying effect is not good and the spraying is normal, and the pixel points with the poor spraying effect and the normal spraying exist in the sub-area with the larger spraying difference index, so that the sub-areas are screened based on the spraying difference index; the method specifically comprises the following steps:
judging whether the spraying difference index corresponding to each subregion is larger than a preset first threshold, and if so, recording the corresponding subregion as a target subregion; in specific applications, the preset first threshold may be set according to actual conditions, and the preset first threshold is set to 0.15 in this embodiment.
Thus, each target sub-area corresponding to the target image of the wallboard film is obtained.
S003, obtaining the similarity between any two pixel points in each target sub-region according to the hue, the saturation, the brightness and the coordinates corresponding to any two pixel points in each target sub-region; and obtaining the characteristic index of each pixel point in each target sub-region according to the neighborhood pixel point of each pixel point in each target sub-region.
Then, the target sub-region is analyzed, the possibility that each pixel point in the target sub-region is an initial clustering center point is obtained based on the analysis result, the initial clustering center point is determined based on the possibility that each pixel point in the target sub-region is the initial clustering center point, and the selected initial clustering center points have both pixel points which are normally sprayed and pixel points which are not well sprayed; the method comprises the following specific steps:
since the distribution of the target sub-regions in the image is not fixed, the target sub-regions may appear at any position on the surface of the film, and the distribution of the pixel points with good spraying effect and the pixel points with poor spraying effect in the target sub-regions has randomness, the present embodiment needs to analyze the pixel points in each target sub-region respectively; firstly, according to the hue, saturation, brightness and coordinates corresponding to each pixel point in each target sub-region, calculating to obtain the similarity between any two pixel points in each target sub-region; the similarity is a basis for obtaining possibility indexes corresponding to all pixel points in all target sub-regions subsequently; for any target subregion, calculating the similarity between any two pixel points in the target subregion according to the following formula:
wherein,is the similarity between the a pixel point and the b pixel point in the target sub-area, device for selecting or keeping>For the normalized hue corresponding to the a-th pixel point in the target sub-region, < > H>For the normalized hue corresponding to the b-th pixel point in the target sub-region, < > H>For the normalized saturation corresponding to the a-th pixel point in the target sub-region, <' > H>For the normalized saturation corresponding to the b-th pixel point in the target sub-region, <' > H>For the normalized luminance corresponding to the a-th pixel point in the target sub-region, < >>For the normalized brightness, corresponding to the b-th pixel point in the target sub-region, is->For the abscissa value corresponding to the a-th pixel point in the target subregion, <>For the abscissa value corresponding to the b-th pixel point in the target subregion, <' >>Is the longitudinal coordinate value corresponding to the a-th pixel point in the target subregion>And the longitudinal coordinate value corresponding to the b-th pixel point in the target subregion.
The larger the pixel value is, the more similar the pixel points a and b in the target sub-region are, namely the higher the probability that the two pixel points belong to the same category is; and when->、/>、/>、And->The smaller the hour, the>The larger; is/are>、/>、/>、And->The hue difference, saturation difference, brightness difference and position difference between the a-th pixel point and the b-th pixel point in the target sub-area can be represented.
The similarity of any pixel point and the corresponding neighborhood pixel point can reflect the possibility that the pixel point is the initial clustering center point, and when the similarity of the pixel point and the corresponding neighborhood pixel point is high, the possibility that the pixel point is the initial clustering center point is higher, otherwise, the possibility is lower; therefore, in the following embodiment, according to the similarity between each pixel point in each target sub-region and the corresponding neighborhood pixel point, the feature index of each pixel point in each target sub-region is obtained, and the neighborhood pixel point refers to eight neighborhood pixel points of each pixel point; the characteristic index is a basis for subsequently calculating a probability index corresponding to the pixel point; for any pixel point in any target sub-area, calculating the characteristic index of the pixel point in the target sub-area according to the following formula:
wherein,for the characteristic index of the c-th pixel point in the target subregion>The number of neighborhood pixel points of the c-th pixel point in the target sub-region is->Is 8, is>Similarity between the c-th pixel point in the target sub-area and the d-th neighborhood pixel point corresponding to the c-th pixel point is calculated; />The larger the probability is, the larger the probability that the pixel point is the initial clustering center point is; />The smaller, the indication->The larger.
Step S004, for any pixel point in any target sub-area, according to the similarity between the pixel point and each corresponding first pixel point, obtaining the attraction degree of the pixel point in each target sub-area to each corresponding first pixel point, wherein the first pixel point is other pixel points except the pixel point in the target sub-area; and obtaining a possibility index corresponding to each pixel point in each target sub-area according to the characteristic index and the attraction degree.
Because the k-means clustering algorithm is to gather similar pixel points to the vicinity of a cluster center, that is to say, each pixel point in the same category is likely to be a clustering center point of a certain cluster, if for a certain pixel point in a category, when the degree of attraction of the pixel point to other pixel points in the same category is larger, the possibility that the pixel point is the clustering center point is higher; therefore, the following attraction degree of each pixel point in each target sub-region to other pixel points is specifically:
for any pixel point in any target sub-region: recording other pixel points except the pixel point in the target sub-region as first pixel points corresponding to the pixel point, acquiring the maximum value of the similarity between the pixel point and each corresponding first pixel point, and recording the maximum value as a first characteristic value corresponding to the pixel point; obtaining the attraction degree of the pixel point to each corresponding first pixel point according to the similarity between the pixel point and each corresponding first pixel point and the first characteristic value corresponding to the pixel point; the attraction degree of the pixel point to each corresponding first pixel point can reflect the possibility that the pixel point is the initial clustering center point, and the greater the attraction degree of the pixel point to each corresponding first pixel point is, the greater the possibility that the pixel point is the initial clustering center point is indicated; calculating the attraction degree of the pixel point to each corresponding first pixel point according to the following formula:
wherein,is the attraction degree of the pixel point to the corresponding q-th first pixel point, is greater than or equal to>The degree of similarity between the pixel point and the corresponding q-th first pixel point is determined, and>a first characteristic value corresponding to the pixel point; when the similarity between the pixel point and the corresponding qth first pixel point is larger, the corresponding->The larger, and->A reference value for measuring the attraction degree of the pixel point to the q-th first pixel point; />Is less than or equal to->I.e. is->Is a value of 1 or less; when/is>The closer to 1, the greater the specification->And/or>The closer the pixel point is, the higher the attraction degree of the pixel point to the q-th first pixel point is, that is, the higher the possibility that the q-th first pixel point selects the pixel point as a clustering center point is.
Because in the clustering result, the pixel point has only two results, one is a clustering central point, and the other is a subordinate point in a certain cluster, the degree that the pixel point in the image supports a certain point to become the clustering central point can be high or low, and the possibility that the pixel point becomes the clustering central point can be judged; therefore, the following embodiment obtains a probability index corresponding to the pixel point according to the characteristic index of the pixel point and the attraction degree of the pixel point to each first pixel point, specifically: acquiring the maximum value of the attraction of the pixel point to each corresponding first pixel point, and recording the maximum value as a second characteristic value corresponding to the pixel point; obtaining a probability index corresponding to the pixel point according to the attraction degree of the pixel point to each first pixel point, a second characteristic value corresponding to the pixel point and the characteristic index of the pixel point; the probability index is a basis for obtaining an initial clustering central point through subsequent screening; obtaining the probability index corresponding to the pixel point according to the following formula:
wherein,is the corresponding possibility index of the pixel point, and>is the characteristic index corresponding to the pixel point, Q is the number of the first pixel point corresponding to the pixel point, and is greater than or equal to>A second characteristic value corresponding to the pixel point; />The larger the pixel point is, the higher the possibility that the pixel point is the initial clustering center point is; />Reflects the support degree of the qth first pixel point to the cluster center point of the pixel point which becomes the class to which the pixel point belongs, namely ^ er>The larger the value is, the more the qth first pixel point supports the pixel point to become a clustering center point;the larger the size, the more the neighborhood pixel point of the pixel point supports the pixel point to become a clustering center point.
Thus, a probability index corresponding to each pixel point in each target sub-region is obtained.
Step S005, obtaining each initial clustering center point according to the possibility index; obtaining each clustering cluster according to the initial clustering central point; and obtaining the spraying effect of the sprayed wallboard film according to each cluster.
The probability index corresponding to each pixel point in each target sub-region is higher, so that the probability that the corresponding pixel point is the initial clustering center point is higher; therefore, in the embodiment, a pixel point set is constructed according to all pixel points in all target sub-regions; sequencing all the pixel points in the pixel point set according to the sequence from large to small of the possibility index to obtain a pixel point sequence; recording the front preset number of pixel points in the pixel point sequence as initial clustering center points; the preset number needs to be set according to actual conditions, and the preset number is set to be 1% of the total number of pixel points on the target image of the wallboard film; according to the embodiment, the clustering effect is better according to the initial clustering center points obtained through screening, and the obtained initial clustering center points have the points with normal spraying and the points with poor spraying effect, so that the embodiment can reduce the iteration times during subsequent clustering and reduce the calculated amount.
For any pixel point on the target image of the wallboard film: marking other pixel points except the pixel point on the target image of the wallboard film as characteristic points; calculating the similarity between the pixel point and each feature point; the calculation method of the similarity is the same as that of the similarity between any two pixel points in each target subregion, so detailed description is omitted; recording the ratio of the similarity between the pixel point and each feature point to the maximum value of the similarity between the pixel point and each feature point as a first target index between the pixel point and each feature point; recording the similarity between the pixel point and each feature point as a second target index between the pixel point and each feature point; for any feature point; obtaining a measurement distance between the pixel point and the feature point according to a first target index and a second target index between the pixel point and the feature point; the measurement distance is a basis for clustering by a k-means clustering algorithm, and when a first target index and a second target index between the pixel point and the feature point are smaller, the probability that the pixel point and the feature point are clustered into a class is higher; calculating the metric distance between the pixel point and the feature point according to the following formula:
wherein,for the measured distance between the pixel point and the feature point>For a first target criterion between the pixel point and the characteristic point>A second target index between the pixel point and the characteristic point; />The smaller the pixel point is, the more likely the pixel point and the feature point are grouped into a class; />The greater the->The smaller.
Therefore, the measurement distance between any two pixel points on the target image of the wallboard membrane can be obtained through the process, and then each pixel point on the target image of the wallboard membrane is clustered based on each initial clustering center point corresponding to the k-means clustering algorithm and the measurement distance between any two pixel points on the target image of the wallboard membrane, so that each clustering cluster is obtained.
And then analyzing each cluster to obtain the spraying effect of the sprayed wallboard film, which specifically comprises the following steps:
the area with poor spraying effect on the sprayed wallboard membrane is smaller than the area with normal spraying under the normal condition, namely the cluster with the most pixel points is the normal spraying area, so that the spraying effect of the sprayed wallboard membrane is measured based on the difference between each cluster and the cluster corresponding to normal spraying in the embodiment, the variance value of the normal cluster is smaller under the normal condition, and the difference between the parameter mean value corresponding to the abnormal cluster and the parameter mean value corresponding to the normal cluster is larger.
Therefore, the saturation mean, the hue mean and the brightness mean of all the pixels in each cluster are calculated and obtained in the following embodiment and are respectively recorded as the saturation mean, the hue mean and the brightness mean corresponding to each cluster; recording the sum of the normalized saturation mean value, the normalized hue mean value and the normalized brightness mean value corresponding to each cluster as a first judgment index corresponding to each cluster; calculating to obtain saturation variance, hue variance and brightness variance of all pixel points in each cluster, and respectively recording the saturation variance, hue variance and brightness variance corresponding to each cluster; and recording the sum of the saturation variance, the hue variance and the brightness variance corresponding to each cluster as a second judgment index corresponding to each cluster.
Acquiring a cluster with the largest number of pixel points, and marking as a normal cluster; recording other cluster except the normal cluster as a cluster to be judged; for any cluster to be judged: calculating to obtain an absolute value of a difference value between a first judgment index corresponding to the cluster to be judged and a first judgment index corresponding to a normal cluster, and recording the absolute value as a characteristic judgment index corresponding to the cluster to be judged; recording the sum of the characteristic judgment index corresponding to the cluster to be judged and the second judgment index corresponding to the cluster to be judged as a comprehensive judgment index; and judging whether the comprehensive judgment index after the normalization processing is larger than a preset second threshold value, if so, indicating that the spraying effect of the image area corresponding to the cluster is not good, and marking the image area as an abnormal cluster.
Then calculating the sum of the areas corresponding to the abnormal clustering clusters, and when the ratio of the sum of the areas corresponding to the abnormal clustering clusters to the area of the target image of the wallboard film is greater than a preset third threshold value, judging that the spraying effect is unqualified, namely, indicating that the spraying effect of the sprayed wallboard film is poor and spraying may need to be carried out again; and when the ratio of the sum of the areas of the regions corresponding to the abnormal clusters to the area of the target image of the wallboard film is larger, the spraying effect is poorer; in specific applications, the preset second threshold and the preset third threshold may be set according to actual conditions, where the preset second threshold is set to be 0.4, and the preset third threshold is set to be 0.3 in this embodiment.
In this embodiment, a target image of the sprayed wallboard film is first obtained, then the target image of the wallboard film is segmented to obtain sub-regions corresponding to the target image of the wallboard film, the sub-regions are screened according to hue, saturation and brightness corresponding to each pixel point in each sub-region to obtain a target sub-region, subsequently, characteristics of pixel points in the target sub-region are analyzed, and an initial clustering center point is obtained based on an analysis result. Then, based on the hue, saturation, brightness and coordinates corresponding to any two pixel points in the target sub-region, obtaining the similarity between any two pixel points in each target sub-region, and obtaining the characteristic index of each pixel point in each target sub-region according to the neighborhood pixel point of each pixel point in each target sub-region, wherein the characteristic index is the basis for obtaining the possibility index subsequently; then, for any pixel point in any target sub-region, obtaining the attraction degree of the pixel point in each target sub-region to each corresponding first pixel point according to the similarity between the pixel point and each corresponding first pixel point; and then, according to the characteristic indexes and the attraction degree, obtaining possibility indexes corresponding to all pixel points in all target sub-regions, wherein the possibility indexes are reference bases for obtaining initial clustering center points subsequently, namely the initial clustering center points obtained based on the possibility indexes can not only reduce the calculation period during subsequent clustering, but also enable the clustering effect to be better. Finally, obtaining each clustering cluster according to the initial clustering central point; and obtaining the spraying effect of the sprayed wallboard film according to each cluster.
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; the modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application, and are included in the protection scope of the present application.
Claims (9)
1. An intelligent detection method for spraying effect of a wallboard film is characterized by comprising the following steps:
acquiring a target image of the sprayed wallboard film;
segmenting the wallboard film target image to obtain each subarea corresponding to the wallboard film target image; obtaining a spraying difference index corresponding to each subregion according to the hue, saturation and brightness corresponding to each pixel point in each subregion; obtaining each target subarea according to the spraying difference index;
obtaining the similarity between any two pixel points in each target sub-region according to the hue, saturation, brightness and coordinates corresponding to any two pixel points in each target sub-region; obtaining characteristic indexes of all pixel points in all target sub-regions according to neighborhood pixel points of all pixel points in all target sub-regions;
for any pixel point in any target sub-region, according to the similarity between the pixel point and each corresponding first pixel point, obtaining the attraction degree of the pixel point to each corresponding first pixel point in each target sub-region, wherein the first pixel point is other pixel points except the pixel point in the target sub-region; according to the characteristic indexes and the attraction degree, possibility indexes corresponding to all pixel points in all target sub-regions are obtained;
obtaining each initial clustering central point according to the possibility index; obtaining each clustering cluster according to the initial clustering central point; obtaining the spraying effect of the sprayed wallboard film according to each cluster;
obtaining a probability index corresponding to each pixel point in each target sub-region according to the characteristic index and the attraction degree, wherein the probability index comprises the following steps:
for any pixel point in any target sub-region:
recording the maximum value of the attraction degree of the pixel point to each corresponding first pixel point as a second characteristic value corresponding to the pixel point;
obtaining the probability index corresponding to the pixel point according to the following formula:
wherein,is the corresponding possibility index of the pixel point, and>is the characteristic index corresponding to the pixel point, Q is the number of the first pixel point corresponding to the pixel point, and is greater than or equal to>For a second characteristic value corresponding to this pixel point, is selected>The attraction degree of the pixel point to the q-th first pixel point corresponding to the pixel point.
2. The method for intelligently detecting the spraying effect of the wallboard film according to claim 1, wherein obtaining the spraying difference index corresponding to each sub-area according to the hue, saturation and brightness corresponding to each pixel point in each sub-area comprises:
calculating to obtain the square of the difference value between the tone corresponding to each pixel in each sub-region and the tone mean value of the corresponding sub-region, and recording as a first difference value corresponding to each pixel in each sub-region;
calculating to obtain the square of the difference between the saturation corresponding to each pixel in each sub-area and the saturation mean value of the corresponding sub-area, and recording as a second difference value corresponding to each pixel in each sub-area;
calculating to obtain the square of the difference between the brightness corresponding to each pixel in each sub-area and the brightness mean value of the corresponding sub-area, and recording as a third difference value corresponding to each pixel in each sub-area;
and obtaining a spraying difference index corresponding to each subregion according to the first difference value, the corresponding second difference value and the corresponding third difference value corresponding to each pixel point in each subregion.
3. The intelligent detection method for the spraying effect of the wallboard film according to claim 2, wherein for any sub-area, the spraying difference index corresponding to the sub-area is calculated according to the following formula:
wherein,for the spray differentiation index corresponding to this sub-region, <' >>For the number of pixels in the sub-area>For the normalized first difference value corresponding to the ith pixel point in the sub-area, be->For the normalized second difference value corresponding to the ith pixel point in the sub-region, be->Is thatAnd the normalized third difference value corresponding to the ith pixel point in the sub-area.
4. The method of claim 1, wherein obtaining target sub-regions based on the spray variance index comprises:
and judging whether the spraying difference index corresponding to each subregion is larger than a preset first threshold, and if so, recording the corresponding subregion as a target subregion.
5. The intelligent detection method for the spraying effect of the wallboard film of claim 1, wherein for any target sub-area, the similarity between any two pixel points in the target sub-area is calculated according to the following formula:
wherein,for the similarity between the a-th pixel point and the b-th pixel point in the target sub-area, be->For the normalized hue corresponding to the a-th pixel point in the target sub-region, < > H>For the normalized hue corresponding to the b-th pixel point in the target sub-region, < > H>For the normalized saturation corresponding to the a-th pixel point in the target subregion>For the b-th image in the target sub-areaThe normalized saturation corresponding to the pixel point is->For the normalized luminance corresponding to the a-th pixel point in the target sub-region>For the normalized luminance corresponding to the b-th pixel point in the target sub-region,for the abscissa value corresponding to the a-th pixel point in the target subregion, <>An abscissa value corresponding to the b-th pixel point in the target subregion, <>For the longitudinal coordinate value corresponding to the a-th pixel point in the target subregion>And the ordinate value corresponding to the b-th pixel point in the target subregion.
6. The intelligent detection method for the spraying effect of the wallboard film of claim 1, wherein obtaining the characteristic index of each pixel point in each target sub-region according to the neighborhood pixel point of each pixel point in each target sub-region comprises:
and for any pixel point in any target sub-region, calculating the mean value of the similarity between the pixel point and each corresponding neighborhood pixel point, and recording the mean value as the characteristic index of the pixel point.
7. The method of claim 1, wherein for any pixel point in any target sub-region, obtaining the attraction of the pixel point to the corresponding first pixel point in each target sub-region according to the similarity between the pixel point and the corresponding first pixel point comprises:
recording the maximum value of the similarity between the pixel point and each corresponding first pixel point as a first characteristic value corresponding to the pixel point;
and recording the ratio of the similarity between the pixel point and each corresponding first pixel point to the first characteristic value corresponding to the pixel point as the attraction degree of the pixel point to each corresponding first pixel point.
8. The method of claim 1, wherein obtaining each initial cluster center point according to the likelihood index comprises:
constructing a pixel point set based on all pixel points in all target sub-regions;
sequencing all the pixel points in the pixel point set according to the sequence from large to small of the possibility index to obtain a pixel point sequence;
and recording the pixel points of the preset number in the pixel point sequence as initial clustering center points.
9. The intelligent detection method for the spraying effect of the wallboard film according to claim 1, wherein obtaining the spraying effect of the sprayed wallboard film according to each cluster comprises:
calculating to obtain the sum of the normalized saturation mean value, the normalized hue mean value and the normalized brightness mean value corresponding to each cluster, and recording as a first judgment index corresponding to each cluster;
calculating to obtain the sum of the saturation variance, the hue variance and the brightness variance corresponding to each cluster, and recording as a second judgment index corresponding to each cluster;
recording the cluster with the largest number of pixel points as a normal cluster; recording other cluster except the normal cluster as a cluster to be judged; for any cluster to be judged:
calculating to obtain an absolute value of a difference value between a first judgment index corresponding to the cluster to be judged and a first judgment index corresponding to a normal cluster, and recording the absolute value as a characteristic judgment index corresponding to the cluster to be judged;
recording the sum of the characteristic judgment index corresponding to the cluster to be judged and the second judgment index corresponding to the cluster to be judged as a comprehensive judgment index;
judging whether the comprehensive judgment index after the normalization processing is larger than a preset second threshold value or not, and if so, marking the comprehensive judgment index as an abnormal cluster;
and when the ratio of the sum of the areas of the regions corresponding to the abnormal clusters to the area of the target image of the wallboard film is greater than a preset third threshold value, judging that the spraying effect is unqualified.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211442339.8A CN115641331B (en) | 2022-11-18 | 2022-11-18 | Intelligent detection method for spraying effect of wallboard film |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211442339.8A CN115641331B (en) | 2022-11-18 | 2022-11-18 | Intelligent detection method for spraying effect of wallboard film |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115641331A CN115641331A (en) | 2023-01-24 |
CN115641331B true CN115641331B (en) | 2023-03-28 |
Family
ID=84947860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211442339.8A Active CN115641331B (en) | 2022-11-18 | 2022-11-18 | Intelligent detection method for spraying effect of wallboard film |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115641331B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113935666A (en) * | 2021-12-17 | 2022-01-14 | 武汉精装房装饰材料有限公司 | Building decoration wall tile abnormity evaluation method based on image processing |
CN115294113A (en) * | 2022-09-30 | 2022-11-04 | 南通佳木汇木制品有限公司 | Wood veneer quality detection method |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368851B (en) * | 2017-07-11 | 2020-12-22 | 华南理工大学 | Rapid fuzzy C-means clustering image segmentation method with neighborhood selection strategy |
CN110853013A (en) * | 2019-11-11 | 2020-02-28 | 四川大学青岛研究院 | Method for detecting spraying quality of outer wall of white household appliance |
EP3866113A1 (en) * | 2020-02-17 | 2021-08-18 | Agile Robots AG | Image segmentation methods and apparatus |
AU2020103332A4 (en) * | 2020-11-09 | 2021-01-21 | Bhatt, Kaushal MR | IMLS-Weed Recognition/Classification: Intelligent Weed Recognition /Classification using Machine Learning System |
CN112819775B (en) * | 2021-01-28 | 2022-07-19 | 中国空气动力研究与发展中心超高速空气动力研究所 | Segmentation and reinforcement method for damage detection image of aerospace composite material |
CN113344947B (en) * | 2021-06-01 | 2022-05-10 | 电子科技大学 | Super-pixel aggregation segmentation method |
CN115170853B (en) * | 2022-09-07 | 2022-11-25 | 南通钇龙玻璃制品有限公司 | Glass bottle surface spraying quality detection method |
-
2022
- 2022-11-18 CN CN202211442339.8A patent/CN115641331B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113935666A (en) * | 2021-12-17 | 2022-01-14 | 武汉精装房装饰材料有限公司 | Building decoration wall tile abnormity evaluation method based on image processing |
CN115294113A (en) * | 2022-09-30 | 2022-11-04 | 南通佳木汇木制品有限公司 | Wood veneer quality detection method |
Also Published As
Publication number | Publication date |
---|---|
CN115641331A (en) | 2023-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022099598A1 (en) | Video dynamic target detection method based on relative statistical features of image pixels | |
CN113628189B (en) | Rapid strip steel scratch defect detection method based on image recognition | |
CN114926436A (en) | Defect detection method for periodic pattern fabric | |
CN116030060B (en) | Plastic particle quality detection method | |
CN117058137B (en) | Visual inspection method for production quality of laminated glass | |
CN117392469B (en) | Perovskite battery surface coating detection method and system based on machine vision | |
CN116071363B (en) | Automatic change shaped steel intelligent production monitoring system | |
CN104598914A (en) | Skin color detecting method and device | |
CN117853493B (en) | Wallboard production quality detection method based on image processing | |
CN116309553B (en) | Method for detecting electroplating defects of non-planar electroplating hardware | |
CN116342583A (en) | Anti-pilling performance detection method for spinning production and processing | |
CN115641331B (en) | Intelligent detection method for spraying effect of wallboard film | |
CN116188465A (en) | Crop growth state detection method based on image processing technology | |
CN110472697B (en) | Water body identification method and device based on iterative classification | |
CN115861318B (en) | Cotton processing production quality detection method | |
CN116258968B (en) | Method and system for managing fruit diseases and insects | |
CN116168024A (en) | Corrugated paper production quality real-time detection method based on computer vision | |
CN115880297A (en) | Quilt cover dyeing quality evaluation method based on machine vision | |
CN113724238B (en) | Ceramic tile color difference detection and classification method based on feature point neighborhood color analysis | |
CN110827272B (en) | Tire X-ray image defect detection method based on image processing | |
Di et al. | The research on the feature extraction of sunflower leaf rust characteristics based on color and texture feature | |
CN111563536B (en) | Bamboo strip color self-adaptive classification method based on machine learning | |
CN118037732B (en) | Fuzhuan tea flowering dynamic detection method based on artificial intelligence | |
CN114324822A (en) | Land quality monitoring system and method based on big data | |
CN116958134B (en) | Plastic film extrusion quality evaluation method based on image processing |
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 |