A method for detecting stirring uniformity of raw materials for gasoline and diesel antistatic agents

By identifying and removing noise points and abnormal pixel points in the stirred image of antistatic agent raw materials, the problem of image noise affecting feature extraction accuracy is solved, the accuracy and reliability of stirring uniformity detection is improved, and product quality is ensured.

CN119338815BActive Publication Date: 2025-02-28XIAN WONDER ENERGY CHEM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411877448.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-02-28
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

During the stirring of gasoline and diesel antistatic agent raw materials, image noise influence leads to inaccurate extraction of HOG feature descriptors, which in turn affects the accuracy of stirring uniformity detection.

Method used

By extracting the feature vectors of each pixel point, compute the abnormal possibility of noise and gradient values, identify and eliminate abnormal pixel points, and only the gradient values ​​of normal pixel points are used for stir uniformity evaluation.

Benefits of technology

It effectively reduces the impact of noise on feature extraction, improves the accuracy and reliability of stirring uniformity detection, and ensures product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and in particular to a method for detecting stirring uniformity of a gasoline and diesel antistatic agent raw material. The method comprises the following steps: obtaining a grayscale image of an image of stirring the antistatic agent raw material, extracting a feature vector of each pixel point, wherein the feature vector includes a gradient value and a gradient direction, calculating the noise possibility of each pixel point according to a grayscale value difference and a distance between each pixel point and its neighboring pixel points, performing superpixel segmentation based on the gradient values ​​of all pixel points, calculating the abnormal possibility of the gradient value of each pixel point, determining abnormal pixels and normal pixels according to the noise possibility of each pixel point and the abnormal possibility of the gradient value of the pixel point, calculating the stirring uniformity of the grayscale image according to the gradient values ​​of all normal pixels, determining whether the stirring of the raw material meets the standard based on the stirring uniformity, reducing the influence of noise on feature extraction, and improving the accuracy of the evaluation result of the stirring uniformity of the raw material.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for detecting stirring uniformity of raw materials of gasoline and diesel antistatic agents. Background Art

[0002] In the production process of gasoline and diesel antistatic agents, the mixing uniformity of raw materials directly affects the quality and performance of the products. With the advancement of technology, more and more companies have begun to try to introduce image processing technology and modern detection equipment. These new technologies use digital image analysis and machine learning algorithms to process and extract features of sample images, which can quickly and objectively evaluate the mixing uniformity. For example, the existing Chinese patent document with the announcement number CN116228777B discloses a concrete mixing uniformity detection method, which includes: obtaining a target mixing image of the concrete to be detected; performing edge detection on the target mixing image; selecting a set of pixels to be fused from a set of non-edge pixels; grouping the grayscale values ​​corresponding to the pixels to be fused in the set of pixels to be fused; performing texture contribution analysis and edge texture influence analysis on each grayscale value to be fused in the set of grayscale value groups to be fused; determining the non-fusion weight corresponding to the grayscale value to be fused; performing grayscale fusion update on the target mixing image; generating a target grayscale co-occurrence matrix corresponding to the target fusion image, and detecting the mixing uniformity of the concrete to be detected. The present invention improves the efficiency of detecting the mixing uniformity of concrete by performing data processing on the target mixing image, and is mainly used for detecting the mixing uniformity of concrete.

[0003] HoG (Histogram of Oriented Gradients) feature extraction is suitable for feature extraction and texture analysis of images, and can quantitatively analyze the particle distribution, color uniformity, etc. of raw materials, thereby achieving more accurate detection. For example, the Chinese patent application document with the existing application publication number CN102867313A discloses a visual saliency detection method that integrates regional color and HoG features: first, on the CIELAB space color component map of the original image, the color saliency value of each pixel is calculated by analyzing the color contrast and distribution characteristics of the superpixel area; then, on the RGB space color component map of the original image, the local rectangular area texture features based on HoG are extracted, and the texture saliency value of each pixel is calculated by analyzing the texture contrast and distribution characteristics of the local rectangular area; finally, the color saliency value and texture saliency value of each pixel are fused into the final saliency value of the pixel using a quadratic nonlinear fusion method. This invention can not only obtain a full-resolution saliency image that conforms to the visual senses of the human eye, but also has a stronger ability to distinguish saliency targets.

