A highway construction image defogging method, device, equipment and storage medium

By selecting the foggy image with the highest overlap with the foggy image in the construction process for feature extraction and weighting, the defogging mapping relationship is established, and the problem of low fogging removal efficiency in the existing technology is solved, and efficient defogging treatment of construction images is achieved.

CN119941567BActive Publication Date: 2025-08-22商洛市公路局 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510003716.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-08-22
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

The existing image enhancement-based defog removal algorithm consumes a lot of time when processing construction images. Deep learning-based defog removal algorithm is difficult to obtain sufficient training sets in construction scenarios, resulting in inefficient defog removal.

Method used

Collect foggy images and multiple foggy images under the same construction link, select the foggy images with the highest overlap with the foggy images as the first image, and establish a defoggy mapping relationship through feature extraction and weighting to achieve batch processing of multiple foggy images.

Benefits of technology

It improves the processing efficiency of construction images to remove fogging, reduces time costs, and does not require a large number of foggy and foggy-free image training sets, and is suitable for complex construction environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941567B_ABST
    Figure CN119941567B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment, and storage medium for defogging highway construction images, relating to the field of image defogging technology. The method comprises the following steps: collecting a fog-free image and multiple foggy images under the same construction link, selecting the foggy image with the highest overlap with the fog-free image from the multiple foggy images as the first image, and the remaining foggy images as the second images; performing feature extraction on the first image to obtain a first feature map, and performing feature extraction on multiple second images to obtain multiple second feature maps; obtaining multiple similarities between the first feature map and the multiple second feature maps, and weighting the multiple second feature maps according to the multiple similarities; obtaining a defogging mapping relationship using the fog-free image and the first feature map, and inputting the multiple weighted second feature maps into the defogging mapping relationship to obtain the corresponding defogging image. The present invention can batch process multiple foggy images under the same construction link, thereby greatly saving image processing time.
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 defogging, and in particular to a method, device, equipment and storage medium for defogging highway construction images. Background Art

[0002] Highways are roads built according to national technical standards, connecting cities, rural areas, villages, and industrial and mining bases. These roads are approved by the relevant highway authorities and include expressways, first-class highways, second-class highways, third-class highways, and fourth-class highways. Currently, with the rapid development of domestic transportation, my country's expressways are still experiencing rapid development. During highway construction, imaging equipment equipped with cameras is often used to monitor and record the specific progress of highway construction.

[0003] Because highway construction often takes place outdoors, it's significantly affected by the weather. Severe weather conditions often impact captured images or videos. In foggy conditions, atmospheric scattering reduces visibility of the target scene. Images captured by outdoor image acquisition equipment often suffer from poor visual quality and lack clarity, making it impossible to accurately capture detailed construction details and potentially missing records of specific construction stages. Therefore, dehazing images captured in foggy conditions is of great practical significance.

[0004] In recent years, research institutions and scholars at home and abroad have shown increasing interest in dehazing images degraded by fog, and have proposed or optimized numerous image dehazing algorithms. These include image enhancement-based dehazing algorithms and deep learning-based dehazing algorithms. Image enhancement-based dehazing algorithms include Retinex, histogram equalization, partial differential equations, and wavelet transforms. These algorithms primarily enhance image features such as contrast and brightness to create a clearer image. Deep learning-based dehazing algorithms use deep learning models such as convolutional neural networks (CNNs) to establish a mapping between foggy and clean images.

[0005] Existing defogging algorithms achieve significant results when applied to images to be defogged. However, image enhancement-based defogging algorithms typically process a single image during the defogging process. When conducting highway construction in fog-prone areas, foggy weather accounts for a large proportion, and more images of construction work taken during foggy weather are captured. Therefore, for large batches of images to be defogged, image enhancement-based defogging algorithms require a significant amount of time to process multiple images, resulting in low computational efficiency and high time costs. Deep learning-based defogging algorithms typically require a large number of foggy images and their corresponding fog-free images as training sets to train the model. However, in specific construction scenarios, the environment is highly variable, making it difficult to obtain a large number of foggy and fog-free images. Summary of the Invention

[0006] The present invention provides a method, device, equipment and storage medium for defogging highway construction images, which solves the problems that the existing defogging algorithms based on image enhancement have a high time cost in processing construction images and that the training sets of the defogging algorithms based on deep learning are difficult to obtain when processing construction images.

[0007] In a first aspect, the present invention provides a method for defogging a highway construction image, comprising the following steps:

