Print

发布时间: 2018-09-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.180035
2018 | Volume 23 | Number 9




    图像理解和计算机视觉    




   <<上一篇 




   下一篇>> 





树木结构层次细化的立体树木图像构建
expand article info 董天阳, 陈东方, 杨丽锦, 姚佳洁, 范菁
浙江工业大学计算机科学与技术学院, 杭州 310023

摘要

目的 2维转3维技术可以将现有的丰富2维图像资源快速有效地转为立体图像,但是现有方法只能对树木的整体进行深度估计,所生成的图像无法表现出树木的立体结构。为此,提出一种树木结构层次细化的立体树木图像构建方法。方法 首先利用Lab颜色模型下的像素色差区别将2维树木图像的树干区域和树冠区域分割开来,并对树冠区域进行再分割;然后,在深度梯度假设思想基础上建立多种类型的深度模板,结合深度模板和树冠的区域信息为典型树木对象构建初始深度图,并通过基础深度梯度图组合的方式为非典型树木进行个性化深度构建;最后,根据应用场景对树木深度信息进行自适应调整与优化,将树木图像合成到背景图像中,并构建立体图像。结果 对5组不同的树木图像及背景图像进行了立体树木图像的构建与合成。结果表明,不同形态的树木图像都能生成具有层次感的深度图并自适应地合成到立体背景图像中,构建树木图像深度图的时间与原始树木图像的尺寸成正比,而构建立体树木图像并合成到背景中所需时间在2~4 s之间。对立体图像质量的主观评价测试中,这些图像的评分均达到良好级别以上,部分立体图像达到了优秀级别。结论 该方法充分利用了树木的形态结构特征,能同时适用于典型和非典型树木,所构建的立体树木图像质量较高,具有丰富的层次感,并具有舒适的立体观看效果。

关键词

树木图像; 立体图像; 图像合成; 深度模板; 树木结构

Construction of 3D tree image with hierarchical tree structures
expand article info Dong Tianyang, Chen Dongfang, Yang Lijin, Yao Jiajie, Fan Jing
College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China
Supported by: National Natural Science Foundation of China (61672464, 61572437)

Abstract

Objective 2D to 3D technology can quickly and effectively transfer the existing rich resource of 2D images into 3D images. However, existing methods only consider depth estimation on the entire object of a tree in the process of depth map generation. In this way, the tree in the final 3D images generated would normally lack a sense of depth and look like a piece of paper stuck on the background. The depth map generated by these methods cannot show the natural three-dimensional structural features of trees and has no sufficient rich stereoscopic levels to show the layering on the trees. To this end, this paper presents a 3D tree image construction method on the basis of depth template. Method In our proposed method, we first utilize the color difference of pixels under the laboratory color model to divide the 2D tree image into trunk and canopy areas and then divide the canopy area again into several small areas by using multiscale spectral-based image segmentation method. Then, considering the assumption of depth gradient hypothesis, we create various types of basic depth templates. In addition to the six commonly used basic depth templates, two new basic depth templates are added on the basis of the structural features of the trees. In accordance with the complexity of the morphology of trees, this paper divides the tree objects into two major categories:typical and atypical trees. The typical trees are those with regular shapes and can basically belong to the four typical tree models of spherical, conical, cylindrical, and wide spread shapes. The atypical trees are inconsistent with the basic characteristics of the existing four tree models. The initial depth maps of typical tree objects are constructed by combining the basic depth template and the area information of canopy. For the atypical tree object, we first select some basic depth templates to generate a personal depth temple, and then a personalized initial depth map is constructed through the combination of the personal depth temple and the tree's canopy area information. Finally, the tree depth information is adjusted and optimized adaptively in accordance with the application scene. 3D images of trees are adaptively adjusted in accordance with the depth information of the corresponding position of the background to obtain a depth map consistent with the background depth information. In addition, different objects in the scene are located at different depths, so when the tree images are synthesized into the background image, the occlusion between the objects in the scene needs to be adjusted. After the abovementioned process, the tree image is synthesized into the background image and the 3D image is constructed. Result To verify the effectiveness and practicability of our method, we used different background and tree image materials to create 3D image pairs. We show the five generated 3D images from the experiment in this paper. The experimental results show that all the tree images of different sizes, namely, typical and atypical, can produce layered depth images and can be adaptively synthesized into different 3D background images. The operating efficiency of the system is stable, and the time required to construct the stereoscopic image is linearly related to the size of the original tree image, which means that the run-time growth would not be explosively increased due to the increase in tree image size. In the subjective evaluation test on the stereoscopic image quality, we conducted tests and statistics on three aspects:3D image pair quality, depth map quality, and 3D comfort situation. Five different ratings are available for each aspect, covering all aspects related to the quality of the 3D image. In accordance with the statistics of each item, we obtain the total score under the percentile and then divide the total score into five grades:excellent, good, medium, normal, and poor. In the test, the ratings for these images all reach good levels, and some of them even achieve excellent levels. Conclusion To naturally blend 3D trees and 3D background images and enhance the 3D display of trees, by using the morphological characteristics of trees, this paper presents a 3D tree image construction method on the basis of depth template. The method takes full advantage of the morphological characteristics of trees and can be applied to both typical and atypical trees. The constructed 3D trees have a high image quality and comfortable stereoscopic effect. The depth template used in this paper presents a greater improvement in the depth sense of trees in 3D images than the existing methods.

