A dust suppression method using fog cannon based on machine vision

By adaptively adjusting the mist retention factor in the transmission value calculation formula, combining grayscale contrast and average gradient amplitude, the dark channel fog removal algorithm is optimized, which solves the problem of poor fog removal effect caused by fixed fog retention factors, and achieves the following Accurate dust recognition and image clarity improvement.

CN118799224BActive Publication Date: 2024-12-20SHAANXI FENGHUA TIMES ENVIRONMENTAL ENG CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411285304.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-20
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

The fixed fog retention factor in the existing dark channel defog removal algorithm cannot accurately reflect the actual situation of the pixel points, resulting in the incorrect defog removal in the dust-free area or the defog removal effect is not obvious, affecting the image clarity.

Method used

By calculating the first dust factor and the second dust factor of the pixel point, adaptively adjust the mist retention factor in the transmission value calculation formula, combine the grayscale contrast and average gradient amplitude of the local area, dynamically evaluate the possibility of dust and optimize the dark channel. Fog removal algorithm.

Benefits of technology

The fog removal effect of the dark channel fog removal algorithm is improved, the image clarity is enhanced, false alarms are reduced, dust areas can be accurately identified and fog cannon dust removal is activated in time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799224B_ABST
    Figure CN118799224B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and in particular to a dust suppression method using a fog cannon based on machine vision. The method comprises: collecting an image of an area to be cleaned, obtaining a corresponding grayscale image, calculating the dust possibility of each pixel according to the grayscale characteristics and gradient characteristics of the pixel, adaptively adjusting the fog retention factor in a transmission value calculation formula according to the dust possibility of each pixel, calculating the transmission value of the pixel by using the adjusted formula, generating a transmission map, performing a dark channel defogging algorithm on the grayscale image based on the transmission map, determining whether the area to be cleaned needs to start the fog cannon dust removal according to the grayscale difference before and after the grayscale image is defogged, and optimizing the dark channel defogging algorithm, improving the defogging effect of the dark channel defogging algorithm, improving the clarity of the image, and being able to accurately and timely start the fog cannon dust removal.
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 fog cannon dust suppression method based on machine vision. Background Art

[0002] With the continuous advancement of global industrialization and urbanization, air pollution has become a social problem that needs to be solved urgently, especially in construction sites, mines and industrial production areas. Dust pollution not only seriously affects the quality of life of surrounding residents, but also has an unignorable impact on the ecological environment. In order to meet this challenge, it is necessary to monitor and control air pollution.

[0003] In construction sites, dust removal is often carried out through fog cannons to suppress dust pollution. The prior art collects images of areas where pollution may exist, and determines whether the area needs to activate fog cannons for dust removal based on image analysis. For example, the existing Chinese patent application document with application number CN118115440A discloses a fog cannon precision dust suppression system based on binocular vision. The system includes an environmental monitoring module that monitors and obtains the distribution of dust in the environment in real time and generates a dust distribution map, a data integration module that performs image processing and analysis based on the dust distribution map and generates analysis results, and an intelligent control module that generates control strategies and performs regulation; it also includes a water mist generator and an electrostatic generating device arranged around it; a strong electric field is generated by the electrostatic generating device to obtain charged water droplets and charged particulate matter; a charged dust-water droplet complex is formed and the dust-water droplet complex is controlled to settle by controlling the strong electric field. The system monitors the dust concentration and distribution in the environment in real time, uses image processing technology to analyze, and then controls the spraying of the fog cannon by generating a control strategy.

[0004] In order to improve the image quality and accurately identify the dust area, it is necessary to improve the image quality and obtain a clear image. As an effective image processing technology, the dark channel defogging algorithm has proved its value in many applications. It estimates the atmospheric light value by analyzing the dark channel prior in the image, and restores a clear image accordingly. For example, the Chinese patent application document with the existing application number CN117726547A discloses a defogging implementation system based on an improved dark channel algorithm, wherein the endoscope image acquisition module is used to store the image data in 16-bit RGB565 format formed by splicing every two consecutive bytes of the collected original foggy image data; the image dark channel calculation module is used to convert the first image data into the original dark channel image data; the atmospheric light intensity calculation module is used to calculate the atmospheric light intensity according to the prior of the dark channel image data. The pixel value is used as the atmospheric light intensity; the image transmittance calculation optimization module is used to calculate the image transmittance according to the atmospheric light intensity and dark channel data; the fog-free image restoration module is used to restore the fog-free image data according to the original foggy image data, the atmospheric light intensity and the transmittance.

