Dehazing system based on MATLAB (deep learning/traditional/improved method) V3.0

Dehazing system V3 has added a dehazing algorithm based on deep learning, integrating histogram equalization, Retinex, MSR, MSRCR, dark channel prior, improved dark channel, and two deep learning algorithms.
insert image description here

00 directory

**1 Introduction
2 New functions of the defogging system
3 System realization
**

01 Introduction

In the previous article written by the author, the application value and research status of the image defogging algorithm have been introduced, and the principles and code implementation of the four defogging algorithms of the V1 version (global histogram equalization, local histogram Dehazing algorithm based on equalization, dark channel prior, Retinex theory)
Dehazing system V1 based on MATLAB

And the MSRCR added by the author in the V2 version, the author's improved algorithm and 4 evaluation indicators
based on the MATLAB defogging system V2

Due to the tremendous progress made by CNN in large-scale image processing (such as detection, recognition, etc.) in recent years, methods of using deep learning to dehaze images with fog are also emerging. Therefore, in the V3 version, the author will introduce two excellent deep learning methods into the defogging system, and update two more commonly used evaluation indicators.

02 New function of defogging system

2.1 Existing functions of the defogging system

Before introducing the new functions, first introduce the functions of the original defogging system. For the original V2 defogging system, 7 algorithms are integrated.

Five enhanced dehazing algorithms——global/local histogram equalization, SSR, MSR, MSRCR. These dehazing algorithms do not consider the cause of the fog image, but only improve the visual effect of the image by increasing the image contrast. Dehaze the image fundamentally, and it is easy to lose image information;

Secondly, there are two restoration-type dehazing algorithms—the dark channel prior algorithm. This type of algorithm is based on the physical model of atmospheric scattering. By searching for prior knowledge, solving the unknowns in the model, and obtaining a clear image, the difficulty of this type of algorithm lies in Can the estimation of model parameters be accurate, and the improvement of the dark channel prior algorithm in this paper.

The following will introduce the new functions of the defogging system of the V3.0 version.

2.2 Dehazing Algorithm Based on Deep Learning

2.2.1 DehazeNet Algorithm

CAI et al. [1] analyzed the prior features, and designed the DehazeNet model in a targeted manner, so as to achieve more accurate prediction of the transmission map. First, DehazeNet takes the foggy image as input and the learned parameters such as transmittance as output. Furthermore, the degradation process is inverted through the atmospheric model, so as to realize the dehazing process of the foggy image and obtain a clear image.

insert image description here
The DehazeNet structure is shown in the figure. When training the model, the mapping relationship between the foggy image and the corresponding transmittance is fully learned. In the feature extraction layer (feature extraction), DehazeNet has added the Maxout structure. The function of this network is to connect DehazeNet and optimize theories such as dark channel prior, maximum contrast, color attenuation prior, and hue difference. For the output of the transmittance, based on the value range of the transmittance between [0, 1], Deha⁃zeNet introduces a new activation function that can maintain local linearity, namely the BReLu function. DehazeNet applies deep learning methods to image dehazing processing, opening the door to a new world of deep learning processing dehazing work.

2.2.2 MSCNN Dehazing Algorithm

Coincidentally, Ren [2] also constructed a multi-scale convolutional neural network (MSCNN) for accurate prediction of transmission maps. Ren et al. proposed to use two convolutional neural network models MSCNN (Multi-Scale Convolutional Neural Networks) To estimate the scene transmittance, it first uses a convolutional neural network to estimate the approximate scene transmittance, and then uses another convolutional neural network to make an accurate estimate. These two deep learning methods essentially use convolutional neural networks to estimate the scene transmittance, and use traditional methods to estimate the global atmospheric light value.

2.3 Evaluation indicators

The evaluation of image defogging performance includes subjective and objective two types. When the effectiveness of image defogging algorithm is carried out through human subjective intuition, it is easily interfered by personal subjective factors of absolute subject status, which often affects the correct judgment. The reliability is not high, so it is necessary to evaluate the defogging effect objectively and quantitatively.

2.3.1 Peak Signal to Noise Ratio - PSNR Value

PSNR represents the fidelity of the image to be evaluated, which is defined as follows:
insert image description here
insert image description here
where M, N are the length and width of the image; i, j represent the pixel position; G and Gr are the gray value of the image to be evaluated and the original image, respectively; A is the pixel The maximum gray value, the smaller the MSE value, the smaller the image gap, the better the image quality, and the larger the PSNR value, the closer the image to be evaluated is to the original image, that is, the better the image quality.

2.3.2 Structural Similarity—SSIM

Its definition is as follows:
insert image description here
Among them, C1=(K1A), C2=(K2A), A=2^8-1=255 in the 8-bit grayscale image, Ki (i=1, 2), I and J are to be evaluated graph and original graph. The value range of SSIM is [0,1]. The larger the value, the smaller the image distortion.

03 System Implementation

可关注作者公主号查找相关内容获取源码:KAU的云实验台

Based on the GUI of MATLAB, the defogging system V3 is developed, and it is displayed as follows after being opened in the GUI:
insert image description here

There are 5 optional modules: main menu, image enhancement method, physical model method, deep learning method, and help.

The main menu functions are loading images, taking screenshots and exiting the system.
Under the image enhancement method, there are five algorithms: global/local histogram equalization, Retinex algorithm, MSR, and MSRCR.
Under the physical model method, there are two algorithms: dark channel prior and improved dark channel prior algorithm.
Under the deep learning method, there are two algorithms: DehazeNet and MSCNN method.
The help includes: instructions about the system, operation process.

Next, one of the three modules of the dehazing algorithm will be selected to show the dehazing effect.

Image enhancement method - global histogram equalization
insert image description here

Physical Model Method——Improved Dark Channel Prior Algorithm
insert image description here

Deep learning method - DehazeNet

insert image description here

references

[1] CAI B L,XU X M,JIA K,et al. Dehazenet:an end-to-end system for single image haze removal[J]. IEEE Transactions on Image Processing,2016,25(11):5187-5198
[2] Ren W Q,Liu S,Zhang H,et al. Single image dehazing via multi-scale convolutional neural networks[C]//LNCS9906:Proceedings of the 14th European Conference on Computer Vision,Amsterdam,Oct 8-10,2016. Berlin,Heidelberg:Springer,2016:154-169.

Guess you like

Origin blog.csdn.net/sfejojno/article/details/130996098