Key words

tree image; 3D image; image synthesis; depth template; tree structure

0 引言

立体图像(3D image)是由赋予适当视差的左眼视图和右眼视图两幅图像组成的,当两者分别映入观察者双眼时,可以在双目视觉的作用下产生立体视觉感受。立体图像的获取主要有两种方式,一种是使用双目摄影机、立体照相机等设备进行图像采集,此类方式的3维立体图像制作周期较长,成本较高;另一种方式是利用现有的普通2维图像,经过图像处理得到立体图像,这类方法适用于大多数简单图像,但对复杂的图像场景的制作,处理过程也比较困难。

立体树木图像是指包含树木对象的立体图像,广泛应用在虚拟场景的构建中,如虚拟森林、城市规划、景观设计等。由于树木对象在场景中重复出现的频次较高,并且具有特殊结构特点,可以在普通2维树木图像中增加树木深度信息的方式,将其制作成为立体树木图像。此种方式不但可以提高图像素材的利用效率,还可以增加树木场景设计的灵活性和便捷性,从而降低3维场景图像的制作成本和周期。

深度信息的准确性会影响立体图像的视差构建,进而影响立体图像的视觉效果。常见的2维图像的深度信息构建方法主要有两大类:一类是基于双幅或多幅2维图像的特征匹配来估计视差,从而推算出深度图。这类方法往往被应用于双目立体视觉匹配或者基于视频序列的深度信息估计中。另一类是基于单幅2维图像的深度信息构建方法,这类方法从图像的空间、结构、纹理、色彩或者亮度等特征出发进行深度信息构建,难度相对更大。常见的单幅2维图像深度图构建方法包括:深度梯度假设方法、基于机器学习的深度获取方法和相似场景的深度迁移方法等。

深度梯度假设的方法主要通过梯度模板模拟图像的深度变化特征。如Cheng等人[ 1]所提出的基于边界信息的方法:对于自然场景图像,先通过边界检测将图像分区,再利用深度假设梯度的方式生成深度图,最后将深度信息运用至具体场景中。王平等人[ 2]提出的基于区域融合图像的深度获取方法,首先根据像素颜色特征实施区域合并,随后用假设深度梯度图对区域进行深度分配。该类方法对目标2维图像的层次布局有特定要求,可以针对具体图像类别进行借鉴和改进。

