Print

发布时间: 2021-12-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.200295
2021 | Volume 26 | Number 12




    图像处理和编码    




  <<上一篇 




  下一篇>> 





图像分解与色彩先验下的多曝光图像融合
expand article info 李嫄源1, 王琴1, 朱智勤2, 齐观秋3
1. 重庆邮电大学计算机科学与技术学院, 重庆 400065;
2. 重庆邮电大学自动化学院, 重庆 400065;
3. 纽约州立大学布法罗分校计算机信息系统学院, 纽约 14222

摘要

目的 多曝光图像融合(multi-exposure fusion,MEF)是利用一组不同曝光度的低动态范围(low dynamic range,LDR)图像进行合成,得到类似高动态范围(high dynamic range,HDR)图像视觉效果图像的过程。传统多曝光图像融合在一定程度上存在图像细节信息受损、边界不清晰以及部分色彩失真等问题。为了充分综合待融合图像的有效信息,提出了一种基于图像分解和色彩先验的双尺度多曝光图像融合方法。方法 使用快速导向滤波进行图像分解,分离出细节层对其进行增强处理,保留更多的细节信息,同时减少融合图像的光晕伪影;根据色彩先验,利用亮度和饱和度之差判断图像曝光程度,并联合亮度与饱和度之差以及图像对比度计算多曝光图像融合权重,同时保障融合图像的亮度和对比度;利用导向滤波对权重图进行优化,抑制噪声,增加像素之间的相关性,提升融合图像的视觉效果。结果 在24组多曝光图像序列上进行实验,从主观评价角度来看,该融合方法能够提升图像整体对比度及色彩饱和度,并兼顾过曝光区域和欠曝光区域的细节提升。从客观评价标准分析,采用两种不同的多曝光图像序列融合结果的质量评估算法,评价结果显示融合性能均有所提高,对应的指标均值分别为0.982和0.970。与其他对比算法的数据结果比较,在两种不同的结构相似性指标上均有所提升,平均提升分别为1.2%和1.1%。结论 通过主观和客观评价,证实了所提方法在图像对比度、色彩饱和度以及细节信息保留的处理效果十分显著,具有良好的融合性能。

关键词

多曝光图像融合(MEF); 高动态范围成像; 导向滤波; 快速导向滤波; 色彩先验

Multi-exposure image fusion based on image decomposition and color prior
expand article info Li Yuanyuan1, Wang Qin1, Zhu Zhiqin2, Qi Guanqiu3
1. College of Computer Science and Technology, Chongqing University of Posts and Telecommunications, Chongqing 400065, China;
2. College of Automation, Chongqing University of Posts and Telecommunications, Chongqing 400065, China;
3. Computer Information Systems Department, State University of New York at Buffalo State, Buffalo, New York 14222, USA
Supported by: National Natural Science Foundation of China (61906026, 61803061, 51705056)

Abstract

Objective Good quality images with rich information and good visual effect have been concerned in digital imaging. Due to the limitation of "dynamic range", existing imaging equipment cannot record all the details of one scene via one exposure imaging, which seriously affects the visual effect and key information retention of source images. A mismatch in the dynamic range has been caused to real scene amongst existing imaging, display equipment and human eye's response. The dynamic range can be regarded as the brightness ratio between the brightest and darkest points in natural scene ima-ges. The dynamic range of human visual system is 105: 1. The dynamic range of images captured/displayed by digital imaging/display equipment is only 102: 1, which is significantly lower than the corresponding one of human visual system. Multi-exposure image fusion has provided a simple and effective way to solve the mismatch of dynamic range between existing imaging/display equipment and human eye. Multi-exposure image fusion has been used to perform the weighted fusion of multiple images via various cameras at different exposure levels. The information of source images has been maximally retained in the fused images, which ensures the fused images have the high-dynamic-range visual effect that matches the resolution of human eyes. Method Multi-exposure image fusion methods have usually categorized into spatial domain methods and transform domain methods. Spatial domain fusion methods either first divide source image sequences into image blocks according to certain rules and then perform the fusion of image blocks, or directly do the pixel-based fusion. The fused images often have different problems, such as unnatural connection of transition areas and uneven brightness distribution, which causes the low structural similarity between the fused images and source images. Transform domain fusion methods first decompose source images into the transform domain, and then perform the fusion according to certain fusion rules. Image decomposition has mainly divided into multi-scale decomposition and two-scale decomposition. Multi-scale decomposition requires up-sampling and down-sampling operations, which cause a certain degree of image information loss. Two-scale decomposition does not contain up-sampling and down-sampling operations, which avoids the problem of information loss caused by multi-scale decomposition, and avoids the shortcomings of spatial domain method to a certain extent. Two-scale decomposition can be directly decomposed into base and detail layers using filters, but the selection of filters seriously affects the quality of the fused images. A new exposure fusion algorithm based on two-scale decomposition and color prior has been proposed to obtain visual effect images like high-quality HDR (high dynamic range) images. The details of overexposed area and dark area can be involved in and the fused image has good color saturation. The main contributions have shown as follows: 1) To use the difference between image brightness and image saturation to determine the degree of exposure; To combine the difference and the image contrast as a quality measure. This method can distinguish the overexposed area and the unexposed area quickly and efficiently. The texture details of the overexposed area and the unexposed area have been considered. The color saturation and contrast of the fused image have been improved. 2) A fusion method based on two-scale decomposition has been presented. Fast guided filter to decompose the image can reduce the halo artifacts of the fused image to a certain extent, which makes the image have better visual effect. The detailed research workflows have shown as follows: First, the image has been decomposed by fast guided filtering. The obtained detail layer has been enhanced, which retains more detailed information, and reduces the halo artifacts of the fused image. Next, based on the color prior, the difference between brightness and saturation has been used to determine the degree of image exposure. The difference and the image contrast have been combined to calculate the fusion weight of multi-exposure images, ensuring the brightness and contrast of the fused images at the same time. At last, the guided filtering has been used to optimize the weight map, suppress noise, increase the pixels correlation and improve the visual effect of the fused images. Result 24 sets of multi-exposure image sequences have been included. From the overall contrast and color saturation of the fused images and the details of both overexposed and underexposed areas have been improved on the perspective of subjective evaluation. In terms of the analysis of objective evaluation criteria, two different quality evaluation algorithms have used to evaluate the fused results of multi-exposure image sequences. The evaluation results have shown that the averages of corresponding indicators reach 0.982 and 0.970 each. The two different structural similarity indexes have been improved, with an average improvement of 1.2% and 1.1% respectively. Conclusion According to subjective and objective evaluations, the good fusion performance of significant processing effects on image contrast, color saturation and detail information retention has been outreached. The algorithm has three main advantages with respect to low complexity, simple implementation and relatively fast running speed, to customize mobile devices. It can be applied to imaging equipment with low dynamic range to obtain ideal images.

