Print

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




    计算机图形学    




  <<上一篇 




  下一篇>> 





不同类型高度图控制浅浮雕模型生成方法
expand article info 尚菁1, 余文杰1, 王美丽1,2,3
1. 西北农林科技大学信息工程学院, 杨凌 712100;
2. 农业农村部农业物联网重点实验室, 杨凌 712100;
3. 陕西省农业信息与智能服务重点实验室, 杨凌 712100

摘要

目的 数字浅浮雕是在平面载体上塑造高低起伏形象的一种造型艺术,具有独特的结构及视觉效果,应用场景极为广泛。为了增加数字浮雕设计的多样性,实现浮雕的风格化应用,提出一种基于高度图的浅浮雕模型生成方法。方法 引入掩模理论,利用掩模操作对待处理的图像进行处理,融合图像处理技术,控制所要生成浮雕不同部位的高度,得到控制浮雕生成效果的高度图,借鉴已有的浅浮雕模型生成方法,利用基于高斯混合模型的滚动引导法向滤波(Gaussian mixture model based rolling guidance normal filtering,GRNF)进行法向分解,基于SfG(surface from gradients)的局部调整和全局重建的方法进行曲面重建,采用拉普拉斯算子及双边滤波器进行去噪平滑处理,最终生成不同高度风格的浅浮雕模型。结果 实验结果表明,本文方法能够生成带有不同视觉效果的浅浮雕模型,通过对细节特征及结构特征相关参数的调整,均能够生成轮廓清晰、细节丰富的浅浮雕模型。结论 本文提出的基于高度图的浅浮雕模型生成方法能够为浅浮雕的多样化设计提供新的思路和方法,在家居装饰行业中有重要的应用价值。

关键词

浅浮雕; 法向分解; 几何重建; 高度图; 掩模理论

Bas-relief generation controlled by different height maps
expand article info Shang Jing1, Yu Wenjie1, Wang Meili1,2,3
1. College of Information Engineering, Northwest A&F University, Yangling 712100, China;
2. Key Laboratory of Agricultural Internet of Things, Ministry of Agriculture and Rural Affairs, Yangling 712100, China;
3. Shaanxi Key Laboratory of Agricultural Information Perception and Intelligent Service, Yangling 712100, China
Supported by: National Natural Science Foundation of China (61402374); Key Laboratory of Agricultural Internet of Things, Ministry of Agriculture and Rural Affairs (2018AIOT-09)

Abstract

Objective Digital bas-relief is a special model that is either raised or lowered and is usually attached to a planar background. The spatial structure of a digital bas-relief lies between a 3D shape and a flat shape. Despite taking up limited space, a bas-relief contains a rich amount of details. Given its unique spatial structure and visual effects, a bas-relief can be applied across various fields. Various bas-relief models have been applied in designing ceramic vessels, wooden carvings, and coin badges, among others. Given its effective space utilization and excellent visual presentation, the bas-relief has been increasingly applied in decoration. However, with the continuous development of digital technology and 3D printing, the demand for and the requirements of bas-relief generation have become increasingly diverse. To enhance the diversity of digital bas-relief design and realize its stylized application, generating a bas-relief model based on height maps has been examined in the literature. Designing and adjusting the height map of relief works can help obtain highly efficient and intuitive embossed decorated models. Method By introducing masks and integrating image processing technology, a height map is generated to control the relief effect, and the existing bas-relief model generation method is adopted to generate bas-relief models with different styles. Masks have an important application value in the field of image processing. A mask is used to control the height of the local area and different areas of the relief to obtain different height information. Through this mask, a normal map with different height information can be obtained and used as input for the bas-relief model generation algorithm. This algorithm normalizes the vectors of different height information. Normal information processing offers two key advantages. On the one hand, transforming normal information can directly reflect surface variation characteristics, which play important roles in the later stages of geometric reconstruction. On the other hand, the depth value discontinuity caused by occlusion does not pose a problem because normal information ignores the differences in distance. In this paper, a Gaussian mixture model based rolling guidance normal filtering (GRNF) is applied in a normal decomposition operation. This model involves two steps. First, by using the rolling guide normal filtering algorithm, a rough structural side layer is decomposed from the original normal layer, and then the original normal layer and rough structure are subtracted to obtain a rough detail layer. Second, by using the expectation-maximization algorithm to solve the final parameter estimated by the Gaussian mixture model, the remaining detail and structural layers that contained tailed information can be separated in the coarse detail layer. After passing the filter based on the rolling guide, a structural layer with the overall contour feature of the relief model and a detail layer that retains the detailed feature information can be obtained. Finally, the surface of the decomposed detail and structural layers is reconstructed. Surface construction based on surface-from-gradients (SfG) local adjustment and global reconstruction is applied to transform the continuous surface reconstruction into a discrete space, and the surface reconstruction problem is effectively solved via least squares optimization. After obtaining the geometric model via surface reconstruction, some noise or interference can influence the visual effect of the bas-relief model. Laplacian smoothing and bilateral filters are then used for smoothing and denoising to obtain the final bas-relief model. Result Mask processing is used to control the height of the relief model and ensure the diversity of relief model generation. A model that references the existing bas-relief model generation algorithm shows a better generation effect. By setting the detail parameters of the adjustment model, the structural and flatness parameters of the overall relief are effectively controlled, and the bas-relief model can be used for diversification. A bas-relief model with different visual effects is eventually obtained. The experiment lists some elements, including pillows and tables, in the home decoration industry. The bas-relief models generated by masking also have unique characteristics and can be applied in decorating vases and walls. By adjusting their detail and structural features, bas-relief models can meet diverse needs, have clear outlines, and rich amounts of detail. Conclusion Height-map-based bas-relief model generation method can benefit the design of bas-relief model sand help meet the demands in home decoration. Results of this study can be combined with the existing 3D printing technology and applied in the production and processing of embossed products.

