WO2020232710A1 - Haze image quality evaluation method and system, storage medium, and electronic device - Google Patents

Haze image quality evaluation method and system, storage medium, and electronic device Download PDF

Info

Publication number
WO2020232710A1
WO2020232710A1 PCT/CN2019/088178 CN2019088178W WO2020232710A1 WO 2020232710 A1 WO2020232710 A1 WO 2020232710A1 CN 2019088178 W CN2019088178 W CN 2019088178W WO 2020232710 A1 WO2020232710 A1 WO 2020232710A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
haze
haze image
sky area
map
Prior art date
Application number
PCT/CN2019/088178
Other languages
French (fr)
Chinese (zh)
Inventor
储颖
游为麟
Original Assignee
深圳大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳大学 filed Critical 深圳大学
Priority to PCT/CN2019/088178 priority Critical patent/WO2020232710A1/en
Publication of WO2020232710A1 publication Critical patent/WO2020232710A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation

Definitions

  • the invention relates to the technical field of haze image quality evaluation, and more specifically, to a haze image quality evaluation method, system, storage medium and electronic equipment.
  • Haze image quality evaluation has broad application prospects. For example, according to the haze image to estimate the haze concentration and impact in time, it can be used to predict the air quality level in weather forecasting, it can be used to estimate visibility in highway monitoring, and it can be used to calculate driving safety in the field of unmanned driving.
  • haze image quality evaluation is also divided into two categories: subjective methods and objective methods. Among them, subjective image quality evaluation takes a long time and is difficult to apply in real-time in embedded devices, so it cannot be directly applied to the field of video surveillance. In the objective haze image quality evaluation method, since there is no corresponding original haze-free image in the haze image itself, the focus of the research should be the non-reference haze image quality evaluation algorithm.
  • the structural similarity method (Structural similarity index, SSIM) is a reference image quality evaluation method. The greater the evaluation value, the greater the similarity between images. This method considers both brightness and contrast. The formula is as follows:
  • ⁇ x and ⁇ y represent the mean values of images x and y, respectively, and represent brightness information.
  • ⁇ x and ⁇ y represent the variance of the image x and y, respectively, and represent contrast information, and C 1 , C 2 and C 3 are constants.
  • PSNR Peak signal to noise ratio
  • L is the total number of gray levels, usually 255, and ⁇ represents the mean square error of the image.
  • the Brenner gradient method is a non-reference image quality evaluation method. The larger the value, the higher the image quality.
  • the formula is as follows:
  • f(x, y) is the gray value of the corresponding pixel of the image
  • D(f) is the result of image quality evaluation.
  • Point sharpness evaluation method belongs to the non-reference type image quality evaluation method. The higher the value, the better the image quality evaluation result. Xu et al. believe that the greater the edge gray level changes, the higher the sharpness and the lower the haze concentration. Therefore, the image quality can be evaluated by statistical point sharpness.
  • the formula is as follows:
  • dI/dx represents the gray-scale derivative in the edge direction
  • I(b)-I(a) represents the overall gray-scale change in the edge direction
  • This method only counts specific image areas, and this area needs to be manually selected, which is not conducive to automation.
  • the entropy method belongs to the non-reference image quality evaluation method. The greater the entropy of the image, the better the image quality. Image entropy is based on statistical features, used to measure the richness of image information, and is an important indicator of the amount of image information measured. The formula is as follows:
  • Pi is the probability that a pixel with a gray value of i appears in the image
  • L is the total number of gray levels.
  • Gray scale difference method is a non-reference image quality evaluation method.
  • An image with a lower degree of haze has more high-frequency components, so the change in gray level can be used as a basis for evaluating the quality of haze images.
  • the formula is as follows:
  • f(x, y) represents the gray value of the pixel at the coordinate (x, y) on the image.
  • the image quality is evaluated by calculating the average gradient or point sharpness of the image.
  • This kind of scheme fails to consider the physical model of the haze image degradation process.
  • images of different scenes have different average gradient or point sharpness characteristics. Therefore, such methods are difficult to generalize to the quality comparison of haze images in different scenes.
  • the technical problem to be solved by the present invention is to provide a haze image quality evaluation method, system, storage medium and electronic equipment in view of the above-mentioned defects of the prior art.
  • the technical solution adopted by the present invention to solve its technical problems is: constructing a method for evaluating the quality of haze images, including the following steps:
  • the calculating the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area includes:
  • the first incident light attenuation rate D non_sky satisfies:
  • A is the global atmospheric light value
  • I c (x) is the pixel value of the pixel x in the haze image in channel c
  • ⁇ r, g, b ⁇ represents the three-color channel
  • ⁇ non_sky represents the non- uniformity of the haze image. Sky area.
  • the obtaining the non-sky area of the haze image includes:
  • S22 Acquire a gradient map of the grayscale image according to edge detection, and convert to generate a binary image
  • the acquiring a gradient map of the grayscale image according to edge detection and converting to generate a binary image includes:
  • the gradient threshold value is the average value of the gradient of the gradient map
  • the brightness threshold value is the average value of the brightness of the gray image.
  • the converting the haze image into a grayscale image includes:
  • the acquiring the gradient map of the grayscale image according to edge detection includes:
  • Adopting Sobel operator, Prewitt operator or Laplacian operator to perform edge detection to obtain the initial gradient map of the gray image
  • Median filtering is applied to the initial gradient image to obtain the final gradient image of the grayscale image.
  • the present invention also constructs a haze image quality evaluation system, including:
  • a first processing unit configured to obtain a first transmittance map corresponding to the haze image based on a dark channel prior method
  • the second processing unit is used to obtain the non-sky area of the haze image
  • a third processing unit configured to obtain a first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area;
  • the output unit is configured to output the image quality of the haze image according to the first incident light attenuation rate.
  • the present invention also constructs a computer storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method for evaluating the quality of the haze image described in any one of the above is realized.
  • the present invention also constructs an electronic device, including a memory and a processor
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program to implement the haze image quality evaluation method as described in any one of the above.
  • the implementation of the haze image quality evaluation method, system, storage medium and electronic equipment of the present invention has the following beneficial effects: by eliminating the sky area, the interference of the sky area on the haze image quality evaluation is reduced to optimize the image quality evaluation effect.
  • FIG. 1 is a program flow chart of an embodiment of the method for evaluating haze image quality according to the present invention
  • FIG. 2 is a program flowchart of another embodiment of the method for evaluating the quality of a haze image of the present invention
  • FIG. 3 is a program flow chart of another embodiment of the method for evaluating haze image quality according to the present invention.
  • Figure 4 is a schematic diagram of the identification process of non-sky areas in the haze image
  • Figure 5 shows the NSDark values corresponding to the non-sky areas of different haze images
  • Figure 6 and Figure 7 show the performance comparison of different haze images
  • FIG. 8 is a logical block diagram of the first embodiment of the haze image quality evaluation system for detecting the sky area of the present invention.
  • the scattering effect of particles in the air causes incident light attenuation, which is called direct light attenuation; the other part is that atmospheric light directly acts on suspended particles in the air, and is received by the imaging device after being scattered, and overlaps on the target image, which is called Additional scattered light.
  • incident light attenuation which is called direct light attenuation
  • the other part is that atmospheric light directly acts on suspended particles in the air, and is received by the imaging device after being scattered, and overlaps on the target image, which is called Additional scattered light.
  • the lower the haze degree the higher the proportion of the direct attenuation light in the image
  • the higher the haze degree the higher the proportion of additional scattered light in the image.
  • I(x) is the haze image
  • J(x) is the clear image
  • t(x) is the transmittance map
  • A is the global atmospheric light value.
  • the dark channel prior method is used to estimate the first transmittance map corresponding to the haze image, and the first transmittance map can be expressed as:
  • A represents the global atmospheric light value
  • I c (x) represents the pixel value of the pixel x in the haze image in channel c
  • ⁇ r, g, b ⁇ represents the three-color channel
  • represents the overall area of the haze image
  • each pixel must have a pixel value close to 0 in the three primary color channels, that is, the elements in the channel composed of the minimum values of the image channels are close to 0.
  • the formula is as follows:
  • J c (x) represents the pixel value of pixel x in the c channel
  • ⁇ r, g, b ⁇ represents the three color channels
  • represents the overall area of the image, at this time the image is a clear image
  • J dark (x) represents the image The dark channel composed of the minimum of the three color channels.
  • the first transmittance diagram can be obtained as formula (2).
  • A represents the global atmospheric light value
  • the average value of the brightness of each channel can be calculated by taking the first 0.01% pixels of the haze image with the maximum brightness.
  • the non-sky area of the haze image specifically, the first transmittance map of the haze image acquired above corresponds to the transmittance of the entire image, and because in some scenes, for example, the sky area is cloudy or cloudy In the case of, the sky area in the haze image is too close to the haze, which will affect the judgment of the quality of the haze image. Therefore, it is necessary to further remove the sky area from the haze image to obtain the haze image
  • the specific process of calculating the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area includes: obtaining the haze according to the first transmittance map The second incident light attenuation rate of the image; the first incident light attenuation rate corresponding to the non-sky area is obtained according to the second incident light attenuation rate and the non-sky area; in another embodiment, it includes: according to the first transmittance map and the non-sky area Obtain the second transmittance map corresponding to the non-sky area in the sky area; obtain the first incident light attenuation rate corresponding to the non-sky area according to the second transmittance map.
  • represents the wavelength
  • ⁇ ( ⁇ ) represents the atmospheric extinction coefficient
  • its physical meaning is the relative attenuation rate of electromagnetic wave radiation per unit distance in the atmosphere
  • d is the distance between the observation point and the target.
  • ⁇ ( ⁇ ) represents the relative attenuation rate per unit distance
  • ⁇ ( ⁇ ) ⁇ d represents the total attenuation rate of the light from the scene to the imaging device, that is, the incident light attenuation rate.
  • the atmospheric extinction coefficient is a parameter related to the properties and density of aerosols. It is constant when the aerosol properties are constant and uniformly distributed. Therefore, in an image with a constant scene depth d, the incident light attenuation rate D(x) is related to the haze density, and its formula is:
  • D(x) represents the attenuation rate of incident light
  • represents the wavelength
  • ⁇ ( ⁇ ) represents the atmospheric extinction coefficient
  • t(x) represents the transmittance graph. That is, on the basis of the above, the second incident light attenuation rate D(x) of the haze image can be obtained according to formula (7), and converted to the corresponding first incident light attenuation rate D non_sky according to the obtained non-sky area. It is also possible to first convert the first transmittance map corresponding to the haze image to obtain the second transmittance map t non_sky corresponding to the non-sky area. Based on the above, the converted formula can be:
  • A is the global atmospheric light value
  • I c (x) is the pixel value of the pixel x in the haze image in channel c
  • ⁇ r, g, b ⁇ represents the three-color channel
  • ⁇ non_sky represents the non- uniformity of the haze image.
  • Sky area The specific process can refer to the above description.
  • the attenuation rate D non_sky of the incident light in the non-sky area can be used as the evaluation value of the haze image quality, and the evaluation value can be defined as the NSDark value.
  • step S2 obtaining the non-sky area of the haze image includes:
  • the minimum filter is used to denoise, and the local scattered noise of the image is covered to make the overall segmentation more reasonable. Finally, the segmented non-sky area and sky area are obtained, so as to calculate the corresponding incident light attenuation rate according to the non-sky area of the haze image.
  • the diameter of the minimum filter can be set to 3.
  • step S22 acquiring a gradient map of a grayscale image according to edge detection, and converting to generate a binary image includes:
  • edge information may appear in the sky area.
  • the interference of artificial light sources may also cause the brightness of some areas on the ground to exceed the threshold. Therefore, a preset gradient threshold and a preset brightness threshold need to be set. Convert the first binary image corresponding to the gradient map according to the preset gradient, generate the second binary image corresponding to the brightness of the grayscale image according to the preset brightness threshold, and then merge the gradient and the brightness to generate the final binary image Figure.
  • the gradient threshold value is the gradient average value of the gradient map
  • the brightness threshold value is the brightness average value of the grayscale image.
  • the preset gradient threshold and the preset brightness threshold may be set as the gradient average value of the gradient map and the brightness average value of the grayscale image, respectively. Then, take 0 or 255 for the divided pixels to obtain a binary image. Since the goal of sky recognition is to find the average transmittance of non-sky areas, the slight error at the junction of the sky and the ground caused by the setting of the preset gradient threshold and the preset brightness threshold has little effect on the calculation results.
  • step S21 converting the haze image into a grayscale image includes: obtaining an RGB image of the haze image, and adjusting the RGB image according to a preset RGB ratio to obtain the corresponding grayscale image; specifically, considering some algorithms
  • the performance improvement of the sky detection effect is limited.
  • the conversion of the gray image may adopt a method of converting an RGB image into a gray image proportionally.
  • the preset RGB ratio can be used, the weight of the R channel is set to 0.299, the weight of the G channel is set to 0.587, and the weight of the B channel is set to 0.114.
  • acquiring the gradient map of the grayscale image according to the edge measurement includes: using Sobel operator, Prewitt operator or Laplacian operator to perform edge detection to acquire the initial gradient map of the grayscale image;
  • the gradient map uses median filtering to obtain the final gradient map of the grayscale image.
  • obtaining the gradient map of the gray image through a specific edge detection operator can adopt any one of the Sobel operator, the Prewitt operator, or the Laplacian operator.
  • the gradation map can be denoised, so that subsequent operations can be performed on the denoised gradient map. Take the specific Laplacian operator as an example.
  • L(f) represents the Laplacian detection value
  • f represents the gray value of the pixel on the image
  • x and y represent the abscissa and ordinate of the pixel respectively.
  • L(f) represents the Laplacian detection value
  • f(x, y) represents the gray value of the pixel with the coordinate (x, y) on the gray image.
  • the sky area is bright and smooth as a whole, and it generally appears as a white area in the Laplacian edge detection image.
  • the edge of the cloud, the dust on the imaging device, etc. may all cause interference noise.
  • median filtering is needed to reduce noise. By sliding the window, the value of the center pixel of the window is taken as the window average value, which can effectively eliminate noise interference.
  • FIG 4 it shows the recognition process of non-sky areas in the haze image.
  • A represents the original image
  • the edge detection of the gray image B is performed by Laplacian operator, and the conversion is performed to obtain the binary image C
  • the minimum value filter is performed on the binary image C to obtain the final
  • the non-sky area corresponding to the haze object corresponds to the white area in Figure D.
  • Figure 5 shows the attenuation rate of incident light corresponding to the non-sky area of different haze images in the HID2018 database, that is, the NSDark value. It can be seen from Figure 5 that the NSDark values of Figure 5 (d) and (e) are small, and the image is less affected by haze. Figure 5(g) and (h) show that the NSDark value is large, and the image is seriously affected by the haze. The NSDark value is consistent with the subjective evaluation result.
  • the process of obtaining the attenuation rate of incident light in the non-sky area D non_sky corresponding to the haze image quality evaluation value, that is, the NSDark value, to evaluate the haze image image quality is a reference-free image quality evaluation process.
  • three commonly used non-reference image quality evaluation methods, entropy function (Entropy), gray-scale variance (SMD) and Laplacian gradient are used for performance comparison.
  • the subjective score (MOS) of the haze image is used as a benchmark for comparison. Refer to the following table for details:
  • Table 1 The data in Table 1 is normalized to obtain the performance comparison of Mos, NSDark and Laplacian shown in Figure 6, where A1 represents the MOS value, A2 represents the NsDark value, A3 represents the Laplacian value, and the Mos and SMD shown in Figure 7.
  • A1 represents the MOS value
  • A2 represents the NsDark value
  • A3 represents the Laplacian value
  • B1 is the MOS value
  • B2 is the Entropy value
  • B3 is the SMD value. It can be seen from Figure 6 and Figure 7 that the overall trend of the NSDark method is consistent with the Laplacian gradient method and MOS, and the monotonicity of its change is better than that of the SMD and Entropy methods.
  • the mean square error between different image quality evaluation methods and MOS values is calculated.
  • the mean square error between the Laplician value and the MOS value is 4.14
  • the mean square error between the Entropy value and the MOS value is 1.13
  • the mean square error between the SMD value and the MOS value is 1.91
  • the mean square error between the NSDark value and the MOS value is 0.5.
  • the mean square error of NSDark and MOS values of all images is the smallest, and the changes of NSDark and MOS values are relatively consistent. Therefore, the evaluation result of NSDark value is slightly better than other quality evaluation methods.
  • a haze image quality evaluation system of the present invention includes:
  • the obtaining unit 10 is used to obtain a haze image
  • the first processing unit 20 is configured to obtain a first transmittance map corresponding to the haze image based on the dark channel prior method
  • the second processing unit 30 is used to obtain the non-sky area of the haze image
  • the third processing unit 40 is configured to obtain the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area;
  • the output unit 50 is configured to output the image quality of the haze image according to the first incident light attenuation rate.
  • the specific coordination operation process between the units of the haze image quality evaluation system can refer to the above-mentioned haze image quality evaluation method, which will not be repeated here.
  • an electronic device of the present invention includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement any of the above haze image quality evaluation methods.
  • the process described above with reference to the flowchart can be implemented as a computer software program.
  • an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program when the computer program can be downloaded and installed by an electronic device and executed, it executes the above-mentioned functions defined in the method of the embodiment of the present invention.
  • the electronic device in the present invention can be a terminal such as a notebook, a desktop computer, a tablet computer, a smart phone, etc., or a server.
  • a computer storage medium of the present invention has a computer program stored thereon, and when the computer program is executed by a processor, any one of the above haze image quality evaluation methods is realized.
  • the above-mentioned computer-readable medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above.
  • Computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The present invention relates to a haze image quality evaluation method and system, a storage medium, and an electronic device, comprising the following steps: S1. obtaining a haze image, and obtaining a first transmittance map corresponding to the haze image on the basis of a dark channel prior method; S2. obtaining a non-sky region of the haze image; S3. obtaining a first incident light attenuation rate corresponding to the non-sky region according to the first transmittance map and the non-sky region, so as to obtain the image quality of the haze image according to the first incident light attenuation rate. According to the present invention, the interference of a sky region on the haze image quality evaluation is reduced by eliminating the sky region, thereby optimizing the image quality evaluation effect.