[0008] Collect a fog-free image and multiple foggy images from the same construction phase. Select the foggy image with the highest overlap with the fog-free image as the first image, and the remaining foggy images as the second images.

[0009] Performing feature extraction on the first image to obtain a first feature map for representing the fog state, and performing feature extraction on the plurality of second images to obtain a plurality of second feature maps;

[0010] Obtaining multiple similarities between the first feature map and the multiple second feature maps, and weighting the multiple second feature maps according to the multiple similarities;

[0011] A defogging mapping relationship is obtained through the haze-free image and the first feature map, and a plurality of weighted second feature maps are input into the defogging mapping relationship to obtain a corresponding defogging image.

[0012] Preferably, extracting features from the first image to obtain a first feature map for characterizing the fog state comprises the following steps:

[0013] Obtain pixel values ​​of each pixel in the first image on the red, green, and blue channels respectively, and extract the minimum value of the pixel values ​​of each pixel on the three channels;

[0014] Combining the minimum values ​​of all pixels to obtain a first grayscale image of the same size as the first image;

[0015] Minimum filtering is performed on the first grayscale image to obtain a first dark channel image, where the first dark channel image is a first feature map.

[0016] Preferably, the obtaining of multiple similarities between the first feature map and the multiple second feature maps, and weighting the multiple second feature maps according to the multiple similarities, comprises the following steps:

[0017] Extracting a first texture feature of the first feature map, and extracting a plurality of second texture features of the plurality of second feature maps;

[0018] Obtaining similarity values ​​between the first texture feature and the plurality of second texture features through a texture feature matching algorithm, and arranging the plurality of similarity values ​​in descending order;

[0019] Corresponding weights are assigned to the second feature maps corresponding to the plurality of second texture features in the order of arrangement to obtain weighted second feature maps.

[0020] Preferably, obtaining the defogging mapping relationship through the haze-free image and the first feature map includes the following steps:

[0021] Taking the pixel with the highest brightness in the first dark channel image as the first atmospheric light intensity;

[0022] Averaging multiple transmittances corresponding to multiple pixel points of the first dark channel feature map to obtain a first transmittance;

[0023] Based on the image defogging algorithm, a mapping relationship between the first atmospheric light intensity and the light intensity of the fog-free image and a mapping relationship between the first transmittance and the transmittance of the fog-free image are established.

[0024] Preferably, the step of inputting the plurality of weighted second feature maps into the defogging mapping relationship to obtain the corresponding defogging image comprises the following steps:

[0025] Obtaining a plurality of second atmospheric light intensities and second transmittances corresponding to the plurality of weighted second feature maps;

[0026] The second atmospheric light intensity of each weighted second feature map is input into the light intensity mapping relationship, and the second transmittance is input into the transmission mapping relationship to obtain the corresponding defogging image.

[0027] Preferably, the step of selecting a foggy image having the highest overlap with the non-fog image from among the multiple foggy images as the first image comprises the following steps:

[0028] Adjust multiple foggy and fog-free images to the same size;

[0029] Converting the adjusted multiple foggy images and fog-free images into grayscale images to obtain multiple foggy grayscale images and fog-free grayscale images;

[0030] Obtaining a plurality of first hash values ​​of a plurality of foggy grayscale images and a second hash value of a non-foggy grayscale image, and obtaining a plurality of Hamming distances between the plurality of first hash values ​​and the second hash values;

[0031] Multiple similarities are obtained through multiple Hamming distances, and the foggy image with the highest similarity is used as the first image.

[0032] In a second aspect, the present invention provides a highway construction image defogging device, comprising:

[0033] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned highway construction image defogging method when executing the program.

[0034] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which implements the above-mentioned highway construction image defogging method when executed by a processor.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The present invention provides a method for defogging highway construction images. First, a fog-free image and multiple foggy images with similar backgrounds within a certain time period under the same construction link are collected. Since the backgrounds of the multiple images of the present invention are similar, it is convenient to find the relationship between the multiple images in the subsequent scheme. At the same time, the foggy image with the highest overlap with the fog-free image is selected from the multiple foggy images as the first image, and the remaining foggy images are the second images. There is no need to obtain a large number of foggy images and corresponding fog-free images for training. Then, the second feature map of the second image is weighted by the first feature map of the first image, and the relationship between the multiple second feature maps and the first feature map is obtained. Finally, the defogging mapping relationship between the fog-free image and the first feature map is obtained by an existing algorithm, and the multiple weighted second feature maps are input into the defogging mapping relationship to obtain the corresponding defogging image. The present invention can batch process multiple foggy images under the same construction link, thereby greatly saving image processing time, and at the same time, there is no need to obtain a large number of foggy images and corresponding fog-free images. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 This is a flow chart of a highway construction image defogging method according to the present invention;