Key words

multi-exposure fusion (MEF); high dynamic range imaging; guided filtering; fast guided filtering; color prior

0 引言

在数字成像中,通常期望获得信息丰富和视觉效果良好的图像。但受成像设备动态范围的限制,现有成像设备无法通过一次曝光成像记录场景中的所有细节信息,严重影响了图像视觉效果与关键信息记录(Mertens等,2007)。而多曝光图像融合(multi-exposure fusion,MEF)是解决该问题的最有效方法,通过相机在不同曝光水平下拍摄多张照片,按一定规则进行加权融合,使得融合图像中的信息含量最大化,从而获得匹配人眼辨析度的类似高动态范围(high dynamic range,HDR)图像的视觉效果图像(Reinhard等,2010)。

由于多曝光图像融合具有生成融合图像的时间短及不需要校准相机响应函数等优点,一直是研究热点,其融合算法也得到快速发展。现有MEF方法中,不同主要体现在:1)根据一种或几种质量度量构建融合规则,包括图像的信息熵(Goshtasby,2005)、对比度、颜色饱和度、曝光适度评价参数(Mertens等,2007Ma等,2019)、梯度(Zhang和Cham,2012)、像素显著性(Li等,2013)、色彩一致性(Shen等,2011)以及图像平均强度(Li等,2012),但往往不能兼顾图像的颜色饱和度、纹理细节信息的保留以及亮度分布均匀等。2)源图像序列的预处理方法决定了后续融合工作是基于空间域还是变换域。空间域融合方法通常是先将源图像序列按一定规则划分成图像块,再进行融合或直接基于像素融合。融合图像往往存在过渡区域衔接不自然和亮度分布不均匀等问题(Kinoshita和Kiya,2019),使得图像结构相似性低。变换域融合方法是先将图像分解到变换域,再根据一定的融合规则进行融合。图像分解主要分为多尺度分解和二尺度分解。多尺度分解需要进行上采样和下采样操作,会产生一定程度的图像信息丢失。二尺度分解不包含上采样和下采样操作,可直接利用滤波器分解为基层和细节层,但滤波器的选择会严重影响到融合图像的质量。

为了获得类似高质量HDR图像的视觉效果图像,本文提出了一种新的基于二尺度分解与色彩先验的多曝光融合算法,可以兼顾过曝光区域和暗区域的细节信息,并且融合图像有较好的色彩饱和度。主要贡献有:1)利用图像亮度与图像饱和度之差判断图像的曝光程度,再联合图像对比度作为质量度量。能够快速高效区分过曝光区域和未过曝光区域,兼顾过曝光区域和未过曝光区域的纹理细节,提升融合图像的颜色饱和度及对比度。2)提出一种基于二尺度分解的融合方法。利用快速导向滤波进行图像分解,能够在一定程度上降低融合图像的光晕伪影,使图像具有更好的视觉效果。

1 相关工作

多曝光图像融合主要分为基于空间域的融合方法和基于变换域的融合方法。

1) 基于空间域的融合方法。Kong等人(2007)提出基于遗传算法(genetic algorithms, GA)的融合方法,将图像域划分为统一的块,采用GA优化混合功能的块大小和宽度,并为每个图像块选择包含该块中信息最多的图像。然后使用以块为中心的有理高斯混合函数将选定的图像混合在一起。Li等人(2012a)提出一种基于加权和的融合方法,首先测量由局部对比度、亮度和颜色差异组成的3个图像特征以估计权值,再用递归滤波器优化权重图。另外,Li等人(2012b)提出一种基于直方图均衡和中值滤波的运动检测方法,用于融合包含运动对象的动态场景中的多曝光图像。Ma等人(2017)提出基于图像结构块分解的方法,用平均强度、信号强度和信号结构表示图像块,然后利用图像块的强度和曝光因子进行加权融合,既可以用于静态场景融合,也可以用于动态场景融合。Moriyama(2019)提出利用保留色相和饱和度的光转换方法生成新的多曝光图像进行融合,基于局部颜色校正实现亮度转换,并通过加权平均(权值通过饱和度计算)得到融合图像。Kinoshit和Kiya(2019)针对某些图像序列曝光次数不足,不能使融合图像呈现最佳的视觉效果,提出对输入图像进行亮度调整,以产生高质量的输入图像。Wang和Zhao(2020)提出使用超像素分割方法将输入图像划分为由具有相似视觉属性的像素组成的非重叠图像块,并将图像块分解为信号强度、图像结构和强度3个独立分量,再根据人类视觉系统的特征和输入图像的曝光水平将3个分量分别融合。