Key words

bas-relief; normal decomposition; geometric reconstruction; height map; mask theory

0 引言

浮雕是雕塑艺术的一种,既可作为单件艺术品以供欣赏,也可用来装饰建筑物和用具器物,丰富和美化空间环境,如图 1(a)(b)所示。浮雕分为浅浮雕、高浮雕和凹浮雕3种类型。与高浮雕相比,浅浮雕中场景元素取自浮雕平面,空间结构既表现了3维立体形态,又兼具平面形态,所占空间较小,细节信息却极为丰富,是一种能够在有限空间内为观赏者提供更多信息的艺术形式。

图 1 具有浮雕装饰的用具器物
Fig. 1 Depth map and depth sensitive map ((a) embossed wall; (b) embossed utensil; (c) auspicious symbol of relief; (d) receptacle cylinder made with 3D printing technology)

浅浮雕装饰作为一种美观大方的工业艺术品已广泛用于日常生活。随着科技发展和人类审美的提高,对浅浮雕的具象表现和抽象表现提出了更高的要求和需求,尤其是装饰中对浅浮雕的多样性需求,已不仅是以一种简单的装饰附属物存在,而是借助层次差异性及风格迥异的浮雕装饰,赋予并传达多种主观情感和寓意,如图 1(c)所示。传统的浅浮雕制作是由专业技术人士纯手工雕刻,费时费力,且成形的浅浮雕作品不易修改和编辑。随着人工智能、数字化技术和3D打印技术的发展,数字浮雕的生成技术成为计算机图形学领域的研究热点,同时,利用计算机辅助生成浮雕模型,能够大幅提高浮雕产品多样性制作的效率,为浮雕艺术品工业化发展提供了基础保障(Kerber等,2012)。图 1(d)展示的是利用3D打印技术制造的具有浮雕装饰的置物筒。

本文提出了一种基于高度图来增加浅浮雕模型多样性的方法,通过引入不同的掩模对物体区域的高度进行控制,然后对包含不同高度信息的法矢图进行法向分解和几何重构,最后使用拉普拉斯算子和双边滤波分别进行去噪和平滑,使生成的浅浮雕模型能够呈现出更好的视觉效果。本文贡献如下:1)将基于掩模的图像处理方法应用到浅浮雕的生成中,通过高度控制,为浅浮雕生成的多样性研究提供了新的思路和参考,同时用户可以通过交互式调节浮雕生成过程中的参数来控制最终浅浮雕模型的生成效果。2)通过掩模及浮雕参数化控制,将数字浮雕的应用拓展到家居装饰行业。借助计算机及3D打印技术,为数字化浮雕的生成提供了便利和保证。

1 相关工作

1.1 掩模理论

掩模是由0和1组成的二进制图像,多用于图像处理过程。首先用选定的图像、图形或物体,对待处理的图像进行全局或局部的遮挡,以此控制图像处理的区域或处理过程。王庆敏和赵亮(2017)将掩模应用到图像前景提取中,能够快速准确提取用户感兴趣的信息。陈恺煊等人(2018)通过将梯度图像经边缘检测得到的双线条图像作为掩模,消除了原梯度图中的伪边缘。

1.2 基于3维模型的浅浮雕生成方法

Cignoni等人(1997)开创了由3维场景到浅浮雕建模的研究,直接对视场空间的高度值进行非线性的缩放,考虑距离摄像机的远近,较近的给出更高的深度范围,然后生成有透视效果的高度场,但是对一些深度值较为复杂的场景,该方法难以达到预期效果,更适合于生成高浮雕模型。