[0039] Figure 2 This is a flowchart of a highway construction image defogging method according to the present invention. DETAILED DESCRIPTION

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0041] Since most links in highway construction require a lot of time to process, and the construction process of each link is the same, all the work is repetitive, so the background differences of the images sampled within a certain period of time in a single link are not very large. For these foggy images with small background differences, the correlation between them can be found and batch processed based on this correlation, thereby greatly saving image processing time. Figure 1 and Figure 2 The present invention provides a method for defogging a highway construction image, which specifically includes the following steps:

[0042] S1: Collect a fog-free image and multiple foggy images under the same construction link, and select the foggy image with the highest background overlap with the background of the fog-free image from the multiple foggy images as the first image, and the remaining foggy images as the second images.

[0043] Highway construction is a complex and systematic process. Each link requires strict control and meticulous construction to ensure the quality and safety of the highway. It mainly includes roadbed construction, pavement base construction and pavement surface construction. Among them, roadbed construction includes:

[0044] Clearing and excavation: Clear debris, plants, etc. on the roadbed and excavate the roadbed to form the appropriate height and shape.

[0045] Drainage system construction: Set up drainage facilities such as drainage ditches and drainage pipes to ensure smooth drainage of the roadbed during construction and future use.

[0046] Roadbed compaction: Use compaction machinery to compact the roadbed to ensure its stability and durability. If necessary, carry out soil reinforcement treatment such as soil replacement, drainage and reinforcement.

[0047] Pavement base construction includes:

[0048] Selection and laying of base materials: Select base materials such as gravel, crushed stone or asphalt concrete according to design requirements, and lay and compact them.

[0049] Quality control and testing: Strictly control and test the quality of base construction to ensure that it meets the design requirements.

[0050] Pavement surface construction includes:

[0051] Surface material selection and paving: Select surface materials, such as asphalt concrete, cement concrete, etc., and lay them. During the paving process, ensure the uniformity and density of the materials.

[0052] Paving and compaction: Use a paver to evenly spread the surface material on the base layer, and use a roller to compact it to ensure the flatness and density of the road surface.

[0053] Surface treatment: Carry out surface treatment on the road surface as needed, such as spraying emulsified asphalt, laying anti-skid materials, etc.

[0054] Existing deep learning-based defogging algorithms usually require a large number of foggy images and corresponding fog-free images as training sets to train the model. However, in specific construction scenarios, the environment is changeable and it is difficult to obtain a large number of foggy images and corresponding fog-free images. To address this problem, the present invention first collects a fog-free image and multiple foggy images under the same construction link, and then selects the foggy image with the highest overlap with the fog-free image from the multiple foggy images as the first image, and uses the remaining foggy images as the second image.

[0055] In this embodiment, the present invention uses the first image as a reference to defog multiple second images. Therefore, the present invention selects the foggy image with the highest overlap with the fog-free image as the first image, ensuring that the background of the first image and the fog-free image are the same to the greatest extent possible, thereby improving the defogging effect of the multiple second images.

[0056] When selecting the foggy image with the highest overlap with the fog-free image from multiple foggy images as the first image, first resize the foggy and fog-free images to the same size to eliminate the effect of size differences. Then, grayscale the processed images to reduce the influence of color on the similarity calculation. Calculate the pixel mean of each grayscale image for subsequent comparison. By comparing the difference between the pixel grayscale values ​​and the mean, a hash value is generated for the image. The Hamming distance between these hash values ​​is then compared to assess image similarity. The foggy image with the highest similarity is selected as the first image.

[0057] S2: Perform feature extraction on the first image to obtain a first feature map for representing the fog state.

[0058] In this embodiment, the first feature map is a dark channel image corresponding to the parameters required by the defogging algorithm based on image enhancement, and feature extraction of the first image includes the following steps:

[0059] Step 1: Obtain the pixel values ​​of each pixel in the first image on the red (R), green (G) and blue (B) channels respectively, and extract the minimum value of the pixel values ​​of each pixel on the three channels.

[0060] Step 2: Combine the minimum values ​​of all pixels to obtain a first grayscale image with the same size as the first image.