[0005] However, the dark channel dehazing algorithm in the above scheme sets a fixed fog retention factor for the transmission value calculation formula of all pixels. Although this simplifies the calculation process, when processing images in a construction site environment, there may be areas with less dust or even no dust in the images collected on the construction site. The grayscale characteristics of these areas are sometimes very similar to those of areas severely affected by dust. This fixed fog retention factor cannot accurately reflect the actual situation of the pixel points in areas with different dust concentrations or pixels of images under different lighting conditions. The calculated transmission value affects the dehazing effect of the dark channel dehazing algorithm, which can easily lead to erroneous dehazing processing in dust-free areas, or the dehazing effect is not obvious in areas with more dust. Summary of the invention

[0006] In order to solve the problem that the fixed fog retention factor causes the transmittance value of the pixel point to not accurately reflect the actual situation of the pixel point, reduces the defogging effect of the dark channel defogging algorithm, and affects the clarity of the image, the present invention proposes a dust suppression method of a fog cannon based on machine vision, which specifically adopts the following scheme:

[0007] Collect an image of the area to be cleaned, obtain a corresponding grayscale image, select a pixel point in the grayscale image, and calculate a first dust factor of the pixel point according to the relative grayscale size between the pixel point and the grayscale image, and the grayscale difference between the pixel point and its neighboring pixels, wherein the first dust factor is positively correlated with the relative grayscale size and negatively correlated with the grayscale difference;

[0008] Using the grayscale contrast and the average gradient amplitude in the local area of ​​the pixel point, the first dust factor of the pixel point is corrected to a second dust factor, where the second dust factor is positively correlated with the first dust factor, negatively correlated with the grayscale contrast, and negatively correlated with the average gradient amplitude;

[0009] Calculating the dust possibility of the pixel point according to the second dust factor and the number of pixel points whose grayscale values ​​change in the local area in the continuous multiple frames of grayscale images, wherein the dust possibility is positively correlated with the number of pixel points whose grayscale values ​​change and with the second dust factor;

[0010] The fog retention factor in the transmission value calculation formula is adaptively adjusted according to the dust possibility of each pixel, the transmission value of the pixel is calculated using the adjusted formula, and a transmission map is generated. The dark channel defogging algorithm is executed based on the transmission map to defog the grayscale image. The grayscale difference before and after defogging of the grayscale image is determined to determine whether the area to be cleaned needs to be started for dust removal by the fog cannon.

[0011] In the above technical solution, a series of image processing technologies are used to evaluate and identify the presence of dust and the amount of grayscale, and finally decide whether it is necessary to start the fog cannon dust removal system. First, the relative grayscale size of the pixel and the entire grayscale image reflects the brightness of the pixel. The grayscale difference between the pixel and its eight neighbors eliminates the influence of noise points, and can preliminarily determine whether the pixel is real dust. Then, the grayscale contrast and average gradient amplitude in the local area of ​​the pixel are used to correct the first dust factor. The grayscale contrast can help identify texture details, and the average gradient amplitude provides information on edge strength. The combination of the two can more accurately identify the presence of dust and reduce false alarms. Possibility, and then dynamically track the changes of dust over time through the change information of multiple consecutive frames to exclude factors other than static dust, such as camera shake or lighting changes, and further filter out grayscale changes caused by non-dust, so as to obtain more accurate dust recognition results. By adaptively adjusting the parameters of pixel points when calculating the transmission value, a more accurate transmission value can be obtained. The generated transmission map will be closer to the actual distribution of dust, and the dark channel defogging algorithm is optimized. The defogging effect of the dark channel defogging algorithm on grayscale images is improved, and the clarity of the image is improved. Then, the fog cannon dust removal can be started according to the grayscale change of the image before and after the defogging process, so as to achieve the purpose of timely cleaning.

