«上一篇 下一篇»
  计算机工程  2021, Vol. 47 Issue (4): 204-210  DOI: 10.19678/j.issn.1000-3428.0058057
0

引用本文  

蔡李美, 李新福, 田学东. 基于分层图像融合的虚拟视点绘制算法[J]. 计算机工程, 2021, 47(4), 204-210. DOI: 10.19678/j.issn.1000-3428.0058057.
CAI Limei, LI Xinfu, TIAN Xuedong. Virtual Viewpoint Rendering Algorithm Based on Hierarchical Image Fusion[J]. Computer Engineering, 2021, 47(4), 204-210. DOI: 10.19678/j.issn.1000-3428.0058057.

基金项目

河北省教育厅高等学校科学技术研究重点项目(ZD2017209)

作者简介

蔡李美(1996-), 女, 硕士研究生, 主研方向为智能图文信息处理;
李新福, 教授、博士;
田学东, 教授、博士

文章历史

收稿日期:2020-04-14
修回日期:2020-05-15
基于分层图像融合的虚拟视点绘制算法
蔡李美 , 李新福 , 田学东     
河北大学 网络空间安全与计算机学院, 河北 保定 071000
摘要:针对虚拟视点绘制过程中出现的重叠和空洞问题,提出一种新的虚拟视点绘制算法。通过形态学操作对三维图像变换后出现的空洞进行膨胀来消除伪影瑕疵,根据深度信息对左、右虚拟视点图像进行前景和背景分割,利用线性加权法对分割后的前景图像和背景图像进行分层融合解决像素重叠问题,对分层融合后的背景图像进行空洞填充并与前景图像融合得到虚拟视点图像。实验结果表明,与经典的Criminisi算法相比,该算法PSNR值提高了1.75 dB,具有较高的绘图质量。
关键词虚拟视点    深度信息    前景和背景分割    分层融合    三维图像变换    
Virtual Viewpoint Rendering Algorithm Based on Hierarchical Image Fusion
CAI Limei , LI Xinfu , TIAN Xuedong     
School of Cyber Security and Computer, Hebei University, Baoding, Hebei 071000, China
Abstract: To address the overlaps and holes in virtual viewpoint rendering, this paper proposes a new virtual viewpoint rendering algorithm based on hierarchical image fusion.The algorithm performs morphological operation on the holes generated by 3D image transformation to expand them, thus eliminating artifact defects.Then according to the depth information, the foreground and background of the left and right virtual viewpoint images are segmented.The linear weighting method is used to implement hierarchical fusion for segmented foreground and background images to solve pixel overlap.Holes filled, the background image is fused with the foreground image to obtain the virtual viewpoint image.Experimental results show that the PSNR of the proposed algorithm is 1.75 dB higher than that of the Criminisi algorithm.
Key words: virtual viewpoint    depth information    foreground and background segmentation    hierarchical fusion    three-dimensional image transformation    
0 概述

基于深度图像的绘制(Depth Image Based Rendering,DIBR)技术是自由视点电视中的关键技术[1]。通过纹理图及其对应的深度图能够绘制出任意视点的虚拟图像,但目前DIBR技术绘制的虚拟图像依然存在重叠、空洞等问题,影响图像质量,主要原因是由于遮挡和深度图的不连续,在三维图像变换后会出现多个像素点映射到同一位置,导致背景像素覆盖前景像素的重叠问题。此外,由于物体之间的遮挡,在参考视点中被前景物体遮挡的区域绘制到目标视点后会变得可见,从而形成空洞区域。