Weyrich等人(2007)考虑深度值不连续产生的问题,提出了一种基于骨架融合过滤器来保持特征信息的方法,通过非线性方式改变高度场的梯度值来确保不连续梯度的精确性。He等人(2007)通过引入图像处理中的高动态范围图像压缩(Fattal等,2002),结合3维网格模型的显著性特征,并建立模型的泊松方程,然后进行线性压缩,再求解泊松方程,最终生成的浮雕能保留一些细节特征信息,但未考虑浮雕模型的轮廓线,容易出现形变问题。Kerber等人(2007)提出了一种基于3维模型的梯度场进行压缩的细节特征保留算法,在梯度空间中处理模型的几何信息,可以很好地保留模型的细节信息。Kerber等人(2010)通过采用双线性滤波技术,利用双边滤波进行高频信息和低频信息的分离,然后在多尺度空间利用非线性压缩技术更有效地保留3维模型的表面细节信息。上述方法均是高动态范围压缩在几何模型中的变形,需要将3维模型转换成一种观察视图的高度场。李博等人(2011)通过对模型进行拉普拉斯分解,将3维模型分解为基础网格、拉普拉斯算子及更高次算子,然后对分解后的各部分采取不同的压缩策略进行深度压缩,最后叠加以生成浅浮雕。之后,李博等人(2012)从信号处理角度出发,控制频谱的分割和扩散函数的参数实现浮雕模型细节的增强。Sun等人(2009)直接对3维模型的高度场进行操作,采用梯度信息作为附加权重和基于改进的均衡直方图方法,开发了保持良好细节信息的自动浮雕生成系统,允许用户在多尺度上区分物体特征,产生的效果较好,但计算量较大,预处理过程比较耗时。另外,Zhang等人(2013)考虑利用空间双线性滤波提取细节信息,同时采用基于视觉的坐标纹理映射技术以及自适应压缩函数实现3维浮雕的实时生成。为了满足浮雕的多样化,Miao等人(2018)提出了一种基于几何纹理丰富度的可控数字浮雕合成方法,可以通过统一的建模框架同时生成浅浮雕和高浮雕。

1.3 基于2维图像的浅浮雕生成方法

除了从3维模型生成浅浮雕外,还可以从图像的角度考虑生成效果较好的浅浮雕。SfS(shape from shading)是一种从单幅图像产生3维物体表面的方法,也可以用来产生类似浮雕的效果。传统的SfS并不适合用来设计浮雕,原因在于不同的光照条件下生成的3维物体表面并不唯一,所以需要凭借人类的观察和知识产生一个合适的表面(Horn和Brooks,1986)。然而,Wu等人(2008)提出的交互式SfS可以生成比较合适的浅浮雕表面,但是需要大量用户交互操作,且不适用于彩色或者具有复杂纹理的图像。

在此之前,He等人(2007)已经提出了一种应用进化理论生成浅浮雕的方法,可以产生非常自然且具有艺术效果的浅浮雕。Alexa和Matusik(2010)提出了一种基于两幅图像的自动生成浮雕技术,首次尝试在不同方向光源条件下,产生不同的浅浮雕效果。Wang等人(2010)通过对图像在梯度域上进行图像增强、应用衰减函数等操作,最后通过求解泊松方程产生浅浮雕模型。Zeng等人(2014)参照浮雕艺术家制作浮雕的真实过程,依据图像中不同物体整体或局部的相对高度进行分层排序,从而构建浮雕。Sohn(2017)提出了一种可以将智能手机或摄像机拍摄的图像生成数字浮雕的新方法,将输入照片的深度值进行压缩得到整体结构特征图,并与利用像素值构造的细节特征图进行融合,构成新的深度图。朱钰恒等人(2018)针对由图像生成浅浮雕的过程中的细节特征问题和特征的空间相对位置问题,提出了一种基于叠加操作的图像浅浮雕模型生成算法,将压缩图像灰度值的补集得到的修正轮廓与压缩灰度值得到的基础轮廓叠加得到浮雕的轮廓,然后通过去雾来增强细节特征,压缩细节特征得到细节轮廓,最后将细节轮廓与浮雕轮廓叠加从而增强浮雕的细节特征。

由于图像信息并不能准确反映几何特征,故需要大量的用户交互进行几何形体恢复,且基于图像的浮雕生成技术在浮雕产品选择上也有一定的局限性,仅能生成效果较好的人脸浮雕(To和Sohn,2017Wu等,2014)、中文书法浮雕(Zhang等,2018)以及砖片浮雕(Li等,2012)等。

1.4 基于法矢图的浅浮雕生成方法