[0012] Furthermore, the dust probability of the pixel point satisfies the following relationship:

[0013]

[0014] In the formula, For the The possibility of dust in pixels, For the The second dust factor of pixels, is the total number of continuous multi-frame grayscale images, For the The local area of ​​the pixel is The number of pixels in the frame grayscale image whose grayscale value changes relative to the previous frame grayscale image. is the preset adjustment value, is the normalization function.

[0015] The above technical solution considers the changes in grayscale values ​​in continuous frame grayscale images. If the grayscale value of the local area of ​​a pixel changes frequently in multiple frame grayscale images, it indicates that there may be dust in the area. It can better capture the changes of dust in the time dimension. The method can better identify dust areas in dynamic environments.

[0016] Furthermore, the second dust factor satisfies the following relationship:

[0017]

[0018] In the formula, For the The second dust factor of pixels, For the The average gradient amplitude in the local area of ​​pixels, For the The first dust factor of each pixel, For the The grayscale contrast in the local area of ​​​​a pixel.

[0019] In the above technical solution, the intensity of the gradient change in the local area is reflected by analyzing the average gradient amplitude in the local area of ​​the pixel, and the second grayscale factor of the pixel is comprehensively quantified in combination with the grayscale contrast in the area. Since dust areas usually have the characteristics of low contrast and blurred boundaries, the lower the contrast and the slower the gradient change in the local area of ​​a pixel, the more likely it is that the area belongs to a dust area. Therefore, the quantized second grayscale factor can more accurately evaluate whether the pixel is dust.

[0020] Furthermore, the method of adaptively adjusting the fog retention factor in the transmittance value calculation formula according to the dust possibility of each pixel is as follows:

[0021] The product of the grayscale possibility of the pixel point and the preset value of the fog retention factor is used as the fog retention factor in the transmittance value formula, and the fog retention factor is used to adjust the transmittance value of the pixel point.

[0022] Furthermore, the grayscale contrast in the local area is obtained by:

[0023] The difference between the maximum grayscale value and the minimum grayscale value in the local area is divided by the sum of the maximum grayscale value and the minimum grayscale value in the local area, and the obtained value is used as the grayscale contrast in the local area.

[0024] Furthermore, the first dust factor satisfies the following relationship:

[0025]

[0026] In the formula, For the The first dust factor of each pixel, For the The relative grayscale size of the pixel points and the grayscale image, For the The gray value of a pixel, For the The average gray value of the eight neighborhoods of the pixel point, is a natural exponential function.

[0027] In the above technical solution, the relative grayscale size The larger the value, the brighter the pixel is relative to the entire grayscale image. Overall, the more likely the pixel is dust. It reflects the grayscale difference between the pixel and its neighboring pixels. The larger the difference, the more likely the pixel is a noise point rather than real dust. On the contrary, the smaller the difference, the more likely the pixel is a real pixel. By combining the relative grayscale size of the pixel and the grayscale image and the grayscale difference between the pixel and its neighboring pixels, it is possible to preliminarily evaluate whether the pixel is real dust.

[0028] Furthermore, the transmission map corresponds to the grayscale map, and the transmission map is composed of a transmission value of each pixel.

[0029] Furthermore, the method for dividing the local area of ​​the pixel point is: taking the pixel point as the center, selecting a The area of ​​the pixel size is regarded as the local area of ​​the pixel. The default size.

[0030] Furthermore, the relative grayscale value of the pixel point and the grayscale image is the ratio of the grayscale value of the pixel point to the average grayscale value of the grayscale image.

[0031] Furthermore, the method for determining whether it is necessary to activate the fog cannon dust removal in the area to be cleaned according to the grayscale difference before and after defogging of the grayscale image is: calculate the grayscale difference of each pixel point in the image before and after defogging, and count the total number of pixels whose grayscale difference exceeds a preset grayscale difference threshold; the grayscale difference is the absolute value of the difference between the grayscale values; if the total number accounts for more than a preset proportion in the total number of all pixel points, the fog cannon dust removal needs to be activated in the area to be cleaned; if the total number accounts for less than a preset proportion in the total number of all pixel points, the fog cannon dust removal does not need to be activated in the area to be cleaned.