为提高绘制后目标视点视图的质量,国内外许多学者对此展开了研究。已有的方法可以分为在三维图像映射前进行处理、对三维图像变换过程进行处理和在三维图像变换后进行处理。在三维图像映射前进行处理的方法,如文献[2]对深度图中的背景区域进行滤波,在减少空洞的同时能够减轻几何失真,文献[3-5]将深度图物体边界扩展到彩色图像的过渡区域,解决伪影和空洞问题,文献[6]利用具有深度置信度的图像引导TGV模型使深度图和纹理图边缘对齐,对深度图进行恢复,文献[7]采用图像分割技术对图像进行分割处理再进行三维映射,解决像素点的错误映射问题。对三维图像变换过程进行处理的方法,如文献[8]采用邻域插值法进行裂缝填充,该方法只适合于空洞区域较小的情况,文献[9]通过对多个映射像素点的深度和空间位置信息进行加权插值操作来实现裂缝的填充。在三维图像变换后进行处理的方法,采用基于样本的图像修复方法[10]或双向DIBR技术[11]对虚拟图像进行后处理,如文献[12-13]将深度信息引入优先级计算中,提高修复准确性,文献[14]将待填充块的优先级以背景纹理优先,抑制前景纹理的错误延伸,文献[15]利用深度图与最大化类间方差算法,解决相对背景的识别问题,文献[16]利用深度值对融合后的空洞进行判断,将外侧一定范围的背景像素复制到前景,能够减轻前景纹理的扩散,文献[17]对深度和纹理图进行分层映射解决了伪影和裂缝问题,但融合后仍需要进行剩余小空洞的填充。

针对三维映射后出现的重叠问题和双向DIBR图像融合后对特殊位置空洞进行处理时出现的前景像素扩散问题,本文提出一种基于分层图像融合的虚拟视点绘制算法。通过消除双向DIBR映射后左、右虚拟视点图像的伪影,利用深度图对左、右虚拟视点图像进行分层融合,填充分层融合后背景图像中的空洞,最终生成虚拟视点图像。

1 双向DIBR绘制技术 1.1 三维图像变换

双向DIBR绘制技术是分别将左、右参考视点的参考图像和其对应的深度图像通过三维图像变换生成任意位置的虚拟视点图像,其中,三维图像变换技术是虚拟视点绘制过程中的关键技术,分为以下两个步骤:

步骤1  利用深度信息将参考图像的每一个像素点投影到三维欧式空间,计算公式如下:

$ \left[\begin{array}{l}{\mathit{\boldsymbol{X}}}_{\mathrm{w}}\\ {\mathit{\boldsymbol{Y}}}_{\mathrm{w}}\\ {\mathit{\boldsymbol{Z}}}_{\mathrm{w}}\end{array}\right]={\left({\mathit{\boldsymbol{K}}}_{\mathrm{r}}{\mathit{\boldsymbol{R}}}_{\mathrm{r}}\right)}^{-1}\left({\lambda }_{\mathrm{r}}{p}_{\mathrm{r}}+{\mathit{\boldsymbol{K}}}_{\mathrm{r}}{\mathit{\boldsymbol{t}}}_{\mathrm{r}}\right) $ (1)

其中,$ {\left({\mathit{\boldsymbol{X}}}_{\mathrm{w}}, {\mathit{\boldsymbol{Y}}}_{\mathrm{w}}, {\mathit{\boldsymbol{Z}}}_{\mathrm{w}}\right)}^{\mathrm{{\rm T}}} $表示三维欧式空间中像素点的位置,$ {p}_{\mathrm{r}}=\left({u}_{\mathrm{r}}, {v}_{\mathrm{r}}\right) $表示参考图像平面上像素点的位置,$ {\mathit{\boldsymbol{K}}}_{\mathrm{r}}\mathrm{、}{\mathit{\boldsymbol{R}}}_{\mathrm{r}}\mathrm{、}{\mathit{\boldsymbol{t}}}_{\mathrm{r}} $分别表示参考图像摄像机坐标系的内参矩阵、旋转矩阵和平移矩阵,$ {\lambda }_{\mathrm{r}} $为参考图像摄像机缩放系数,取值为深度值。

步骤2  将三维欧式空间中的点投影到虚拟视点图像平面上,计算公式如下:

$ {\lambda }_{\mathrm{v}}{p}_{\mathrm{v}}={\mathit{\boldsymbol{K}}}_{\mathrm{v}}{\mathit{\boldsymbol{R}}}_{\mathrm{v}}\left[\begin{array}{l}{\mathit{\boldsymbol{X}}}_{\mathrm{w}}\\ {\mathit{\boldsymbol{Y}}}_{\mathrm{w}}\\ {\mathit{\boldsymbol{Z}}}_{\mathrm{w}}\end{array}\right]-{\mathit{\boldsymbol{K}}}_{\mathrm{v}}{\mathit{\boldsymbol{t}}}_{\mathrm{v}} $ (2)

