计算机工程与应用 ›› 2021, Vol. 57 ›› Issue (20): 229-235.DOI: 10.3778/j.issn.1002-8331.2006-0415

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

导向滤波的高光去除改进算法

郭碧茹,孔韦韦,陈斌   

  1. 1.西安邮电大学 计算机学院,西安 710121
    2.陕西省网络数据分析与智能处理重点实验室,西安 710121
  • 出版日期:2021-10-15 发布日期:2021-10-21

Improved Algorithm for Removing Highlights with Guided Filtering

GUO Biru, KONG Weiwei, CHEN Bin   

  1. 1.School of Computer Science and Technology, Xi’an University of Posts and Telecommunications, Xi’an 710121, China
    2.Shaanxi Provincial Key Laboratory of Network Data Analysis and Intelligent Processing, Xi’an 710121, China
  • Online:2021-10-15 Published:2021-10-21

摘要:

为了解决传统的高光去除方法在去除图像高光时黑色像素点褪色、边缘和纹理缺失、产生伪影效应的问题,提出了一种导向滤波的高光去除改进算法。该算法通过设置第一阈值分离出图像中的黑色像素和其他像素,并采用不同方法分别估算黑色像素和其他像素的最大漫反射色度,避免黑色像素点发生褪色;利用导向滤波器对最大色度图进行了平滑处理,避免了伪影效应;在分离漫反射分量过程中,根据分母与第二阈值的关系,将滤波后图像中的像素点划分为两类,并对不同类别的像素点采用不同方法实现漫反射分量的分离,避免了分母为0导致错误分离。根据实验结果,该算法相比于传统算法,在防止黑色像素褪色、保留图像边缘和纹理信息、避免伪影方面均表现出优势。

关键词: 高光去除, 导向滤波, 双色反射模型, 镜面反射, 漫反射

Abstract:

In order to solve the problems of discoloration of black pixels, loss of edges and textures, and artifacts when removing highlights, an improved algorithm for removing highlights with guided filtering is proposed. Firstly, it separates the black pixels and other pixels by setting the first threshold, and estimates the maximum diffuse chromaticity of the black pixels and other pixels separately. These can avoid the black pixels from fading. Secondly, it smoothes the maximum chromaticity image by using the guided filter. The artifact effect is avoided. Finally, the pixels are divided into two categories according to the relationship between the denominator and the second threshold. Moreover the two categories are used different methods to separate diffuse reflection components. It avoids error separation caused by denominator 0. Experimental results show that the algorithm is superior to traditional algorithms in processing black pixels, preserving edges and textures, and avoiding artifacts.

Key words: highlight removal, guided filter, double-color?reflection, specular reflection, diffuse reflection