[0032] The above technical solution can more accurately evaluate the degree of dust impact by counting the total number of pixels whose grayscale difference exceeds the threshold and compare it with the total number of all pixels, thereby reducing misjudgment, especially when the dust impact is small, and avoiding unnecessary dust removal operations.

[0033] The present invention has the following effects:

[0034] The present invention accurately evaluates the dust possibility of pixel points in multiple dimensions, and adaptively adjusts the parameters of the pixel points when calculating the transmission value according to the dust possibility of the pixel points to obtain a more accurate transmission value, and generates a transmission map that is closer to the actual distribution of dust. The dark channel defogging algorithm is optimized, the defogging effect of the dark channel defogging algorithm on grayscale images is improved, and the clarity of the image is improved. Furthermore, the fog cannon dust removal can be started according to the grayscale change of the image before and after the defogging process, and the dust is cleaned in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] 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:

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

[0037] 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.

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

[0039] Reference Figure 1 , a fog cannon dust suppression method based on machine vision, including steps S1 to S6, specifically as follows:

[0040] S1: Collect an image of the area to be cleaned and preprocess it to obtain a grayscale image.

[0041] This solution is to analyze images of possible dust pollution areas on the construction site to determine whether there is dust pollution, and decide whether to start the fog cannon dust removal based on this. The possible dust pollution areas on the construction site are taken as areas to be cleaned. The areas to be cleaned may include but are not limited to the following areas: areas with frequent construction activities, such as places for excavation and material handling; near high dust emission sources, such as concrete mixing plants or sand and gravel storage areas; mechanical operation areas, such as where excavators and bulldozers work; exposed ground or sand piles that are easily dusty due to wind.

[0042] Use a high-definition camera to shoot the possible areas to be cleaned in the construction site. The shooting time is 10 minutes, and one image is collected per second. Through continuous shooting, multiple images of the area to be cleaned within a period of time can be obtained, and then image preprocessing is performed: grayscale processing is performed on all collected images. Grayscale processing can simplify image data and make subsequent dust detection and analysis more convenient and efficient. Through the above steps, continuous multiple-frame grayscale images can be obtained to prepare for further dust detection and analysis. These grayscale images will be used in the dust factor calculation and grayscale change feature analysis in the subsequent steps to accurately determine whether there is dust pollution in the area to be cleaned and decide whether to start the fog cannon dust removal system.

[0043] S2: Preliminarily evaluate the first dust factor of each pixel in the grayscale image according to the relative grayscale size of each pixel in the grayscale image and the grayscale difference between the pixel and its neighboring pixels.

[0044] In this step, the first dust factor of each pixel is determined by analyzing the gray value characteristics of each pixel and its surrounding area. The calculation formula is:

[0045]

[0046] In the formula, For the The first dust factor of each pixel, For the The relative grayscale size of the pixel points and the grayscale image, For the The gray value of a pixel, For the The average gray value of the eight neighborhoods of the pixel point, is the natural exponential function,

[0047] In this formula, The calculation method is The ratio of the gray value of a pixel to the average gray value of the grayscale image.

[0048] Generally, the grayscale value of dust is usually larger because dust reflects more light. Therefore, if a pixel appears brighter in the grayscale image, the pixel is more likely to be dust and the corresponding first dust factor will be larger. Further considering the influence of noise: additional noise may be introduced during image transmission, storage or processing. The grayscale value of the noise may be similar to the grayscale value of dust, but noise usually appears in the form of a single pixel with certain outliers and will not form a coherent area. That is to say, if the grayscale value of a pixel is very different from the grayscale value of its neighboring pixels, then the pixel is more likely to be noise rather than dust. Conversely, if the grayscale value of a pixel is very different from the grayscale value of its neighboring pixels, then the pixel is more likely to be a real pixel rather than noise.

[0049] In this way, the dust in the image can be identified more accurately and the influence of noise can be eliminated. Therefore, based on the above analysis, The relative grayscale size of the pixel and the entire grayscale image Reflects the brightness of the pixel, through Reflects the grayscale difference between the pixel and its neighboring pixels. The smaller the value, the more likely the pixel is a real pixel. The higher the credibility, the first dust factor of the pixel is calculated comprehensively. The pixel with a larger grayscale value and a grayscale value close to that of the surrounding pixels is more likely to be dust, and the larger the first dust factor is. It can be seen that the first dust factor is positively correlated with the relative grayscale size and negatively correlated with the grayscale difference.