Description

雾霾图像质量评价方法、系统、存储介质及电子设备Haze image quality evaluation method, system, storage medium and electronic equipment 技术领域Technical field
本发明涉及雾霾图像质量评价技术领域,更具体地说,涉及一种雾霾图像质量评价方法、系统、存储介质及电子设备。The invention relates to the technical field of haze image quality evaluation, and more specifically, to a haze image quality evaluation method, system, storage medium and electronic equipment.
背景技术Background technique
雾霾图像质量评价具有广阔的应用前景。例如,根据雾霾图像及时估计雾霾浓度和影响,在气象预测中可用于预测空气质量等级,高速道路监控中可用于估算能见度,无人驾驶领域可用于计算行车安全程度。Haze image quality evaluation has broad application prospects. For example, according to the haze image to estimate the haze concentration and impact in time, it can be used to predict the air quality level in weather forecasting, it can be used to estimate visibility in highway monitoring, and it can be used to calculate driving safety in the field of unmanned driving.
与图像质量评价方法类似,雾霾图像质量评价也分为主观方法与客观方法两大范畴。其中,主观图像质量评价耗时长,难以在嵌入式设备中实时应用,因此无法直接应用于视频监控领域。客观雾霾图像质量评价方法中,由于雾霾图像本身不存在对应的原始无雾霾图像,所以研究的重点应是无参考型雾霾图像质量评价算法。Similar to image quality evaluation methods, haze image quality evaluation is also divided into two categories: subjective methods and objective methods. Among them, subjective image quality evaluation takes a long time and is difficult to apply in real-time in embedded devices, so it cannot be directly applied to the field of video surveillance. In the objective haze image quality evaluation method, since there is no corresponding original haze-free image in the haze image itself, the focus of the research should be the non-reference haze image quality evaluation algorithm.
然而,国内外在这方面的研究较为有限,许多方法仍采用传统的全参考型图像质量评价算法来进行雾霾图像质量评价。下面介绍几种常用的雾霾图像质量评价算法。However, research in this area at home and abroad is relatively limited, and many methods still use traditional full-reference image quality evaluation algorithms to evaluate haze image quality. The following introduces several commonly used haze image quality evaluation algorithms.
(1)结构相似度方法(Structural similarity index,SSIM),属于参考型图像质量评价方法。评价值越大图像间的相似度越大。该方法同时考虑了亮度和对比度。公式如下:(1) The structural similarity method (Structural similarity index, SSIM) is a reference image quality evaluation method. The greater the evaluation value, the greater the similarity between images. This method considers both brightness and contrast. The formula is as follows:
Figure PCTCN2019088178-appb-000001
Figure PCTCN2019088178-appb-000001
其中,μ x,μ y分别表示图像x和y的均值,代表亮度信息。σ x,σ y分别表示图像x和y的方差,代表对比度信息,C 1,C 2和C 3为常数。 Among them, μ x and μ y represent the mean values of images x and y, respectively, and represent brightness information. σ x and σ y represent the variance of the image x and y, respectively, and represent contrast information, and C 1 , C 2 and C 3 are constants.
(2)峰值信噪比方法(Peak signal to noise ratio,PSNR),属于传统基于能 量的比较方法。PSNR值越高,相似度越高。其公式如下:(2) Peak signal to noise ratio (PSNR) is a traditional energy-based comparison method. The higher the PSNR value, the higher the similarity. The formula is as follows:
Figure PCTCN2019088178-appb-000002
Figure PCTCN2019088178-appb-000002
其中,L为灰度级总数,通常取值为255,σ表示图像的均方误差。Among them, L is the total number of gray levels, usually 255, and σ represents the mean square error of the image.
(3)Brenner梯度方法,属于无参考图像质量评价方法,其值越大,表示图像质量越高。公式如下:(3) The Brenner gradient method is a non-reference image quality evaluation method. The larger the value, the higher the image quality. The formula is as follows:
Figure PCTCN2019088178-appb-000003
Figure PCTCN2019088178-appb-000003
其中,f(x,y)为图像对应像素点的灰度值,D(f)为图像质量评价的结果。Among them, f(x, y) is the gray value of the corresponding pixel of the image, and D(f) is the result of image quality evaluation.
(4)点锐度方法。点锐度评价方法属于无参考型图像质量评价方法,其值越高,图像质量评价结果越好。Xu等人认为,边缘灰度变化越大,则清晰度越高,雾霾浓度越低,因此可以通过统计点锐度进行图像质量评价。公式如下:(4) Point sharpness method. The point sharpness evaluation method belongs to the non-reference type image quality evaluation method. The higher the value, the better the image quality evaluation result. Xu et al. believe that the greater the edge gray level changes, the higher the sharpness and the lower the haze concentration. Therefore, the image quality can be evaluated by statistical point sharpness. The formula is as follows:
Figure PCTCN2019088178-appb-000004
Figure PCTCN2019088178-appb-000004
其中,dI/dx表示边缘方向的灰度导数,I(b)-I(a)表示边缘方向的总体灰度变化。Among them, dI/dx represents the gray-scale derivative in the edge direction, and I(b)-I(a) represents the overall gray-scale change in the edge direction.
此方法只统计特定图像区域,并且该区域需要人工选取,不利于自动化。This method only counts specific image areas, and this area needs to be manually selected, which is not conducive to automation.
(5)熵方法,属于无参考图像质量评价方法。图像的熵越大,图像质量越好。图像熵基于统计特征,用于衡量图像信息丰富程度,是度量的图像信息量的重要指标。公式如下:(5) The entropy method belongs to the non-reference image quality evaluation method. The greater the entropy of the image, the better the image quality. Image entropy is based on statistical features, used to measure the richness of image information, and is an important indicator of the amount of image information measured. The formula is as follows:
Figure PCTCN2019088178-appb-000005
Figure PCTCN2019088178-appb-000005
其中,Pi是灰度值为i的像素点在图像中出现的概率,L为灰度级总数。Among them, Pi is the probability that a pixel with a gray value of i appears in the image, and L is the total number of gray levels.
(6)灰度方差方法(Gray scale difference method,SMD),属于无参考图像质量评价方法。图像的灰度方差值越大,图像质量越好。雾霾程度越低的图像,其高频分量也越多,因此可将灰度的变化作为雾霾图像质量评价的依据。公式如下:(6) Gray scale difference method (SMD) is a non-reference image quality evaluation method. The larger the gray-scale variance of the image, the better the image quality. An image with a lower degree of haze has more high-frequency components, so the change in gray level can be used as a basis for evaluating the quality of haze images. The formula is as follows:
Figure PCTCN2019088178-appb-000006
Figure PCTCN2019088178-appb-000006
其中,f(x,y)表示图像上在坐标为(x,y)的像素点的灰度值。Among them, f(x, y) represents the gray value of the pixel at the coordinate (x, y) on the image.
该方法方法计算便捷快速,缺点为在梯度密集处灵敏度不高。This method is convenient and fast to calculate, but the disadvantage is that the sensitivity is not high at dense gradients.
上述的现有方案中通过计算图像的平均梯度或点锐度,进而评估雾霾图像质量。这类方案未能考虑雾霾图像退化过程中的物理模型。并且,不同场景的图像具有不同的平均梯度或点锐度特征。因此,此类方法较难泛化到不同场景的雾霾图像质量对比中。In the above-mentioned existing solutions, the image quality is evaluated by calculating the average gradient or point sharpness of the image. This kind of scheme fails to consider the physical model of the haze image degradation process. Moreover, images of different scenes have different average gradient or point sharpness characteristics. Therefore, such methods are difficult to generalize to the quality comparison of haze images in different scenes.
综上,现有方案的雾霾图像质量评价性能还有较大的提升空间,其雾霾图像质量评价方法与图像采集的范围有必要进行改进。In summary, there is still a lot of room for improvement in the evaluation performance of haze image quality in existing schemes, and it is necessary to improve the haze image quality evaluation method and the scope of image collection.
发明内容Summary of the invention
本发明要解决的技术问题在于,针对现有技术的上述现有技术缺陷,提供一种雾霾图像质量评价方法、系统、存储介质及电子设备。The technical problem to be solved by the present invention is to provide a haze image quality evaluation method, system, storage medium and electronic equipment in view of the above-mentioned defects of the prior art.
本发明解决其技术问题所采用的技术方案是:构造一种雾霾图像质量评价方法,包括以下步骤:The technical solution adopted by the present invention to solve its technical problems is: constructing a method for evaluating the quality of haze images, including the following steps:
S1、获取雾霾图像,并基于暗通道先验方法获取所述雾霾图像对应的第一透射率图;S1. Acquire a haze image, and acquire a first transmittance map corresponding to the haze image based on a dark channel prior method;
S2、获取所述雾霾图像的非天空区域;S2. Obtain a non-sky area of the haze image;
S3、根据所述第一透射率图和所述非天空区域获取所述非天空区域对应的第一入射光衰减率,以根据所述第一入射光衰减率获取所述雾霾图像的图像质量。S3. Acquire a first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area, so as to obtain the image quality of the haze image according to the first incident light attenuation rate .
优选地,所述步骤S3中,所述根据所述第一透射率图和所述非天空区域计算所述非天空区域对应的第一入射光衰减率,包括:Preferably, in the step S3, the calculating the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area includes:
根据所述第一透射率图获取所述雾霾图像的第二入射光衰减率;Acquiring the second incident light attenuation rate of the haze image according to the first transmittance map;
根据所述第二入射光衰减率和所述非天空区域获取所述非天空区域对应的第一入射光衰减率;或Obtaining the first incident light attenuation rate corresponding to the non-sky area according to the second incident light attenuation rate and the non-sky area; or
根据所述第一透射率图和所述非天空区域获取所述非天空区域对应的第二透射率图;Acquiring a second transmittance map corresponding to the non-sky area according to the first transmittance map and the non-sky area;
根据所述第二透射率图获取所述非天空区域对应的第一入射光衰减率。Acquire the first incident light attenuation rate corresponding to the non-sky area according to the second transmittance map.
优选地,Preferably,
所述第一入射光衰减率D non_sky满足:
Figure PCTCN2019088178-appb-000007
The first incident light attenuation rate D non_sky satisfies:
Figure PCTCN2019088178-appb-000007
其中,A为全局大气光值,I c(x)为雾霾图像内像素点x在通道c中的像素值,{r,g,b}表示三颜色通道,Ω non_sky表示雾霾图像的非天空区域。 Among them, A is the global atmospheric light value, I c (x) is the pixel value of the pixel x in the haze image in channel c, {r, g, b} represents the three-color channel, and Ω non_sky represents the non- uniformity of the haze image. Sky area.
优选地,在所述步骤S2中,所述获取所述雾霾图像的非天空区域包括:Preferably, in the step S2, the obtaining the non-sky area of the haze image includes:
S21、转换所述雾霾图像为灰度图像;S21: Convert the haze image into a grayscale image;
S22、根据边缘检测获取所述灰度图像的梯度图,并转换以生成二值图;S22: Acquire a gradient map of the grayscale image according to edge detection, and convert to generate a binary image;
S23、对所述二值图进行最小值滤波,以获取所述雾霾图像的非天空区域。S23. Perform minimum filtering on the binary image to obtain a non-sky area of the haze image.
优选地,所述步骤S22中,所述根据边缘检测获取所述灰度图像的梯度图,并转换以生成二值图包括:Preferably, in the step S22, the acquiring a gradient map of the grayscale image according to edge detection and converting to generate a binary image includes:
S221、根据预设梯度阈值转换所述梯度图以生成第一二值图;S221: Convert the gradient map according to a preset gradient threshold to generate a first binary map;
S222、根据预设亮度阈值转换所述灰度图像以生成第二二值图;S222: Convert the grayscale image according to a preset brightness threshold to generate a second binary image;
S223、合并所述第一二值图与所述第二二值图,以生成所述二值图。S223. Combine the first binary graph and the second binary graph to generate the binary graph.
优选地,所述梯度阈值为所述梯度图的梯度平均值;所述亮度阈值为所述灰度图像的亮度平均值。Preferably, the gradient threshold value is the average value of the gradient of the gradient map; the brightness threshold value is the average value of the brightness of the gray image.
优选地,在所述步骤S21中,所述转换所述雾霾图像为灰度图像包括:Preferably, in the step S21, the converting the haze image into a grayscale image includes:
获取所述雾霾图像的RGB图像,根据预设RGB比例调整所述RGB图像以获取对应的所述灰度图像;和/或Acquiring an RGB image of the haze image, and adjusting the RGB image according to a preset RGB ratio to acquire the corresponding grayscale image; and/or
在所述步骤S22中,所述根据边缘测测获取所述灰度图像的梯度图,包括:In the step S22, the acquiring the gradient map of the grayscale image according to edge detection includes:
采用Sobel算子、Prewitt算子或Laplacian算子进行边缘检测以获取所述灰度图像的初始梯度图;Adopting Sobel operator, Prewitt operator or Laplacian operator to perform edge detection to obtain the initial gradient map of the gray image;
对所述初始梯度图采用中值滤波以获取所述灰度图像的最终梯度图。Median filtering is applied to the initial gradient image to obtain the final gradient image of the grayscale image.
本发明还构造一种雾霾图像质量评价系统,包括:The present invention also constructs a haze image quality evaluation system, including:
获取单元,用于获取雾霾图像;An acquiring unit for acquiring a haze image;
第一处理单元,用于基于暗通道先验方法获取所述雾霾图像对应的第一透射率图;A first processing unit, configured to obtain a first transmittance map corresponding to the haze image based on a dark channel prior method;
第二处理单元,用于获取所述雾霾图像的非天空区域;The second processing unit is used to obtain the non-sky area of the haze image;
第三处理单元,用于根据所述第一透射率图和所述非天空区域获取所述非天空区域对应的第一入射光衰减率;A third processing unit, configured to obtain a first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area;
输出单元,用于根据所述第一入射光衰减率输出所述雾霾图像的图像质量。The output unit is configured to output the image quality of the haze image according to the first incident light attenuation rate.
本发明还构造一种计算机存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上面任意一项所述的雾霾图像质量评价方法。The present invention also constructs a computer storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method for evaluating the quality of the haze image described in any one of the above is realized.
本发明还构造一种电子设备,包括存储器和处理器;The present invention also constructs an electronic device, including a memory and a processor;
所述存储器用于存储计算机程序;The memory is used to store computer programs;
所述处理器用于执行所述计算机程序实现如上面中任意一项所述的雾霾图像质量评价方法。The processor is configured to execute the computer program to implement the haze image quality evaluation method as described in any one of the above.
实施本发明的雾霾图像质量评价方法、系统、存储介质及电子设备,具有以下有益效果:通过剔除天空区域减少天空区域对雾霾图像质量评价的干扰,以优化图像质量评价效果。The implementation of the haze image quality evaluation method, system, storage medium and electronic equipment of the present invention has the following beneficial effects: by eliminating the sky area, the interference of the sky area on the haze image quality evaluation is reduced to optimize the image quality evaluation effect.
附图说明Description of the drawings
下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with the accompanying drawings and embodiments. In the accompanying drawings:
图1是本发明雾霾图像质量评价方法一实施例的程序流程图;FIG. 1 is a program flow chart of an embodiment of the method for evaluating haze image quality according to the present invention;
图2是本发明雾霾图像质量评价方法另一实施例的程序流程图;2 is a program flowchart of another embodiment of the method for evaluating the quality of a haze image of the present invention;
图3是本发明雾霾图像质量评价方法另一实施例的程序流程图;FIG. 3 is a program flow chart of another embodiment of the method for evaluating haze image quality according to the present invention;
图4是雾霾图像中非天空区域的识别过程示意图;Figure 4 is a schematic diagram of the identification process of non-sky areas in the haze image;
图5是不同雾霾图像的非天空区域对应的NSDark值;Figure 5 shows the NSDark values corresponding to the non-sky areas of different haze images;
图6、图7是不同雾霾图像性能对比;Figure 6 and Figure 7 show the performance comparison of different haze images;
图8是本发明天空区域检测的雾霾图像质量评价系统第一实施例的逻辑框图。FIG. 8 is a logical block diagram of the first embodiment of the haze image quality evaluation system for detecting the sky area of the present invention.
具体实施方式Detailed ways
为了对本发明的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本发明的具体实施方式。In order to have a clearer understanding of the technical features, objectives and effects of the present invention, the specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
如图1所示,在本发明的雾霾图像质量评价方法第一实施例中,包括以下 步骤:As shown in Fig. 1, in the first embodiment of the haze image quality evaluation method of the present invention, the following steps are included:
S1、获取雾霾图像,并基于暗通道先验方法获取雾霾图像对应的第一透射率图;具体的,被广泛应用于雾霾天气下的图像处理领域的大气散射模型描述了大气散射过程和环境光衰减的原理。其详细的技术原理单光源下的大气散射模型如图5所示,该模型将到达成像设备的光线分为两部分:一部分是直接衰减光线,场景的反射光传播到成像设备的过程中,受空气中颗粒物的散射作用,发生入射光衰减,称为直接光衰减;另一部分是大气光直接作用在空气中的悬浮颗粒上,散射后被成像设备接收,并在目标图像上发生重叠,称为附加散射光线。通常这两部分光线都存在,雾霾程度越低的图像,直接衰减光线在图像中占比越高;雾霾程度越高的图像,附加散射光线在图像中占比越高。在上面的基础上,在图像去雾领域,有雾图像和去雾图像的关系可以如下模型表示:S1. Obtain the haze image, and obtain the first transmittance map corresponding to the haze image based on the dark channel prior method; specifically, the atmospheric scattering model widely used in the field of image processing under the haze weather describes the atmospheric scattering process And the principle of ambient light attenuation. The detailed technical principle of the atmospheric scattering model under a single light source is shown in Figure 5. The model divides the light reaching the imaging device into two parts: one is directly attenuating the light, and the reflected light of the scene propagates to the imaging device. The scattering effect of particles in the air causes incident light attenuation, which is called direct light attenuation; the other part is that atmospheric light directly acts on suspended particles in the air, and is received by the imaging device after being scattered, and overlaps on the target image, which is called Additional scattered light. Usually these two parts of light exist, the lower the haze degree, the higher the proportion of the direct attenuation light in the image; the higher the haze degree, the higher the proportion of additional scattered light in the image. Based on the above, in the field of image defogging, the relationship between the foggy image and the defogging image can be represented by the following model:
I(x)=J(x)t(x)+A(1-t(x))  (1)I(x)=J(x)t(x)+A(1-t(x)) (1)
其中,I(x)为雾霾图像,J(x)为清晰图像,t(x)为透射率图,A为全局大气光值。Among them, I(x) is the haze image, J(x) is the clear image, t(x) is the transmittance map, and A is the global atmospheric light value.
在上面的基础上,采用暗通道先验方法估算雾霾图像对应的第一透射率图,该第一透射率图可以表示为:On the basis of the above, the dark channel prior method is used to estimate the first transmittance map corresponding to the haze image, and the first transmittance map can be expressed as:
Figure PCTCN2019088178-appb-000008
Figure PCTCN2019088178-appb-000008
其中,A表示全局大气光值,I c(x)表示雾霾图像内像素点x在通道c中的像素值,{r,g,b}表示三颜色通道,Ω表示雾霾图像的整体区域。 Among them, A represents the global atmospheric light value, I c (x) represents the pixel value of the pixel x in the haze image in channel c, {r, g, b} represents the three-color channel, and Ω represents the overall area of the haze image .
其具体操作:对于户外清晰图像的非天空区域,每个像素点在三原色通道中一定存在接近于0的像素值,即图像各通道最小值组成的通道中的元素趋近于0。用公式表述如下:The specific operation: For the non-sky area of the outdoor clear image, each pixel must have a pixel value close to 0 in the three primary color channels, that is, the elements in the channel composed of the minimum values of the image channels are close to 0. The formula is as follows:
Figure PCTCN2019088178-appb-000009
Figure PCTCN2019088178-appb-000009
其中,J c(x)表示像素点x在c通道的像素值,{r,g,b}表示三颜色通道,Ω表示图像整体区域,此时图像取清晰图像,J dark(x)表示图像的三颜色通道取最小值组成的暗通道。 Among them, J c (x) represents the pixel value of pixel x in the c channel, {r, g, b} represents the three color channels, Ω represents the overall area of the image, at this time the image is a clear image, J dark (x) represents the image The dark channel composed of the minimum of the three color channels.
将公式(3)代入公式(1)得到以下公式:Substitute formula (3) into formula (1) to get the following formula:
Figure PCTCN2019088178-appb-000010
Figure PCTCN2019088178-appb-000010
由于无雾图像的暗通道值趋近于0,将公式(3)代入(4)可得:Since the dark channel value of a fog-free image is close to 0, substituting formula (3) into (4) can get:
Figure PCTCN2019088178-appb-000011
Figure PCTCN2019088178-appb-000011
即可得到第一透射率图如公式(2)。The first transmittance diagram can be obtained as formula (2).
其中,A表示全局大气光值,可以通过取雾霾图像亮度最大的前0.01%像素点,计算其各通道亮度平均值。Among them, A represents the global atmospheric light value, and the average value of the brightness of each channel can be calculated by taking the first 0.01% pixels of the haze image with the maximum brightness.
S2、获取雾霾图像的非天空区域;具体的,在上述获取的雾霾图像的第一透射率图其对应的整个图像的透射率,而由于在部分场景下例如天空区域在阴天或者多云的情况下,雾霾图像中的天空区域由于图像特征与雾霾过于接近,其会影响雾霾图像质量的判断,因此,需要进一步的对雾霾图像进行天空区域的剔除,以获取雾霾图像中的非天空区域。S2. Acquire the non-sky area of the haze image; specifically, the first transmittance map of the haze image acquired above corresponds to the transmittance of the entire image, and because in some scenes, for example, the sky area is cloudy or cloudy In the case of, the sky area in the haze image is too close to the haze, which will affect the judgment of the quality of the haze image. Therefore, it is necessary to further remove the sky area from the haze image to obtain the haze image The non-sky area in
S3、根据第一透射率图和非天空区域获取非天空区域对应的第一入射光衰减率,以根据第一入射光衰减率获取雾霾图像的图像质量。具体的,在获取到雾霾图像的非天空区域后,可以根据已经获得的整个雾霾图像的第一透射率图的表达进行转换,获取与雾霾图像中的非天空区域对应的第一入射光衰减率,通过该第一入射光衰减率来获取该雾霾图像的图像质量,也可以理解为雾霾图像的图像质量评价结果。S3. Obtain a first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area, so as to obtain the image quality of the haze image according to the first incident light attenuation rate. Specifically, after the non-sky area of the haze image is obtained, conversion can be performed according to the expression of the first transmittance map of the entire haze image that has been obtained, and the first incidence corresponding to the non-sky area in the haze image can be obtained. The light attenuation rate, which is used to obtain the image quality of the haze image through the first incident light attenuation rate, can also be understood as the image quality evaluation result of the haze image.
进一步的,步骤S3中,根据第一透射率图和非天空区域计算非天空区域对应的第一入射光衰减率的具体过程,在一实施例中,包括:根据第一透射率图获取雾霾图像的第二入射光衰减率;根据第二入射光衰减率和非天空区域获取非天空区域对应的第一入射光衰减率;在另一实施例中,包括:根据第一透射率图和非天空区域获取非天空区域对应的第二透射率图;根据第二透射率图获取非天空区域对应的第一入射光衰减率。Further, in step S3, the specific process of calculating the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area, in one embodiment, includes: obtaining the haze according to the first transmittance map The second incident light attenuation rate of the image; the first incident light attenuation rate corresponding to the non-sky area is obtained according to the second incident light attenuation rate and the non-sky area; in another embodiment, it includes: according to the first transmittance map and the non-sky area Obtain the second transmittance map corresponding to the non-sky area in the sky area; obtain the first incident light attenuation rate corresponding to the non-sky area according to the second transmittance map.
具体的,大气散射模型中,透射率与场景深度和大气消光系数的关系为:Specifically, in the atmospheric scattering model, the relationship between transmittance and scene depth and atmospheric extinction coefficient is:
t(x)=e -β(λ)d   (6) t(x)=e -β(λ)d (6)
其中,λ表示波长,β(λ)表示大气消光系数,其物理意义为电磁波辐射在 大气中传播单位距离时的相对衰减率,d为观察点到目标物之间的距离。Among them, λ represents the wavelength, β (λ) represents the atmospheric extinction coefficient, and its physical meaning is the relative attenuation rate of electromagnetic wave radiation per unit distance in the atmosphere, and d is the distance between the observation point and the target.
单散射条件下,气溶胶在空气中均匀分布。β(λ)代表单位距离的相对衰减率,β(λ)×d代表场景处的光线到成像设备的总衰减率,即入射光衰减率。大气消光系数是关于气溶胶性质和密度的参数。当气溶胶性质不变且均匀分布时是常数。因此,在场景深度d不变的的图像中,入射光衰减率D(x)与雾霾浓度有关,其公式为:Under single scattering conditions, aerosols are uniformly distributed in the air. β(λ) represents the relative attenuation rate per unit distance, β(λ)×d represents the total attenuation rate of the light from the scene to the imaging device, that is, the incident light attenuation rate. The atmospheric extinction coefficient is a parameter related to the properties and density of aerosols. It is constant when the aerosol properties are constant and uniformly distributed. Therefore, in an image with a constant scene depth d, the incident light attenuation rate D(x) is related to the haze density, and its formula is:
D(x)=β(λ)d=-ln(t(x))  (7)D(x)=β(λ)d=-ln(t(x)) (7)
其中,D(x)代表入射光衰减率,λ表示波长,β(λ)表示大气消光系数,t(x)表示透射率图。即在上面的基础上,可以根据公式(7)获取雾霾图像的第二入射光衰减率D(x),并根据获取的非天空区域获取转换为对应的第一入射光衰减率D non_sky。还可以先对雾霾图像对应的第一透射率图进行转换,获取与非天空区域对应的第二透射率图t non_sky,在上面的基础上,其转换后的公式可以为: Among them, D(x) represents the attenuation rate of incident light, λ represents the wavelength, β(λ) represents the atmospheric extinction coefficient, and t(x) represents the transmittance graph. That is, on the basis of the above, the second incident light attenuation rate D(x) of the haze image can be obtained according to formula (7), and converted to the corresponding first incident light attenuation rate D non_sky according to the obtained non-sky area. It is also possible to first convert the first transmittance map corresponding to the haze image to obtain the second transmittance map t non_sky corresponding to the non-sky area. Based on the above, the converted formula can be:
Figure PCTCN2019088178-appb-000012
Figure PCTCN2019088178-appb-000012
然后根据公式(7)获取对应的第一入射光衰减率D non_skyThen, obtain the corresponding first incident light attenuation rate D non_sky according to formula (7).
进一步的,第一入射光衰减率D non_sky满足: Further, the first incident light attenuation rate D non_sky satisfies:
Figure PCTCN2019088178-appb-000013
Figure PCTCN2019088178-appb-000013
其中,A为全局大气光值,I c(x)为雾霾图像内像素点x在通道c中的像素值,{r,g,b}表示三颜色通道,Ω non_sky表示雾霾图像的非天空区域。其具体过程可以参照上文描述。既可以通过非天空区域的入射光衰减率D non_sky对应为雾霾图像质量的评价值,可以将该评价值定义为NSDark值。 Among them, A is the global atmospheric light value, I c (x) is the pixel value of the pixel x in the haze image in channel c, {r, g, b} represents the three-color channel, and Ω non_sky represents the non- uniformity of the haze image. Sky area. The specific process can refer to the above description. The attenuation rate D non_sky of the incident light in the non-sky area can be used as the evaluation value of the haze image quality, and the evaluation value can be defined as the NSDark value.
可选的,如图2所示,在步骤S2中,获取雾霾图像的非天空区域包括:Optionally, as shown in FIG. 2, in step S2, obtaining the non-sky area of the haze image includes:
S21、转换雾霾图像为灰度图像;具体的,将获取的彩色雾霾图像转换为灰度图像,转换过程中,为保留更多的边缘信息,可使用有对比度保留功能的去色算法,例如采用能量函数去色算法。S21. Convert the haze image to a grayscale image; specifically, convert the acquired color haze image into a grayscale image. During the conversion process, in order to retain more edge information, a decolorization algorithm with contrast retention function can be used. For example, an energy function decolorization algorithm is used.
S22、根据边缘检测获取灰度图像的梯度图,并转换以生成二值图;具体的,求解梯度图可使用多种边缘检测算子。并对获取的梯度图进行像素点划分, 得到二值图。S22. Obtain a gradient map of the grayscale image according to the edge detection, and convert to generate a binary image; specifically, a variety of edge detection operators can be used to solve the gradient map. The obtained gradient map is divided into pixels to obtain a binary map.
S23、对二值图进行最小值滤波,以获取雾霾图像的非天空区域。具体的,通过最小值滤波器去噪,将图像局部零散的噪音覆盖,使整体分割更合理。最终获得分割后的非天空区域和天空区域,以便根据雾霾图像的非天空区域进行对应的入射光衰减率计算。在一些实施例中,最小值滤波器的直径可以设定为3。S23. Perform minimum filtering on the binary image to obtain a non-sky area of the haze image. Specifically, the minimum filter is used to denoise, and the local scattered noise of the image is covered to make the overall segmentation more reasonable. Finally, the segmented non-sky area and sky area are obtained, so as to calculate the corresponding incident light attenuation rate according to the non-sky area of the haze image. In some embodiments, the diameter of the minimum filter can be set to 3.
进一步的,如图3所示,步骤S22中,根据边缘检测获取灰度图像的梯度图,并转换以生成二值图包括:Further, as shown in FIG. 3, in step S22, acquiring a gradient map of a grayscale image according to edge detection, and converting to generate a binary image includes:
S221、根据预设梯度阈值转换梯度图以生成第一二值图;S221: Convert the gradient map according to the preset gradient threshold to generate a first binary map;
S222、根据预设亮度阈值转换灰度图像以生成第二二值图;S222: Convert the gray image according to the preset brightness threshold to generate a second binary image;
S223、合并第一二值图与第二二值图,以生成二值图。S223. Combine the first binary graph and the second binary graph to generate a binary graph.
具体的,在云层的干扰下,天空区域中可能出现边缘信息。人造光源的干扰也可能使地面部分区域亮度超过阈值。因此,需要设定预设梯度阈值和预设亮度阈值。根据预设梯度遇着转换该梯度图对应的第一二值图,根据预设亮度阈值对灰度图像生成亮度对应的第二二值图,然后将梯度和亮度进行合并,生成最终的二值图。Specifically, under the interference of clouds, edge information may appear in the sky area. The interference of artificial light sources may also cause the brightness of some areas on the ground to exceed the threshold. Therefore, a preset gradient threshold and a preset brightness threshold need to be set. Convert the first binary image corresponding to the gradient map according to the preset gradient, generate the second binary image corresponding to the brightness of the grayscale image according to the preset brightness threshold, and then merge the gradient and the brightness to generate the final binary image Figure.
进一步的,梯度阈值为梯度图的梯度平均值;亮度阈值为灰度图像的亮度平均值。具体的,在上面的基础上,可以将预设梯度阈值和预设亮度阈值分别设置为梯度图梯度平均值和灰度图像的亮度平均值。然后,对划分后的像素点分别取0或255,得到二值图。由于天空识别的目标是求解非天空区域的平均透射率,因此,由于预设梯度阈值和预设亮度阈值的设置导致的天空和地面交界处的轻微误差对计算结果影响不大。Further, the gradient threshold value is the gradient average value of the gradient map; the brightness threshold value is the brightness average value of the grayscale image. Specifically, based on the above, the preset gradient threshold and the preset brightness threshold may be set as the gradient average value of the gradient map and the brightness average value of the grayscale image, respectively. Then, take 0 or 255 for the divided pixels to obtain a binary image. Since the goal of sky recognition is to find the average transmittance of non-sky areas, the slight error at the junction of the sky and the ground caused by the setting of the preset gradient threshold and the preset brightness threshold has little effect on the calculation results.
可选的,在步骤S21中,转换雾霾图像为灰度图像包括:获取雾霾图像的RGB图像,根据预设RGB比例调整RGB图像以获取对应的灰度图像;具体的,考虑到一些算法对天空检测效果性能提升有限,为提高效率,在一些实施例中,对灰度图像的转换可以采用RGB图像按比例转化为灰度图像的方法。其中,预设RGB比例可以采用,R通道的权值设为0.299,G通道的权值设为0.587,B通道权值设为0.114。Optionally, in step S21, converting the haze image into a grayscale image includes: obtaining an RGB image of the haze image, and adjusting the RGB image according to a preset RGB ratio to obtain the corresponding grayscale image; specifically, considering some algorithms The performance improvement of the sky detection effect is limited. In order to improve the efficiency, in some embodiments, the conversion of the gray image may adopt a method of converting an RGB image into a gray image proportionally. Among them, the preset RGB ratio can be used, the weight of the R channel is set to 0.299, the weight of the G channel is set to 0.587, and the weight of the B channel is set to 0.114.
可选的,在步骤S22中,根据边缘测测获取灰度图像的梯度图,包括:采用Sobel算子、Prewitt算子或Laplacian算子进行边缘检测以获取灰度图像的初始梯度图;对初始梯度图采用中值滤波以获取灰度图像的最终梯度图。具体的,通过具体的边缘检测算子获取灰度图像的梯度图可以采用采用Sobel算子、Prewitt算子或Laplacian算子中的任意一种。同时,在基于上述算子进行灰度图像的梯度图计算时,可以对剃度图进行去噪,以便后续对去噪后的梯度图进行对应操作。以具体的Laplacian算子为例。Optionally, in step S22, acquiring the gradient map of the grayscale image according to the edge measurement includes: using Sobel operator, Prewitt operator or Laplacian operator to perform edge detection to acquire the initial gradient map of the grayscale image; The gradient map uses median filtering to obtain the final gradient map of the grayscale image. Specifically, obtaining the gradient map of the gray image through a specific edge detection operator can adopt any one of the Sobel operator, the Prewitt operator, or the Laplacian operator. At the same time, when the gradient map of the grayscale image is calculated based on the above-mentioned operator, the gradation map can be denoised, so that subsequent operations can be performed on the denoised gradient map. Take the specific Laplacian operator as an example.
用Laplacian算子进行边缘检测,公式为:Use Laplacian operator for edge detection, the formula is:
Figure PCTCN2019088178-appb-000014
Figure PCTCN2019088178-appb-000014
其中,L(f)表示拉普拉斯检测值,f表示图像上像素点的灰度值,x和y分别表示像素点的横坐标和纵坐标。Among them, L(f) represents the Laplacian detection value, f represents the gray value of the pixel on the image, and x and y represent the abscissa and ordinate of the pixel respectively.
Laplace算子的离散形式为:The discrete form of Laplace operator is:
L(f)=[f(x+1,y)+f(x-1,y)+f(x,y-1)]-4f(x,y)  (11)L(f)=[f(x+1,y)+f(x-1,y)+f(x,y-1)]-4f(x,y) (11)
其中,L(f)表示拉普拉斯检测值,f(x,y)表示灰度图像上坐标为(x,y)的像素点的灰度值。Among them, L(f) represents the Laplacian detection value, and f(x, y) represents the gray value of the pixel with the coordinate (x, y) on the gray image.
天空区域整体明亮且平滑,其在Laplacian边缘检测图中一般呈现为白色区域。但是,云的边缘、成像设备上的灰尘等,都可能形成干扰噪声。为降低噪声,需采用中值滤波降噪。通过滑动窗口,将窗口中心像素点的值取为窗口平均值,可有效消除噪音干扰。The sky area is bright and smooth as a whole, and it generally appears as a white area in the Laplacian edge detection image. However, the edge of the cloud, the dust on the imaging device, etc., may all cause interference noise. In order to reduce noise, median filtering is needed to reduce noise. By sliding the window, the value of the center pixel of the window is taken as the window average value, which can effectively eliminate noise interference.
如图4所示,其展示了对雾霾图像中非天空区域的识别过程。其中A代表原始图像,通过将其转换为灰度图像B,对灰度图像B进行Laplacian算子进行边缘检测,并进行转换得到二值图C,对二值图C进行最小值滤波得到最终的雾霾对象对应的非天空区域,对应图D中的白色区域。As shown in Figure 4, it shows the recognition process of non-sky areas in the haze image. Where A represents the original image, by converting it into a gray image B, the edge detection of the gray image B is performed by Laplacian operator, and the conversion is performed to obtain the binary image C, and the minimum value filter is performed on the binary image C to obtain the final The non-sky area corresponding to the haze object corresponds to the white area in Figure D.
图5示出了,在HID2018数据库中不同雾霾图像的非天空区域对应的入射光衰减率即NSDark值。从图5可知,图5(d)与(e)的NSDark值较小,图像受雾霾影响较小。图5(g)图和(h)图则NSDark值较大,图像受雾霾影响严重。NSDark值与主观评价结果相符。Figure 5 shows the attenuation rate of incident light corresponding to the non-sky area of different haze images in the HID2018 database, that is, the NSDark value. It can be seen from Figure 5 that the NSDark values of Figure 5 (d) and (e) are small, and the image is less affected by haze. Figure 5(g) and (h) show that the NSDark value is large, and the image is seriously affected by the haze. The NSDark value is consistent with the subjective evaluation result.
同时可以理解,本发明中通过获取非天空区域的入射光衰减率D non_sky对应为雾霾图像质量的评价值即NSDark值对雾霾图像进行图像质量评价的过程为无参考型图像质量评价过程。在此,可以选择常用的无参考型图像质量评价方法进行对比。具体的采用熵函数(Entropy)、灰度方差(SMD)和Laplacian梯度三种常用的无参考型图像质量评价方法进行性能比较。同时将雾霾图像的主观评分(MOS)作为比较基准,具体参照下表: At the same time, it can be understood that the process of obtaining the attenuation rate of incident light in the non-sky area D non_sky corresponding to the haze image quality evaluation value, that is, the NSDark value, to evaluate the haze image image quality is a reference-free image quality evaluation process. Here, you can choose the commonly used non-reference image quality evaluation methods for comparison. Specifically, three commonly used non-reference image quality evaluation methods, entropy function (Entropy), gray-scale variance (SMD) and Laplacian gradient, are used for performance comparison. At the same time, the subjective score (MOS) of the haze image is used as a benchmark for comparison. Refer to the following table for details:
表1雾霾图像质量评价方法性能对比Table 1 Comparison of performance of haze image quality evaluation methods
图像编号Image number MOSMOS EntropyEntropy SMD SMD LaplacianLaplacian NSDarkNSDark
11 3.25003.2500 7.0167.016 3597.8093597.809 563.637563.637 0.1590.159
22 2.25002.2500 6.9336.933 2593.5332593.533 224.517224.517 0.2950.295
33 4.18754.1875 6.886.88 4401.9994401.999 796.295796.295 0.1030.103
44 5.00005.0000 7.4727.472 2897.5992,897.599 1994.3361994.336 0.0920.092
55 5.00005.0000 7.4667.466 2925.5952925.595 2097.0672097.067 0.0870.087
66 3.75003.7500 6.76.7 2746.8692746.869 783.437783.437 0.1820.182
77 4.06254.0625 6.7426.742 3252.5253,252.525 1006.4691006.469 0.1970.197
88 2.62502.6250 6.9336.933 2641.0132641.013 395.499395.499 0.2410.241
99 4.93754.9375 7.4597.459 2758.442,758.44 2078.9172078.917 0.1130.113
1010 3.56253.5625 6.6666.666 3203.0943203.094 756.269756.269 0.1130.113
1111 5.00005.0000 7.4817.481 2967.5212967.521 2211.0082211.008 0.2060.206
1212 4.62504.6250 7.447.44 2749.592,749.59 1762.7221,762.722 0.1130.113
1313 4.93754.9375 7.2727.272 2265.0362265.036 1711.0251711.025 0.1560.156
1414 3.50003.5000 6.4676.467 2529.0612529.061 727.178727.178 0.2610.261
1515 2.25002.2500 6.6366.636 2137.6322,137.632 309.936309.936 0.3620.362
1616 2.43752.4375 6.6826.682 2516.2182516.218 346.830346.830 0.2760.276
1717 1.62501.6250 6.8186.818 2035.7182035.718 115.954115.954 0.5320.532
1818 1.68751.6875 7.0727.072 2654.2552,654.255 86.57186.571 0.5750.575
1919 1.81251.8125 7.0967.096 2739.0162739.016 116.050116.050 0.4050.405
2020 4.75004.7500 7.297.29 2398.712,398.71 1701.7621701.762 0.150.15
21twenty one 4.87504.8750 7.3487.348 2367.8262367.826 1680.9801,680.980 0.1460.146
22twenty two 2.75002.7500 6.9776.977 3036.2863036.286 307.178307.178 0.2590.259
23twenty three 2.12502.1250 6.4246.424 1477.0991,477.099 305.824305.824 0.4390.439
24twenty four 3.12503.1250 6.6046.604 2285.1892,285.189 652.431652.431 0.2780.278
2525 5.00005.0000 7.3537.353 2238.6212238.621 1822.2431822.243 0.150.15
2626 4.62504.6250 7.2357.235 2917.2642917.264 1189.0221,189.022 0.1450.145
2727 2.75002.7500 6.6426.642 2752.8272752.827 403.511403.511 0.2440.244
从表1中随机抽取部分MOS值与NSDark值分析,如:图像编号7有轻微雾霾,图像编号8中雾霾较严重。图像编号7的NSDark值为0.197,图像编号7的NSDark值为0.241,从NSDark值中可判断图像8比图像7的雾霾更为严重。Randomly extract some MOS values and NSDark values from Table 1 for analysis. For example, image number 7 has a slight haze, and image number 8 has more severe haze. The NSDark value of image number 7 is 0.197, and the NSDark value of image number 7 is 0.241. From the NSDark value, it can be judged that the smog of image 8 is more serious than that of image 7.
对表1数据进行归一化处理,得到图6所示的,Mos、NSDark与Laplacian性能对比,其中A1代表MOS值,A2代表NsDark值,A3代表Laplacian值,以及图7所示的Mos、SMD与Entropy性能对比,其中B1为MOS值,B2为Entropy值,B3为SMD值。从图6和图7可以看出,NSDark方法的总体变化趋势与Laplacian梯度方法和MOS一致,且其变化的单调性优于SMD与Entropy方法。The data in Table 1 is normalized to obtain the performance comparison of Mos, NSDark and Laplacian shown in Figure 6, where A1 represents the MOS value, A2 represents the NsDark value, A3 represents the Laplacian value, and the Mos and SMD shown in Figure 7. Compared with Entropy performance, B1 is the MOS value, B2 is the Entropy value, and B3 is the SMD value. It can be seen from Figure 6 and Figure 7 that the overall trend of the NSDark method is consistent with the Laplacian gradient method and MOS, and the monotonicity of its change is better than that of the SMD and Entropy methods.
进一步的,为对比不同图像质量评价方法,计算不同图像质量评价方法与MOS值的均方误差。其中,Laplician值与MOS值的均方误差为4.14,Entropy值与MOS值的均方误差为1.13,SMD值与MOS值的均方误差为1.91,NSDark值与MOS值的均方误差为0.5。所有图像的NSDark与MOS值的均方误差最小,且NSDark与MOS值的变化较为一致。因此,NSDark值的评价结果略优其他质量评价方法。Further, in order to compare different image quality evaluation methods, the mean square error between different image quality evaluation methods and MOS values is calculated. Among them, the mean square error between the Laplician value and the MOS value is 4.14, the mean square error between the Entropy value and the MOS value is 1.13, the mean square error between the SMD value and the MOS value is 1.91, and the mean square error between the NSDark value and the MOS value is 0.5. The mean square error of NSDark and MOS values of all images is the smallest, and the changes of NSDark and MOS values are relatively consistent. Therefore, the evaluation result of NSDark value is slightly better than other quality evaluation methods.
另,如图8所示的实施例中,本发明一种雾霾图像质量评价系统,包括:In addition, in the embodiment shown in FIG. 8, a haze image quality evaluation system of the present invention includes:
获取单元10,用于获取雾霾图像;The obtaining unit 10 is used to obtain a haze image;
第一处理单元20,用于基于暗通道先验方法获取雾霾图像对应的第一透 射率图;The first processing unit 20 is configured to obtain a first transmittance map corresponding to the haze image based on the dark channel prior method;
第二处理单元30,用于获取雾霾图像的非天空区域;The second processing unit 30 is used to obtain the non-sky area of the haze image;
第三处理单元40,用于根据第一透射率图和非天空区域获取非天空区域对应的第一入射光衰减率;The third processing unit 40 is configured to obtain the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area;
输出单元50,用于根据第一入射光衰减率输出雾霾图像的图像质量。The output unit 50 is configured to output the image quality of the haze image according to the first incident light attenuation rate.
具体的,这里的雾霾图像质量评价系统各单元之间具体的配合操作过程具体可以参照上述雾霾图像质量评价方法,这里不再赘述。Specifically, the specific coordination operation process between the units of the haze image quality evaluation system can refer to the above-mentioned haze image quality evaluation method, which will not be repeated here.
另,本发明的一种电子设备,包括存储器和处理器;存储器用于存储计算机程序;处理器用于执行计算机程序实现如上面任意的雾霾图像质量评价方法。具体的,根据本发明的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过电子设备下载和安装并且执行时,执行本发明实施例的方法中限定的上述功能。本发明中的电子设备可为笔记本、台式机、平板电脑、智能手机等终端,也可为服务器。In addition, an electronic device of the present invention includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement any of the above haze image quality evaluation methods. Specifically, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, when the computer program can be downloaded and installed by an electronic device and executed, it executes the above-mentioned functions defined in the method of the embodiment of the present invention. The electronic device in the present invention can be a terminal such as a notebook, a desktop computer, a tablet computer, a smart phone, etc., or a server.
另,本发明的一种计算机存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上面任意一项的雾霾图像质量评价方法。具体的,需要说明的是,本发明上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的 数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。In addition, a computer storage medium of the present invention has a computer program stored thereon, and when the computer program is executed by a processor, any one of the above haze image quality evaluation methods is realized. Specifically, it should be noted that the above-mentioned computer-readable medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
可以理解的,以上实施例仅表达了本发明的优选实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制;应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,可以对上述技术特点进行自由组合,还可以做出若干变形和改进,这些都属于本发明的保护范围;因此,凡跟本发明权利要求范围所做的等同变换与修饰,均应属于本发明权利要求的涵盖范围。It is understandable that the above examples only express the preferred embodiments of the present invention, and the descriptions are more specific and detailed, but they should not be construed as limiting the scope of the present invention; it should be pointed out that for those of ordinary skill in the art In other words, without departing from the concept of the present invention, the above technical features can be freely combined, and several modifications and improvements can be made. These all belong to the scope of protection of the present invention; therefore, everything that follows the scope of the claims of the present invention All equivalent changes and modifications shall fall within the scope of the claims of the present invention.

