CN115641331A - Intelligent detection method for spraying effect of wallboard film - Google Patents
Intelligent detection method for spraying effect of wallboard film Download PDFInfo
- Publication number
- CN115641331A CN115641331A CN202211442339.8A CN202211442339A CN115641331A CN 115641331 A CN115641331 A CN 115641331A CN 202211442339 A CN202211442339 A CN 202211442339A CN 115641331 A CN115641331 A CN 115641331A
- Authority
- CN
- China
- Prior art keywords
- pixel point
- pixel
- sub
- region
- target sub
- 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.)
- Granted
Links
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, 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; according to the characteristic indexes and the attraction degree, obtaining possibility indexes corresponding to all pixel points in all target sub-regions; 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 center 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 the 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 the 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 is randomly selected on the basis of 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 the clustering process, namely, the calculation period is very easy to be overlong, and the calculation amount is larger, so that the problem of ensuring the precision of the detection of the spraying effect of the wallboard film on the basis of reducing the calculation amount is solved.
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 spraying difference indexes corresponding to the sub-regions according to the hue, saturation and brightness corresponding to each pixel point in each sub-region; 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 a 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;
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 cluster according to the initial cluster 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 the content of the first and second substances,the spraying difference index corresponding to the subarea is obtained,for the number of pixels in the sub-area,the normalized first difference value corresponding to the ith pixel point in the sub-region,the normalized second difference value corresponding to the ith pixel point in the sub-area,is thatAnd 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 the content of the first and second substances,is the similarity between the a pixel point and the b pixel point in the target sub-area,for the normalized hue corresponding to the a-th pixel point in the target sub-region,for the normalized hue corresponding to the b-th pixel point in the target sub-region,the normalized saturation corresponding to the a-th pixel point in the target sub-region,for the normalized saturation corresponding to the b-th pixel point in the target sub-region,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,an abscissa value corresponding to the a-th pixel point in the target sub-region,an abscissa value corresponding to the b-th pixel point in the target sub-region,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.
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 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.
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 the content of the first and second substances,is the probability index corresponding to the pixel point,is the characteristic index corresponding to the pixel point, Q is the number of the first pixel points corresponding to the pixel point,a second feature value corresponding to the pixel point,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 pixels with 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, judging 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 reduce the calculation period during subsequent clustering and can 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 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 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 is described in detail as follows:
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 well-known technologies, and detailed descriptions of the specific processes are omitted here.
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.
S002, segmenting the wallboard film target image to obtain each sub-area 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 embodiment analyzes the target image of the wallboard film to obtain a sub-area 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 are required to be analyzed subsequently, the embodiment requires 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, saturation mean value and brightness mean value of each sub-region; 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 the content of the first and second substances,the spraying difference index corresponding to the subarea is obtained,for the number of pixels in the sub-area,the normalized first difference value corresponding to the ith pixel point in the sub-region,the normalized second difference value corresponding to the ith pixel point in the sub-area,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 subarea are pixel points with poor spraying effect, the value of the spraying difference index corresponding to the subarea under the condition is smaller because the parameter difference between the pixel points is not large; thus, it is possible to provideThe 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 color is, the more inconsistent the color in the sub-region is, namely, the more possible pixel points with good spraying effect and poor spraying effect exist in the sub-region; and isThe 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, theThe 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 specifically comprises the following 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 the basis for obtaining the probability index corresponding to each pixel point in each target sub-region subsequently; for any target subregion, calculating the similarity between any two pixel points in the target subregion according to the following formula:
wherein the content of the first and second substances,is the similarity between the a pixel point and the b pixel point in the target sub-area,for the normalized hue corresponding to the a-th pixel point in the target sub-region,for the b-th image in the target sub-areaThe normalized hue corresponding to the pixel point,for the normalized saturation corresponding to the a-th pixel point in the target sub-region,for the normalized saturation corresponding to the b-th pixel point in the target sub-region,for the normalized luminance corresponding to the a-th pixel point in the target sub-region,the normalized brightness corresponding to the b-th pixel point in the target sub-region,an abscissa value corresponding to the a-th pixel point in the target sub-region,an abscissa value corresponding to the b-th pixel point in the target sub-region,the ordinate value corresponding to the a-th pixel point in the target sub-region,and the ordinate value corresponding to the b-th pixel point in the target subregion.
The larger the pixel value is, the more similar the pixel point a and the pixel point b in the target sub-region are, namely the greater the probability that the two pixel points belong to the same category is; and when、、、Andthe smaller, theThe larger; the above-mentioned、、、Andthe hue difference, the saturation difference, the brightness difference and the 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 the content of the first and second substances,is the characteristic index of the c-th pixel point in the target sub-area,the number of neighborhood pixels of the c-th pixel point in the target sub-region is shown in this embodimentIs a mixture of a water-soluble polymer and a water-soluble polymer, wherein the water-soluble polymer is 8,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 size is, theThe 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 subregion: 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, the first and the second end of the pipe are connected with each other,the attraction of the pixel point to the q-th first pixel point corresponding to the pixel point,is the similarity between the pixel point and the corresponding q-th first pixel point,a first characteristic value corresponding to the pixel point; when the similarity between the pixel point and the corresponding q-th first pixel point is larger, the corresponding pixel point is obtainedThe larger, theA reference value for measuring the attraction degree of the pixel point to the q-th first pixel point;is less than or equal toI.e. byIs a value of 1 or less; when in useThe closer to 1, the moreAndthe 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 the content of the first and second substances,is the probability index corresponding to the pixel point,is the characteristic index corresponding to the pixel point, Q is the number of the first pixel points corresponding to the pixel point,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 q-th first pixel point to the cluster center point of the class to which the pixel point belongs, namelyThe 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 of the probability indexes from large to small 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; in the embodiment, the clustering effect is better according to each initial clustering center point obtained by screening, and the obtained initial clustering center points have both points with normal spraying and 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: recording 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 the content of the first and second substances,is the metric distance between the pixel point and the feature point,is a first target indicator between the pixel point and the feature 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 larger, theThe smaller.
Therefore, the measuring distance between any two pixel points on the wallboard membrane target image can be obtained through the process, and then each pixel point on the wallboard membrane target image is clustered on the basis of each initial clustering center point corresponding to the k-means clustering algorithm and the measuring distance between any two pixel points on the wallboard membrane target image, 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 effect under the normal condition, that is, the cluster with the largest number of 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 the normal spraying in the next 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 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; 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, first, a target image of the sprayed wallboard film tool is obtained, then, the target image of the wallboard film tool is segmented to obtain each sub-region corresponding to the target image of the wallboard film tool, the sub-regions are screened according to the hue, saturation and brightness corresponding to each pixel point in each sub-region to obtain a target sub-region, subsequently, the characteristics of the pixels in the target sub-region are analyzed, and an initial clustering center point is obtained based on the analysis result. Therefore, the similarity between any two pixel points in each target sub-region is obtained based on the hue, saturation, brightness and coordinates corresponding to any two pixel points in the target sub-region, and the characteristic index of each pixel point in each target sub-region is obtained 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, 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 reduce the calculation period during subsequent clustering and can 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; such modifications or substitutions do not cause the essential features of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present application, and are intended to be included within the scope of the present application.
Claims (10)
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; and obtaining the spraying effect of the sprayed wallboard film according to each cluster.
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 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.
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 the content of the first and second substances,the spraying difference index corresponding to the subarea is obtained,for the number of pixels in the sub-area,the normalized first difference value corresponding to the ith pixel point in the sub-region,the normalized second difference value corresponding to the ith pixel point in the sub-area,and 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 the content of the first and second substances,is the similarity between the a pixel point and the b pixel point in the target sub-area,for the normalized hue corresponding to the a-th pixel point in the target sub-region,for the normalized hue corresponding to the b-th pixel point in the target sub-region,for the normalized saturation corresponding to the a-th pixel point in the target sub-region,for the normalized saturation corresponding to the b-th pixel point in the target sub-region,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,an abscissa value corresponding to the a-th pixel point in the target sub-region,an abscissa value corresponding to the b-th pixel point in the target sub-region,the ordinate value corresponding to the a-th pixel point in the target sub-region,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 for intelligently detecting the spraying effect of the wallboard film according to claim 1, wherein obtaining the probability index corresponding to each pixel point in each target sub-area according to the characteristic index and the attractiveness comprises:
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 the content of the first and second substances,is the probability index corresponding to the pixel point,is the characteristic index corresponding to the pixel point, Q is the number of the first pixel points corresponding to the pixel point,a second feature value corresponding to the pixel point,the attraction degree of the pixel point to the q-th first pixel point corresponding to the pixel point.
9. 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 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.
10. 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 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, 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 true CN115641331A (en) | 2023-01-24 |
CN115641331B 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 (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368851A (en) * | 2017-07-11 | 2017-11-21 | 华南理工大学 | A kind of Fast Fuzzy C-Means Clustering image partition method with neighborhood choice strategy |
CN110853013A (en) * | 2019-11-11 | 2020-02-28 | 四川大学青岛研究院 | Method for detecting spraying quality of outer wall of white household appliance |
AU2020103332A4 (en) * | 2020-11-09 | 2021-01-21 | Bhatt, Kaushal MR | IMLS-Weed Recognition/Classification: Intelligent Weed Recognition /Classification using Machine Learning System |
CN112819775A (en) * | 2021-01-28 | 2021-05-18 | 中国空气动力研究与发展中心超高速空气动力研究所 | Segmentation and reinforcement method for damage detection image of aerospace composite material |
EP3866113A1 (en) * | 2020-02-17 | 2021-08-18 | Agile Robots AG | Image segmentation methods and apparatus |
CN113344947A (en) * | 2021-06-01 | 2021-09-03 | 电子科技大学 | Super-pixel aggregation segmentation method |
CN113935666A (en) * | 2021-12-17 | 2022-01-14 | 武汉精装房装饰材料有限公司 | Building decoration wall tile abnormity evaluation method based on image processing |
CN115170853A (en) * | 2022-09-07 | 2022-10-11 | 南通钇龙玻璃制品有限公司 | Glass bottle surface spraying quality detection method |
CN115294113A (en) * | 2022-09-30 | 2022-11-04 | 南通佳木汇木制品有限公司 | Wood veneer quality detection method |
-
2022
- 2022-11-18 CN CN202211442339.8A patent/CN115641331B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368851A (en) * | 2017-07-11 | 2017-11-21 | 华南理工大学 | A kind of Fast Fuzzy C-Means Clustering image partition method with neighborhood choice 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 |
CN112819775A (en) * | 2021-01-28 | 2021-05-18 | 中国空气动力研究与发展中心超高速空气动力研究所 | Segmentation and reinforcement method for damage detection image of aerospace composite material |
CN113344947A (en) * | 2021-06-01 | 2021-09-03 | 电子科技大学 | Super-pixel aggregation segmentation method |
CN113935666A (en) * | 2021-12-17 | 2022-01-14 | 武汉精装房装饰材料有限公司 | Building decoration wall tile abnormity evaluation method based on image processing |
CN115170853A (en) * | 2022-09-07 | 2022-10-11 | 南通钇龙玻璃制品有限公司 | Glass bottle surface spraying quality detection method |
CN115294113A (en) * | 2022-09-30 | 2022-11-04 | 南通佳木汇木制品有限公司 | Wood veneer quality detection method |
Non-Patent Citations (2)
Title |
---|
KUROSAKI H 等: "DEVELOPMENT OF AN AUTOMATIC FRUIT-SET-REAGENT SPRAYING ROBOT FOR TOMATO PLANTS TO PROMOTE UNIFORM FRUIT RIPENING" * |
岳晓峰 等: "铝型材表面喷涂质量的图像检测与研究" * |
Also Published As
Publication number | Publication date |
---|---|
CN115641331B (en) | 2023-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022099598A1 (en) | Video dynamic target detection method based on relative statistical features of image pixels | |
CN115100221B (en) | Glass defect segmentation method | |
CN113628189B (en) | Rapid strip steel scratch defect detection method based on image recognition | |
CN106803257B (en) | Method for segmenting disease spots in crop disease leaf image | |
CN114926436A (en) | Defect detection method for periodic pattern fabric | |
CN104966305B (en) | Foreground detection method based on motion vector division | |
CN113409362B (en) | High altitude parabolic detection method and device, equipment and computer storage medium | |
CN115330767A (en) | Method for identifying production abnormity of corrosion foil | |
CN111160451A (en) | Flexible material detection method and storage medium thereof | |
CN114998345A (en) | Injection molding silver thread defect detection method and system based on gray level run matrix | |
CN104598914A (en) | Skin color detecting method and device | |
CN117058137A (en) | Visual inspection method for production quality of laminated glass | |
CN115641331B (en) | Intelligent detection method for spraying effect of wallboard film | |
CN111738931A (en) | Shadow removal algorithm for aerial image of photovoltaic array unmanned aerial vehicle | |
CN110988883A (en) | Intelligent squall line characteristic identification early warning method in radar echo image | |
CN115862006B (en) | Bran star detection method in flour milling process | |
CN115222735B (en) | Metal mold quality detection method based on pockmark defects | |
CN113724238B (en) | Ceramic tile color difference detection and classification method based on feature point neighborhood color analysis | |
CN104881652A (en) | Row number automatic detection algorithm based on corn ear convexity characteristic | |
CN110827272B (en) | Tire X-ray image defect detection method based on image processing | |
CN112560740A (en) | PCA-Kmeans-based visible light remote sensing image change detection method | |
CN118037732B (en) | Fuzhuan tea flowering dynamic detection method based on artificial intelligence | |
CN115294167B (en) | Data processing-based silkworm cocoon number identification method | |
CN113420771B (en) | Colored glass detection method based on feature fusion | |
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 |