影像科学与光化学 ›› 2020, Vol. 38 ›› Issue (6): 935-940.DOI: 10.7517/issn.1674-0475.200416

• 综述与论文 • 上一篇    下一篇

基于邻域优先搜索和纹理相似度匹配的图像颜色转移方法

朱明1, 焦会敏2, 赵兴运1   

  1. 1. 河南工程学院 材料与化学工程学院, 河南 郑州 450007;
    2. 齐鲁工业大学 轻工科学与工程学院, 山东 济南 250353
  • 收稿日期:2020-06-28 出版日期:2020-11-15 发布日期:2020-11-15
  • 通讯作者: 朱明
  • 基金资助:
    河南工程学院2020年度科研培育基金(PYXM202010)、国家新闻出版署"柔版印刷绿色制版与标准化"重点实验室资助项目(ZBKT202005)和2019年河南省高等学校大学生创新训练项目(S201911517005)

A Color Transfer Method based on Neighborhood-first Searching and Texture Similarity Matching

ZHU Ming1, JIAO Huimin2, ZHAO Xingyun1   

  1. 1. College of Materials and Chemical Engineering, Henan University of Engineering, Zhengzhou 450007, Henan, P. R. China;
    2. School of Light Industry Science and Engineering, Qilu University of Technology, Jinan 250353, Shandong, P. R. China
  • Received:2020-06-28 Online:2020-11-15 Published:2020-11-15

摘要: 为了解决影视制作、动漫设计、医学成像、空间探索等领域中的灰度图像彩色化问题,本文提出了一种基于邻域优先搜索和纹理匹配的图像颜色转移算法。对于目标灰度图像中的待着色像素,该方法首先基于邻域优先搜索方案找到其候选匹配像素,然后定义纹理特征向量的概念来描述彩色像素和灰度像素之间的纹理相似度,并根据候选像素与目标像素之间的向量空间距离计算匹配误差,以确定最终匹配像素。针对初次匹配后不同图像内容因匹配误差接近而造成的匹配错误和色彩误传问题,本文在彩色图像和灰度图像中选择相对应的区域进行样窗匹配。在5个图像彩色化测试案例中,本文算法的效果均明显好于Welsh算法。本文算法在总体上具有一个合理的色彩转移效果。此外,针对色彩构成或语义内容较为复杂的图像,通过一个案例验证了样窗匹配的有效性,分析了其中的问题和不足。

关键词: 颜色转移, 邻域优先搜索, 纹理匹配

Abstract: To address the problem of grayscale image colorization in the fields of film and television, medical imaging, animation, space exploration and so on, a color transferring algorithm based on neighborhood-first search and texture similarity matching is proposed. For a pixel to be colorized in target grayscale image, the method first finds its candidate matching pixels based on the neighborhood-first searching scheme. Then, we define the concept of the texture eigenvector to describe the texture similarity between two pixels, and determine the final matching pixel by calculating the matching error based on the distance between the eigenvectors of the candidate pixels and the target pixel. To address the problem of image distortion occurred after global matching, the present method conducts one or more swatch matching procedures for the distortion regions of the colorized image. In the five test cases of image colorization, the proposed algorithm has a reasonable color transfer effect. Moreover, for the image with complex color composition or semantic content, this paper verifies the effectiveness of swatch matching through a case, and analyzes the problems and shortcomings of swatch matching.

Key words: color transferring, neighborhood-first search, texture similarity matching