[0004] However, since the antistatic agent raw material images are often affected by noise during the collection and transmission process, the HOG feature descriptor is extremely sensitive to noise. The presence of noise affects the accuracy of feature extraction of the raw material stirring image, which in turn leads to inaccurate results in subsequent detection of stirring uniformity. Summary of the invention

[0005] In order to solve the problem that noise affects the accuracy of feature extraction of raw material stirring images, resulting in inaccurate results of subsequent detection of stirring uniformity, the present invention proposes a method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials, comprising:

[0006] Acquire a grayscale image of an image of an antistatic agent raw material being stirred, and extract a feature vector of each pixel in the grayscale image, wherein the feature vector includes a gradient value and a gradient direction;

[0007] Calculate the noise probability of each pixel point based on the gray value difference and distance between each pixel point and its neighboring pixel points; the noise probability is used to reflect the possibility of the pixel point being a noise point;

[0008] The grayscale image is segmented into superpixels based on the gradient values ​​of all pixels, and the abnormal possibility of the gradient value of each pixel is calculated:

[0009]

[0010] In the formula , For the In the superpixel block The abnormal probability of the gradient value of each pixel, is the cosine function, For the The pixel and its The angle between the gradient directions of the neighboring pixels, is the gradient value of the pixel, and Respectively The mean and standard deviation of the gradient values ​​of all pixels in a superpixel block, is the total number of neighboring pixels of the pixel;

[0011] The abnormal pixels and normal pixels in the grayscale image are determined according to the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel, the stirring uniformity of the grayscale image is calculated according to the gradient values ​​of all normal pixels, and whether the raw materials are stirred to the standard is determined based on the stirring uniformity.

[0012] The above technical solution can more comprehensively represent the texture and structural information in the image by extracting feature descriptors, provide basic data for subsequent noise detection and anomaly detection, and evaluate whether the pixel may be noise by comparing the grayscale value difference and spatial distance between each pixel and its neighboring pixels. This method utilizes the consistency of local information, because noise usually appears as mutations that are inconsistent with surrounding pixels. It can effectively identify possible noise points, thereby reducing the impact of noise on feature extraction in subsequent processing and improving the effectiveness and accuracy of features. Superpixel segmentation helps to retain the local structural information of the image. The pixels in each superpixel have similar gradient values, so local features can be aggregated to facilitate subsequent anomaly detection. The angle between the feature vectors of the pixel and its neighboring pixels, as well as the relationship between the gradient value of the pixel and the mean and standard deviation of the gradient value in the superpixel block, is further calculated to quantify the abnormal possibility of the gradient value of each pixel. By combining the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel, abnormal pixels can be identified more accurately. By eliminating the gradient values ​​of abnormal pixels and evaluating the stirring uniformity only based on the gradient values ​​of normal pixels, the influence of noise on the stirring uniformity evaluation is reduced, and the accuracy of the detection results is improved. Based on the calculated stirring uniformity, it is possible to objectively and quickly determine whether the raw materials are stirred to the standard, thereby ensuring product quality.

[0013] Preferably, the calculation formula for the noise probability of each pixel is:

[0014]

[0015] In the formula, For the Line The noise probability of the pixel points in the column, is the number of neighboring pixels of the pixel, is the pixel and its The Euclidean distance of the neighboring pixels is and are the pixel and its The gray value of the neighboring pixels, is the summation function, is the absolute value symbol.

[0016] The above technical solution can effectively identify potential noise points by combining grayscale difference and Euclidean distance to calculate the noise possibility of each pixel. It not only considers the grayscale value change of the pixel, but also considers its spatial position relationship, thereby improving the accuracy and robustness of noise detection. This noise detection method provides a reliable basis for subsequent feature extraction and stirring uniformity evaluation.

[0017] Preferably, the method for evaluating the stirring uniformity according to the gradient values ​​of all normal pixels is: taking the inverse of the standard deviation of the gradient values ​​of all normal pixels in the grayscale image as the stirring uniformity of the grayscale image.

[0018] The above technical solution uses the reciprocal of the standard deviation as a reasonable uniformity indicator. The standard deviation reflects the degree of dispersion of the data. The smaller the standard deviation, the more concentrated the data. The larger the reciprocal, the higher the uniformity, which means the higher the mixing uniformity.

[0019] Preferably, the method for determining whether the raw materials are stirred to the standard based on stirring uniformity is:

[0020] A stirring uniformity threshold is set. If the stirring uniformity of the grayscale image is greater than the stirring uniformity threshold, the stirring of the gasoline and diesel antistatic agent raw materials at the time of collecting the grayscale image meets the standard. If the stirring uniformity of the grayscale image is not greater than the stirring uniformity threshold, the stirring of the gasoline and diesel antistatic agent raw materials at the time of collecting the grayscale image does not meet the standard.

[0021] Preferably, the method for determining whether the raw materials are stirred to a standard based on stirring uniformity also includes:

[0022] Based on the order of acquisition time, the current grayscale image and its previous and subsequent grayscale images are obtained. Grayscale image, judge this Whether the mixing of gasoline and diesel antistatic agent raw materials meets the standards at the time of collecting the grayscale image;

[0023] If this The stirring of the raw materials of gasoline and diesel antistatic agent at the time of collecting the grayscale image all meets the standard, the stirring of the raw materials of gasoline and diesel antistatic agent has been completely uniform, and the stirring is stopped;

[0024] If this In the grayscale image, the stirring of the gasoline and diesel antistatic agent raw materials does not meet the standard at the time of collecting some grayscale images, and the stirring of the gasoline and diesel antistatic agent raw materials is not yet completely uniform, and the stirring continues.

[0025] Preferably, the method for setting the stirring uniformity threshold comprises:

[0026] Collect multiple grayscale images of the antistatic agent raw material stirring in advance, and mark whether the stirring of the antistatic agent raw material corresponding to each grayscale image meets the standard;

[0027] Get the minimum value of the mixing uniformity of all grayscale images that meet the mixing standards , get the maximum value of the mixing uniformity of all grayscale images that do not meet the mixing standard ,Will and The mean of is taken as the stirring uniformity threshold.

[0028] The above technical solution can clearly define the boundary between meeting the standard and not meeting the standard by finding the lowest stirring uniformity in the grayscale image where the stirring meets the standard and the highest stirring uniformity in the grayscale image where the stirring does not meet the standard. This method ensures that the threshold can effectively distinguish the two types of images, reducing the possibility of misjudgment.

[0029] Preferably, the method for determining abnormal pixels and normal pixels in the grayscale image according to the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel is:

[0030] The product of the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel is used as the reference degree of the pixel;

[0031] Pixels whose reference degree is greater than a preset reference degree threshold are marked as abnormal pixels, and pixels other than the abnormal pixels are marked as normal pixels.

[0032] Preferably, the feature vector of each pixel is obtained by Feature extraction is performed to determine.

[0033] The above technical solution is passed Feature extraction can effectively capture the edge and texture information of local areas in the image, which is helpful for accurately evaluating the stirring uniformity of the antistatic agent raw materials.

[0034] Preferably, when calculating the abnormal possibility of the gradient value of each pixel point, the neighborhood pixel points of the pixel point include 4 neighborhood pixel points, and when calculating the noise possibility of each pixel point, the neighborhood pixel points of the pixel point include 24 neighborhood pixel points.

[0035] In the above technical solution, 4-neighborhood pixels can capture very local information, which can efficiently and accurately detect the possibility of abnormal gradient values ​​of pixels. 24-neighborhood pixels can provide more extensive neighborhood information, which helps to evaluate the consistency of grayscale values ​​in a larger range, thereby more accurately judging the possibility of noise in pixels.

[0036] The present invention has the following effects:

[0037] The present invention comprehensively analyzes the noise possibility of each pixel and the abnormality of the gradient value, evaluates the noise possibility of the pixel, and removes the feature descriptors with high abnormality possibility in combination with the abnormality of the gradient value, thus effectively solving the problem of noise in the image. The influence of feature descriptor extraction is that only features with low abnormal probability are retained for the measurement of stirring uniformity, thereby improving the accuracy and reliability of the stirring uniformity detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0039] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0041] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0042] Reference Figure 1 The present invention provides a method for detecting stirring uniformity of a gasoline and diesel antistatic agent raw material, comprising steps S1 to S6:

[0043] S1: Obtain a grayscale image of an image of the antistatic agent raw material being stirred, and extract a feature vector of each pixel in the grayscale image.

[0044] In the production process of gasoline and diesel antistatic agents, ensuring that the raw materials are evenly stirred is a key step to ensure product quality and performance. This step first collects surface images of the antistatic agent raw materials being stirred. In order to ensure that the dynamic changes during the stirring process can be captured and uneven phenomena can be discovered in time, the image acquisition frequency is set to capture an image every 5 to 10 seconds. This frequency can provide sufficient time resolution to monitor the stirring process without causing excessive processing burden due to excessive data volume.

