计算机工程与应用 ›› 2020, Vol. 56 ›› Issue (7): 234-239.DOI: 10.3778/j.issn.1002-8331.1901-0109

• 图形图像处理 • 上一篇    下一篇

从图片到衣服:快速虚拟角色服饰生成方法

张姝洁,郑利平,韩清,张晗   

  1. 合肥工业大学 计算机与信息学院,合肥 230001
  • 出版日期:2020-04-01 发布日期:2020-03-28

Pictures to Clothes:Method of Quickly Generating Costumes for Virtual Characters

ZHANG Shujie, ZHENG Liping, HAN Qing, ZHANG Han   

  1. School of Computer and Information, Hefei University of Technology, Hefei 230001, China
  • Online:2020-04-01 Published:2020-03-28

摘要:

在人群仿真中,虚拟人物的外观多样化可以使得场景更具有真实性。针对如何快速生成具有多样化服饰特征的三维虚拟角色服饰模型,介绍了一种从图片读取角色衣服并自动快速生成对应角色服饰模型的方法。通过GrabCut算法分割识别图片中人物衣服,计算出对应上衣下衣的服饰风格颜色,再通过从所持有模型库中,选取与其对应的典型三维人物角色服饰模型,利用服饰风格颜色对模板模型的UV展开图和纹理图进行填充修改,将修改后的纹理图贴合模板模型,即制作出相似的人物模型,从而完成虚拟角色服饰的快速生成。实验结果表明,该方法可以快速轻便地完成从图片到三维人物的大致还原。

关键词: 图像分割, 三维人物模型, 角色服饰, 模型库

Abstract:

In crowd simulation, the diversification of the appearance of virtual characters can make the scene more realistic. This paper focuses on quickly generating the three-dimensional virtual characters with diverse costumes. It proposes a method of reading the characters’ clothes from the pictures and automatically generating the corresponding character models with the similar costumes to three-dimensional space. The specific steps are as follows:firstly, the GrabCut algorithm is used to segment the pictures as to get the different parts of the characters’ costumes. Then the style colors of the clothes and trousers are calculated separately. At the same time, it selects the typical three-dimensional character models with similar costume styles to the origin pictures from the model library. It gains the UV expansion map and the texture map of the template models which are using to be automatically filled and modified with the style colors that calculated in the former steps. After that, the changed texture map will be attached to the origin character model. Thereby, the three-dimensional virtual character with similar costumes to the origin picture is completely generated. The experimental results show that this method can be done to quickly and easily achieve the rough simulation from the pictures to the three-dimensional characters.

Key words: image segmentation, 3D character model, character costume, model library