其中,$ {p}_{\mathrm{v}}=\left({u}_{\mathrm{v}}, {v}_{\mathrm{v}}\right) $表示虚拟视点图像平面上像素点的位置,$ {\mathit{\boldsymbol{K}}}_{\mathrm{v}}\mathrm{、}{\mathit{\boldsymbol{R}}}_{\mathrm{v}}\mathrm{、}{\mathit{\boldsymbol{t}}}_{\mathrm{v}} $分别表示虚拟视点图像摄像机坐标系的内参矩阵、旋转矩阵和平移矩阵,$ {\lambda }_{\mathrm{v}} $是虚拟视点图像摄像机缩放系数,取值为深度值。

1.2 图像融合技术

双向DIBR技术利用不同视点之间的信息冗余性,即左侧虚拟视点图像中的空洞在右侧虚拟视点中不一定是空洞,因此可以用右侧虚拟视点的信息进行填补,反之亦然。传统的基于距离的图像融合公式如下:

$ {I}_{\mathrm{v}}(u, v)=\left\{\begin{array}{l}\alpha {I}_{\mathrm{L}}(u, v)+(1-\alpha ){I}_{\mathrm{R}}(u, v)\mathrm{ }, {I}_{\mathrm{L}}\ne 0\&\&{I}_{\mathrm{R}}\ne 0\\ {I}_{\mathrm{L}}(u, v)\mathrm{ }, {I}_{\mathrm{L}}(u, v)\ne 0\&\&{I}_{\mathrm{R}}(u, v)=0\\ {I}_{\mathrm{R}}(u, v)\mathrm{ }, {I}_{\mathrm{L}}(u, v)=0\&\&{I}_{\mathrm{R}}(u, v)\ne 0\\ 0, {I}_{\mathrm{L}}(u, v)=0\&\&{I}_{\mathrm{R}}(u, v)=0\end{array}\right. $ (3)

其中,$ {I}_{\mathrm{v}}(u, v) $是虚拟视点图像在$ (u, v) $处的像素值,$ {I}_{\mathrm{L}}(u, v)\mathrm{、}{I}_{\mathrm{R}}(u, v) $分别表示映射后左侧虚拟视点图像和右侧虚拟视点图像在$ (u, v) $处的像素值,$ \alpha $为权重因子,由参考视点与虚拟视点之间的距离决定,计算公式如下:

$ \alpha =\frac{\left|{\mathit{\boldsymbol{t}}}_{\mathrm{V}}-{\mathit{\boldsymbol{t}}}_{\mathrm{L}}\right|}{\left|{\mathit{\boldsymbol{t}}}_{\mathrm{V}}-{\mathit{\boldsymbol{t}}}_{\mathrm{L}}\right|+\left|{\mathit{\boldsymbol{t}}}_{\mathrm{V}}-{\mathit{\boldsymbol{t}}}_{\mathrm{R}}\right|} $ (4)

其中,$ {\mathit{\boldsymbol{t}}}_{\mathrm{V}}\mathrm{、}{\mathit{\boldsymbol{t}}}_{\mathrm{L}}\mathrm{、}{\mathit{\boldsymbol{t}}}_{\mathrm{R}} $分别为虚拟视点、左侧参考视点和右侧参考视点的平移向量。

传统的基于距离的图像融合方法能够消除由遮挡引起的虚拟图像中的大面积空洞,但是在图像直接融合后会出现前景物体中残留背景像素的重叠问题,如图 1(a)所示。由于物体边缘的前景像素映射到背景中,在直接图像融合后前景物体两侧均出现伪影,如图 1(b)所示。此外,图像融合后仍会剩余小部分空洞,如图 1(c)所示。本文将空洞周围在水平或垂直方向含有前景像素的这类空洞称为“特殊位置空洞”,由于空洞周围存在前景像素,直接融合后很难处理。

Download:
图 1 传统图像融合方法 Fig. 1 Traditional image fusion method
2 分层图像融合方法

为解决传统图像融合方法存在的问题,本文提出一种基于分层图像融合视点绘制算法。利用双向DIBR映射得到左、右虚拟视点图像,再分别对其进行伪影去除、前景和背景分割、分层融合等操作最终得到虚拟视点处的图像。虚拟视点生成算法流程如图 2所示,分层图像融合是本文算法的重点,主要是对重叠问题和空洞问题的后处理。

Download:
图 2 虚拟视点生成算法流程 Fig. 2 Procedure of virtual viewpoint generation algorithm
2.1 图像分层预处理

预处理工作包含两部分:

1)消除裂缝。由于像素点位置的舍入误差,在三维图像变换过程中,参考图像的像素点并不一定落到虚拟视点图像的整数像素位置上,因此形成裂缝。对正向映射得到的深度图进行中值滤波,再利用滤波后的深度图和虚拟视点图像进行逆向映射[18]消除裂缝,图 3(a)图 3(b)为裂缝消除后的左、右虚拟视点图像。