在基于机器学习的深度获取方法中,Lim等人[ 3]通过三角形小块的方法,利用每个三角区块深度信息不连续性和色彩特性对所采集的稀疏深度图进行重建,对不规则的深度区域构建具有较好效果。Make 3D[ 4]是另一种基于图像的小区块方法,并通过马尔可夫无监督学习的方法感知立体信息的细节。此外,Jung等人[ 5]利用贝叶斯学习算法实现图像物体的分类,从而根据物体的种类进行深度赋值得到深度图。Fang等人[ 6]则提出了一个结构森林框架来从单个RGB图像推断深度信息。由于该类方法侧重图像的局部特征信息,所获取的深度图比较粗略,深度图的整体层次布局仍有提升空间。

相似场景的深度迁移方法即充分利用图像库中所隐含的知识来指导输入图像[ 7]。基于相似场景图像可能具有相似深度信息的假设,Konrad等人[ 8]从现有立体图像中提取相似场景的深度信息,并通过中值算法对这些信息进行合并,从而用于2维图像的深度图构建。袁红星等人[ 9]通过语义排序[ 10]的方法对相似场景进行匹配,并通过SIFT算法建立目标场景图像与相似场景图像的像素级对应,由此将匹配所得深度信息迁移至目标2维场景中。

但是,将2维图像中提取的树木模型应用和融合到新的立体图像时,现有的方法一般只对树木的整体作深度估计,导致立体图像中树木纸片化,无法突出树木各个部位深度的差异,体现不了树木3维结构的立体效果。这样使得立体树木图像与立体背景图像无法进行自然地融合,影响了树木的立体显示效果。如果使用这些常见的单幅2维图像深度图获取方法,首先由于缺少大量的深度先验知识,基于相似场景深度迁移的方法在本文的树木深度信息构建中并不适用;基于机器学习的深度获取方法考虑了局部特征而忽视了深度变化的全局性;而基于深度梯度假设的深度获取方法虽然从全局层次进行考虑,在提高效率的同时对局部深度信息构建的细节有所缺失,因而需结合树木特点进一步对上述方法从局部和全局特征综合考虑来完成树木深度信息的构建。

因此,为了让立体树木图像与立体背景图像自然地融合,并提升树木的立体显示效果,本文提出了一种树木结构层次细化的立体树木图像构建方法。该方法通过分析树木本身的空间结构特征,利用深度模板初始化树木深度图,并根据立体背景图像的深度信息进行深度合成优化,将立体树木图像合成到立体背景图像中。实验结果表明,本文提出的立体树木图像构建方法能适用于典型和非典型树木,所构建的立体树木图像质量较高,并具有舒适的立体视觉效果。

1 树木结构层次细化的树木深度信息构建

1.1 树木结构分析与区域分割

树木结构分析与区域分割是通过树冠和树干的色差对树木的两部分结构进行分离,并通过多尺度图分割的区域划分方法对树冠部分实施再分割,由此作为后期树木深度信息构建的先验知识。树木结构分析与区域分割的主要步骤如 图 1所示。

图1 树木结构分析与区域分割过程
Fig. 1 The process of tree structure analysis and regional segmentation
" href="PIC/zgtxtxxb-23-9-1382-1.jpg">



图 1 树木结构分析与区域分割过程
Fig. 1 The process of tree structure analysis and regional segmentation

基于Lab颜色模型的树木结构分割可分为以下几步:

1) 输入彩色树木图像,作为目标图像,如 图 2(a)所示;

图2 树木的结构分析与区域分割示例
Fig. 2 The sample of tree structure analysis and regional segmentation((a)target tree; (b)trunk; (c)canopy; (d)segmentation in canopy area)
" href="PIC/zgtxtxxb-23-9-1382-2.jpg">



图 2 树木的结构分析与区域分割示例
Fig. 2 The sample of tree structure analysis and regional segmentation((a)target tree; (b)trunk; (c)canopy; (d)segmentation in canopy area)

2) 将彩色图像的颜色空间从RGB模型转化至Lab模型;

3) 对Lab颜色模型下的目标图像的各个像素值进行K-means聚类[ 11]