近年来,研究者从法矢图出发来研究浮雕生成技术。Ji等人(2014a)提出了基于法矢图的浮雕编辑方法,可以进行直观的风格控制。之后Ji等人(2014b)通过迁移细节信息生成了风格各异的浅浮雕模型。刘玉洁等人(2016)也提出了基于法向域的浅浮雕风格化生成方法。Wei等人(2019)将输入3维模型图像的法线分解为光滑的基础层和细节层,生成了结构与细节信息良好的浅浮雕模型。本文通过将高度信息与法矢图融合,拟参考Wei等人(2019)的浅浮雕生成研究,对融合了高度信息的法矢图进行法向分解及几何重建,生成基于不同高度图的数字浅浮雕模型。相较于普通2维图像,法矢图蕴含较为丰富的法线信息,不但能很好地表现出曲面的特征细节信息,还能够避免因遮挡造成高度场不连续的情况,最终能够生成效果良好的浅浮雕模型。

2 本文算法

2.1 高度图获取

高度图指包含不同高度信息的图像,所用掩模操作不同,呈现的掩模图像也会不同,最终生成的图像中含有的高度信息就会不同。所以利用掩模对浅浮雕的高度进行控制有很大的可行性。本文利用掩模技术提取感兴趣区域,用制作好的掩模对待处理的图像进行处理,从而得到感兴趣区域的图像,在感兴趣区域内图像值均保持不变,而区域外的图像值都为0。如图 2所示,图 2 (a)为原始图像,图 2 (b)为掩模图像,图 2 (c)为利用掩模图像提取原图待处理区域的结果。然后利用不同的掩模操作对已经提取的感兴趣区域进行不同掩模处理,最终生成能够控制浅浮雕生成效果的高度图。

图 2 利用掩模操作进行预处理
Fig. 2 Pre-processing with mask operation
((a) original image; (b) mask image; (c) region of interest)

图 3展示的是不同掩模对提取的感兴趣区域的处理效果。通过不同的掩模操作,对提取的区域进行融合处理,最终生成具有不同高度控制信息的高度图。掩模操作是指利用掩模函数以及不同类型的掩模对待处理区域进行处理的过程。

图 3 掩模处理效果示意图
Fig. 3 The example of pre-processing with mask operation
((a) based on mask function; (b) based on cartoon images; (c) based on pattern texture)

2.2 法向分解

滚动导向滤波(rolling guidance filter,RGF)是Zhang等人(2014)提出的一个计算速度快、易于实现、可扩展性强的滤波框架,核心思想是以反复迭代的方式,实现纹理平滑和虚拟轮廓恢复的效果,包括细节平滑和边缘恢复两个过程。

平滑细节的过程与高斯滤波类似,边缘恢复则是利用迭代的方式进行图像更新,具体计算为

$ \mathit{\boldsymbol{G}}(\mathit{\boldsymbol{p}}) = \frac{1}{{{K_p}}}\sum\limits_{\mathit{\boldsymbol{q}} \in \mathit{\boldsymbol{N}}(\mathit{\boldsymbol{p}})} {\exp } \left({ - \frac{{{{\left\| {\mathit{\boldsymbol{p}} - \mathit{\boldsymbol{q}}} \right\|}^2}}}{{2\sigma _s^2}}} \right)\mathit{\boldsymbol{I}}(\mathit{\boldsymbol{q}}) $ (1)

$ \begin{array}{*{20}{c}} {{\mathit{\boldsymbol{J}}^{k + 1}}(\mathit{\boldsymbol{p}}) = }\\ {\frac{1}{{{K_p}}}\sum\limits_{\mathit{\boldsymbol{q}} \in \mathit{\boldsymbol{N}}(\mathit{\boldsymbol{p}})} {\exp } \left({ - \frac{{{{\left\| {\mathit{\boldsymbol{p}} - \mathit{\boldsymbol{q}}} \right\|}^2}}}{{2\sigma _s^2}} - \frac{{{{\left\| {{\mathit{\boldsymbol{p}}^k} - {\mathit{\boldsymbol{q}}^k}} \right\|}^2}}}{{2\sigma _r^2}}} \right)\mathit{\boldsymbol{I}}(\mathit{\boldsymbol{q}})} \end{array} $ (2)

式中,$\mathit{\boldsymbol{G}}$为输出图像,$\mathit{\boldsymbol{p}}$$\mathit{\boldsymbol{q}}$为图像像素坐标矢量,${{K_p}}$为归一化因子,${\mathit{\boldsymbol{N}}(\mathit{\boldsymbol{p}})}$是以$\mathit{\boldsymbol{p}}$为中心的邻域内的像素点集,${\sigma _s}$为邻域内标准差,$\mathit{\boldsymbol{I}}$代表输入图像,$k$代表迭代次数。将式(1)中的输出图像$\mathit{\boldsymbol{G}}$记为${\mathit{\boldsymbol{J}}^1}$,则${\mathit{\boldsymbol{J}}^{k + 1}}$表示第$k$次迭代后的图像。${\sigma _r}$控制范围权重,${{\mathit{\boldsymbol{p}}^k}}$${{\mathit{\boldsymbol{q}}^k}}$为第$k$次迭代的图像像素坐标矢量,通过此方法,可以消除一些不必要的纹理特征。