[0050] S3: Analyze the grayscale features and gradient features in the local area of ​​each pixel, and correct the first dust factor of the pixel to obtain a second dust factor.

[0051] The above steps obtain the first dust factor of each pixel by analyzing the grayscale value of each pixel. However, due to the limitation of camera resolution, fine dust particles may not be captured individually, but mixed in other pixels, making it difficult to accurately detect dust. Therefore, this step corrects the first dust factor by analyzing the grayscale value characteristics of the pixels in the local area of ​​each pixel to obtain a more accurate second dust factor.

[0052] The second dust factor satisfies the following relationship:

[0053]

[0054] In the formula, For the The second dust factor of pixels, For the The average gradient amplitude in the local area of ​​pixels, For the The first dust factor of each pixel, For the The grayscale contrast in the local area of ​​​​a pixel.

[0055] Among them, the method for obtaining the grayscale contrast in the local area is:

[0056] The maximum grayscale value and the minimum grayscale value of all pixels in the local area are obtained, and the difference between the maximum grayscale value and the minimum grayscale value is divided by the sum of the maximum grayscale value and the minimum grayscale value, and the obtained value is used as the grayscale contrast in the local area.

[0057] Generally, dust areas usually have high grayscale values, low contrast, and blurred boundaries. This is because the color and brightness changes in dust areas are relatively weak and difficult to distinguish. Therefore, a pixel is selected around each pixel. The area of ​​the pixel size is regarded as the local area of ​​the pixel. is the preset size, here , this value is an empirical value, and the above formula is used Measure the grayscale contrast in a local area, using Measures how fast the gradient changes in a local area.

[0058] If the grayscale contrast in the local area is lower and the gradient changes more slowly, that is, The lower, The smaller it is, the more likely the local area is to be a dust area, the more likely the center of the local area (the pixel) is to be dust, and the larger the second dust factor of the pixel is. On the contrary, if the grayscale contrast in the local area is higher and the gradient changes significantly, then the local area is more likely to be a non-dust area, the less likely the pixel is to be dust, and the smaller the second dust factor of the pixel is. It can be seen that the second dust factor is positively correlated with the first dust factor, negatively correlated with the grayscale contrast, and negatively correlated with the average gradient amplitude.

[0059] In this way, a more reliable second dust factor for each pixel is obtained, and dust in the grayscale image can be identified more accurately.

[0060] S4: Calculate the dust possibility of each pixel according to the grayscale change of the local area of ​​each pixel in the continuous multi-frame grayscale image and the second dust factor of the pixel.

[0061] Through the above analysis steps, the second dust factor of each pixel is obtained. This index is obtained based on the analysis of a single-frame grayscale image, and may not be able to exclude some pixels in the grayscale image that are not affected by dust but have similar grayscale values ​​to dust.

[0062] Due to the flow of air, dust particles in the air will constantly move, so in the grayscale image, the real dust area usually shows a change in grayscale value in multiple frames of grayscale images. This is because dust particles are displaced in the grayscale image as the air flows. Therefore, if a pixel is dust, the grayscale value of the local area of ​​the pixel changes greatly in the continuous grayscale image. Therefore, if the grayscale value of the local area of ​​a pixel is relatively stable in multiple frames of grayscale images, the pixel is not affected by dust, and the pixel is other background pixels with similar grayscale characteristics to dust.

[0063] Therefore, this step is to more accurately identify dust by combining the second dust factor of the pixel in a single-frame grayscale image and the grayscale change characteristics of the local area of ​​the pixel in multiple-frame grayscale images, solving the limitations of single-frame grayscale image analysis to enhance the accuracy of dust detection. The specific operations are as follows:

[0064] Select the N1 frames of grayscale images immediately before the current grayscale image. N1 is a preset number, which is set to 5 in this step, that is, select the current grayscale image and the 5 grayscale images before it to form a continuous 6-frame grayscale image. For each pixel, analyze the grayscale change characteristics of the local area of ​​the pixel in these 6 consecutive grayscale frames, that is, the number of pixels in each grayscale frame of the local area that have a grayscale value change relative to the previous grayscale frame. The larger the number of pixels with a grayscale value change, the more grayscale value changes of the local area in multiple grayscale frames, the more likely the local area is to be a dust area, and the more likely the pixel is to be real dust.

[0065] Therefore, the dust possibility of the pixel is calculated here by combining the second dust factor of the pixel and the number of pixels in the local area of ​​the pixel whose grayscale value changes in the multi-frame grayscale image:

[0066]

[0067] In the formula, For the The possibility of dust in pixels, For the The second dust factor of pixels, is the total number of continuous multi-frame grayscale images, For the The local area of ​​the pixel is The number of pixels in the frame grayscale image whose grayscale value changes relative to the previous frame grayscale image. is the preset adjustment value, is the normalization function, and the formula is calculated The larger the value of The more likely the pixel is to be real dust, the more likely it is that the dust possibility of the visible pixel is positively correlated with its second dust factor, and is positively correlated with the number of pixels with grayscale value changes mentioned above.

[0068] S5: Adaptively adjust the fog retention factor in the transmission value calculation formula according to the dust possibility of each pixel, calculate the transmission value of the pixel using the adjusted formula, and generate a transmission map. Perform a dark channel defogging algorithm based on the transmission map to defog the grayscale image.

[0069] In the dark channel dehazing algorithm, the calculation of the transmission map is crucial to restoring a clear image. The transmission map describes the extent to which light at each pixel passes through the atmospheric scattering layer directly to reach the camera sensor. Through the transmission map, the dark channel dehazing algorithm can restore the clarity of the image and remove the blurring effect caused by atmospheric scattering.

[0070] The transmission map does not refer to the transmission value of a single pixel, but refers to a two-dimensional matrix or image composed of the transmission values ​​of all pixels. The transmission value indicates the proportion of light that is not weakened by atmospheric scattering. The transmission value is usually between 0 and 1, where 0 means it is completely blocked by atmospheric scattering and 1 means it is not affected by atmospheric scattering at all. The transmission map has the same size as the original grayscale image.

[0071] S51: The dark channel dehazing algorithm performs dehazing processing on the grayscale image based on the transmission image.

[0072] S511: Obtaining a transmission image, usually follows these steps:

[0073] Atmospheric light estimation: Atmospheric light It is a global brightness value. Usually the brightest pixel value in the grayscale image is selected to estimate the atmospheric light. In the dark channel defogging algorithm, the atmospheric light It is usually considered to be the average of the brightest pixels in the image. It is used to restore clear images and is also an important parameter in the dark channel dehazing algorithm.

[0074] Dark channel prior calculation: obtained by calculating the minimum value of each pixel in the three color channels of red, green and blue. pixels, dark channel prior It can be expressed as:

[0075]

[0076] in, , and Respectively The pixel value of a pixel in the red, green and blue channels.

[0077] Calculate the transmission value for each pixel:

[0078]

[0079] In the formula, Indicates The transmission value of each pixel, It is the preset fog retention factor, which is used to adjust the transmission value. Usually set to a fixed experience value, The value of .

[0080] Generate a transmission map: Calculate the transmission value of each pixel in the grayscale image according to the formula, and the transmission values ​​of all pixels constitute a transmission map.

[0081] S512: The traditional dark channel defogging algorithm obtains the transmission map and atmospheric light After that, the grayscale image is processed and defogging is performed to restore the clarity of the grayscale image. Specifically, the grayscale image is defogged using the following formula:

[0082]

[0083] In the formula, In the grayscale image The gray value of the pixel after defogging, In the grayscale image The gray value of the pixel before defogging, For atmospheric light, For the The transmission value of each pixel.

[0084] According to this formula, the grayscale values ​​of all pixels in the grayscale image after defogging are calculated to obtain the defogging grayscale image, which improves the clarity of the grayscale image.

[0085] S52: Optimize the dark channel defogging algorithm to improve its defogging effect and obtain a clearer grayscale image.