4) 根据各个聚类集的特征对比,确定树干类,并实行基于形态学方法[ 12]的去噪处理, 由此获得目标树木的树干图像,如 图 2(b)所示;

5) 根据树木原始形态分离出树木对象的树冠部分,如 图 2(c)所示。

为了使树木的树冠结构能够科学有效地进行区域划分,利用基于多尺度图谱的分割方法[ 13],通过计算不同尺度中邻近像素间的相似程度来对树冠区域进行再划分。首先根据树冠区域的亮度和轮廓特征进行图像边界编码,并在此基础上完成最优归一化分割的计算。 图 2(d)所示为对树冠部分进行再分割的结果,该方法能够将树冠划分为较为均匀的多个区块。

1.2 树木深度模板的构建

深度梯度假设方法常常被应用于单幅2维图像的室内场景或是室外场景的深度信息假设中,采用不同变化方向的渐变深度来模拟景物的深度变化情况。深度梯度假设的内容是深度阶梯化过渡的情况,常用的深度图梯度有left、left-down、up-bottom、bottom-up、right-down和right等6种[ 1],如 图 3所示。

图3 常用的深度梯度图
Fig. 3 Commonly used depth gradient map
" href="PIC/zgtxtxxb-23-9-1382-3.jpg">



图 3 常用的深度梯度图
Fig. 3 Commonly used depth gradient map

然而,对于大多数树木深度信息的变化特点,上述6种深度梯度并不能完全满足树木深度模板构建的需求。因为大多数树木具有对称性的结构,本文增设了两个基础深度梯度假设图,分别名为bottom-mid-up和left-mid-right,代表大多数树木的树冠从上至下与从左至右两个方向上的深度变化趋势,如 图 4所示。利用这8种基础深度梯度图的合并与重组,可以为各种类型树木构建深度信息。

图4 本文新增深度梯度图
Fig. 4 New depth gradient map added
" href="PIC/zgtxtxxb-23-9-1382-4.jpg">



图 4 本文新增深度梯度图
Fig. 4 New depth gradient map added

由于树木的形态结构复杂多变,有限数量的深度模板不一定能满足所有树木的深度构建需求。因此,本文依照树木形态的复杂程度,将树木对象分为典型树木和非典型树木两大类。典型树木是指外形规则,能够基本归属于球形、锥形、圆柱形和宽展开形4种典型树木模型的树木,如 图 5所示;而非典型树木是指与现有树木模型的基本特点不一致的树木。针对非典型树木,本文提出了个性化模板构建的方法,可以根据树木个体的具体情况来构建新的深度模板。

图5 典型树木的4种类型
Fig. 5 Four types of typical trees
" href="PIC/zgtxtxxb-23-9-1382-5.jpg">



图 5 典型树木的4种类型
Fig. 5 Four types of typical trees

通过分析可知,球形树木的树冠深度信息特点是:水平方向上的深度距离先变小,再变大;垂直方向上的深度距离也是先变小后变大。因此,为这一类树木的树冠构建深度模板时,利用 图 3中left-mid-right和bottom-mid-up两种基础深度梯度图组合得到球形深度梯度模板。由此,为4种典型树木分别构建了4种深度模板,如 图 6所示,其中 图 6(a)为各类型树木的模型及对应主视图, 图 6(b)为模板构建时所用到的基础深度梯度图, 图 6(c)为深度模板。由于4种基本树木类型的树冠形状依次为圆形、矩形、三角形和六边形,可以通过树冠形状与4种典型树木主视图形的相似度匹配[ 14],找到相似度最高的树木类型,并将该类型的典型树木模板作为对应树木的深度模板。

图6 典型树木的深度模板
Fig. 6 Depth template of typical trees((a)tree type; (b)base depth gradient map; (c)depth template)
" href="PIC/zgtxtxxb-23-9-1382-6.jpg">



图 6 典型树木的深度模板
Fig. 6 Depth template of typical trees((a)tree type; (b)base depth gradient map; (c)depth template)