Claims (10)

  1. 一种雾霾图像质量评价方法,其特征在于,包括以下步骤:A method for evaluating haze image quality, characterized in that it comprises the following steps:
    S1、获取雾霾图像,并基于暗通道先验方法获取所述雾霾图像对应的第一透射率图;S1. Acquire a haze image, and acquire a first transmittance map corresponding to the haze image based on a dark channel prior method;
    S2、获取所述雾霾图像的非天空区域;S2. Obtain a non-sky area of the haze image;
    S3、根据所述第一透射率图和所述非天空区域获取所述非天空区域对应的第一入射光衰减率,以根据所述第一入射光衰减率获取所述雾霾图像的图像质量。S3. Acquire a first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area, so as to obtain the image quality of the haze image according to the first incident light attenuation rate .
  2. 根据权利要求1所述的雾霾图像质量评价方法,其特征在于,The method for evaluating haze image quality according to claim 1, wherein:
    所述步骤S3中,所述根据所述第一透射率图和所述非天空区域计算所述非天空区域对应的第一入射光衰减率,包括:In the step S3, the calculating the first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area includes:
    根据所述第一透射率图获取所述雾霾图像的第二入射光衰减率;Acquiring the second incident light attenuation rate of the haze image according to the first transmittance map;
    根据所述第二入射光衰减率和所述非天空区域获取所述非天空区域对应的第一入射光衰减率;或Obtaining the first incident light attenuation rate corresponding to the non-sky area according to the second incident light attenuation rate and the non-sky area; or
    根据所述第一透射率图和所述非天空区域获取所述非天空区域对应的第二透射率图;Acquiring a second transmittance map corresponding to the non-sky area according to the first transmittance map and the non-sky area;
    根据所述第二透射率图获取所述非天空区域对应的第一入射光衰减率。Acquire the first incident light attenuation rate corresponding to the non-sky area according to the second transmittance map.
  3. 根据权利要求1所述的雾霾图像质量评价方法,其特征在于,The method for evaluating haze image quality according to claim 1, wherein:
    所述第一入射光衰减率D non_sky满足:
    Figure PCTCN2019088178-appb-100001
    The first incident light attenuation rate D non_sky satisfies:
    Figure PCTCN2019088178-appb-100001
    其中,A为全局大气光值,I c(x)为雾霾图像内像素点x在通道c中的像素值,{r,g,b}表示三颜色通道,Ω non_sky表示雾霾图像的非天空区域。 Among them, A is the global atmospheric light value, I c (x) is the pixel value of the pixel x in the haze image in channel c, {r, g, b} represents the three-color channel, and Ω non_sky represents the non- uniformity of the haze image. Sky area.
  4. 根据权利要求2所述的雾霾图像质量评价方法,其特征在于,在所述步骤S2中,所述获取所述雾霾图像的非天空区域包括:The method for evaluating the quality of a haze image according to claim 2, wherein, in the step S2, the obtaining the non-sky area of the haze image comprises:
    S21、转换所述雾霾图像为灰度图像;S21: Convert the haze image into a grayscale image;
    S22、根据边缘检测获取所述灰度图像的梯度图,并转换以生成二值图;S22: Acquire a gradient map of the grayscale image according to edge detection, and convert to generate a binary image;
    S23、对所述二值图进行最小值滤波,以获取所述雾霾图像的非天空区域。S23. Perform minimum filtering on the binary image to obtain a non-sky area of the haze image.
  5. 根据权利要求4所述的雾霾图像质量评价方法,其特征在于,所述步 骤S22中,所述根据边缘检测获取所述灰度图像的梯度图,并转换以生成二值图包括:The method for evaluating the quality of a haze image according to claim 4, wherein in the step S22, the obtaining a gradient map of the grayscale image according to edge detection, and converting to generate a binary image comprises:
    S221、根据预设梯度阈值转换所述梯度图以生成第一二值图;S221: Convert the gradient map according to a preset gradient threshold to generate a first binary map;
    S222、根据预设亮度阈值转换所述灰度图像以生成第二二值图;S222: Convert the grayscale image according to a preset brightness threshold to generate a second binary image;
    S223、合并所述第一二值图与所述第二二值图,以生成所述二值图。S223. Combine the first binary graph and the second binary graph to generate the binary graph.
  6. 根据权利要求4所述的雾霾图像质量评价方法,其特征在于,所述梯度阈值为所述梯度图的梯度平均值;所述亮度阈值为所述灰度图像的亮度平均值。The method for evaluating the quality of a haze image according to claim 4, wherein the gradient threshold value is the average value of the gradient of the gradient map; the brightness threshold value is the average value of the brightness of the gray image.
  7. 根据权利要求4所述的雾霾图像质量评价方法,其特征在于,在所述步骤S21中,所述转换所述雾霾图像为灰度图像包括:The method for evaluating the quality of a haze image according to claim 4, wherein in the step S21, the converting the haze image into a grayscale image comprises:
    获取所述雾霾图像的RGB图像,根据预设RGB比例调整所述RGB图像以获取对应的所述灰度图像;和/或Acquiring an RGB image of the haze image, and adjusting the RGB image according to a preset RGB ratio to acquire the corresponding grayscale image; and/or
    在所述步骤S22中,所述根据边缘测测获取所述灰度图像的梯度图,包括:In the step S22, the acquiring the gradient map of the grayscale image according to edge detection includes:
    采用Sobel算子、Prewitt算子或Laplacian算子进行边缘检测以获取所述灰度图像的初始梯度图;Adopting Sobel operator, Prewitt operator or Laplacian operator to perform edge detection to obtain the initial gradient map of the gray image;
    对所述初始梯度图采用中值滤波以获取所述灰度图像的最终梯度图。Median filtering is applied to the initial gradient image to obtain the final gradient image of the grayscale image.
  8. 一种雾霾图像质量评价系统,其特征在于,包括:A haze image quality evaluation system, characterized in that it includes:
    获取单元,用于获取雾霾图像;An acquiring unit for acquiring a haze image;
    第一处理单元,用于基于暗通道先验方法获取所述雾霾图像对应的第一透射率图;A first processing unit, configured to obtain a first transmittance map corresponding to the haze image based on a dark channel prior method;
    第二处理单元,用于获取所述雾霾图像的非天空区域;The second processing unit is used to obtain the non-sky area of the haze image;
    第三处理单元,用于根据所述第一透射率图和所述非天空区域获取所述非天空区域对应的第一入射光衰减率;A third processing unit, configured to obtain a first incident light attenuation rate corresponding to the non-sky area according to the first transmittance map and the non-sky area;
    输出单元,用于根据所述第一入射光衰减率输出所述雾霾图像的图像质量评价。The output unit is configured to output the image quality evaluation of the haze image according to the first incident light attenuation rate.
  9. 一种计算机存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任意一项所述的雾霾图像质量评价方法。A computer storage medium having a computer program stored thereon, wherein the computer program implements the haze image quality evaluation method according to any one of claims 1 to 7 when the computer program is executed by a processor.
  10. 一种电子设备,其特征在于,包括存储器和处理器;An electronic device, characterized in that it includes a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器用于执行所述计算机程序实现如权利要求1至7中任意一项所述的雾霾图像质量评价方法。The processor is configured to execute the computer program to implement the haze image quality evaluation method according to any one of claims 1 to 7.
