A mixture stirring uniformity detection method based on machine vision
Patent Information
- Application Number
- CN202610794369.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-03
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-06-03
AI Technical Summary
[0004]为了解决现有方法对图像像素差异性分析准确性较低,使得对施工涂料自动搅拌过程进行均匀性检测结果较不准确的技术问题,本发明的目的在于提供一种基于机器视觉的混合物搅拌均匀性检测方法,所采用的技术方案具体如下:
本发明首先获取施工涂料自动搅拌过程的涂料表面颜色图像,为后续针对涂料混合的颜色差异情况进行均匀性检测提供数据基础。然后,利用滑窗对图像进行处理,可以有效分析图像中不同局部区域的颜色分布情况以及颜色差异的波动,量化每个滑窗所在局部区域的色差离散程度,反映了颜色差异的离散性,针对色差离散程度对滑窗进行筛选确定特征窗口,特征窗口表征了颜色差异的离散性较大的局部区域。进一步的,将中心像素点模拟旋涡中心分析中心像素点周围的亮度分布情况,确定旋涡特征边缘,表征了旋涡边缘信息;进而可以通过分析旋涡中心到旋涡特征边缘之间亮度差异以及亮度变化趋势,获得搅拌调节系数,通过分析图像中像素点亮度分布是否符合产生旋涡的特征,自适应构建图像对应的搅拌调节系数,避免了搅拌产生的旋涡对像素差异的影响。最后,利用搅拌调节系数,对滑窗的色差离散程度和特征窗口的颜色差异进行调整和修正,使得获得的施工涂料自动搅拌的均匀检测结果更加准确,能够有效减少搅拌产生的旋涡对均匀性检测过程中像素差异分析的误分析操作,使得差异性分析准确性更高,进而提高均匀性检测结果的准确性。
Smart Images