本文采用基于高斯混合模型的滚动引导法向滤波(Gaussian mixture model based rolling guidance normal filtering,GRNF)方法,将滚动导向滤波扩展到3维网格,以此完成法向分解过程,最终获得一个由细节层${\mathit{\boldsymbol{N}}_D}$与结构层${\mathit{\boldsymbol{N}}_B}$组成的集合$\left({{\mathit{\boldsymbol{N}}_B}, {\mathit{\boldsymbol{N}}_D}} \right)$,二者满足$\boldsymbol{N}_{B} \cup \boldsymbol{N}_{D}=\boldsymbol{N}$$\boldsymbol{N}_{B} \cap \boldsymbol{N}_{D}=\varnothing$$\mathit{\boldsymbol{N}}$为分解之前的原始法线层。将网格的法线场分解成结构层和细节层后,接着采用具有细节、结构和高度约束的表面重建方案,生成细节和结构均保留的浅浮雕模型。

2.3 几何重建

2014年,Xie等人(2014)提出了一种更高效的用于表面重建的方法SfG(surface from gradients),将表面重建问题转移到离散几何处理上,通过一系列最小二乘优化步骤来完成表面重建。

为了恢复高度场,本文将SfG扩展到基于法线的网格处理,主要包含局部成型和全局调整两部分。在局部成型过程中,根据迁移的法向量投影出每个网格面片,一个顶点可能被分成2或4个顶点,在全局调整步骤中,最小化总能量函数以获得新的顶点位置,然后以原始方式连接这些顶点,形成新的表面,在新的表面上迭代以上步骤直到收敛。该方法将连续曲面重构转化到离散空间,并通过最小二乘优化步骤有效解决了曲面重构问题。全局调整的能量函数为

$ \begin{aligned} \theta\left(\left\{\boldsymbol{v}_{m, n}^{z}\right\}\right) &=\sum\limits_{f_{i, j}}\left[\left\|\boldsymbol{Rz} \left(\boldsymbol{f}_{i, j}\right)-\boldsymbol{R} \boldsymbol{P}^{o}\left(\boldsymbol{f}_{i, j}\right)\right\|^{2}+\right.\\ \mu \| \boldsymbol{Rz} \left(\boldsymbol{f}_{i, j}\right) &\left.-\boldsymbol{R} \boldsymbol{P}^{d}\left(\boldsymbol{f}_{i, j}\right)\left\|^{2}+\beta\right\| \boldsymbol{v}_{m, n}^{z}-\boldsymbol{h} \|^{2}\right] \end{aligned} $ (3)

$ \boldsymbol{R}=\boldsymbol{I}_{4 \times 4}-\frac{1}{4} \boldsymbol{A} $ (4)

式中,$θ$表示能量函数,$μ$是生成浮雕的细节丰富度控制参数,$β$控制浮雕的生成风格,主要体现在平整度,$h$是浅浮雕生成高度的影响因子,将${\mathit{\boldsymbol{v}}_{i, j}}$记为顶点的位置坐标,${\mathit{\boldsymbol{f}}_{i, j}}$是由顶点$\boldsymbol{v}_{i, j}, \boldsymbol{v}_{i+1, j}, \quad \boldsymbol{v}_{i+1, j+1}$, $\boldsymbol{v}_{i, j+1}$组成的网格面片,$\mathit{\boldsymbol{z}}\left({{f_{i, j}}} \right)$表示面片顶点的$z$分量组成的列向量,$\boldsymbol{v}_{(m,{\rm{ }}n)}^z $表示面片顶点的$z$分量,其中$m \in\{i, i+1\}, n \in\{j, j+1\}, \boldsymbol{v}_{(m, n)}^{z}$${\mathit{\boldsymbol{O}}_p}$(原高度图)和${\mathit{\boldsymbol{D}}_p}$(法向分解后得到的细节层)上的投影可用$\boldsymbol{P}_{i, j}^{o}\left(\boldsymbol{v}_{m, n}\right)$$\boldsymbol{P}_{i, j}^{d}\left(\boldsymbol{v}_{m, n}\right)$表示,网格面片${\mathit{\boldsymbol{f}}_{i, j}}$上顶点的投影用$\boldsymbol{P}^{o}\left(\boldsymbol{f}_{i, j}\right)$$\boldsymbol{P}^{d}\left(\boldsymbol{f}_{i, j}\right)$表示。$\mathit{\boldsymbol{R}}$为矩阵,$\mathit{\boldsymbol{I}}$为输入图像,$\mathit{\boldsymbol{A}}$是值均为1的4 × 4矩阵。

通过表面重建得到的几何模型,往往有一些噪声或干扰影响浮雕模型的视觉效果,需要通过简单的平滑去噪处理,对一些局部信息进行调整和控制,消除或抑制噪声,完成对模型的修饰,生成视觉效果较好的浮雕模型。为了更好地体现平滑去噪效果,图 4展示了基于兔子模型进行平滑去噪处理的前后效果对比,可以看出经过处理之后的模型边界区域更加光滑。