[0045] The collected image is grayed out to obtain the corresponding grayscale image. Graying can simplify the subsequent processing steps, while improving processing efficiency and retaining the key feature information in the image.

[0046] Feature extraction is a commonly used image feature extraction method, which can be used to describe the shape and texture information in the image, and can well capture the changes of pixels and their neighborhoods in the image. It is mainly through calculating the gradient direction and gradient value of each pixel in the image. The size of the gradient value represents the intensity of the pixel, and the direction of the gradient represents the texture information of the pixel. The gradient direction and gradient value constitute the feature vector of the pixel. The feature vector of the pixel is used to describe the characteristics of the pixel, which provides an important data basis for the evaluation of stirring uniformity. Because, in the stirring surface image, the changes in the gradient size and gradient direction of the pixel reflect the texture and structural information in the image. This information is very critical for judging whether the stirring is uniform. Specifically: during the stirring process of the antistatic agent raw material, if there are more and larger gradient changes in the pixels of the stirring surface image, it means that the stirring uniformity at this time is low. On the contrary, if the gradient changes of the pixels of the stirring surface image are small and evenly distributed, it means that the stirring uniformity at this time is high.

[0047] Therefore, for any grayscale image corresponding to the surface image of the antistatic agent raw material being stirred, Feature extraction obtains the feature vector of each pixel.

[0048] According to the feature vector of each pixel, the stirring uniformity of the antistatic agent raw materials can be accurately evaluated. This method can not only capture the local and global changes in the image, but also effectively reduce the influence of noise, thereby improving the accuracy and reliability of the detection results.

[0049] S2: Calculate the noise possibility of each pixel based on the gray value difference and distance between each pixel and its neighboring pixels.

[0050] In the process of evaluating the stirring uniformity of antistatic agent raw materials, the noise points in the image will have a great impact on feature extraction, resulting in inaccurate evaluation results of stirring uniformity based on gradient values. In order to improve the accuracy of the evaluation, a method is needed to identify and eliminate these noise points, so as to perform a more accurate stirring uniformity evaluation.

[0051] For any pixel in the grayscale image, the noise possibility of the pixel is determined by calculating the grayscale value difference between the pixel and its neighboring pixels and combining other factors (such as distance). For those pixels with a higher noise possibility, their gradient values ​​are considered abnormal, so their gradient values ​​are eliminated.

[0052] The calculation formula for the noise probability of each pixel is:

[0053]

[0054] In the formula, For the Line The noise probability of the pixel point in the column is used to reflect the possibility that the pixel point is a noise point. is the number of neighboring pixels of the pixel, is the pixel and its The Euclidean distance of the neighboring pixels is and are the pixel and its The gray value of the neighboring pixels, is the summation function, is the absolute value symbol.

[0055] In this formula, is a weight factor for the Line For a pixel in a column, the difference in grayscale value between the pixel and its neighboring pixels that are closer to it contributes more to the noise possibility of the pixel. Calculated the Line The gray value difference between the pixel point in the column and each of its neighboring pixels. The greater the gray value difference, the higher the inconsistency between the pixel point and its neighboring pixels, which means that the pixel point is more likely to be a noise point. Finally, the final noise probability is obtained by taking the absolute value of the weighted gray value difference of all neighboring pixels and calculating the average. , the absolute value ensures that the differences are always positive, while the mean provides an overall estimate of the noise likelihood.

[0056] In this way, the formula comprehensively considers the distance and gray value difference of neighboring pixels, improving the accuracy of noise point detection.

[0057] S3: Perform superpixel segmentation on the grayscale image based on the gradient values ​​of all pixels, and calculate the abnormal possibility of the gradient value of each pixel according to the superpixel segmentation result.

[0058] In the process of evaluating the uniformity of stirring the antistatic agent raw materials, the noise in the image will not only affect the feature extraction of a single pixel, but also may affect the feature extraction of other pixels through the neighboring pixels. Therefore, in addition to identifying the noise points, it is also necessary to evaluate the abnormal possibility of the gradient value of each pixel to further improve the accuracy of feature extraction.