PCT/CN2019/088178 2019-05-23 2019-05-23 Haze image quality evaluation method and system, storage medium, and electronic device WO2020232710A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/088178 WO2020232710A1 (en) 2019-05-23 2019-05-23 Haze image quality evaluation method and system, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/088178 WO2020232710A1 (en) 2019-05-23 2019-05-23 Haze image quality evaluation method and system, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2020232710A1 true WO2020232710A1 (en) 2020-11-26

Family

ID=73459333

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088178 WO2020232710A1 (en) 2019-05-23 2019-05-23 Haze image quality evaluation method and system, storage medium, and electronic device

Country Status (1)

Country Link
WO (1) WO2020232710A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112465720A (en) * 2020-11-27 2021-03-09 南京邮电大学 Image defogging method and device based on image sky segmentation and storage medium
CN113340777A (en) * 2021-05-31 2021-09-03 西安电子科技大学 Simulation system for monitoring haze evolution under electromagnetic environment
CN113658275A (en) * 2021-08-23 2021-11-16 深圳市商汤科技有限公司 Visibility value detection method, device, equipment and storage medium
CN113822816A (en) * 2021-09-25 2021-12-21 李蕊男 Haze removing method for single remote sensing image optimized by aerial fog scattering model
CN114170205A (en) * 2021-12-14 2022-03-11 天津科技大学 Contrast distortion image quality evaluation method fusing image entropy and structural similarity characteristics
CN114240884A (en) * 2021-12-17 2022-03-25 中南大学 Evaluation system of dust pollution
CN115941857A (en) * 2022-12-30 2023-04-07 湖南大学 Defogging circuit and method
CN117788336A (en) * 2024-02-28 2024-03-29 山东昆仲信息科技有限公司 Data optimization acquisition method and system in homeland space planning process

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809707A (en) * 2015-04-28 2015-07-29 西南科技大学 Method for estimating visibility of single fog-degraded image
CN105424655A (en) * 2015-11-04 2016-03-23 北京交通大学 Visibility detection method based on video images
CN106709903A (en) * 2016-11-22 2017-05-24 南京理工大学 PM2.5 concentration prediction method based on image quality
US20170206690A1 (en) * 2016-01-20 2017-07-20 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
US10290081B2 (en) * 2016-04-29 2019-05-14 Industry Foundation Of Chonnam National University System for image dehazing by modifying lower bound of transmittance and method therefor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809707A (en) * 2015-04-28 2015-07-29 西南科技大学 Method for estimating visibility of single fog-degraded image
CN105424655A (en) * 2015-11-04 2016-03-23 北京交通大学 Visibility detection method based on video images
US20170206690A1 (en) * 2016-01-20 2017-07-20 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
US10290081B2 (en) * 2016-04-29 2019-05-14 Industry Foundation Of Chonnam National University System for image dehazing by modifying lower bound of transmittance and method therefor
CN106709903A (en) * 2016-11-22 2017-05-24 南京理工大学 PM2.5 concentration prediction method based on image quality

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112465720A (en) * 2020-11-27 2021-03-09 南京邮电大学 Image defogging method and device based on image sky segmentation and storage medium
CN112465720B (en) * 2020-11-27 2024-02-23 南京邮电大学 Image defogging method and device based on image sky segmentation and storage medium
CN113340777A (en) * 2021-05-31 2021-09-03 西安电子科技大学 Simulation system for monitoring haze evolution under electromagnetic environment
CN113658275A (en) * 2021-08-23 2021-11-16 深圳市商汤科技有限公司 Visibility value detection method, device, equipment and storage medium
CN113822816A (en) * 2021-09-25 2021-12-21 李蕊男 Haze removing method for single remote sensing image optimized by aerial fog scattering model
CN114170205A (en) * 2021-12-14 2022-03-11 天津科技大学 Contrast distortion image quality evaluation method fusing image entropy and structural similarity characteristics
CN114240884A (en) * 2021-12-17 2022-03-25 中南大学 Evaluation system of dust pollution
CN115941857A (en) * 2022-12-30 2023-04-07 湖南大学 Defogging circuit and method
CN115941857B (en) * 2022-12-30 2024-04-02 湖南大学 Defogging circuit and method
CN117788336A (en) * 2024-02-28 2024-03-29 山东昆仲信息科技有限公司 Data optimization acquisition method and system in homeland space planning process
CN117788336B (en) * 2024-02-28 2024-05-24 山东昆仲信息科技有限公司 Data optimization acquisition method and system in homeland space planning process