[0061] Step 3: Perform a minimum filter on the first grayscale image to obtain the first dark channel image. The filtering window size can be selected as needed; for example, a commonly used window size is 15x15. Within each window, find the minimum value among all pixel values ​​and assign it to the pixel at the center of the window.

[0062] Through these three steps, a dark channel image can be obtained. The areas with lower grayscale values ​​usually correspond to the fog or shadow parts in the original image.

[0063] S3: Perform feature extraction on the multiple second images to obtain multiple second feature maps.

[0064] The second feature map is a dark channel image corresponding to the parameters required by the defogging algorithm based on image enhancement, and its extraction method is the same as that of the first image.

[0065] S4: Obtain multiple similarities between the first feature map and the multiple second feature maps, and weight the multiple second feature maps according to the multiple similarities.

[0066] Step S4 includes:

[0067] Step 1: extracting a first texture feature from a first feature map, and extracting a plurality of second texture features from a plurality of second feature maps.

[0068] Image texture features are a type of visual feature that reflects the homogeneous phenomenon in an image. They reflect the surface structural organization and arrangement properties of an object's surface that have slow or periodic changes. Texture has three major characteristics: a certain local sequence that is repeated continuously, a non-random arrangement, and a roughly uniform unity within the texture area. In this embodiment, the grayscale co-occurrence matrix of the first feature map is first obtained and normalized, and then the energy of the grayscale co-occurrence matrix, that is, the sum of the squares of the values ​​of each element, is obtained to obtain the texture features of the image. The energy reflects the uniformity of the grayscale distribution of the image and the coarseness of the texture. A large energy value indicates that the current texture is a texture with relatively stable regular changes.

[0069] Step 2: Obtain similarity values ​​between the first texture feature and the plurality of second texture features through a texture feature matching algorithm, and arrange the plurality of similarity values ​​in descending order.

[0070] This paper uses the cosine similarity between two texture feature vectors to measure their similarity. The cosine similarity range is [−1, 1], and the larger the value, the more similar the two vectors are. The specific calculation formula is as follows:

[0071]

[0072] Where, and Represents the first two texture feature vectors i A quantity, n is the dimension of the vector, θ is the angle between the two vectors.

[0073] Step 3: assign corresponding weights to the second feature maps corresponding to the multiple second texture features in the order of arrangement, and the sum of the multiple weight values ​​is 1, thereby obtaining a weighted second feature map.

[0074] S5: Obtain a defogging mapping relationship through the haze-free image and the first feature map.

[0075] The pixel with the highest brightness in the first dark channel image is used as the first atmospheric light intensity. The multiple transmittances corresponding to multiple pixels in the first dark channel feature map are averaged to obtain the first transmittance. Based on the image dehazing algorithm, a mapping relationship between the first atmospheric light intensity and the intensity of the haze-free image, as well as a mapping relationship between the first transmittance and the transmittance of the haze-free image, is established.

[0076] S6: Input the multiple weighted second feature maps into the defogging mapping relationship to obtain a corresponding defogging image.

[0077] Obtain multiple second atmospheric light intensities and second transmittances corresponding to the multiple weighted second feature maps. Input the second atmospheric light intensity of each weighted second feature map into the intensity mapping relationship, and input the second transmittance into the transmittance mapping relationship to obtain the corresponding defogging image.

[0078] Based on the same concept, the present invention also provides a highway construction image defogging device, which includes an acquisition module, an extraction module, a weighting module and a defogging module.

[0079] The acquisition module is used to collect a fog-free image and multiple foggy images under the same construction link. Among the multiple foggy images, the foggy image with the highest overlap with the fog-free image is selected as the first image, and the remaining foggy images are the second images;

[0080] The extraction module is used to perform feature extraction on the first image to obtain a first feature map for representing the fog state, and to perform feature extraction on the plurality of second images to obtain a plurality of second feature maps;

[0081] The weighting module is used to obtain multiple similarities between the first feature map and the multiple second feature maps, and weight the multiple second feature maps according to the multiple similarities;

[0082] The defogging module is used to obtain a defogging mapping relationship through a haze-free image and a first feature map, and input multiple weighted second feature maps into the defogging mapping relationship to obtain a corresponding defogging image.

[0083] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned highway construction image defogging method is implemented.

[0084] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned highway construction image defogging method is implemented.

[0085] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0086] Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if such modifications and variations fall within the scope of the claims and their equivalents, the present invention is intended to include such modifications and variations.

Claims

