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:
In this case, assuming that A
a given, specific A
values will be described later. Next, the formula (1) can be converted to sort:
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:
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:
And because A c is always positive, so there are:
Equation (10) into equation (8) can be obtained:
Therefore it can be known I
and given A
to determined t(x)
, then it can be obtained J
a.
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):
In the second half of the paper, also we discussed the A
value of the problem, because it is assumed that the above A
is 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 A
evaluation 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
A
values.
Finally, using the formula (1) recovery J
time, when t(x)
close to zero time, will cause J
the 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:
t0
Often the value of 0.1.
Defogging optimization results
In this project, A
the 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.
Here are some of the processing results show:
Can be found, the result of the processing, the image are bluish or dark side. This and A
values 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:
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:
Also used on the processing results Guided the Filter , will bring better results.
Reproduced in: https: //www.jianshu.com/p/e2e06f405637