图 4 平滑去噪效果对比图
Fig. 4 Comparison of smoothing and denoising effects
((a) before smoothing and denoising; (b) after smoothing and denoising)

3 实验结果与分析

3.1 掩模意义

本文利用掩模函数对提取的感兴趣区域的法矢图进行高度控制,最终生成层次分明且具有不同于普通浮雕模型风格化特点的浅浮雕模型。利用本文方法还可以将浅浮雕应用扩展到一些家具用品的装饰上。

图 5对比了有无掩模函数对生成浮雕的影响,展示了基于不同高度图生成的浅浮雕模型,参数均为$μ$= 0.1,$β$= 0.06,$h$= 10。其中,图 5(a)未经过任何高度控制处理,图 5(b)为基于图 5(a)生成的浅浮雕模型,图 5(c)是通过掩模进行高度控制的示意图,图 5(d)为经由高度处理生成的浅浮雕模型。可以看出,基于掩模函数处理后的模型在视觉效果中有明显不同,物体的层次性也有所体现。

图 5 无掩模操作和引入掩模操作对生成浅浮雕的对比
Fig. 5 Comparison the effect of masked and unmasked operations ((a) the image without unmasked operations; (b) bas-relief generated by (a); (c) the image with masked operations; (d) bas-relief generated by (c))

3.2 细节、结构特征参数对比

在浅浮雕生成过程中,通过最小化能量函数,同时实现细节保留、目标高度重建以及浅浮雕建模的多样化,具体计算如式(3)所示,参数$μ$控制整个浮雕生成过程中的细节特征,$μ$值越大,细节特征体现得越明显。参数$β$用来控制模型的平整度,可以理解为模型的外观,$β$值越大,生成的浅浮雕越平坦。参数$h$控制浅浮雕的高度。实验结果表明,当$μ$∈[0.01,2],$β$∈[0.01,1]以及$h$∈[0.1,20]时,可以得到较为理想的结果。

图 6$μ$= 0.1和$β$ = 0.06时,不同$h$值对应的浅浮雕效果。可以看出,$h$控制的是浮雕所依附平面的高度,$h$值越大,平面厚度越大。图 7$β$= 0.06和$h$=10时,参数$μ$的变化对浅浮雕生成效果的影响。$μ$值越大,细节特征愈加明显,类似锐化的效果。图 8$μ$= 0.1和$h$= 10时,不同$β$值对应的浅浮雕本身的高度。可以看出,随着$β$的增大,呈现出的浮雕越来越光滑平整。

图 6 参数$h$变化对浅浮雕生成效果的影响
Fig. 6 The bas-relief modeling results with different values of$h$((a)$h$=10;(b)$h$=20)
图 7 参数$μ$对浅浮雕生成效果的影响
Fig. 7 The bas-relief modeling results with different values of$μ$((a)$μ$= 0.01; (b)$μ$= 1)
图 8 参数$β$变化对浅浮雕生成效果的影响
Fig. 8 The bas-relief modeling results with different values of$β$((a)$β$=0.6; (b)$β$= 0.06)

利用本文方法也可对家居物品进行设计和装饰,如图 9所示,利用带有猫型图案的掩模,可得到猫咪图案装饰的抱枕($μ$= 0.1, $β$= 0.06, $h$=10)。除此之外,不同高度控制的掩模函数能生成具有不同装饰效果的浅浮雕模型,图 10展示了利用同一掩模图像进行不同高度控制生成的浅浮雕模型($μ$= 0.1, $β$= 0.06, $h$= 10)。

图 9 利用掩模生成带有猫图案的抱枕
Fig. 9 Bas-relief of a pillow with a cat pattern with mask operation ((a) height map; (b) bas-relief generated by (a))
图 10 不同装饰效果的浅浮雕模型
Fig. 10 The bas-relief modeling results with different decoration
((a) the different types of height maps; (b) the bas-relief generated by (a))

4 结论

为了实现浅浮雕模型的多样性、增强浮雕的应用价值,结合图像处理中的掩模操作,本文提出了一种基于高度图的浅浮雕模型生成方法,实验验证了本文方法的有效性和可行性,得到以下结论:

1) 掩模操作可以对物体区域的高度进行控制,可以作为浅浮雕的层次性表达的研究思路,能够呈现出视觉效果良好的多样性浅浮雕模型。

2) 基于不同类型高度图,利用法向分解和几何重建算法实现浅浮雕建模,调整浮雕生成时的细节等参数也可以增加浅浮雕模型的多样性。

3) 相较于传统方法,本文方法选择利用法向信息进行编辑,在一定程度上能够避开浮雕生成过程中的深度值不连续问题。