Download:
图 3 裂缝去除后的虚拟图像 Fig. 3 Virtual image after crack removal

2)消除伪影。由于深度图和纹理图在前景物体边缘处的不一致,导致前景物体的边界像素点会被错误地映射到背景区域。解决伪影的一种简单有效的方法是利用形态学对空洞区域进行膨胀,将处于背景区域的伪影作为空洞进行处理。具体步骤如下:

(1)提取深度图的掩模图记为$ \mathrm{m}\mathrm{a}\mathrm{s}\mathrm{k} $,对深度值$ \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{v}}(u, v) $为0的空洞区域进行标记,公式如下:

$ \mathrm{m}\mathrm{a}\mathrm{s}\mathrm{k}(u, v)=\left\{\begin{array}{l}1, \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{v}}(u, v)=0\\ 0, \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{v}}(u, v)\ne 0\end{array}\right. $ (5)

(2)对提取的掩模图$ \mathrm{m}\mathrm{a}\mathrm{s}\mathrm{k} $进行形态学膨胀操作,计算公式如下:

$ M=\mathrm{m}\mathrm{a}\mathrm{s}\mathrm{k}\oplus S $ (6)

其中,$ S $表示大小为$ 5\times 5 $的矩形结构元素,$ \oplus $表示形态学的膨胀操作。利用空洞膨胀后的掩模图$ M $就可以得到消除伪影后的左、右虚拟视点图像,如图 4(a)图 4(b)所示。

Download:
图 4 伪影去除后的虚拟图像 Fig. 4 Virtual image after artifact removal
2.2 基于分层图像融合的视点绘制 2.2.1 前景和背景分割

将深度信息引入到融合算法中,通过权重比例进行融合能够在一定程度上解决重叠问题,但不是使用原始真实的前景像素值进行填充[19]。本文算法对重叠问题进行后处理,在图像融合之前先对左、右虚拟视点图像进行前景和背景分割,可以有效地将存在于前景物体中的背景像素分割到背景图像中,这时原来前景物体中的背景像素区域将变成空洞区域,然后再进行分层融合,则使用的是真实的前景像素。

利用Canny算子检测深度图中深度值存在突变的物体边缘区域如图 5所示,本文使用的深度值是场景的实际深度值。

Download:
图 5 Canny算子边缘检测 Fig. 5 Canny operator edge detection

根据检测得到的物体边缘深度值的均值求取前景和背景分割的深度阈值$ T $,通过深度阈值$ T $指导左、右虚拟视点图像的前景和背景分割。若左侧虚拟视点在$ (u, v) $的深度值$ \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{L}}(u, v) $小于深度阈值$ T $,则认定为前景;若$ \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{L}}(u, v) $大于深度阈值$ T $,则认定为背景,因此得到左侧前景、背景分割图像$ {I}_{\mathrm{L}\mathrm{f}}(u, v) $$ {I}_{\mathrm{L}\mathrm{g}}(u, v) $的公式如下:

$ {I}_{\mathrm{L}\mathrm{f}}(u, v)=\left\{\begin{array}{l}{I}_{\mathrm{L}}(u, v)\mathrm{ }, \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{L}}(u, v)<T\\ 0, \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{L}}(u, v)>T\end{array}\right. $ (7)
$ {I}_{\mathrm{L}\mathrm{g}}(u, v)=\left\{\begin{array}{l}{I}_{\mathrm{L}}(u, v)\mathrm{ }, \mathrm{D}\mathrm{p}\mathrm{e}\mathrm{t}{\mathrm{h}}_{\mathrm{L}}(u, v)>T\\ 0, \mathrm{D}\mathrm{e}\mathrm{p}\mathrm{t}{\mathrm{h}}_{\mathrm{L}}(u, v)<T\end{array}\right. $ (8)

同理,可得右侧前景和背景分割图像$ {I}_{\mathrm{R}\mathrm{f}}(u, v) $$ {I}_{\mathrm{R}\mathrm{g}}(u, v) $,最终的前景和背景分割图像如图 6所示。

Download:
图 6 前景和背景分割图像 Fig. 6 Foreground and background segmentation image
2.2.2 图像分层融合

根据深度阈值分割得到的左侧虚拟视点前景和背景图像$ {I}_{\mathrm{L}\mathrm{f}}(u, v)\mathrm{、}{I}_{\mathrm{L}\mathrm{g}}(u, v) $以及右侧虚拟视点前景和背景图像$ {I}_{\mathrm{R}\mathrm{f}}(u, v)\mathrm{、}{I}_{\mathrm{R}\mathrm{g}}(u, v)\mathrm{ }, $利用基于距离的融合方法进行分层图像融合,可以使重叠问题得到解决。左侧前景图像和右侧前景图像在像素点$ (u, v) $处进行融合得到虚拟视点前景融合图像$ {I}_{\mathrm{f}}(u, v) $,公式如下:

$ {I}_{\mathrm{f}}(u, v)=\left\{\begin{array}{l}\alpha {I}_{\mathrm{L}\mathrm{f}}(u, v)+(1-\alpha ){I}_{\mathrm{R}\mathrm{f}}(u, v), \\ {I}_{\mathrm{L}\mathrm{f}}(u, v)\ne 0\&\&{I}_{\mathrm{R}\mathrm{f}}(u, v)\ne 0\\ {I}_{\mathrm{L}\mathrm{f}}(u, v)\mathrm{ }, {I}_{\mathrm{L}\mathrm{f}}(u, v)\ne 0\&\&{I}_{\mathrm{R}\mathrm{f}}(u, v)=0\\ {I}_{\mathrm{R}\mathrm{f}}(u, v)\mathrm{ }, {I}_{\mathrm{L}\mathrm{f}}(u, v)=0\&\&{I}_{\mathrm{R}\mathrm{f}}(u, v)\ne 0\\ 0, {I}_{\mathrm{L}\mathrm{f}}(u, v)=0\&\&{I}_{\mathrm{R}\mathrm{f}}(u, v)=0\end{array}\right. $ (9)

同理,可得背景融合图像$ {I}_{\mathrm{g}}(u, v) $,此时,进行分层融合后的前景物体中已经不存在背景像素,如图 7(a)所示,融合后的背景图像只有背景像素,如图 7(b)所示。

Download:
图 7 分层融合后的虚拟图像 Fig. 7 Virtual image after layered fusion
2.2.3 空洞收缩和背景填充

为尽可能地保留原始像素的真实值,本文提出一种空洞收缩的处理方法对伪影消除过程中扩大的空洞区域进行收缩。首先利用伪影去除后的前景融合图像$ {I}_{\mathrm{f}}(u, v) $和未进行空洞膨胀的前景融合图像$ {I}_{\mathrm{n}\mathrm{f}}(u, v) $,对需要空洞收缩区域进行标记$ \mathrm{h}\mathrm{o}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{h}\mathrm{r}\mathrm{i}\mathrm{n}\mathrm{k} $,再根据标记后的图像指导空洞收缩,公式如下:

$ \mathrm{h}\mathrm{o}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{h}\mathrm{r}\mathrm{i}\mathrm{n}\mathrm{k}(u, v)=\left\{\begin{array}{l}1, {I}_{\mathrm{f}}(u, v)\mathrm{ }=0\&\&{I}_{\mathrm{n}\mathrm{f}}(u, v)\ne 0\\ 0, \mathrm{其}\mathrm{他}\end{array}\right. $ (10)
$ {I}_{\mathrm{f}}(u, v)=\left\{\begin{array}{l}{I}_{\mathrm{n}\mathrm{f}}(u, v)\mathrm{ }, \mathrm{h}\mathrm{o}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{h}\mathrm{r}\mathrm{i}\mathrm{n}\mathrm{k}(u, v)=1\\ {I}_{\mathrm{f}}(u, v)\mathrm{ }, \mathrm{h}\mathrm{o}\mathrm{l}\mathrm{e}\mathrm{s}\mathrm{h}\mathrm{r}\mathrm{i}\mathrm{n}\mathrm{k}(u, v)=0\end{array}\right. $ (11)

在式(11)中,$ {I}_{\mathrm{f}}(u, v) $是最终空洞收缩后的前景融合图像,如图 8(a)所示,同理可得最终空洞收缩后的背景融合图像$ {I}_{\mathrm{g}}(u, v) $,如图 8(b)所示。

Download:
图 8 空洞收缩后的前景和背景融合图像 Fig. 8 Foreground and background fusion image after holes contraction

在空洞的后处理中,特殊位置空洞的处理最为关键。本文对只含有背景像素的背景融合图像$ {I}_{\mathrm{g}} $进行空洞填充,由于周围不存在前景像素,因此可以有效地解决特殊位置空洞的前景扩散问题。

考虑到用于空洞填充的经典的Criminisi算法的复杂度相对较高,本文利用大小为$ W=(2n+1)\times (2n+1) $窗口求像素均值方法对$ {I}_{\mathrm{g}} $进行背景空洞的填充。

最后将前景融合图像$ {I}_{\mathrm{f}} $覆盖空洞填充后的背景融合图像$ {I}_{\mathrm{g}} $得到虚拟视点处的图像,公式如下:

$ {I}_{\mathrm{v}\mathrm{i}\mathrm{r}}(u, v)=\left\{\begin{array}{l}{I}_{\mathrm{f}}(u, v)\mathrm{ }, {I}_{\mathrm{f}}(u, v)\ne 0\\ {I}_{\mathrm{g}}(u, v)\mathrm{ }, {I}_{\mathrm{f}}(u, v)=0\end{array}\right. $ (12)

其中,$ {I}_{\mathrm{v}\mathrm{i}\mathrm{r}}(u, v) $为最终的虚拟视点图像,如图 9所示。

Download:
图 9 分层融合后的虚拟视点图像 Fig. 9 Virtual viewpoint image after hierarchical fusion
3 实验与结果分析

为验证本文算法的有效性,实验将本文算法与经典Criminisi算法、文献[16]改进的相邻像素填充算法、文献[19]改进的视点合成算法、文献[20]深度引导的视点绘制算法进行主观和客观的比较。采用由微软研究院的交互视觉媒体组提供的Ballet和Breakdancers图像测试序列进行实验,共8个视点,每个视点的纹理图和深度图均为100帧,图像分辨率为1 024像素$ \times $768像素。在三维图像变换时,对于Ballet测试序列,以Cam3和Cam5作为参考视点,以Cam4作为目标视点,对于Breakdancers测试序列,以Cam2和Cam4作为参考视点,以Cam3作为目标视点,在不同帧之间进行了实验对比。Criminisi算法中的匹配块的大小设置为9$ \times $9,匹配源图是整幅虚拟图像。

不同算法之间和不同帧之间的主观质量对比如图 10~图 12所示。

Download:
图 10 Ballet序列重叠问题对比结果 Fig. 10 Comparison results of Ballet sequence overlap problems
Download:
图 11 Ballet序列空洞问题对比结果 Fig. 11 Comparison results of Ballet sequence hole problems
Download:
图 12 Breakdancers序列空洞问题对比结果 Fig. 12 Comparison results of Breakdancers sequence hole problems

图 10可以看出,对于重叠问题,Criminisi算法、文献[16]算法、文献[19]算法在胳膊处均存在背景像素,文献[20]利用深度进行插值避免背景像素覆盖前景像素,本文算法用真实的前景像素填充背景像素。从图 11图 12可以看出,对于处于特殊位置的空洞,其他4种算法均出现了前景像素的错误扩散,这是由于Criminisi算法进行空洞填充时不区分前景和背景像素进行逐层收缩,受前景像素的干扰较大。文献[16]利用一定范围的背景像素替换前景像素,对于特殊位置空洞仍会出现前景纹理的扩散,文献[19]同样受到前景像素的干扰,文献[20]降低了前景像素的干扰。将前景和背景进行分层融合,能够排除前景像素的干扰,避免前景纹理出现在背景中。

为进一步验证本文算法的有效性,采用峰值信噪比(Peak Signal-to-Noise Ratio,PSNR)和结构相似度(Structural Similarity,SSIM)作为客观质量的评价指标,其中,PSNR值越高,SSIM值越接近于1,则表明图像的质量越好。不同算法在Ballet和Breakdancers图像测试序列上的PSNR比较如图 13所示,可以看出本文算法和其他4种算法相比具有一定的优势,尤其是在Ballet、Breakdancers图像测试序列中,存在个别图像帧的PSNR值低于其他4种算法,但是整体上仍高于其他4种算法。

Download:
图 13 不同序列的PSNR比较 Fig. 13 PSNR comparison of different sequences

表 1表 2给出了不同测试序列以及不同算法之间的平均PSNR值和SSIM值,其中,$ \mathrm{\Delta } $PSNR1表示Ballet序列中本文算法的PSNR值与其他4种算法PSNR的差值,$ \mathrm{\Delta } $SSIM1表示本文算法的SSIM值和其他4种算法的SSIM的差值,同理,$ \mathrm{\Delta } $PSNR2和$ \mathrm{\Delta } $SSIM2表示Breakdancers序列中的差值。通过表 1表 2可以看出本文算法优于其他算法。

下载CSV 表 1 不同算法的平均PSNR比较 Table 1 Comparison of average PSNR of different algorithms 
下载CSV 表 2 不同算法的平均SSIM比较 Table 2 Comparison of average SSIM of different algorithms
4 结束语

本文针对三维映射后出现的重叠和空洞问题,提出一种基于分层图像融合的视点绘制算法。对左、右虚拟视图空洞区域进行膨胀来消除伪影,利用深度图进行前景和背景分割以及分层融合解决重叠问题,对融合后的背景图像进行填充解决特殊位置空洞问题。实验结果表明,与经典Criminisi等算法相比,本文算法绘制出的图像质量较高。但随着场景复杂度的增加,依靠单阈值进行前景和背景分割会降低绘制图像的准确率,为提高绘制图像的质量,进行合理的多阈值图像分割将是下一步的研究内容。

参考文献
[1]
TANIMO M. FTV: free-viewpoint television[J]. Signal Processing: Image Communication, 2012, 27(6): 555-570. DOI:10.1016/j.image.2012.02.016
[2]
LU Xiaohan, WEI Fang, CHEN Fangmin. Foreground-object-protected depth map smoothing for DIBR[C]//Proceedings of IEEE International Conference on Multi-media and Exposition. Los Alamitos, USA: IEEE Computer Society Press, 2012: 339-343.
[3]
XU X Y, PO L M, NG K H. Depth map misalignment correction and dilation for DIBR view synthesis[J]. Signal Processing: Image Communication, 2013, 28(9): 1023-1045. DOI:10.1016/j.image.2013.04.003
[4]
LEI Jianjun, ZHANG Cuicui, WU Min, et al. A divide-and-conquer hole-filling method for handling disocclusion in single-view rendering[J]. Multimedia Tools and Applica-tions, 2017, 76(6): 7661-7676. DOI:10.1007/s11042-016-3413-3
[5]
LIANG Haitao, CHEN Xiaodong, XU Huaiyuan, et al. Virtual view rendering based on depth map preprocessing and image inpainting[J]. Journal of Computer-Aided Design & Computer Graphics, 2019, 31(8): 1278-1285. (in Chinese)
梁海涛, 陈晓冬, 徐怀远, 等. 基于深度图预处理和图像修复的虚拟视点绘制[J]. 计算机辅助设计与图形学学报, 2019, 31(8): 1278-1285.
[6]
LASANG P. Optimal depth recovery using image guided TGV with depth confidence for high-quality view synthesis[J]. Journal of Visual Communication & Image Representation, 2016, 39: 24-39.
[7]
LOU Daping, WANG Xiaodong, FU Xianzu, et al. Virtual view point rendering based on range image segmentation[J]. Computer Engineering, 2016, 42(10): 12-19. (in Chinese)
娄达平, 王晓东, 富显祖, 等. 基于深度图像分割的虚拟视点绘制[J]. 计算机工程, 2016, 42(10): 12-19.
[8]
WANG Qi, CAO Ning. The hole-filling method for view synthesis in free viewpoint television and 3D video[C]//Proceedings of IEEE International Conference on Electric Information and Control Engineering. Washington D.C., USA: IEEE Press, 2011: 1805-1807.
[9]
WANG Hui, CHEN Fen. Virtual view rendering algorithm based on spatial weighting[J]. Computer Engineering and Applications, 2016, 52(8): 174-179, 195. (in Chinese)
汪辉, 陈芬. 基于空间加权的虚拟视点绘制算法[J]. 计算机工程与应用, 2016, 52(8): 174-179, 195. DOI:10.3778/j.issn.1002-8331.1508-0157
[10]
CRIMINISI A, PÉREZ P, TOYAMA K. Region filling and object removal by exemplar-based image inpainting[J]. IEEE Transactions on Image Processing, 2004, 13(9): 1200-1212. DOI:10.1109/TIP.2004.833105
[11]
MULLER K, SMOLIC A, DIX K, et al. View synthesis for advanced 3D video systems[J]. EURASIP Journal on Image and Video Processing, 2009(1): 438-448. DOI:10.1155/2008/438148
[12]
WANG Dan, ZHAO Yan, WANG Zheng, et al. Hole-filling for DIBR based on depthand gradient information[J]. International Journal of Advanced Robotic Systems, 2015, 12(1): 39-42.
[13]
LI Ying. Research on virtual viewpoint rendering algorithm based on depth image[D]. Taiyuan: North University of China, 2017. (in Chinese)
李英. 基于深度图像的虚拟视点绘制算法研究[D]. 太原: 中北大学, 2017.
[14]
WANG S M. Recursive line-based algorithm forhole-filling in DIBR images[J]. Journal of Computer-Aided Design & Computer Graphics, 2017, 29(8): 1536-1541.
[15]
YANG Jie, LI Zhaoxin, WANG Suqin, et al. Virtual viewpoint rendering based on hole filling[J]. Computer Engineering, 2017, 43(10): 234-240, 245. (in Chinese)
杨婕, 李兆歆, 王素琴, 等. 基于空洞填补的虚拟视点绘制[J]. 计算机工程, 2017, 43(10): 234-240, 245.
[16]
YU Li, GUO Li, YUAN Hongxing. A novel method of depth-image-based view synthesis[J]. Journal of the Graduate School of the Chinese Academy of Sciences, 2010, 27(5): 638-644.
[17]
MEI Ning. Reserch on layered virtual view synthesis technology[D]. Nanjing: Southeast University, 2016. (in Chinese)
梅宁. 基于分层的虚拟视点合成技术的研究[D]. 南京: 东南大学, 2016.
[18]
ZINGER S, DO L, DE WITH P H N. Free-viewpoint depth image based rendering[J]. Journal of Visual Communication and Image Representation, 2010, 21(5): 533-541.
[19]
WANG Lu, LAI Chunlu. A modifiedtw o-viewpoint DIBR based virtual view synthesis method[J]. Journal of Shandong University(Natural Science), 2016, 51(3): 122-131, 142. (in Chinese)
王路, 赖春露. 一种基于两视点DIBR的改进虚拟视点合成方法[J]. 山东大学学报(理学版), 2016, 51(3): 122-131, 142.
[20]
LOU Daping, WANG Xiaodong, FU Xianzu, et al. A virtual view rendering method based on depth-guided hole filling[J]. Computer Applications and Software, 2017, 34(6): 162-168. (in Chinese)
娄达平, 王晓东, 富显祖, 等. 基于深度引导空洞填补的虚拟视点绘制方法[J]. 计算机应用与软件, 2017, 34(6): 162-168. DOI:10.3969/j.issn.1000-386x.2017.06.030