2) 基于变换域的融合方法。Mertens等人(2009)在多尺度图像分解下,利用对比度、饱和度及曝光度等评价参数衡量像素成像质量,并以此计算融合权重值。Shen等人(2014)在前者的基础上,提出升级的多尺度分解。Li等人(2013)提出利用均值滤波将图像分解为基层和细节层,通过显著性像素计算权重,再用导向滤波进行优化的融合方法。Nejati等人(2017)提出一种基于曝光函数的快速融合算法,基于二尺度分解,利用导向滤波器将图像分解为基层和细节层,再利用图像全局平均强度和局部平均强度分别计算基层和细节层权重。Qi等人(2020)利用曝光质量先验选取参考图像,在结构一致性测试中利用参考图像解决动态场景中存在的重影问题,再利用导向滤波器对图像进行分解,提出结合空间域尺度分解、图像块结构分解和适度曝光评价的融合方法。Li等人(2020)提出一种基于改进金字塔变换的多曝光图像融合算法,通过使用自适应直方图均衡算法改善图像局部对比度信息,并计算具有对比度信息、图像熵以及曝光度良好的图像融合权重系数来进行融合。

基于空间域的方法主要缺陷是图像过渡区域衔接不自然、亮度分布不均匀,图像结构相似性低;基于变换域的方法主要问题则是多尺度分解过程中的信息丢失以及二尺度分解造成融合图像的光晕。而这两类方法采用的图像质量度量往往不能兼顾图像的颜色饱和度、纹理细节信息的保留以及亮度分布均匀等。本文采用快速导向滤波进行二尺度分解,规避了多尺度分解中由于上采样和下采样造成的信息丢失和空间域融合方法的图像衔接不自然等问题,在一定程度上减轻了融合图像的光晕伪影。同时,根据色彩先验进行曝光判断,结合图像对比度进行质量度量,提升图像色彩饱和度,兼顾图像过曝光和未过曝光区域细节,再利用导向滤波优化最佳权重图,抑制噪声、提升融合图像的像素相关性,进一步提升了融合图像的视觉效果。

2 本文算法

本文提出的融合方法分为图像分层、色彩先验、权重计算以及加权融合4部分,本文方法整体流程图如图 1所示。

图 1 本文方法整体流程
Fig. 1 The overall process of this method

2.1 导向滤波和快速导向滤波

导向滤波器是一种边缘保护的滤波器。一幅真实图像通常由过渡平缓的(即梯度较小的)区域和梯度较大的边缘(包括图像的纹理、细节等)组成。相比均值滤波和高斯滤波等,在边缘和平滑区域都采取同样处理,导向滤波的局部线性模型保护了图像的边缘及纹理细节。

通过导向图对目标图像进行滤波处理,使得结果图像与目标图像大体上相似,但纹理部分却与导向图相似。导向滤波器的一个重要假设是导向图$\mathit{\boldsymbol{G}} $与结果图像$\mathit{\boldsymbol{Q}} $之间在以像素$k $为中心的窗口内是一个局部线性模型,即

$ \boldsymbol{Q}_{i}=a_{k} \boldsymbol{G}_{i}+b_{k}, \quad \forall i \in \boldsymbol{\omega}_{k} $ (1)

式中,窗口${\mathit{\boldsymbol{\omega }}_k} $的大小为$(2 \times r + 1)(2 \times r - 1) $$r $为窗口半径大小。局部线性模型的参数$ {a_k}$${b_k} $在窗口${\mathit{\boldsymbol{\omega }}_k} $内是恒定的,通过最小化代价函数$E({a_k}, {b_k}) $确定,该函数具体为

$ E\left(a_{k}, b_{k}\right)=\sum\limits_{i \in \boldsymbol{\omega}_{k}}\left(\left(a_{k} \boldsymbol{G}_{i}+b_{k}-\boldsymbol{I}_{i}\right)^{2}+\varepsilon a_{k}^{2}\right) $ (2)

式中,${\mathit{\boldsymbol{I}}_i} $为待滤波图像,$\varepsilon $是正则化参数,决定导向滤波的模糊程度。由式(2)可以直接求得线性模型的参数,即

$ a_{k}=\frac{|\omega| \sum\limits_{i \in \boldsymbol{\omega}_{k}} \boldsymbol{I}_{i} \boldsymbol{G}_{i}-\overline{\boldsymbol{I}}_{k} u_{k}}{\sigma_{k}^{2}+\varepsilon} $ (3)

$ b_{k}=\overline{\boldsymbol{I}}_{k}-a_{k} M_{k} $ (4)

式中,${M_k} $为导向图在${\mathit{\boldsymbol{\omega }}_k} $窗口内的均值,$\sigma _k^2 $为导向图在${\mathit{\boldsymbol{\omega }}_k} $窗口内的方差,${\mathit{\boldsymbol{I}}_k} $为待滤波图像在$ {\mathit{\boldsymbol{\omega }}_k}$窗口中的均值,$\left| \omega \right| $${\mathit{\boldsymbol{\omega }}_k} $窗口内的总像素数。计算出${a_k} $${b_k} $便可由式(1)得出${\mathit{\boldsymbol{\omega }}_k} $窗口内的输出像素值。对每一个像素,其输出值${\mathit{\boldsymbol{Q}}_i} $与所有覆盖该像素的窗口${\mathit{\boldsymbol{\omega }}_k} $有关。当${\mathit{\boldsymbol{\omega }}_k} $不同时,${\mathit{\boldsymbol{Q}}_i} $值也不同,其中$i $为像素的索引值。为解决此问题,一个简单策略是取所有可能的${\mathit{\boldsymbol{Q}}_i} $的平均值,即

$ \boldsymbol{Q}_{i}=\frac{1}{|\omega|} \sum\limits_{k | i \in \boldsymbol{\omega}_{k}}\left(a_{k} \boldsymbol{G}_{i}+b_{k}\right) $ (5)

$ \overline{\boldsymbol{Q}}_{i}=\bar{a}_{i} \boldsymbol{G}_{i}-\bar{b}_{i} $ (6)