4) 本文方法可以将浅浮雕的生成与家居装饰(如桌子图案)的雕刻等结合起来,给用具器物上的浮雕装饰制作带来了便利,同时利用计算机辅助家居装饰的制作,可以降低制作成本,提高制作效率。

5) 本文方法仍存在不足,仅利用掩模对单个浮雕模型进行局部的高度控制实现浮雕模型多样性。

今后将考虑运用风格迁移融合高度信息处理进行浮雕模型间的多样性表达。在保护浮雕生成过程中的细节特征信息的同时,更有效地将高度控制同浅浮雕本身具有的层次性结合起来,改善浅浮雕的整体视觉呈现效果。

参考文献

  • Alexa M, Matusik W. 2010. Reliefs as images. ACM Transactions on Graphics, 29(4): # 60 [DOI:10.1145/1778765.1778797]
  • Chen K X, Liu X, Wang D. 2018. An algorithm for optimized edge detection based on image mask and Hit-miss transform. Journal of Xi'an University of Technology, 34(1): 116-121 (陈恺煊, 刘昕, 王咚. 2018. 基于图像掩模和击中击不中变换的优化边缘提取算法. 西安理工大学学报, 34(1): 116-121) [DOI:10.19322/j.cnki.issn.1006-4710.2018.01.019]
  • Cignoni P, Montani C, Scopigno R. 1997. Computer-assisted generation of bas- and high-reliefs. Journal of Graphics Tools, 2(3): 15-28 [DOI:10.1080/10867651.1997.10487476]
  • Fattal R, Lischinski D and Werman M. 2002. Gradient domain high dynamic range compression//Proceedings of the 29th Annual Conference on Computer Graphics and Interactive Techniques. Texas, San Antonio: ACM: 249-256[DOI: 10.1145/566570.566573]
  • He J S, Shi B P and Liu M G. 2007. A novel artistic image generation technique: making relief effects through evolution//Proceedings of the 2nd International Symposium on Intelligence Computation and Applications. Wuhan: Springer: 591-600[DOI: 10.1007/978-3-540-74581-5_65]
  • Horn B K P, Brooks M J. 1986. The variational approach to shape from shading. Computer Vision Graphics and Image Processing, 33(2): 174-208 [DOI:10.1016/0734-189X(86)90114-3]
  • Ji Z P, Ma W Y, Sun X F. 2014a. Bas-relief modeling from normal images with intuitive styles. IEEE Transactions on Visualization and Computer Graphics, 20(5): 675-685 [DOI:10.1109/TVCG.2013.267]
  • Ji Z P, Sun X F, Li S, Wang Y G. 2014b. Real-time bas-relief generation from depth-and-normal maps on GPU. Computer Graphics Forum, 33(5): 75-83 [DOI:10.1111/cgf.12433]
  • Kerber J, Belyaev A and Seidel H P. 2007. Feature preserving depth compression of range images//Proceedings of the 23rd Spring Conference on Computer Graphics. Budmerice, Slovakia: ACM: 101-105[DOI: 10.1145/2614348.2614363]
  • Kerber J, Tevs A, Belyaev A, Zayer R, Seidel H P. 2010. Real-time generation of digital bas-reliefs. Computer-Aided Design and Applications, 7(4): 465-478 [DOI:10.3722/cadaps.2010.465-478]
  • Kerber J, Wang M L, Chang J, Zhang J J, Belyaev A, Seidel H P. 2012. Computer assisted relief generation-a survey. Computer Graphics Forum, 31(8): 2363-2377 [DOI:10.1111/j.1467-8659.2012.03185.x]
  • Li B, Liu S L, Zhang L Y, Xu X Y. 2011. Bas-relief generation algorithm based on Laplace operator decomposition of 3D model. Computer Integrated Manufacturing Systems, 17(5): 946-951 (李博, 刘胜兰, 张丽艳, 徐小燕. 2011. 基于三维模型拉普拉斯分解的浮雕生成算法. 计算机集成制造系统, 17(5): 946-951) [DOI:10.13196/j.cims.2011.05.52.lib.007]
  • Li B, Liu S L, Zhang L Y. 2012. Bas-relief generation using manifold harmonics analysis. Journal of Computer-Aided Design and Computer Graphics, 24(2): 252-261 (李博, 刘胜兰, 张丽艳. 2012. 基于流形调和变换的浅浮雕生成算法. 计算机辅助设计与图形学学报, 24(2): 252-261) [DOI:10.3969/j.issn.1003-9775.2012.02.019]
  • Li Z W, Wang S, Yu J H, Ma K L. 2012. Restoration of brick and stone relief from single rubbing images. IEEE Transactions on Visualization and Computer Graphics, 18(2): 177-187 [DOI:10.1109/TVCG.2011.26]
  • Liu Y J, Ji Z P, Liu Z, Wu X Y. 2016. Stylized design of bas-relief based on normal field. Journal of Computer-Aided Design and Computer Graphics, 28(12): 2120-2127 (刘玉洁, 计忠平, 刘真, 吴向阳. 2016. 基于法向域的浅浮雕风格化设计. 计算机辅助设计与图形学学报, 28(12): 2120-2127) [DOI:10.3969/j.issn.1003-9775.2016.12.011]
  • Miao Y W, Sun Y L, Fang X D, Chen J Z, Zhang X D, Pajarola R. 2018. Relief generation from 3D scenes guided by geometric texture richness. Computational Visual Media, 4(3): 209-221 [DOI:10.1007/s41095-018-0111-2]
  • Sohn B S. 2017. Ubiquitous creation of bas-relief surfaces with depth-of-field effects using smartphones. Sensors, 17(3): #572 [DOI:10.3390/s17030572]
  • Sun X F, Rosin P L, Martin R R, Langbein F C. 2009. Bas-relief generation using adaptive histogram equalization. IEEE Transactions on Visualization and Computer Graphics, 15(4): 642-653 [DOI:10.1109/TVCG.2009.21]
  • To H T, Sohn B S. 2017. Bas-relief generation from face photograph based on facial feature enhancement. Multimedia Tools and Applications, 76(8): 10407-10423 [DOI:10.1007/s11042-016-3924-y]
  • Wang M L, Chang J, Pan J J and Zhang J J. 2010. Image-based bas-relief generation with gradient operation//Proceedings of the 11th IASTED International Conference on Computer Graphics and Imaging. Innsbruck: Acta Press: 87-92[DOI: 10.2316/P.2010.679-040]
  • Wang Q M and Zhao L. 2017. Image foreground extraction based on Poisson. Computer Programming Skills & Maintenance, (5): 81-83 (王庆敏, 赵亮. 2017.利用Poisson方法实现图像前景提取.电脑编程技巧与维护, (5): 81-83[DOI: 10.3969/j.issn.1006-4052.2017.05.031])
  • Wei M Q, Tian Y, Pang W M, Wang C C L, Pang M Y, Wang J, Qin J, Heng P A. 2019. Bas-relief modeling from normal layers. IEEE Transactions on Visualization and Computer Graphics, 25(4): 1651-1665 [DOI:10.1109/TVCG.2018.2818146]
  • Weyrich T, Deng J, Barnes C, Rusinkiewicz S, Finkelstein A. 2007. Digital bas-relief from 3D scenes. ACM Transactions on Graphics, 26(3): #32 [DOI:10.1145/1276377.1276417]
  • Wu J, Martin R R, Rosin P L, Sun X F, Lai Y K, Liu Y H, Wallraven C. 2014. Use of non-photorealistic rendering and photometric stereo in making bas-reliefs from photographs. Graphical Models, 76(4): 202-213 [DOI:10.1016/j.gmod.2014.02.002]
  • Wu T P, Sun J, Tang C K, Shum H Y. 2008. Interactive normal reconstruction from a single image. ACM Transactions on Graphics, 27(5): #119 [DOI:10.1145/1457515.1409072]
  • Xie W Y, Zhang Y B, Wang C C L and Chung R C K. 2014. Surface-from-gradients: an approach based on discrete geometry processing. Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, USA: IEEE: 2203-2210[DOI: 10.1109/CVPR.2014.282]
  • Zeng Q, Martin R R, Wang L, Quinn J A, Sun Y H, Tu C H. 2014. Region-based bas-relief generation from a single image. Graphical Models, 76(3): 140-151 [DOI:10.1016/j.gmod.2013.10.001]
  • Zhang Q, Shen X Y, Li X and Jia J Y. 2014. Rolling guidance filter//Proceedings of the 13th European Conference on Computer Vision. Zurich, Switzerland: Springer: 815-830[DOI: 10.1007/978-3-319-10578-9_53]
  • Zhang Y W, Chen Y Z, Liu H, Ji Z P, Zhang C M. 2018. Modeling Chinese calligraphy reliefs from one image. Computers and Graphics, 70: 300-306 [DOI:10.1016/j.cag.2017.07.022]
  • Zhang Y W, Zhou Y Q, Zhao X F, Yu G. 2013. Real-time bas-relief generation from a 3D mesh. Graphical Models, 75(1): 2-9 [DOI:10.1016/j.gmod.2012.10.003]
  • Zhu Y H, Liu B, Zhang L B. 2018. Algorithm and its implementation of bas-relief generation using image overlay. Journal of Huaqiao University (Natural Science), 39(2): 172-178 (朱钰恒, 刘斌, 张凌搏. 2018. 采用叠加图像的浅浮雕生成算法及实现. 华侨大学学报(自然科学版), 39(2): 172-178) [DOI:10.11830/ISSN.1000-5013.201711039]