Figure CN122510241B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to a machine vision-based method for detecting the uniformity of mixing in a mixture. Background Technology
[0002] Paint is a mixture containing various components such as pigments, solvents, and additives. These components need to be thoroughly mixed to ensure the paint's performance and color uniformity. The uniformity of paint during application is crucial to the quality of the final coating. By monitoring the uniformity of the automated mixing process, it can be ensured that the pigments, solvents, and additives in the paint are fully mixed, thereby guaranteeing stable paint quality and preventing quality problems such as uneven color or excessive color difference. This ensures the overall consistency of the coating's appearance, avoiding inconsistent color depth or patchy patches, and improving both the application and decorative effects.
[0003] Therefore, uniformity detection during the automated mixing process of construction coatings is particularly important. With the development of computer technology, machine vision is commonly used to detect the color uniformity of automatically mixed construction coatings, assessing the degree of mixing and uniformity. Current methods often involve clustering the pixel differences in surface images of the automatically mixed coating process, calculating uniformity detection results based on the clustering results. However, pixel difference analysis during clustering cannot distinguish between pixel differences caused by vortices generated during mixing and those caused by uneven mixing, resulting in inaccurate uniformity detection results for the automated mixing process of construction coatings. Summary of the Invention
[0004] To address the problem that existing methods have low accuracy in analyzing image pixel differences, resulting in inaccurate uniformity detection results for automated mixing processes of construction coatings, the present invention aims to provide a machine vision-based method for detecting the uniformity of mixture mixing. The specific technical solution adopted is as follows: Acquire images of the paint surface color during the automatic mixing process of the construction coating; The color image of the paint surface is processed by sliding window using a preset window. The color difference dispersion of each sliding window is obtained based on the color difference between every two pixels in each sliding window and the fluctuation distribution of the color difference in the sliding window. The color difference dispersion is used to filter the sliding windows to determine the feature windows. The vortex feature edge of the paint surface color image is determined based on the brightness distribution of pixels in different ranges around the center pixel; the stirring adjustment coefficient is obtained based on the brightness difference between the center pixel and the pixels on the vortex feature edge of the paint surface color image, and the brightness change trend between the center pixel and the vortex feature edge. The uniformity detection result of automatic mixing of the construction coating is obtained based on the stirring adjustment coefficient, the color difference dispersion of all sliding windows in the color image of the coating surface, and the color difference between each feature window and the whole of all feature windows.
[0005] Preferably, the step of obtaining the stirring adjustment coefficient based on the brightness difference between the center pixel and the pixels on the edge of the vortex feature in the color image of the coating surface, and the brightness change trend between the center pixel and the edge of the vortex feature, specifically includes: Each pixel on the vortex feature edge is recorded as a feature edge pixel, and the line segment connecting the center pixel of the paint surface color image to each feature edge pixel is recorded as the feature line segment of each feature edge pixel; the paint surface color image is a LAB image; Based on the differences in the magnitude and direction of brightness changes between the center pixel and each feature edge pixel in the color image of the coating surface, the trend feature factor of each feature edge pixel is obtained. The stirring adjustment coefficient is obtained based on the value distribution of the trend feature factor of each pixel on the edge of the vortex feature.
[0006] Preferably, the method for obtaining the trend feature factor of the feature edge pixels is as follows: The channel value of each pixel in the L channel of the paint surface color image is recorded as the brightness value of each pixel; any feature edge pixel is recorded as the selected feature edge pixel; The center difference coefficient is obtained by calculating the absolute value of the difference in brightness values between the center pixel and the selected feature edge pixels in the color image of the paint surface. The difference in brightness value between the selected feature edge pixels and the center pixel of the paint surface color image is used as the brightness change direction coefficient; The trend feature factor of the selected feature edge pixel is obtained based on the center difference coefficient and the brightness change direction coefficient. Both the center difference coefficient and the brightness change direction coefficient are positively correlated with the trend feature factor.
[0007] Preferably, obtaining the stirring adjustment coefficient based on the value distribution of the trend feature factor of each pixel on the edge of the vortex feature specifically includes: The number of feature edge pixels corresponding to trend feature factors greater than the preset trend threshold is obtained, and the ratio between this number and the total number of feature edge pixels on the vortex feature edge is used as the stirring adjustment coefficient.
[0008] Preferably, obtaining the uniformity detection result of automatic mixing of the construction coating based on the stirring adjustment coefficient, the color difference dispersion of all sliding windows in the coating surface color image, and the color difference between each feature window and the whole of all feature windows specifically includes: The initial judgment factor for each feature window is obtained based on the mean of the color difference dispersion of all sliding windows in the color image of the coating surface, the difference between the distribution of channel values of all pixels in the L, A and B channels in each feature window and the overall channel value distribution of all feature windows. The uniformity judgment factor of the paint surface color image is obtained by correcting the initial judgment factor of each feature window using the stirring adjustment coefficient. If the uniformity judgment factor is greater than or equal to the preset uniformity threshold, the automatic mixing test result of the construction coating is non-uniform; if the uniformity judgment factor is less than the preset uniformity threshold, the automatic mixing test result of the construction coating is uniform.
[0009] Preferably, the method for obtaining the initial judgment factor for each feature window is as follows: Denote any feature window as the target feature window, and calculate the mean value of the channel values of all pixels in the target feature window in each of the L, A and B channels to obtain the local mean value of the target feature window in each channel. The global mean of each channel is obtained by calculating the mean value of the channel values of all pixels in each of the L, A, and B channels within all feature windows. Based on the difference between the local mean of the target feature window in each channel and the global mean in the same channel, the color difference distance of the target feature window is calculated. The difference between the local mean and the global mean in the same channel is positively correlated with the color difference distance. The product of the color difference distance of the target feature window and the mean of the color difference dispersion of all sliding windows in the paint surface color image is used as the initial judgment factor of the target feature window.
[0010] Preferably, the step of using the stirring adjustment coefficient to correct the initial judgment factor of each feature window to obtain the uniformity judgment factor of the paint surface color image specifically includes: The product of the stirring adjustment coefficient and the initial judgment factor of the target feature window is used as the adjustment difference factor of the target feature window. The mean of the adjustment difference factors of all feature windows is normalized to obtain the uniformity judgment factor of the paint surface color image.
[0011] Preferably, determining the vortex feature edge of the paint surface color image based on the brightness distribution of pixels in different ranges around the center pixel of the paint surface color image specifically includes: Obtain circular edges with different preset lengths centered at the center pixel of the paint surface color image, and denote them as vortex edges corresponding to different preset lengths; calculate the mean value of the brightness of all pixels on each vortex edge and denote it as the mean factor; take the vortex edge corresponding to the maximum value of the mean factor as the vortex feature edge of the paint surface color image.
[0012] Preferably, the step of obtaining the color difference dispersion of each sliding window based on the color difference between every two pixels within each sliding window and the fluctuation distribution of color differences within the sliding window specifically includes: For any sliding window, the color distance between any two pixels is calculated based on the difference in channel values of any two pixels in the same channel; the dispersion coefficient of the color distance between any two pixels in the sliding window is used as the color difference dispersion of the sliding window.
[0013] Preferably, the step of using the color difference dispersion to filter and determine the feature window in the sliding window specifically involves: The sliding window whose color difference dispersion is greater than the average color difference dispersion of all sliding windows is used as the feature window.
[0014] The embodiments of the present invention have at least the following beneficial effects: This invention first acquires a color image of the paint surface during the automatic mixing process of the coating, providing a data foundation for subsequent uniformity detection of color differences in the mixed coating. Then, a sliding window is used to process the image, effectively analyzing the color distribution and color difference fluctuations in different local areas of the image. The degree of color difference dispersion in the local area where each sliding window is located is quantified, reflecting the discreteness of color differences. Based on the degree of color difference dispersion, feature windows are selected from the sliding windows to determine feature windows, which characterize local areas with large color difference dispersion. Furthermore, the brightness distribution around the central pixel is analyzed to simulate the center of a vortex, determining the vortex feature edge and characterizing the vortex edge information. Then, by analyzing the brightness difference and brightness change trend between the vortex center and the vortex feature edge, a mixing adjustment coefficient is obtained. By analyzing whether the pixel brightness distribution in the image conforms to the characteristics of vortex generation, the mixing adjustment coefficient corresponding to the image is adaptively constructed, avoiding the influence of vortex generated by mixing on pixel differences. Finally, by using the stirring adjustment coefficient, the color difference dispersion of the sliding window and the color difference of the feature window are adjusted and corrected, so that the obtained uniformity detection results of the automatic stirring of the construction coating are more accurate. This can effectively reduce the vortex generated by stirring and the misanalysis operation of pixel difference analysis during uniformity detection, making the difference analysis more accurate, and thus improving the accuracy of uniformity detection results. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of a machine vision-based method for detecting the uniformity of mixing in a mixture, provided in an embodiment of the present invention. Figure 2 This is a schematic side view of the coating stirring provided in an embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a machine vision-based method for detecting the uniformity of mixing mixtures according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0018] Unless otherwise defined, 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 pertains.
[0019] The following describes in detail, with reference to the accompanying drawings, a specific scheme of the machine vision-based method for detecting the uniformity of mixing of a mixture provided by the present invention.
[0020] The specific implementation scenario addressed by this invention is as follows: Construction coatings are mixtures primarily composed of organic polymers such as resins, oils, and emulsions. Common construction coatings include water-based latex paints, solvent-based paints, and transparent varnishes. This invention primarily focuses on detecting the color uniformity of solvent-based paints during the automated mixing and production process. This ensures that no color difference occurs during construction or use, thereby improving product quality.
[0021] Please see Figure 1 The diagram illustrates a flowchart of a machine vision-based method for detecting the uniformity of mixing in a mixture, according to an embodiment of the present invention. The method includes the following steps: Step 1: Obtain an image of the paint surface color during the automatic mixing process of the construction paint.
[0022] Specifically, an industrial high-definition camera is installed directly above the mixer to ensure it can clearly capture the color image of the paint surface during the mixing process. The camera can continuously capture images during mixing to monitor the uniformity of the paint mixing process in real time. The acquired paint surface color image is an RGB image. To ensure the accuracy of subsequent color analysis, the paint surface color image needs to be preprocessed and converted to LAB color space to obtain the paint surface color image. Image preprocessing operations may include noise reduction, adjusting image brightness and contrast, correcting color deviations, etc., which will not be described in detail here.
[0023] Step 2: Perform sliding window processing on the color image of the paint surface using a preset window. Based on the color difference between every two pixels in each sliding window and the fluctuation distribution of the color difference in the sliding window, obtain the color difference dispersion of each sliding window. Use the color difference dispersion to filter the sliding windows and determine the feature windows.
[0024] During the automatic mixing process of the paint, due to varying degrees of color mixing, the color distribution in different local areas of the image is uneven, meaning the color distribution in different local areas has different degrees of dispersion. The paint surface color image is a LAB image, and there are also differences in the distribution of channel values across the L, A, and B channels. Based on this, this embodiment uses a sliding window to analyze the color distribution differences between pixels within different local areas of the paint surface color image, thereby allowing for the selection of local areas with significant color differences for further analysis.
[0025] In this embodiment, a preset window is used to perform sliding window processing on the color image of the paint surface. The size of the preset window is n*n, where n is 20. The window slides with a step size of 10, which is half the side length of the preset window, until the window has traversed the entire color image of the paint surface. Then, by analyzing the fluctuation of color differences between pixels in the local area where each window is located, the color dispersion of the local area where each window is located is quantified.
[0026] Specifically, for any sliding window, the color distance between any two pixels is calculated based on the difference in channel values of any two pixels in the same channel; the dispersion coefficient of the color distance between any two pixels within the sliding window is used as the color difference dispersion of the sliding window. The dispersion coefficient can be the variance, standard deviation, or range of the color distance between any two pixels, reflecting the dispersion of all color distances within the sliding window.
[0027] In this embodiment, taking any sliding window as an example, the formula for calculating the color distance between any two pixels within the i-th sliding window can be expressed as: in, This represents the color distance between the u-th pixel and the v-th pixel within the i-th sliding window. This represents the channel value of the u-th pixel within the i-th sliding window in the L channel. This represents the channel value of the u-th pixel within the i-th sliding window in channel A. This represents the channel value of the u-th pixel within the i-th sliding window in the B channel. This represents the channel value of the v-th pixel within the i-th sliding window in the L channel. This represents the channel value of the v-th pixel within the i-th sliding window in channel A. This represents the channel value of the v-th pixel within the i-th sliding window in the B channel.
[0028] , and It reflects the difference in channel values between the u-th pixel and the v-th pixel in the same channel, and then calculates the color distance between the two pixels to obtain the color distance, which reflects the color difference between the two pixels.
[0029] Furthermore, in this embodiment, the color distance between any two pixels within the i-th sliding window is calculated, and the standard deviation of all color distances within the i-th sliding window is used as the color difference dispersion of the i-th sliding window. The color difference dispersion reflects the degree of dispersion of color differences between pixels within the sliding window. The larger the value of the color difference dispersion, the more uneven the distribution of color differences within the sliding window, that is, the greater the dispersion of the color difference distribution.
[0030] Finally, the color difference dispersion of each sliding window can be used to filter the sliding windows, and the parts with a large dispersion of color difference in the local area where the sliding window is located can be filtered out. The parts of the local area where the color difference is large are more likely to have uneven color mixing.
[0031] Specifically, the sliding window whose color difference dispersion is greater than the average of the color difference dispersion of all sliding windows is used as the feature window. The average of the color difference dispersion of all sliding windows in the paint surface color image is calculated, reflecting the balance of color difference dispersion in the paint surface color image. When the color difference dispersion of a sliding window is greater than the average of the color difference dispersion of all sliding windows in the paint surface color image, it indicates that the dispersion of color difference distribution within that sliding window is slightly greater than the image's balance, thus indicating a larger dispersion of color difference distribution within that sliding window, and consequently, a smaller uniformity of color mixing in the local area where that sliding window is located. Based on this, the feature window characterizes the local area with a larger dispersion of color difference distribution in the paint surface color image.
[0032] Step 3: Determine the vortex feature edge of the paint surface color image based on the brightness distribution of pixels in different ranges around the center pixel; obtain the stirring adjustment coefficient based on the brightness difference between the center pixel and the pixels on the vortex feature edge, and the brightness change trend between the center pixel and the vortex feature edge.
[0033] During the coating mixing process, the vortices generated on the coating surface due to stirring may also cause different changes in the color characteristics of the coating surface. By analyzing the changes in pixel brightness differences in the L channel of the coating surface color image in LAB space, it can be determined whether the color difference of the pixels is caused by the vortices generated by stirring or by uneven mixing of the coating.
[0034] like Figure 2 The diagram shown is a side view of a paint mixing process. During mixing, the liquid forms a vortex within the container due to the rotational motion of the agitator. This rotational motion causes different colors of paint to mix evenly. At the center of the vortex, the agitator mixes the different colors of paint more thoroughly, resulting in more saturated colors and more uniform pigment mixing. At the edge of the vortex, the paint moves slowly, resulting in uneven pigment mixing. Consequently, the color at the edge of the vortex becomes lighter, and there may be areas where some colors are concentrated.
[0035] For vortices generated by stirring, from the center of the vortex to the edge of the vortex, due to the influence of stirring, the liquid level is lower closer to the center and relatively higher further away from the center. Consequently, the L channel of the paint surface color image shows a gradual increase from the center to the edge of the vortex. Due to the characteristics of the vortex, the brightness difference of pixels in the same direction from the center to the edge of the vortex also shows a gradual increase through difference analysis.
[0036] Based on this, the vortex edges in the paint surface color image are first determined by analyzing the brightness variations of pixels within different ranges around the central pixel. The central pixel of the paint surface color image can be considered the vortex center. Specifically, circular edges with different preset lengths as radii and centered on the central pixel of the paint surface color image are obtained and denoted as vortex edges corresponding to different preset lengths. The mean value of the brightness of all pixels on each vortex edge is calculated and denoted as the mean factor. The vortex edge corresponding to the maximum value of the mean factor is taken as the vortex feature edge of the paint surface color image.
[0037] In this embodiment, the initial value of the preset length is 1, and then it is incremented by 1 step to obtain the circular edge corresponding to each different length radius. Since the vortex edge is far from the vortex center, the brightness distribution of pixels on the vortex edge is relatively large. Therefore, the mean value of the brightness of all pixels on each circular edge is calculated, where the brightness value of the pixel is the channel value of the pixel in the L channel of the paint surface color image. When the mean factor corresponding to the circular edge is at its maximum value, it indicates that the brightness distribution of pixels on the circular edge is the largest, and thus the circular edge is most likely to be the vortex edge. Based on this, the vortex feature edge of the paint surface color image represents the edge information of the vortex generated during the paint stirring process.
[0038] Then, by analyzing the brightness changes in each direction from the center pixel of the image to the edge of the vortex feature, the brightness change trend in each direction is quantified. Specifically, each pixel on the edge of the vortex feature is denoted as the feature edge pixel.
[0039] It should be noted that in other embodiments, a preset number of pixels can be selected on the edge of the vortex feature for subsequent brightness change trend analysis. For example, any pixel on the edge of the vortex feature can be recorded as the feature edge pixel. Then, taking the line connecting the center pixel and the feature edge pixel as a reference, every 10° counterclockwise rotation, a pixel is selected on the edge of the vortex feature and recorded as the feature edge pixel. At this time, 36 feature edge pixels are selected on the edge of the vortex feature.
[0040] Based on the differences in the magnitude and direction of brightness changes between the center pixel and each feature edge pixel in the color image of the coating surface, the trend feature factor of each feature edge pixel is obtained.
[0041] The channel value of each pixel in the paint surface color image under the L channel is recorded as the brightness value of each pixel; any feature edge pixel is recorded as the selected feature edge pixel; the absolute value of the difference in brightness value between the center pixel of the paint surface color image and the selected feature edge pixel is calculated to obtain the center difference coefficient; the difference in brightness value between the selected feature edge pixel and the center pixel of the paint surface color image is obtained as the brightness change direction coefficient; the trend feature factor of the selected feature edge pixel is obtained based on the center difference coefficient and the brightness change direction coefficient, and both the center difference coefficient and the brightness change direction coefficient are positively correlated with the trend feature factor. The positive correlation can be a multiplicative relationship, an additive relationship, etc.
[0042] In this embodiment, the t-th feature edge pixel on the vortex feature edge is selected as the selected feature edge pixel. The formula for calculating the trend feature factor of the selected feature edge pixel can be expressed as: in, This represents the trend feature factor of the t-th feature edge pixel. This represents the brightness value of the center pixel. This represents the brightness value of the t-th feature edge pixel.
[0043] The center difference coefficient represents the brightness difference between the center pixel and the feature edge pixels. The larger the value, the greater the degree of brightness change in the direction corresponding to the t-th feature edge pixel. Consequently, the larger the value of the trend feature factor, the greater the trend of brightness change in that direction.
[0044] The brightness variation direction coefficient is defined as follows: the core brightness characteristic of a stirred vortex is an overall increasing trend in brightness from the center to the edge, while the brightness characteristic of uneven stirring is an irregular decrease or random distribution of brightness. Based on this, when the characteristics of a vortex are met, the brightness variation direction coefficient... Furthermore, the greater the brightness difference between the edge and the center, the larger the value of the corresponding trend characteristic factor, and the more significantly it reflects the vortex feature. When it meets the characteristics of uneven mixing, At this point, the corresponding trend feature factor takes a negative value, and there is no trend in the brightness of the vortex feature.
[0045] Therefore, when the brightness change direction coefficient is positive overall, the corresponding trend characteristic factor is also positive, which largely conforms to the vortex characteristic. When the brightness change direction coefficient is negative, the corresponding trend characteristic factor is also negative, which is largely due to uneven mixing of the coating.
[0046] Furthermore, the trend feature factor of each feature edge pixel reflects the direction of pixel brightness change from the vortex center to the vortex edge, indicating whether it tends towards vortex characteristics or uneven mixing characteristics. When the trend feature factor of the feature edge pixel is greater than 0, it means that the brightness change trend in the corresponding direction of the feature edge pixel is more consistent with vortex characteristics. When the trend feature factor of the feature edge pixel is less than 0, it means that the brightness change trend in the corresponding direction of the feature edge is more consistent with the characteristics of uneven coating mixing.
[0047] Based on this, the stirring adjustment coefficient can be obtained according to the value distribution of the trend feature factor of each pixel on the vortex feature edge. That is, the number of feature edge pixels corresponding to the trend feature factor being greater than the preset trend threshold is obtained, and the ratio between this number and the total number of feature edge pixels on the vortex feature edge is used as the stirring adjustment coefficient.
[0048] In this embodiment, the trend threshold is set to 0. Therefore, the number of feature edge pixels corresponding to a trend feature factor greater than 0 represents the number of pixels on the vortex feature edge that conform to the vortex feature. The proportion of pixels satisfying the threshold is used as the stirring adjustment coefficient. This indicates that the more pixels on the vortex feature edge whose brightness change trend closely matches the vortex feature, the larger the corresponding stirring adjustment coefficient, suggesting that a greater color difference during stirring is likely due to the vortex. Conversely, the fewer pixels on the vortex feature edge whose brightness change trend closely matches the vortex feature, the smaller the corresponding stirring adjustment coefficient, suggesting that a greater color difference during stirring is likely due to uneven stirring.
[0049] Step four: Based on the stirring adjustment coefficient, the color difference dispersion of all sliding windows in the paint surface color image, and the color difference between each feature window and the whole of all feature windows, obtain the uniformity detection result of automatic stirring of the construction paint.
[0050] A larger value for the stirring adjustment coefficient indicates the presence of vortices caused by paint stirring in the image. This leads to brightness differences between pixels from the vortex center to the edge, increasing the likelihood of errors in the color differences of pixels within the local areas of each feature window. Therefore, the calculated probability of a gradually increasing brightness trend in pixel values from the vortex center to the edge is used to correct for the color differences in pixels within each feature window, eliminating the influence of brightness differences caused by paint stirring vortices on the calculation results. Simultaneously, the uniformity of the paint surface color image is quantified by combining the color value distribution of each feature window with the overall distribution.
[0051] First, based on the mean of the color difference dispersion of all sliding windows in the color image of the paint surface, the difference between the distribution of channel values of all pixels in the L, A and B channels in each feature window and the overall channel value distribution of all feature windows, the initial judgment factor of each feature window is obtained.
[0052] Specifically, any feature window is designated as the target feature window. The mean value of the channel values of all pixels in the target feature window in each of the L, A, and B channels is calculated to obtain the local mean value of the target feature window in each channel. For example, the mean value of the channel values of all pixels in the target feature window in the L channel is calculated to obtain the local mean value of the target feature window in the L channel.
[0053] The global mean of each channel is obtained by calculating the mean value of the channel values of all pixels in each of the L, A and B channels within all feature windows. The color difference distance of the target feature window is calculated based on the difference between the local mean of the target feature window in each channel and the global mean in the same channel. The difference between the local mean and the global mean in the same channel is positively correlated with the color difference distance.
[0054] In this embodiment, the s-th feature window is taken as the target feature window, and the formula for calculating the color difference distance of the target feature window can be expressed as: in, This represents the color difference distance of the s-th feature window. This represents the local mean of all pixels within the s-th feature window in the L channel. This represents the global mean of all pixels within all feature windows in the L channel. This represents the local mean of all pixels within the s-th feature window in channel A. This represents the global mean of all pixels within all feature windows in channel A. This represents the local mean of all pixels within the s-th feature window in the B channel. This represents the global mean of all pixels within all feature windows in the B channel.
[0055] , and The values represent the difference between the local mean and the global mean of the target feature window under the same channel. The color difference distance is obtained by calculating the Euclidean distance of the color. The color difference distance reflects the difference between the average color distribution in the target feature window and the whole. The larger the difference, the more chaotic the color distribution of the pixels in the target feature window is, and further uniformity analysis needs to be carried out in combination with other aspects.
[0056] The product of the color difference distance of the target feature window and the mean of the color difference dispersion of all sliding windows in the paint surface color image is used as the initial judgment factor for the target feature window. Then, the initial judgment factor of each feature window is corrected using the stirring adjustment coefficient to obtain the uniformity judgment factor of the paint surface color image.
[0057] Specifically, the product of the stirring adjustment coefficient and the initial judgment factor of the target feature window is used as the adjustment difference factor of the target feature window. The mean of the adjustment difference factors of all feature windows is normalized to obtain the uniformity judgment factor of the paint surface color image.
[0058] In this embodiment, the formula for calculating the uniformity judgment factor of the paint surface color image can be expressed as: Where P represents the uniformity judgment factor of the paint surface color image, and N represents the number of feature windows contained in the paint surface color image. The stirring adjustment coefficient represents the color image of the paint surface. This represents the mean of the color difference dispersion across all sliding windows in the paint surface color image. Let represent the color difference distance of the s-th feature window, and Norm() represent the linear normalization function.
[0059] As the initial judgment factor, the color difference dispersion of all sliding windows in the paint surface image is used to measure the color uniformity of different local areas. The larger the value of the initial judgment factor, the greater the average color difference of the s-th feature region in the image. At the same time, the greater the color dispersion of different regions in the image, the greater the possibility of uneven mixing of the paint.
[0060] Furthermore, The adjustment difference factor for the target feature window: A larger stirring adjustment coefficient results in a larger initial judgment factor and a larger uniformity judgment factor after normalization. This indicates poor color consistency, suggesting that the paint is currently being stirred, leading to vortex phenomena and uneven color mixing, thus requiring further stirring. Conversely, a smaller stirring adjustment coefficient results in a smaller initial judgment factor and a smaller uniformity judgment factor after normalization. This indicates relatively good color consistency, possibly indicating complete stirring without vortex phenomena, thus greater paint color uniformity and less need for further stirring.
[0061] Based on this, if the uniformity judgment factor is greater than or equal to the preset uniformity threshold, the automatic mixing test result of the construction coating is non-uniform; if the uniformity judgment factor is less than the preset uniformity threshold, the automatic mixing test result of the construction coating is uniform.
[0062] In this embodiment, the uniformity threshold is set to 0.3. Since the uniformity judgment factor is a normalized value, the uniformity threshold ranges from (0,1). When the uniformity threshold is closer to 0, it indicates that the standard for uniformity detection using the uniformity threshold is more lenient. When the uniformity threshold is closer to 1, it indicates that the standard for uniformity detection using the uniformity threshold is more stringent.
[0063] When the uniformity judgment factor of the paint surface color image is greater than or equal to the uniformity threshold, it indicates that the uniformity of paint mixing during the automatic mixing process is low, meaning the uniformity test result is unqualified and mixing needs to continue. When the uniformity judgment factor of the paint surface color image is less than the uniformity threshold, it indicates that the uniformity of paint mixing during the automatic mixing process is high, meaning the uniformity test result is qualified and mixing does not need to continue.
[0064] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A machine vision-based method for detecting the uniformity of mixing in a mixture, characterized in that, The method includes the following steps: Acquire images of the paint surface color during the automatic mixing process of the construction coating; The color image of the paint surface is processed by sliding window using a preset window. The color difference dispersion of each sliding window is obtained based on the color difference between any two pixels in each sliding window and the fluctuation distribution of the color difference in the sliding window. The color difference dispersion is used to filter the sliding windows to determine the feature windows. The vortex feature edge of the paint surface color image is determined based on the brightness distribution of pixels in different ranges around the center pixel; the stirring adjustment coefficient is obtained based on the brightness difference between the center pixel and the pixels on the vortex feature edge of the paint surface color image, and the brightness change trend between the center pixel and the vortex feature edge. The uniformity detection result of automatic mixing of the construction coating is obtained based on the stirring adjustment coefficient, the color difference dispersion of all sliding windows in the color image of the coating surface, and the color difference between each feature window and the whole of all feature windows. The stirring adjustment coefficient is obtained based on the brightness difference between the center pixel and the pixels on the edge of the vortex feature in the color image of the coating surface, and the brightness change trend between the center pixel and the edge of the vortex feature. Specifically, it includes: Each pixel on the vortex feature edge is recorded as a feature edge pixel, and the line segment connecting the center pixel of the paint surface color image to each feature edge pixel is recorded as the feature line segment of each feature edge pixel; the paint surface color image is a LAB image; Based on the differences in the magnitude and direction of brightness changes between the center pixel and each feature edge pixel in the color image of the coating surface, the trend feature factor of each feature edge pixel is obtained. The stirring adjustment coefficient is obtained based on the value distribution of the trend feature factor of each pixel on the edge of the vortex feature.
2. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 1, characterized in that, The method for obtaining the trend feature factor of the feature edge pixel is as follows: The channel value of each pixel in the L channel of the paint surface color image is recorded as the brightness value of each pixel; any feature edge pixel is recorded as the selected feature edge pixel; The center difference coefficient is obtained by calculating the absolute value of the difference in brightness values between the center pixel and the selected feature edge pixels in the color image of the paint surface. The difference in brightness value between the selected feature edge pixels and the center pixel of the paint surface color image is used as the brightness change direction coefficient; The trend feature factor of the selected feature edge pixel is obtained based on the center difference coefficient and the brightness change direction coefficient. Both the center difference coefficient and the brightness change direction coefficient are positively correlated with the trend feature factor.
3. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 2, characterized in that, The process of obtaining the stirring adjustment coefficient based on the value distribution of the trend feature factor of each pixel on the vortex feature edge specifically includes: The number of feature edge pixels corresponding to trend feature factors greater than the preset trend threshold is obtained, and the ratio between this number and the total number of feature edge pixels on the vortex feature edge is used as the stirring adjustment coefficient.
4. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 1, characterized in that, The uniformity detection result of automatic mixing of the construction coating is obtained based on the stirring adjustment coefficient, the color difference dispersion of all sliding windows in the coating surface color image, and the color difference between each feature window and the whole of all feature windows. Specifically, this includes: The initial judgment factor for each feature window is obtained based on the mean of the color difference dispersion of all sliding windows in the color image of the coating surface, the difference between the distribution of channel values of all pixels in the L, A and B channels in each feature window and the overall channel value distribution of all feature windows. The uniformity judgment factor of the paint surface color image is obtained by correcting the initial judgment factor of each feature window using the stirring adjustment coefficient. If the uniformity judgment factor is greater than or equal to the preset uniformity threshold, the automatic mixing test result of the construction coating is non-uniform; if the uniformity judgment factor is less than the preset uniformity threshold, the automatic mixing test result of the construction coating is uniform.
5. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 4, characterized in that, The method for obtaining the initial judgment factor for each feature window is as follows: Denote any feature window as the target feature window, and calculate the mean value of the channel values of all pixels in the target feature window in each of the L, A and B channels to obtain the local mean value of the target feature window in each channel. Calculate the mean value of each pixel in each of the L, A and B channels within all feature windows to obtain the global mean value for each channel. The color difference distance of the target feature window is calculated based on the difference between the local mean of the target feature window in each channel and the global mean in the same channel; the difference between the local mean and the global mean in the same channel is positively correlated with the color difference distance. The product of the color difference distance of the target feature window and the mean of the color difference dispersion of all sliding windows in the paint surface color image is used as the initial judgment factor of the target feature window.
6. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 5, characterized in that, The process of using the stirring adjustment coefficient to correct the initial judgment factor of each feature window to obtain the uniformity judgment factor of the paint surface color image specifically includes: The product of the stirring adjustment coefficient and the initial judgment factor of the target feature window is used as the adjustment difference factor of the target feature window. The mean of the adjustment difference factors of all feature windows is normalized to obtain the uniformity judgment factor of the paint surface color image.
7. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 1, characterized in that, The step of determining the vortex feature edge of the paint surface color image based on the brightness distribution of pixels in different ranges around the center pixel of the paint surface color image specifically includes: Obtain circular edges with different preset lengths centered at the center pixel of the paint surface color image, and denote them as vortex edges corresponding to different preset lengths; calculate the mean value of the brightness of all pixels on each vortex edge and denote it as the mean factor; take the vortex edge corresponding to the maximum value of the mean factor as the vortex feature edge of the paint surface color image.
8. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 1, characterized in that, The step of determining the color difference dispersion of each sliding window based on the color difference between any two pixels within each sliding window and the fluctuation distribution of the color difference within the sliding window specifically includes: For any sliding window, the color distance between any two pixels is calculated based on the difference in channel values of any two pixels in the same channel; the dispersion coefficient of the color distance between any two pixels in the sliding window is used as the color difference dispersion of the sliding window.
9. The method for detecting the uniformity of mixing of a mixture based on machine vision according to claim 1, characterized in that, The specific steps for using the color difference dispersion to filter and determine the feature window in the sliding window are as follows: The sliding window whose color difference dispersion is greater than the average color difference dispersion of all sliding windows is used as the feature window.
Citation Information
Patent Citations
Method and system for detecting stirring homogeneity of viscous substance and stirring control method
CN113144999A
Mixing uniformity detection method and system for ribbon mixer
CN114897891A