[0086] In this step, in order to make the transmission map look more natural and reduce artifacts, the preliminary transmission map is refined to ensure that the transmission map is smoother in space, so as to optimize the dark channel defogging algorithm and improve the defogging effect of the dark channel defogging algorithm on the grayscale image. The specific operations are as follows:

[0087] S521: Adaptively adjust the fog retention factor in the transmittance value calculation formula based on the dust probability of each pixel point. The fog retention factor is used to adjust the range of the transmittance value of the pixel point. The method for adjusting the fog retention factor is:

[0088] The first The product of the grayscale possibility of a pixel and the preset value of the fog retention factor is used as the fog retention factor in the transmittance value formula to adjust the transmittance value range of the pixel. The formula is:

[0089]

[0090] In this formula, It is used in the transmission value formula to adjust the The fog retention factor for the transmittance range of pixels, is the preset fog retention factor, For the The possibility of dust in each pixel.

[0091] Since the dust probability of each pixel is different, the greater the dust probability of a pixel, the more likely it is that the pixel is dust. Therefore, a larger fog retention factor is needed to calculate its transmission value. The reason is that dust will increase light scattering, thereby reducing the actual transmission value in the transmission map. In order to compensate for this scattering effect and better restore clarity, the fog retention factor in the transmission value calculation formula should be set larger. The above formula can dynamically and adaptively adjust the fog retention factor corresponding to the transmission value of each pixel in the transmission value formula when calculating it.

[0092] S522: After the adjustment, the transmission value of each pixel is recalculated according to the adjusted transmission value calculation formula:

[0093]

[0094] It can be seen that this step is to convert the transmission value calculation formula into Dynamically adjust to , so as to realize the dynamic adjustment of the transmission value of each pixel and recalculate the The transmission value of each pixel.

[0095] S523: Regenerate an optimized transmission map that can reflect the actual dust distribution according to the transmission values ​​of all pixels.

[0096] S524: The dark channel defogging algorithm performs a defogging operation on the grayscale image according to the optimized transmission image (the same method as in S512), thereby improving the defogging effect and making the grayscale image clearer after defogging. Based on the clear grayscale image, it is possible to accurately determine whether dust removal is required.

[0097] S6: Determine whether the area to be cleaned needs to start the fog cannon for dust removal according to the grayscale difference before and after the grayscale image is defogged.

[0098] The preset grayscale difference threshold is 30, which is an empirical value and can be adjusted by the specific implementer. Calculate the grayscale difference of each pixel (based on position) in the image before and after defogging. The grayscale difference is the absolute value of the difference in grayscale values. For example, The grayscale value of the pixel at is 100, and the grayscale value of the pixel after defogging is 60. The grayscale difference of the pixel is 40, which exceeds the grayscale difference threshold, and the pixel is marked.

[0099] The total number of pixels with grayscale differences exceeding 30 before and after dehazing is counted as , the total number of pixels in the grayscale image is , the preset quantity ratio is ,like and The ratio exceeds , it means that the grayscale difference of the grayscale image before and after defogging changes significantly, that is, there is a lot of dust in the area to be cleaned and it needs to be cleaned. Therefore, the fog cannon is started for dust removal. and The ratio does not exceed , it means that the grayscale difference of the grayscale image before and after defogging changes slightly, and the area to be cleaned does not need to be cleaned. Therefore, the fog cannon dust removal is not started.

[0100] By continuously collecting images of the area to be cleaned, performing the above steps on the images of the area to be cleaned, and judging whether the area to be cleaned needs to start the fog cannon dust removal for cleaning, intelligent monitoring and cleaning functions of the area to be cleaned can be realized.

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