式中,${{\bar a}_i} = \frac{1}{{\left| \omega \right|}}\sum\limits_{\left. k \right|i \in {\mathit{\boldsymbol{\omega }}_k}}^{} {{a_k}}, {{\bar b}_i} = \frac{1}{{\left| \omega \right|}}\sum\limits_{\left. k \right|i \in {\mathit{\boldsymbol{\omega }}_k}}^{} {{b_k}} $

快速导向滤波是在导向滤波的基础上进行优化,通过对图像下采样,减少像素点,计算${\bar a} $${\bar b} $后,进行上采样恢复图像原有尺寸。

2.2 融合算法

多曝光技术使场景内不同亮度的目标在不同曝光时间分别正确曝光,最终得到对应高动态范围场景的低动态范围图像序列。曝光融合的目的就是从多曝光图像序列中抽取重要的目标信息,并组合在一幅类似高动态范围图像视觉效果的图像中。

假设多曝光图像序列为 ${\mathit{\boldsymbol{I}}_k}(k = 1, 2, \cdots, N) $$N $表示序列中图像总数量。则图像融合可以描述为

$ \boldsymbol{F}=\sum\limits_{k=1}^{N} \boldsymbol{W}_{k} \boldsymbol{I}_{k} $ (7)

式中,$ {\mathit{\boldsymbol{W}}_k}$是第$k $幅图像的权重函数,满足$\sum\limits_{k = 1}^N {{W_k}(i, j) = 1} $

2.2.1 基于快速导向滤波的图像分层

采用两层融合的方法,首先将曝光序列图像转换成灰度图${{\mathit{\boldsymbol{I'}}}_k} $,利用快速引导滤波得到图像基层${\mathit{\boldsymbol{B}}_k} $, 再利用原图减去基层得到细节层${\mathit{\boldsymbol{D}}_k} $。即

$ B_{k}(i, j)=F G\left(\boldsymbol{I}_{k}^{\prime}\right) $ (8)

$ D_{k}(i, j)=I_{k}(i, j)-B_{k}(i, j) $ (9)

式中,$(i, j) $代表像素的坐标,$ FG(\cdot)$代表快速导向滤波操作,并且采用灰度图同时作为快速导向滤波的导向图和原图。快速导向滤波与均值滤波的效果对比如图 2所示,二者采用同样的滤波半径$r $=12。滤波结果表明,快速导向滤波相比传统的均值滤波,在一定程度上可以降低滤波后图像的光晕伪影。

图 2 滤波效果对比
Fig. 2 Filter effect comparison
((a)original image; (b)fast guided filtering; (c)mean filtering)

2.2.2 色彩先验

Zhu等人(2015)提出的色彩衰减先验启示,经实验观察发现在多曝光图像序列中,存在随曝光度增加,图像亮度逐渐增加、饱和度逐渐下降现象。并且在任意图像中,过曝光区域存在亮度高但饱和度低的现象;与之相反,曝光不足区域则存在亮度低而饱和度高的情况,即为色彩先验。依据人眼的视觉特性,可大致认为当像素的亮度与饱和度之差大于某个阈值$\alpha $时,像素点处于过度曝光状态。图 3为阈值$\alpha $分别取值0.8、0.7、0.6、0.5时的曝光判断对比,白色区域处于过曝光状态,黑色区域处于未过曝光状态。显然利用色彩先验进行曝光判断是十分简单有效的。从图 3可以看出,当$\alpha $取值较大时,易将过曝光区域判断为未过曝光,丢失细节。反之$\alpha $取值较小时,则容易将白色区域判为过曝光状态,例如图中的白色区域部分。经多次实验,发现$\alpha $ = 0.7时,融合图像质量最佳。

图 3 不同$\alpha $值的曝光判断对比
Fig. 3 Comparison of exposure judgment of different $\alpha $ values
((a)original image; (b)$\alpha $ = 0.8;(c)$\alpha $ = 0.7;(d)$\alpha $ = 0.6;(e)$\alpha $ = 0.5)

2.2.3 权重计算及优化

在保证亮度的情况下,亮度与饱和度之差越小时,像素的曝光状态越好。所以本文采用亮度$\mathit{\boldsymbol{V}} $和饱和度$\mathit{\boldsymbol{S}} $之差为特征指标之一,并利用高斯模型进行计算权重。具体为

$ W_{1}(i, j)=\exp \left[-\frac{(d(i, j))^{2}}{2 \times \sigma^{2}}\right] $ (10)

$ d(i, j)=|V(i, j)-S(i, j)| $ (11)

式中,$V(i, j) $为亮度,$S(i, j) $为饱和度,$\delta $控制高斯曲线的扩展范围,$\left| \cdot \right| $代表取绝对值。当$d(i, j) > \alpha $时,直接利用$\left| {\mathit{\boldsymbol{V - S}}} \right| $计算权重,给予高饱和度像素大的权值。但因在未曝光过度区域,通常期望亮度占主导地位,所以先将未曝光过度的像素的饱和度置为1。即

$ S(i, j)=1, d(i, j) \leqslant \alpha $ (12)

图 4$\alpha \mathit{\boldsymbol{ = }}{\rm{0}}{\rm{.7}} $的曝光判断图,经过判断后保留了亮度和饱和度都较高的像素。

图 4 曝光判断
Fig. 4 Exposure judgment
((a)multi-exposure sequence original image of house; (b)over exposure judgment chart of house sequence images)

$ W_{2}(i, j)=c(i, j) $ (13)

$ c(i, j)=|I(i, j) \times l(i, j)| $ (14)

式中,$\mathit{\boldsymbol{c}} $是图像对比度,$\mathit{\boldsymbol{I}} $是输入图像,$\mathit{\boldsymbol{l}} $表示拉普拉斯滤波器,且

$ \boldsymbol{l}=\left|\begin{array}{ccc} 1 & 0 & 1 \\ 0 & -4 & 0 \\ 1 & 0 & 1 \end{array}\right| $ (15)

最终的权重函数为

$ W(i, j)=W_{1}(i, j) \times W_{2}(i, j) $ (16)

为使融合图像信息最大化,本文对权重图进行后处理,让权重值最大的占比为1,其他占比为0。即

$ W(i, j)= \begin{cases}1 & w=\max \left(w_{1}^{k}, w_{2}^{k}, \cdots, w_{N}^{k}\right) \\ 0 & \text { 其他 }\end{cases} $ (17)

图像的对比度以及亮度与饱和度之差都是局部特征,未考虑到像素之间的相关性,融合图像会产生很多的随机噪声。最后利用灰度图对权重图进行导向滤波,具体为

$ \boldsymbol{W}_{k}=G\left(\boldsymbol{W}_{k}, \boldsymbol{I}_{k}^{\prime}\right) $ (18)

式中,$ G(\cdot)$代表导向滤波操作. $ {\mathit{\boldsymbol{W}}_k}$为引导图像,${{\mathit{\boldsymbol{I'}}}_k} $为第$ k$幅图像的权重。

基层和细节层采用不同的滤波参数,不同图像采用的滤波参数可能不同。Li等人(2012)经实验证明基层采用较大的滤波半径和模糊系数,细节层采用较小的滤波半径和模糊系数,会得到质量更佳的融合图像。图 5是权重图未经过和经过导向优化的融合图像。

图 5 导向优化对比
Fig. 5 Guide optimization comparison
((a)before guided filtering; (b)after guided filtering)

2.2.4 加权融合

经导向滤波后, 再对权重进行归一化,然后对图像进行加权融合。具体为

$ \boldsymbol{F} \boldsymbol{I}=\sum\limits_{k=1}^{N} \boldsymbol{W}_{k}^{B} \times \boldsymbol{B}_{k}+\sum\limits_{k=1}^{N} \boldsymbol{W}_{k}^{D} \times \boldsymbol{D}_{k} \times \beta $ (19)

式中,$\mathit{\boldsymbol{FI}} $表示融合图像。$\mathit{\boldsymbol{W}}_k^B $$\mathit{\boldsymbol{W}}_k^D $分别为第$k $幅图像的基层和细节层权重。为了增强最终融合图像的细节,采用参数$ \beta \ge 1$决定最终细节增强的程度。

本文整体算法流程如下:

输入:LDR图像序列${\mathit{\boldsymbol{I}}_k} $, 灰度图序列${{\mathit{\boldsymbol{I'}}}_k} $,亮度$V $,饱和度$S, k = 1, 2, \cdots, N, (x, y) $为像素位置。

输出:融合图像$\mathit{\boldsymbol{FI}} $

1) for each $k \in [1, N]\;\;{\rm{do}} $

2)   ${\mathit{\boldsymbol{B}}_k} = FG({{\mathit{\boldsymbol{I'}}}_k}) $

3)   ${\mathit{\boldsymbol{D}}_k} = {\mathit{\boldsymbol{I}}_k} - {\mathit{\boldsymbol{B}}_k} $

4) end for

5) if $\left| {V(i, j) - S(i, j)} \right| \le \alpha \;\;{\rm{then}} $

6)   $S{\rm{ = 1}} $

7) end if

8) $\begin{array}{l} {W_k}(x, y) = \exp (\frac{{{V_k}(x, y) - {S_k}(x, y)}}{{2{\delta ^2}}}) \times \\ {c_k}(x, y) \end{array} $

9) if ${W_k}(x, y) = \max ({W_k}(x, y))\;\;\rm {then} $

10)   ${W_k}(x, y) = 1 $

11) else ${W_k}(x, y) = 0$

12) end if

13) for each ${\mathit{\boldsymbol{B}}_k}, {\mathit{\boldsymbol{D}}_k}, k \in [1, N]\;\;{\rm{do}} $

14)   ${W_k}(x, y) = G(W_k^B(x, y)) $

15)   ${W_k}(x, y) = G(W_k^D(x, y)) $

16) end for

17) 融合图像:

$ \boldsymbol{F} \boldsymbol{I}=\sum\limits_{k=1}^{n} \boldsymbol{W}_{k}^{B} \times \boldsymbol{B}_{k}+\beta \times \sum\limits_{k=1}^{n} \boldsymbol{W}_{k}^{D} \times \boldsymbol{D}_{k} $

3 实验及结果

实验使用MATLAB 2019编程实现,在8 GB RAM,Intel I7 9750H@2.60 GHz的笔记本电脑上运行完成。对比实验选取24组多曝光图像序列和8种现有的传统多曝光图像融合算法(不包含深度学习相关融合方法)进行主客观两方面对比。8种算法为Liu和Wang(2015)提出的基于密集尺度不变特征变换的多曝光融合算法(算法5)、Nejati等人(2017)提出的基于曝光函数的快速融合方法(算法1)、Li和Kang(2012)提出的基于中值滤波器和递归滤波器的融合方法(算法2)、Zhang和Cham(2012)提出的利用梯度信息进行融合的方法(算法7)、He等人(2013)提出的基于导向滤波的融合方法(算法6)、Mertens等人(2009)提出的基于多尺度分解的融合方法(算法3)、Ma等人(2017)提出的基于图像结构块分解的融合方法(算法4)和Qi等人(2020)提出的基于低层特征的精确融合方法(算法8)。根据经验,本文算法的快速导向滤波参数设置为$r $=12、$\varepsilon $=0.25、$r $=2.5,导向滤波的参数设置为$r $1=100、${\varepsilon _1}$=25、$r $2=10、${\varepsilon _2} $=0.01。其余参数设置为$\beta $=1.1,$\delta $=0.2。

3.1 客观评价

为客观评价多曝光图像融合算法的性能,采用Ma等人(2015)提出的MEF-SSIM(structural similarity index of multi-exposure fusion)质量评价模型和Rahman等人(2017)提出的质量评估(quality assessment, QA)算法来进行评估。

