注意:这篇文章上次更新于1996天前,文章内容可能已经过时。
This article was last updated1996 days ago, the content may be outdated.
算法简介
算法的核心思想为:使用 DoG 模型提取图像边缘信息并与原图相加来获得细节增强的效果[1]。
其中:
为了能够在增强细节的同时不放大噪声,依据图像的梯度信息对 k 的取值进行自适应化。图像的梯度越大时,k 的取值越小。理论上可以实现对图像的每一个像素都使用不同 k 值的 DoG 模型进行运算,但这会使得运算的时间代价特别大。因此,我们对梯度图量化到 N ,这样只需要 N 个DoG 模型作用到原图像上,可有效减少计算的时间花费[2]。
首先,梯度图可以使用如下公式进行计算:
其中, 和 分别为输入图像使用 的 Sobel 算子计算的结果。我们假设在一个局部区域内图像的细节丰富程度是相同的,因此,在对梯度图进行量化操作之前,首先对梯度图进行扩张(dilate)操作[3]。
我们通过对扩张后的梯度图按其强度所在的区间进行标记来实现量化操作,例如,当梯度图的强度在 [0 , 0.2] 范围内时,将该点标记为 1 ;当梯度图的强度在 [0.2 , 0.4] 范围内时,将其标记为 2 …… 以此类推。接下来对输入图像进行 DoG 滤波,当该像素点的标记为 1 时,此处 DoG 模型的 k 值 取 1 ;当该像素点的标记为 2 时 ,此处 DoG 模型的 k 值取 0.95 …… 当该像素点的标记为 5 时,此处的 DoG 模型的 k 值取 0.8。
最后,将自适应 DoG 模型提取的细节图与原图相加,在不放大噪声的情况下实现细节增强。
PS:对于像素值超过 1 的情况,可以使用线性拉伸,非线性拉伸,裁剪等操作将其缩放到 [0 , 1]
Algorithm Overview
The core idea of the algorithm is to use the DoG model to extract edge information from the image and add it to the original image to achieve detail enhancement[1].
where:
In order to enhance details without amplifying noise, the value of k is adapted based on the gradient information of the image: the larger the image gradient, the smaller the value of k. In theory, a DoG model with a different k value can be applied to every pixel of the image, but this would be extremely time-consuming. Therefore, we quantize the gradient image to N levels, so that only N DoG models need to be applied to the original image, which effectively reduces the computational cost[2].
First, the gradient map can be computed with the following formula:
where and are the results of applying the Sobel operator to the input image. We assume that the level of detail richness is the same within a local region, so before quantizing the gradient map, a dilation (dilate) operation is first applied to the gradient map[3].
We implement the quantization by labeling the dilated gradient map according to the interval in which its intensity falls. For example, when the gradient intensity is in the range [0 , 0.2], the point is labeled 1; when it is in the range [0.2 , 0.4], it is labeled 2 … and so on. Next, DoG filtering is applied to the input image: when the pixel is labeled 1, the k value of the DoG model here is 1; when the pixel is labeled 2, the k value is 0.95 … when the pixel is labeled 5, the k value is 0.8.
Finally, the detail map extracted by the adaptive DoG model is added to the original image to achieve detail enhancement without amplifying noise.
PS: For pixels whose values exceed 1, operations such as linear stretching, nonlinear stretching, and clipping can be used to scale them to [0 , 1]
1 | function gauss = GaussFun2D(xsigma,ysigma) |
1 | function output = MyDoG(input,sigma_c,sigma_s,k) |
1 | function [Grad] = getGrad(I, win) |
1 | function label = Quantisation(input,N) |
1 | function [outputs] = Normalize(arg,str) |
1 | function output = DetailEnhancement(input) |
实验结果
原图

扩张后的梯度图

量化标记结果

DoG 模型的结果图
其中, 。
k = 1 时

k = 0.95 时

k = 0.9 时

k = 0.85 时

k = 0.8 时

k 值自适应

最终结果图

嗯… 确实和原图看不出任何差距,但也许在客观评价上有用哦,参考[1].
我的想法
这是我融合了几篇论文得出来的想法,虽然在主观上看不出细节的增强,但是也许在客观评价上有用。整个框架看起来复杂程度也还算够,可以作为图像增强或去雾框架的后处理步骤。
目前关于水下图像增强框架的想法是:首先一个颜色校正,接一个基于成像模型的去雾,最后在加上这里的细节增强,应该可以发一篇水…平很高的论文吧😉
其实算法简介里关于这种做法的解释还不能保证有道理,比如这句 “不放大噪声的同时增强细节” ,我的做法是梯度越大就提取更多细节,但是噪声和梯度有关系吗?该想想怎么吹。
另外我只试了这一张图,其他图还需要再试试。
参考文献




Experimental Results
Original Image

Dilated Gradient Map

Quantization Label Result

DoG Model Results
where .
When k = 1

When k = 0.95

When k = 0.9

When k = 0.85

When k = 0.8

Adaptive k

Final Result

Hmm… There is indeed no visible difference from the original image, but maybe it is useful in objective evaluation. See [1].
My Thoughts
This is an idea I came up with by fusing several papers. Although the detail enhancement cannot be seen subjectively, it may be useful in objective evaluation. The whole framework looks complex enough, and it can serve as a post-processing step for image enhancement or dehazing frameworks.
My current idea for an underwater image enhancement framework is: first a color correction, then an imaging-model-based dehazing, and finally the detail enhancement described here. That should be enough to publish a high-lev…el paper, right? 😉
Actually, the explanation of this approach in the algorithm overview is not guaranteed to be sound. For example, this phrase “enhance details without amplifying noise” — my approach extracts more details when the gradient is larger, but is there any relation between noise and gradient? I need to think about how to sell it.
Besides, I only tried this one image; the others still need to be tested.
References






