Channel optimization algorithm dark mist and night image image

Digital picture processing of the first three projects, all of a sudden two kinds of image types to optimize, and again immediately following item 4. Off, almost a week reading papers, watching other people's code, to achieve complete.

Involving theory and formula

You can view this article: paper records - Single Image Haze Removal Using Dark Channel Prior

Here are some important formula:

2759738-5d06464ee682b171.png

In this case, assuming that Aa given, specific Avalues will be described later. Next, the formula (1) can be converted to sort:

2759738-df9b5288e578ec48.png

Note that, this formula is for each color channel, so that by the I C expressed.

Suppose then Ω (x) is a constant, and t (x) with t̄ (x) is represented. Then the minimum value in the Formula (7) calculates a dark sides of the channel, and finally both sides:

2759738-7c2e8f97878ad5fe.png

Since t̄ (x) is a constant, so it can be extracted.

Because J is without a gray scale image, i.e. the image to be solved, according to the previous dark channel theory, J dark channel close to zero:

2759738-bfb4c7844f57f4c9.png

And because A c is always positive, so there are:

2759738-b31e12a3879d4b78.png

Equation (10) into equation (8) can be obtained:

2759738-000715bde53a9609.png

Therefore it can be known Iand given Ato determined t(x), then it can be obtained Ja.

In practice, even on clear days the atmosphere is not absolutely free of any particle. So the haze still exists when we look at distant objects. Moreover, the presence of haze is a fundamental cue for human to perceive depth [13], [14]. This phenomenon is called aerial perspective. If we remove the haze thoroughly, the image may seem unnatural and we may lose the feeling of depth.

In fact, even on a clear day, the atmosphere is not completely free of any particles. So when we look at distant objects, the fog is still there. In addition, there is the basic clue fog human perception of depth. This phenomenon is called aerial perspective. If you completely remove the fog, but the image might not look natural, and there will be a feeling of loss of depth.

Therefore, addition of a factor ω in the range [0, 1] in the formula (11):

2759738-67878b27b2798a3f.png

In the second half of the paper, also we discussed the Avalue of the problem, because it is assumed that the above Ais given. Authors believe that previous work, rarely focus on the most haze-opaque area, ie the most fuzzy opaque place. In the paper, the proposed maximum brightness value of the pixel area is considered the most obscure opaque, but only under circumstances when the weather is cloudy, the sun can ignore established. However, in reality we can not ignore the sun.

After that, the authors propose the use of a dark passage to detect the faintest opaque area to enhance the Aevaluation values. Methods as below:

  • Taken from the dark channel front luminance was 0.1% of the pixels;
  • , To find the corresponding values of the pixel having the highest luminance as the original image based on these pixel Avalues.

Finally, using the formula (1) recovery Jtime, when t(x)close to zero time, will cause Jthe value of unusually large, will be prone to noise. Therefore, the t(x)addition of a lower bound t0, and finally restore the formula as follows:

2759738-96a733e4870a70ae.png

t0 Often the value of 0.1.

Defogging optimization results

In this project, Athe value of I only took the average of all channels, and this thesis different. While a bit rough on the results obtained after treatment with a dark passageway, as shown below. Paper use Soft Mapping to obtain a more delicate result. But generally considered Soft Mapping algorithm is relatively complicated and inefficient, so the algorithm used in the project another paper Ho Kai Ming - Guided Filtering to get better treatment results.

2759738-69aa2e3e3e453009.png

Here are some of the processing results show:

2759738-900a62507a78cdf3.png
2759738-7e0dff4758f3d227.png
2759738-5039ddb10b73afc6.png
2759738-76cd1366e1b90683.png

Can be found, the result of the processing, the image are bluish or dark side. This and Avalues related, it can take A, its upper limit when certain set of values.

Night image enhancement results

Fast Efficient Algorithm For Enhancement Of Low Lighting Video This paper studied the dark night of image enhancement based on channel theory. Enhanced good result, as shown below:

2759738-008f9ce8d3498350.png

But I have to deal with some of the enhanced picture professors provided by this paper's algorithm, the results did not find the paper so good results.

There may be reasons:

  • Pictures of reasons: the paper used was almost completely dark picture, as shown in the picture above. Professor provided the picture there will be some light, not entirely black.
  • Question I algorithm, given time reasons (rush homework), no time to study fine papers and code.

Thus, the reported idea to try, using the above algorithm to the channel dark mist directly to the nighttime image processing, enhanced results surprisingly found that good results are as follows:

2759738-641d74ff2d0bc908.png
2759738-d61d9fe156f723ce.png
2759738-ff54b130f9681afe.png
2759738-5084d8b3df45cbb9.png

Also used on the processing results Guided the Filter , will bring better results.

Reproduced in: https: //www.jianshu.com/p/e2e06f405637

Guess you like

Origin blog.csdn.net/weixin_34375251/article/details/91259801