结构相似性是一种衡量两幅图像相似度的指标。结构相似度指数从图像组成的角度将结构信息定义为独立于亮度、对比度的反映场景中物体结构的属性,并将失真建模为亮度、对比度和结构3个不同因素的组合。用均值作为亮度的估计,标准差作为对比度的估计,协方差作为结构相似程度的度量。具体定义为

$ \begin{gathered} {SSIM}(x, y)=[l(x, y)]^{\alpha} \times \\ {[c(x, y)]^{\beta} \times[s(x, y)]^{\gamma}} \end{gathered} $ (20)

$ l(x, y)=\frac{2 \mu_{x} \mu_{y}+c_{1}}{\mu_{x}^{2}+\mu_{y}^{2}+c_{1}} $ (21)

$ c(x, y)=\frac{2 \delta_{x} \delta_{y}+c_{2}}{\delta_{x}^{2}+\delta_{y}^{2}+c_{2}} $ (22)

$ s(x, y)=\frac{\delta_{x y}+c_{3}}{\delta_{x} \delta_{y}+c_{3}} $ (23)

式中,$ l(x, y)$$c(x, y) $$s(x, y) $分别为图像亮度、对比度和结构的比较结果;${\mu _x} $${\mu _y} $为图像像素均值,${\delta _x} $${\delta _y} $为图像像素值的标准差,${\delta _{xy}} $$x $$y $的协方差,${c_1} $$ {c_2}$${c_3} $为常数,避免分母为0时带来的系统错误。

Rahman等人(2017)提出的QA算法基于不同的结构相似性指数,具体为

$ {SSIM}_{l, k}(i, j)=\frac{2 \delta_{t-l, k}(i, j)+C}{\delta_{t, k}^{2}(i, j)+\delta_{l, k}^{2}(i, j)+C} $ (24)

式中,$ \mathit{\boldsymbol{t}}$代表测试图像,$\mathit{\boldsymbol{l}} $代表过曝光/欠曝光图像,$k $为子带数。${\delta _{t - 1, k}}(i, j) $代表$\mathit{\boldsymbol{t}} - \mathit{\boldsymbol{l}} $在子带$k $中的位置($(i, j) $)的标准差,$\delta _{t, k}^2(i, j) $$\delta _{l, k}^2(i, j) $分别代表图像$$\mathit{\boldsymbol{t}} $在子带$\mathit{\boldsymbol{l}} $中的局部方差,$k $为常数。

MEF-SSIM和QA的评估结果如图 6图 7表 1表 2所示。可以看出,本文算法的性能优于大多数现有的多曝光图像融合算法,在多数多曝光图像序列中都取得了最好或次好的结果。平均而言,本文方法的性能也是最优的。

图 6 MEF-SSIM评估结果
Fig. 6 MEF-SSIM assessment results
图 7 QA评估结果
Fig. 7 QA assessment results

表 1 MEF-SSIM评估结果
Table 1 MEF-SSIM assessment results

下载CSV
图像 算法1 算法2 算法3 算法4 算法5 算法6 算法7 算法8 本文
Arno 0.985 0.965 0.991 0.980 0.989 0.969 0.958 0.980 0.989
balloons 0.971 0.945 0.969 0.965 0.968 0.948 0.893 0.965 0.974
Belgium house 0.973 0.947 0.971 0.973 0.972 0.964 0.900 0.969 0.974
cave 0.979 0.961 0.975 0.948 0.972 0.978 0.964 0.969 0.986
Chinese garden 0.991 0.982 0.989 0.985 0.993 0.984 0.982 0.986 0.988
church 0.991 0.979 0.989 0.993 0.991 0.992 0.978 0.986 0.993
farmhouse 0.983 0.977 0.981 0.984 0.976 0.985 0.971 0.977 0.983
house 0.944 0.926 0.963 0.898 0.964 0.957 0.865 0.941 0.970
kluki 0.972 0.965 0.980 0.971 0.981 0.968 0.952 0.965 0.982
landscape 0.992 0.972 0.976 0.993 0.973 0.942 0.972 0.983 0.978
lamp 0.961 0.931 0.969 0.954 0.960 0.929 0.851 0.955 0.959
Laurenziana 0.987 0.976 0.988 0.990 0.989 0.987 0.982 0.982 0.991
lighthouse 0.975 0.953 0.980 0.970 0.965 0.950 0.964 0.968 0.979
Madison capitol 0.979 0.918 0.977 0.977 0.973 0.968 0.932 0.973 0.974
mask 0.988 0.982 0.987 0.988 0.992 0.979 0.975 0.981 0.989
Office 0.988 0.972 0.985 0.988 0.972 0.967 0.973 0.984 0.993
ostrow 0.979 0.957 0.974 0.967 0.971 0.967 0.968 0.973 0.983
room 0.976 0.973 0.974 0.978 0.974 0.986 0.967 0.972 0.984
set 0.981 0.973 0.986 0.988 0.990 0.960 0.975 0.984 0.988
studio 0.952 0.924 0.960 0.934 0.954 0.943 0.922 0.947 0.960
tower 0.986 0.984 0.986 0.986 0.987 0.986 0.977 0.979 0.988
Venice 0.976 0.952 0.966 0.940 0.972 0.954 0.954 0.935 0.981
window 0.981 0.966 0.982 0.982 0.981 0.971 0.962 0.975 0.984
yellow hall 0.996 0.987 0.995 0.995 0.991 0.990 0.987 0.990 0.997
平均值 0.979 0.961 0.979 0.972 0.977 0.968 0.951 0.972 0.982
注:加粗字体表示各行最优结果。

表 2 QA评估结果
Table 2 QA assessment results