Similar Documents

Publication Publication Date Title
WO2020232710A1 (en) Haze image quality evaluation method and system, storage medium, and electronic device
CN107103591B (en) Single image defogging method based on image haze concentration estimation
WO2021000302A1 (en) Image dehazing method and system based on superpixel segmentation, and storage medium and electronic device
CN117764986B (en) Titanium plate surface defect detection method based on image processing
CN111062293B (en) Unmanned aerial vehicle forest flame identification method based on deep learning
CN109389569B (en) Monitoring video real-time defogging method based on improved DehazeNet
CN105447825B (en) Image defogging method and its system
CN110675340A (en) Single image defogging method and medium based on improved non-local prior
CN117252868B (en) Direct current screen defect detection method based on machine vision
CN111353968B (en) Infrared image quality evaluation method based on blind pixel detection and analysis
CN107093173A (en) A kind of method of estimation of image haze concentration
CN105023246B (en) A kind of image enchancing method based on contrast and structural similarity
CN115393216A (en) Image defogging method and device based on polarization characteristics and atmospheric transmission model
CN109949239B (en) Self-adaptive sharpening method suitable for multi-concentration multi-scene haze image
CN106709876B (en) Optical remote sensing image defogging method based on dark image element principle
CN110751667A (en) Method for detecting infrared dim small target under complex background based on human visual system
CN110322431B (en) Haze image quality evaluation method and system, storage medium and electronic equipment
CN117710266A (en) Night road visibility monitoring method based on video image
CN112712482A (en) Image defogging method based on linear learning model
Yang et al. Single image dehazing using elliptic curve scattering model
Mahdi et al. SINGLE IMAGE DE-HAZING THROUGH IMPROVED DARK CHANNEL PRIOR AND ATMOSPHERIC LIGHT ESTIMATION.
Liang et al. A self-adaption single image dehaze method based on clarity-evaluation-function of image
Fan et al. Image defogging approach based on incident light frequency
Li et al. Haze density estimation and dark channel prior based image defogging
Wang et al. Heterogeneity constrained color ellipsoid prior image dehazing algorithm

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929299

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929299

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.03.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19929299

Country of ref document: EP

Kind code of ref document: A1