[0059] Traditional superpixel segmentation algorithms such as SLIC (Simple Linear Iterative Clustering Segmentation) and Watershed (Watershed algorithm) mainly rely on color information and spatial position to define similarity metrics, and divide the image into multiple regions (i.e., superpixel blocks) accordingly. These methods usually do not directly utilize gradient information, but may indirectly consider local structural information through methods such as edge detection.

[0060] This step performs superpixel segmentation based on the gradient value of the pixel point, which further highlights the boundaries of objects in the image. Since the gradient reflects the intensity changes between pixels, this method helps to form superpixels along the boundaries of objects more accurately, thereby better preserving important structural information. In addition, the gradient not only reflects the change in brightness but also indirectly reflects the texture features. Therefore, in the case of complex textures or subtle differences, the gradient-based superpixel segmentation method can well maintain edges and distinguish textures by directly utilizing the local structural information of the image.

[0061] After superpixel segmentation of the grayscale image, the pixels in each superpixel block have similar gradient values. The mean and standard deviation of the gradient values ​​of all pixels in each superpixel block are calculated. Then, the abnormal probability of the gradient value of each pixel is calculated according to the following formula:

[0062]

[0063] In the formula, For the In the superpixel block The abnormal probability of the gradient value of each pixel, is the cosine function, For the The pixel and its The angle between the gradient directions of the neighboring pixels, is the gradient value of the pixel, and Respectively The mean and standard deviation of the gradient values ​​of all pixels in a superpixel block, is the total number of neighboring pixels of the pixel, which is set here , that is, the neighborhood pixel points here are the 4 neighborhood pixel points of the pixel point, namely the neighborhood pixel points above, below, left, and right.

[0064] In this formula, the angle between the gradient directions It reflects the local structural consistency between two pixels. If the gradient directions of two pixels are very close, the angle is close to 0. If the gradient directions of two pixels are very different, the angle is larger. is a normalizing factor, when When it is close to 0, the value is close to 0. When it is close to 90 degrees or greater, the value is close to 0.5, which means that the greater the difference in gradient direction, the greater the The abnormal possibility of the gradient value of each pixel.

[0065] In this formula is the gradient value of the pixel After standardization, the first The sum of the mean and standard deviation of the gradient values ​​of all pixels in the superpixel block is used as the denominator. This is done to make the gradient values ​​of the pixel points comparable between different superpixel blocks and to reflect the degree of deviation of the gradient value of the pixel point relative to the overall gradient value distribution of the superpixel block in which it is located. If the gradient value of a pixel point is significantly higher or lower than the average gradient value of the superpixel block in which it is located, then the standardized value will be larger, increasing the The abnormal possibility of the gradient value of each pixel.

[0066] In this formula, the gradient direction angle reflects the local structural information, while the normalization of the eigenvalues ​​reflects the global statistical information. The combination of the two makes anomaly detection more comprehensive and accurate. This formula multiplies the normalization factor of the angle between the gradient direction of each pixel and the gradient direction of its neighboring pixels by the standardized gradient value of the pixel, and finally obtains the abnormal possibility of the pixel. This weighted summation method comprehensively considers the consistency of the gradient direction of the pixel and its neighboring pixels and the degree of deviation of the gradient value of the pixel. The formula can more accurately identify those pixels that are inconsistent with the surrounding pixels. These pixels may be noise points or abnormal points.

[0067] S4: Determine abnormal pixels and normal pixels in the grayscale image according to the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel.

[0068] If the noise probability of a pixel point and the abnormal probability of the gradient value of the pixel point are both high, the pixel point is considered to pass The feature vector extracted by feature extraction is affected by noise. Even if a pixel point itself is not a noise point, if its position is near a noise point, the extracted feature vector will also be affected by the noise point.

[0069] Therefore, it is necessary to distinguish pixels according to the noise probability of pixels and the abnormal probability of the gradient value of the pixels, and divide the pixels into normal pixels and abnormal pixels, and remove the feature vectors of abnormal pixels, and only retain the feature vectors of normal pixels (pixels with low noise probability and low abnormal gradient value probability) for subsequent stirring uniformity evaluation. This method can not only reduce the impact of noise points on feature extraction, but also improve the accuracy and reliability of feature extraction, thereby ensuring the accuracy of stirring uniformity evaluation results.

[0070] This step provides a method to distinguish normal pixels from abnormal pixels:

[0071] For all pixels in the grayscale image, the reference degree of each pixel is calculated first. The calculation method is: the product of the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel is used as the reference degree of the pixel. The noise possibility reflects the degree to which the pixel is affected by external factors (such as sensor noise, illumination changes, etc.), and the abnormal possibility of the gradient value measures the feature consistency of the pixel in the local environment. Combining the two, the greater the reference degree, the more likely the pixel is a noise point or the greater the influence of the noise point, and the greater the impact on the feature extraction result.

[0072] Preset reference threshold , this value is an empirical value and can be set by yourself. The pixels are marked as abnormal pixels, and the pixels other than the abnormal pixels are marked as normal pixels.

[0073] S5: Calculate the stirring uniformity of the grayscale image based on the gradient values ​​of normal pixels.

[0074] After determining the abnormal pixels and normal pixels in the grayscale image in step S4, the feature vectors corresponding to the abnormal pixels are eliminated, and only the feature vectors of the normal pixels are retained. Since the feature vector includes the gradient value and the gradient direction, the inverse of the standard deviation of the gradient values ​​of all normal pixels is used as the mixing uniformity of the grayscale image.

[0075] S6: Evaluate whether the raw materials meet the stirring standards based on the stirring uniformity.

[0076] This step provides a method to set the stirring uniformity threshold:

[0077] Collect multiple grayscale images of the stirring of the antistatic agent raw material in advance, and mark whether the stirring of the antistatic agent raw material corresponding to each grayscale image meets the standard; select all grayscale images that meet the stirring standard, and calculate the stirring uniformity of these grayscale images according to the method of step S1 to step S5, and record the minimum value of the stirring uniformity as ; Then select all the grayscale images that do not meet the stirring standard, and calculate the maximum value of the stirring uniformity of these grayscale images according to the method of steps S1-step S5 ; Finally, and The mean of is taken as the stirring uniformity threshold.

[0078] This step provides a method to evaluate whether the raw materials are stirred to the standard based on stirring uniformity:

[0079] The stirring uniformity of the grayscale image of the currently collected image of the electrostatic agent raw material being stirred is compared with the stirring uniformity threshold; if the stirring uniformity of the grayscale image is greater than the stirring uniformity threshold, it means that at the time of collecting the grayscale image, the electrostatic agent raw material is stirred evenly and the stirring meets the standard; if the stirring uniformity of the grayscale image is not greater than the stirring uniformity threshold, it means that at the time of collecting the grayscale image, the electrostatic agent raw material is stirred unevenly and the stirring does not meet the standard.

[0080] In order to more accurately determine whether the electrostatic agent raw materials are stirred to the standard, the grayscale image before the current one is obtained based on the order of acquisition time. A grayscale image (corresponding to the image of the electrostatic agent raw material stirring) and the grayscale image after the current one A grayscale image (corresponding to the image of the electrostatic agent raw material stirring) is obtained, and the above method is used to determine whether the The grayscale image (including the current grayscale value itself) corresponds to whether the stirring of the antistatic agent raw material meets the standard at the time of collection. If the stirring of the electrostatic agent raw material at the time of collecting the grayscale image meets the standard, it means that the stirring of the electrostatic agent raw material has been completely uniform and no further stirring is required. Otherwise, continue stirring and repeat the above steps until the stirring of the electrostatic agent raw material is completely uniform. In this embodiment, , this value is an empirical value and can be set by yourself.

[0081] Since continuous time series images provide dynamic information of the stirring process, if the evaluation is only performed at one time point, the stirring state may be misjudged due to accidental factors. This method can more comprehensively understand the changing trends in the stirring process by analyzing images at multiple time points instead of relying solely on data from a single time point. This helps capture uneven phenomena that may be overlooked in a single image.

[0082] This approach ensures that the mixing process achieves the desired uniformity through continuous monitoring and evaluation. The stirring is considered uniform only when all images show that the stirring meets the standard. Otherwise, stirring continues. This continuous monitoring mechanism can avoid the unevenness problem caused by stopping stirring too early. Because if the image at a certain time point shows uniform stirring, but if the images at the previous and next time points show uneven stirring, it means that the stirring process is not yet completely uniform. This method can effectively detect and prevent local unevenness.