下载CSV
图像 算法1 算法2 算法3 算法4 算法5 算法6 算法7 算法8 本文
Arno 0.981 0.953 0.983 0.980 0.980 0.972 0.955 0.981 0.981
balloons 0.938 0.918 0.944 0.940 0.936 0.932 0.860 0.940 0.938
Belgium house 0.952 0.935 0.946 0.956 0.951 0.959 0.880 0.954 0.958
cave 0.946 0.921 0.960 0.909 0.964 0.951 0.936 0.936 0.960
Chinese garden 0.989 0.974 0.984 0.987 0.990 0.983 0.977 0.989 0.985
church 0.983 0.956 0.983 0.984 0.983 0.982 0.964 0.982 0.984
farmhouse 0.959 0.949 0.953 0.964 0.954 0.969 0.944 0.955 0.957
house 0.926 0.923 0.960 0.905 0.969 0.963 0.855 0.924 0.970
kluki 0.972 0.956 0.975 0.974 0.984 0.962 0.940 0.971 0.967
landscape 0.994 0.980 0.990 0.993 0.988 0.966 0.977 0.993 0.990
lamp 0.937 0.889 0.935 0.943 0.912 0.917 0.818 0.934 0.916
Laurenziana 0.984 0.971 0.988 0.984 0.991 0.988 0.979 0.984 0.991
lighthouse 0.970 0.926 0.972 0.966 0.955 0.949 0.965 0.967 0.978
Madison capitol 0.970 0.915 0.967 0.978 0.972 0.958 0.926 0.977 0.961
mask 0.986 0.978 0.981 0.986 0.990 0.979 0.965 0.985 0.986
office 0.983 0.961 0.981 0.985 0.961 0.977 0.971 0.984 0.990
Ostrow 0.973 0.937 0.965 0.975 0.952 0.971 0.951 0.974 0.977
room 0.967 0.967 0.969 0.971 0.973 0.978 0.955 0.968 0.975
set 0.985 0.964 0.984 0.983 0.981 0.963 0.966 0.985 0.983
studio 0.914 0.896 0.936 0.917 0.927 0.929 0.896 0.912 0.929
Tower 0.981 0.964 0.977 0.980 0.982 0.978 0.959 0.980 0.974
Venice 0.972 0.950 0.959 0.950 0.975 0.955 0.949 0.950 0.974
window 0.958 0.950 0.960 0.960 0.953 0.956 0.944 0.956 0.958
yellow hall 0.994 0.979 0.995 0.993 0.987 0.988 0.988 0.993 0.995
平均值 0.967 0.946 0.969 0.965 0.967 0.964 0.938 0.966 0.970
注:加粗字体表示各行最优结果。

3.2 主观评价

为进一步验证本文方法的性能,与其余8种方法在cave、house和kluki等序列上的融合结果进行主观比较。图像cave序列中,算法3和算法5在左侧靠近洞口的墙壁上存在亮度偏暗,导致整个图像亮度分布不均匀,影响图像整体视觉效果。而算法7在此部分图像处于过曝光,严重丢失图像纹理细节信息,视觉效果欠佳,如图 8所示。其余方法的整体效果和细节信息提取效果都不错。图像house序列中算法1—3以及算法6等都存在窗口部分图像细节信息丢失,算法4出现图像整体泛白的现象,如图 9所示。图像kluki序列中,算法1、算法2、算法6以及算法8都存在过饱和导致细节丢失的现象,而算法2在树枝部分出现了颜色失真,如图 10所示。图 11展示了本文算法其余的大部分融合结果,都具有良好的视觉效果。通过对比可以看出,本文方法兼顾了良好的视觉效果以及细节的保留,同时客观性能评估也是最优的。

图 8 不同方法在图像cave序列上的融合图像对比
Fig. 8 Comparison of fusion images of cave sequence among different methods
((a)multi-exposure sequence original image of cave; (b)algorithm 1;(c)algorithm 2; (d)algorithm 3;(e)algorithm 4;(f)algorithm 5;(g)algorithm 6;(h)algorithm 7;(i)algorithm 8;(j)ours)
图 9 不同方法在图像house序列上的融合图像对比
Fig. 9 Comparison of fusion images of house sequence among different methods
((a)multi-exposure sequence original image of house; (b)algorithm 1;(c)algorithm 2; (d)algorithm 3;(e)algorithm 4;(f)algorithm 5;(g)algorithm 6;(h)algorithm 7;(i)algorithm 8;(j)ours)
图 10 不同方法在图像kluki序列上的融合图像对比
Fig. 10 Comparison of fusion images of kluki sequence among different methods
((a)multi-exposure sequence original image of kluki; (b)algorithm 1;(c)algorithm 2; (d)algorithm 3;(e)algorithm 4;(f)algorithm 5;(g)algorithm 6;(h)algorithm 7;(i)algorithm 8;(j)ours)
图 11 本文算法的部分多曝光图像序列融合结果
Fig. 11 The fusion results of partial multi exposure image sequences based on the proposed algorithm
((a)balloons; (b)Belgium house; (c)Arno; (d)Chinese garden; (e)lamp; (f)landscape; (g)mask; (h)Madison capitol; (i)office; (j)yellow hall; (k)set; (l)window; (m)studio; (n)Venice; (o)room)

4 结论

本文提出一种基于快速导向滤波和导向滤波的简洁高效的多曝光图像融合方法。首先利用快速导向滤波对图像进行二尺度分解,有效降低光晕伪影的现象。其次利用亮度和饱和度之差判断是否曝光过度,再结合图像局部对比度求解最佳权重,通过导向滤波对其进行优化,最终进行加权融合得到图像。实验结果表明,本文算法能够兼顾过曝光和曝光不足区域的纹理细节,融合图像具有良好的视觉效果和性能指标。

由于本文算法复杂度较低,实现简单,运行速度相对较快,符合移动设备的需求,可以应用于动态范围较低的成像设备获取理想图像。但由于使用导向滤波对权重图进行优化,增加了耗时,计算效率还需要优化。为了提升速度,后续工作希望通过结合色彩先验与图像的全局特征,能够在不利用导向滤波优化的基础上提升融合效果。同时,将致力于将本文算法扩展到多曝光动态场景的应用上,提高算法的实用性。