1. A highway construction image defogging method, characterized in that: The following steps are involved: Collect a fog-free image and multiple foggy images from the same construction phase. Select the foggy image with the highest overlap with the fog-free image as the first image, and the remaining foggy images as the second images. Performing feature extraction on the first image to obtain a first feature map for representing the fog state, and performing feature extraction on the plurality of second images to obtain a plurality of second feature maps; Obtaining multiple similarities between the first feature map and the multiple second feature maps, and weighting the multiple second feature maps according to the multiple similarities; A defogging mapping relationship is obtained through the haze-free image and the first feature map, and a plurality of weighted second feature maps are input into the defogging mapping relationship to obtain a corresponding defogging image.

2. A highway construction image defogging method according to claim 1, characterized in that: The step of extracting features from the first image to obtain a first feature map for representing the fog state includes the following steps: Obtain pixel values ​​of each pixel in the first image on the red, green, and blue channels respectively, and extract the minimum value of the pixel values ​​of each pixel on the three channels; Combining the minimum values ​​of all pixels to obtain a first grayscale image of the same size as the first image; Minimum filtering is performed on the first grayscale image to obtain a first dark channel image, where the first dark channel image is a first feature map.

3. A highway construction image defogging method according to claim 1, characterized in that: The obtaining of multiple similarities between the first feature map and the multiple second feature maps, and weighting the multiple second feature maps according to the multiple similarities, comprises the following steps: Extracting a first texture feature of the first feature map, and extracting a plurality of second texture features of the plurality of second feature maps; Obtaining similarity values ​​between the first texture feature and the plurality of second texture features through a texture feature matching algorithm, and arranging the plurality of similarity values ​​in descending order; Corresponding weights are assigned to the second feature maps corresponding to the plurality of second texture features in the order of arrangement to obtain weighted second feature maps.

4. A highway construction image defogging method according to claim 2, characterized in that: The method of obtaining a defogging mapping relationship using a fog-free image and a first feature map includes the following steps: Taking the pixel with the highest brightness in the first dark channel image as the first atmospheric light intensity; Averaging multiple transmittances corresponding to multiple pixel points of the first dark channel feature map to obtain a first transmittance; Based on the image defogging algorithm, a mapping relationship between the first atmospheric light intensity and the light intensity of the fog-free image and a mapping relationship between the first transmittance and the transmittance of the fog-free image are established.

5. A highway construction image defogging method according to claim 4, characterized in that: The step of inputting the plurality of weighted second feature maps into the defogging mapping relationship to obtain a corresponding defogging image comprises the following steps: Obtaining a plurality of second atmospheric light intensities and second transmittances corresponding to the plurality of weighted second feature maps; The second atmospheric light intensity of each weighted second feature map is input into the light intensity mapping relationship, and the second transmittance is input into the transmission mapping relationship to obtain the corresponding defogging image.

6. A method for defogging highway construction images according to claim 1, characterized in that: The step of selecting a foggy image with the highest overlap with the non-fog image from among the multiple foggy images as the first image comprises the following steps: Adjust multiple foggy and fog-free images to the same size; Converting the adjusted multiple foggy images and fog-free images into grayscale images to obtain multiple foggy grayscale images and fog-free grayscale images; Obtaining a plurality of first hash values ​​of a plurality of foggy grayscale images and a second hash value of a non-foggy grayscale image, and obtaining a plurality of Hamming distances between the plurality of first hash values ​​and the second hash values; Multiple similarities are obtained through multiple Hamming distances, and the foggy image with the highest similarity is used as the first image.

7. A road construction image defogging device, characterized in that: include: An acquisition module is used to acquire a fog-free image and multiple foggy images in the same construction link, and select the foggy image with the highest overlap with the fog-free image from the multiple foggy images as the first image, and the remaining foggy images as the second images; an extraction module, configured to perform feature extraction on the first image to obtain a first feature map for representing the fog state, and perform feature extraction on the plurality of second images to obtain a plurality of second feature maps; a weighting module, configured to obtain a plurality of similarities between the first feature map and the plurality of second feature maps, and weight the plurality of second feature maps according to the plurality of similarities; The defogging module is used to obtain a defogging mapping relationship through the haze-free image and the first feature map, and input multiple weighted second feature maps into the defogging mapping relationship to obtain a corresponding defogging image.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for defogging highway construction images as claimed in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the highway construction image defogging method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Image processing method and device, equipment and storage medium

    CN112991218A

  • CycleGAN endoscope image defogging method based on image structure similarity constraint

    CN116309114A