摘要
分析了KNN抠图算法中近邻选取策略对抠图结果的影响,针对KNN抠图存在的弱边缘失真问题,提出了像素间不平度的概念.采用两级相似度计算:先选取距离、颜色联合空间中的最优近邻,再用不平度衡量像素间的连接程度.最后构建拉普拉斯矩阵,求解方程得到最终的抠图结果.该算法不但实现了远距离的信息扩散,还能够有效防止边缘地带的误扩散.此外,还对不平度算法的扩散计算机制进行分析,提出了具有线性复杂度的不平度计算方法.实验结果表明,在增加少量运算代价的情况下,改进的算法具有良好的边缘保持特性,抠图效果更加理想.
The method to calculate the affinity of KNN matting was analyzed. In order to prevent the distortion near the edges,the unevenness between the pixels was proposed. The calculation of the affinity has two steps: first united the color and space features to find the K nearest neighbours,then calculate the unevenness between the neighbours. The final matting was obtained through the Laplacian equation. Not only the nonlocal information was obtained,also the distortion was alleviated. Besides,based on the analysis of the unevenness,a computation with linear complextity was invented. The experiment shows that the improved method can well preserves the edges,while compromises little computation cost.
出处
《小型微型计算机系统》
CSCD
北大核心
2015年第7期1591-1596,共6页
Journal of Chinese Computer Systems
基金
国家自然科学基金项目(61473318
60974048)资助