[0083] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0084] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials, characterized in that: include: Acquire a grayscale image of an image of an antistatic agent raw material being stirred, and extract a feature vector of each pixel in the grayscale image, wherein the feature vector includes a gradient value and a gradient direction; The noise possibility of each pixel is calculated based on the gray value difference and distance between each pixel and its neighboring pixels; The noise probability is used to reflect the possibility that a pixel point is a noise point; The grayscale image is segmented into superpixels based on the gradient values ​​of all pixels, and the abnormal possibility of the gradient value of each pixel is calculated: ; In the formula , For the In the superpixel block The abnormal probability of the gradient value of each pixel, is the cosine function, For the The pixel and its The angle between the gradient directions of the neighboring pixels, is the gradient value of the pixel, and Respectively The mean and standard deviation of the gradient values ​​of all pixels in a superpixel block, is the total number of neighboring pixels of the pixel; The abnormal pixels and normal pixels in the grayscale image are determined according to the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel, the inverse of the standard deviation of the gradient values ​​of all normal pixels in the grayscale image is used as the stirring uniformity of the grayscale image, and whether the raw materials are stirred to the standard is determined based on the stirring uniformity.

2. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 1, characterized in that: The noise probability of each pixel is calculated as: ; In the formula, For the Line The noise probability of the pixel points in the column, is the number of neighboring pixels of the pixel, is the pixel and its The Euclidean distance of the neighboring pixels is and are the pixel and its The gray value of the neighboring pixels, is the summation function, is the absolute value symbol.

3. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 1, characterized in that: The method for determining whether the raw materials are stirred to the standard based on stirring uniformity is: A stirring uniformity threshold is set. If the stirring uniformity of the grayscale image is greater than the stirring uniformity threshold, the stirring of the gasoline and diesel antistatic agent raw materials at the time of collecting the grayscale image meets the standard. If the stirring uniformity of the grayscale image is not greater than the stirring uniformity threshold, the stirring of the gasoline and diesel antistatic agent raw materials at the time of collecting the grayscale image does not meet the standard.

4. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 1, characterized in that: The method for determining whether the raw materials are stirred to the standard based on stirring uniformity also includes: Based on the order of acquisition time, the current grayscale image and its previous and subsequent grayscale images are obtained. Grayscale image, judge this Whether the mixing of gasoline and diesel antistatic agent raw materials meets the standards at the time of collecting the grayscale image; If this The stirring of the raw materials of gasoline and diesel antistatic agent at the time of collecting the grayscale image all meets the standard, the stirring of the raw materials of gasoline and diesel antistatic agent has been completely uniform, and the stirring is stopped; If this In the grayscale image, the stirring of the gasoline and diesel antistatic agent raw materials does not meet the standard at the time of collecting some grayscale images, and the stirring of the gasoline and diesel antistatic agent raw materials is not yet completely uniform, and the stirring continues.

5. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 3, characterized in that: Methods for setting the stirring uniformity threshold include: Collect multiple grayscale images of the antistatic agent raw material stirring in advance, and mark whether the stirring of the antistatic agent raw material corresponding to each grayscale image meets the standard; Get the mixing uniformity of all grayscale images that meet the mixing standard, and take the minimum value of the mixing uniformity , get the maximum value of the mixing uniformity of all grayscale images that do not meet the mixing standard ,Will and The mean of is taken as the stirring uniformity threshold.

6. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 1, characterized in that: The method for determining abnormal pixels and normal pixels in the grayscale image according to the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel is: The product of the noise possibility of each pixel and the abnormal possibility of the gradient value of the pixel is used as the reference degree of the pixel; Pixels whose reference degree is greater than a preset reference degree threshold are marked as abnormal pixels, and pixels other than the abnormal pixels are marked as normal pixels.

7. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 1, characterized in that: The feature vector of each pixel is Feature extraction is performed to determine.

8. A method for detecting stirring uniformity of gasoline and diesel antistatic agent raw materials according to claim 1, characterized in that: When calculating the abnormal possibility of the gradient value of each pixel point, the neighborhood pixel points of the pixel point include 4 neighborhood pixel points, and when calculating the noise possibility of each pixel point, the neighborhood pixel points of the pixel point include 24 neighborhood pixel points.

Citation Information

Patent Citations

  • Visual saliency detection method with fusion of region color and HoG (histogram of oriented gradient) features

    CN102867313A

  • A method for testing the uniformity of concrete mixing

    CN116228777B

  • Visual saliency-driven automatic image annotation method

    CN113705579A

  • Pre-debridement information acquisition system for traumatic patients

    CN116269467A