参考文献

  • Goshtasby A A. 2005. Fusion of multi-exposure images. Image and Vision Computing, 23(6): 611-618 [DOI:10.1016/j.imavis.2005.02.004]
  • He K M, Sun J, Tang X O. 2013. Guided image filtering. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(6): 1397-1409 [DOI:10.1109/TPAMI.2012.213]
  • Kinoshita Y, Kiya H. 2019. Scene segmentation-based luminance adjustment for multi-exposure image fusion. IEEE Transactions on Image Processing, 28(8): 4101-4116 [DOI:10.1109/TIP.2019.2906501]
  • Kong J, Wang R J, Lu Y H, Feng X and Zhang J B. 2007. A novel fusion approach of multi-exposure image//Proceedings of the EUROCON 2007: The International Conference on "Computer as a Tool". Warsaw, Poland: IEEE: 163-169[DOI: 10.1109/EURCON.2007.4400468]
  • Li H, Ma K D, Yong H W, Zhang L. 2020. Fast multi-scale structural patch decomposition for multi-exposure image fusion. IEEE Transactions on Image Processing, 29: 5805-5816 [DOI:10.1109/TIP.2020.2987133]
  • Li S T, Kang X D. 2012. Fast multi-exposure image fusion with median filter and recursive filter. IEEE Transactions on Consumer Electronics, 58(2): 626-632 [DOI:10.1109/tce.2012.6227469]
  • Li S T, Kang X D, Hu J W. 2013. Image fusion with guided filtering. IEEE Transactions on Image Processing, 22(7): 2864-2875 [DOI:10.1109/TIP.2013.2244222]
  • Liu Y, Wang Z F. 2015. Dense SIFT for ghost-free multi-exposure fusion. Journal of Visual Communication and Image Representation, 31: 208-224 [DOI:10.1016/j.jvcir.2015.06.021]
  • Ma K D, Duanmu Z F, Zhu H W, Fang Y M, Wang Z. 2019. Deep guided learning for fast multi-exposure image fusion. IEEE Transactions on Image Processing, 29: 2808-2819 [DOI:10.1109/TIP.2019.2952716]
  • Ma K D, Li H, Yong H W, Wang Z, Meng D Y, Zhang L. 2017. Robust multi-exposure image fusion: a structural patch decomposition approach. IEEE Transactions on Image Processing, 26(5): 2519-2532 [DOI:10.1109/TIP.2017.2671921]
  • Ma K D, Zeng K, Wang Z. 2015. Perceptual quality assessment for multi-exposure image fusion. IEEE Transactions on Image Processing, 24(11): 3345-3356 [DOI:10.1109/TIP.2015.2442920]
  • Mertens T, Kautz J and Van Reeth F. 2007. Exposure fusion//Proceedings of the 15th Pacific Conference on Computer Graphics and Applications. Maui, USA: IEEE: 382-390[DOI: 10.1109/PG.2007.17]
  • Mertens T, Kautz J, Van Reeth F. 2009. Exposure fusion: a simple and practical alternative to high dynamic range photography. Computer Graphics Forum, 28(1): 161-171 [DOI:10.1111/j.1467-8659.2008.01171.x]
  • Moriyama D, Ueda Y, Misawa H, Suetake N and Uchino E. 2019. Saturation-based multi-exposure image fusion employing local color correction//Proceedings of 2019 IEEE International Conference on Image Processing. Taipei, China: IEEE: 3512-3516[DOI: 10.1109/ICIP.2019.8803693]
  • Nejati M, Karimi M, Soroushmehr S M R, Karimi N, Samavi S and Najarian K. 2017. Fast exposure fusion using exposedness function//Proceedings of 2017 IEEE International Conference on Image Processing. Beijing, China: IEEE: 2234-2238[DOI: 10.1109/ICIP.2017.8296679]
  • Qi G Q, Chang L, Luo Y Q, Chen Y N, Zhu Z Q, Wang S J. 2020. A precise multi-exposure image fusion method based on low-level features. Sensors, 20(6): #1597 [DOI:10.3390/s20061597]
  • Rahman H, Soundararajan R, Babu R V. 2017. Evaluating multiexposure fusion using image information. IEEE Signal Processing Letters, 24(11): 1671-1675 [DOI:10.1109/LSP.2017.2752233]
  • Reinhard E, Ward G, Pattanaik S, Debevec P, Heidrich W, Myszkowski K. 2010. High Dynamic Range Imaging: Acquisition, Display and Image-Based Lighting. 2nd ed. Burlington: Elsevier
  • Shen J B, Zhao Y, Yan S C, Li X L. 2014. Exposure fusion using boosting laplacian pyramid. IEEE Transactions on Cybernetics, 44(9): 1579-1590 [DOI:10.1109/TCYB.2013.2290435]
  • Shen R, Cheng I, Shi J B, Basu A. 2011. Generalized random walks for fusion of multi-exposure images. IEEE Transactions on Image Processing, 20(12): 3634-3646 [DOI:10.1109/TIP.2011.2150235]
  • Wang S P, Zhao Y. 2020. A novel patch-based multi-exposure image fusion using super-pixel segmentation. IEEE Access, 8: 39034-39045 [DOI:10.1109/ACCESS.2020.2975896]
  • Zhang W, Cham W K. 2012. Gradient-directed multi-exposure composition. IEEE Transactions on Image Processing, 21(4): 2318-2323 [DOI:10.1109/TIP.2011.2170079]
  • Zhu Q S, Mai J M, Shao L. 2015. A fast single image haze removal algorithm using color attenuation prior. IEEE Transactions on Image Processing, 24(11): 3522-3533 [DOI:10.1109/TIP.2015.2446191]