[0102] 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 dust suppression method using a fog cannon based on machine vision, characterized in that: include: Collect an image of the area to be cleaned, obtain the corresponding grayscale image, select a pixel point in the grayscale image, and calculate the first dust factor of the pixel point according to the relative grayscale size between the pixel point and the grayscale image, and the grayscale difference between the pixel point and its neighboring pixels, satisfying the following relationship: ; In the formula, For the The first dust factor of each pixel, For the The relative grayscale size of the pixel points and the grayscale image, For the The gray value of a pixel, For the The average gray value of the eight neighborhoods of the pixel point, is the natural exponential function; The first dust factor of the pixel point is corrected to a second dust factor by using the grayscale contrast and the average gradient amplitude in the local area of ​​the pixel point, satisfying the following relationship: ; In the formula, For the The second dust factor of pixels, For the The average gradient amplitude in the local area of ​​pixels, For the Grayscale contrast in the local area of ​​​​a pixel; The dust possibility of the pixel is calculated according to the second dust factor and the number of pixels of the local area whose grayscale value changes in the continuous multiple frames of grayscale images, satisfying the following relationship: ; In the formula, For the The possibility of dust in pixels, is the total number of continuous multi-frame grayscale images, For the The local area of ​​the pixel is The number of pixels in the frame grayscale image whose grayscale value changes relative to the previous frame grayscale image. is the preset adjustment value, is the normalization function; The fog retention factor in the transmittance calculation formula is adaptively adjusted according to the dust probability of each pixel. The transmittance calculation formula for each pixel is: ; In the formula, Indicates The transmission value of each pixel, is the preset fog retention factor, The value of ; The transmission value of the pixel point is calculated using the adjusted formula, and a transmission map is generated. The dark channel defogging algorithm is used to defog the grayscale image based on the transmission map. The difference in grayscale before and after defogging of the grayscale image is used to determine whether the area to be cleaned needs to be defogged using a fog cannon. Dark channel prior calculation: obtained by calculating the minimum value of each pixel in the three color channels of red, green and blue; pixels, dark channel prior It is expressed as: ;in, , and Respectively The pixel value of a pixel in the red, green and blue channels.

2. The method for dust suppression using a fog cannon based on machine vision according to claim 1, characterized in that: The method of adaptively adjusting the fog retention factor in the transmittance value calculation formula according to the dust probability of each pixel is: The product of the dust possibility of the pixel point and the preset value of the fog retention factor is used as the fog retention factor in the transmittance value formula, and the fog retention factor is used to adjust the transmittance value of the pixel point.

3. The method for dust suppression using a fog cannon based on machine vision according to claim 1, characterized in that: The method for obtaining the grayscale contrast in the local area is: The difference between the maximum grayscale value and the minimum grayscale value in the local area is divided by the sum of the maximum grayscale value and the minimum grayscale value in the local area, and the obtained value is used as the grayscale contrast in the local area.

4. The method for dust suppression using a fog cannon based on machine vision according to claim 2, characterized in that: The transmission map corresponds to the grayscale map, and the transmission map is composed of a transmission value of each pixel.

5. The method for dust suppression using a fog cannon based on machine vision according to claim 2, characterized in that: The method for dividing the local area of ​​the pixel point is: taking the pixel point as the center, selecting a The area of ​​the pixel size is regarded as the local area of ​​the pixel. The default size.

6. The method for dust suppression using a fog cannon based on machine vision according to claim 1, characterized in that: The relative grayscale value of the pixel point and the grayscale image is the ratio of the grayscale value of the pixel point to the average grayscale value of the grayscale image.

7. The method for dust suppression using a fog cannon based on machine vision according to claim 6, characterized in that: The method for determining whether the area to be cleaned needs to start the fog cannon dust removal according to the grayscale difference before and after the grayscale image is defogging is: Calculate the grayscale difference of each pixel in the image before and after defogging, and count the total number of pixels whose grayscale difference exceeds a preset grayscale difference threshold; the grayscale difference is the absolute value of the difference between the grayscale values; If the proportion of the total number of pixels in the total number of all pixels exceeds the preset proportion, the area to be cleaned needs to start dust removal with a fog cannon; If the total number accounts for less than a preset number of pixels in the total number of all pixels, there is no need to activate the fog cannon to remove dust in the area to be cleaned.

Citation Information

Patent Citations

  • Defogging implementation method and system based on improved dark channel algorithm

    CN117726547A

  • Fog gun precise dust suppression system based on binocular vision

    CN118115440A

  • Mobile phone screen backlight foreign matter defect diagnosis method and device based on machine vision

    CN110445921A

  • Intelligent dust measurement and control system and dust suppression and reduction method thereof

    CN111530203A