摘要
针对普通单一摄像头的智能手机无法直接简单地处理得到背景虚化效果图像的问题,本文提出基于显著性检测的肖像照片自动背景虚化算法.根据肖像照片中人像的空间位置特点,本文引入背景超像素块优化策略到显著性检测算法中,提高了显著性检测算法对人像中前景区域的检测效果.基于显著性检测结果,本文应用超像素尺度的GrabCut算法快速地从背景区域中分离出人像区域.基于显著性检测以及分割结果,一种快速的引导滤波被应用于分别对背景区域和前景人像区域进行模糊和细节增强,从而得到背景虚化后的肖像照片.实验结果表明,该方法能够完整地检测并快速地分割出人像区域,这使背景虚化效果更接近具有大光圈的数码单反相机拍摄得到的背景虚化效果.
Since ordinary single-camera based mobile phones are unable to directly produce photos with background defocus effect,this paper proposed a background defocus algorithm for portrait image based on saliency detection. Because of spatial feature of portrait region in portrait image,this paper introduces a strategy to adjust the background hypothesis in saliency detection algorithm,and enhance the saliency detection performance of portrait region. Based on the result of saliency detection,this paper uses the superpixellevel GrabCut method to quickly separate the portrait region from background. With the results of saliency detection and segmentation,a fast version of guided filter is used to blur background region and enhance the details of portrait region for achieving the background defocus effect. Experimental result shows that the proposed algorithm can better detect and segment portrait region,which makes the resultant defocus image more like captured by a digital single-lens reflex( DSLR) camera with a large aperture.
引文
[1] Saxena,Ashutosh,Sung H Chung,Andrew Y Ng. Learning depthfrom single monocular images[C]. Proceedings of Advances inNeural Information Processing Systems(NIPS),2006:1161-1168.
[2]Saxena,Ashutosh,Sung H Chung,Andrew Y Ng. 3-d depth re-construction from a single still image[J]. International Journal ofComputer Vision(IJCV),2008,76(1):53-69.
[3]Liu Be-yang,Stephen Gould,Daphne Koller,et al. Single imagedepth estimation from predicted semantic labels[C]. Proceedingsof IEEE International Conference on Computer Vision and PatternRecognition(IEEE CVPR),2010:1253-1260.
[4]Barron,Jonathan T,et al. Fast bilateral-space stereo for syntheticdefocus[C]. Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition(IEEE CVPR),2015:4466-4474.
[5]Zhu W,Liang S,Wei Y,et al. Saliency optimization from robustbackground detection[C]. Proceedings of IEEE International Con-ference on Computer Vision and Pattern Recognition(IEEECVPR),2014:2814-2821.
[6]Chen W,Kou F,Wen C,et al. Automatic synthetic background de-focus for a single portrait image[J]. IEEE Transactions on Consum-er Electronics,2017,63(3):234-242.
[7] Kou F,Chen W,Wen C,et al. Gradient domain guided image fil-tering[J]. IEEE Transactions on Image Processing(IEEE T IP),2015,24(11):4528-4539.
[8] Rother C,Kolmogorov V,Blake A. Grabcut:Interactive fore-ground extraction using iterated graph cuts[C]. Proceedings ofACM Transactions on Graphics(ACM T GRAPHIC),2004,23(3):309-314.
[9]He K,Sun J,Tang X. Guided image filtering[J]. IEEE Transac-tions on Pattern Analysis and M achine Intelligence(IEEE T PA-M I),2013,35(6):1397-1409.
[10]Li Z,Chen J. Superpixel segmentation using linear spectral cluste-ring[C]. IEEE International Conference on Computer Vision andPattern Recognition(IEEE CVPR),2015:1356-1363.
[11] Otsu N. A threshold selection method from gray-level histograms[J]. IEEE Transactions on Systems, Man, and Cybernetics(IEEE T SYST MAN CY),1979,9(1):62-66.
[12]Achanta R,Shaji A,Smith K,et al. SLIC superpixels comparedto state-of-the-art superpixel methods[J]. IEEE Transactions onPattern Analysis and M achine Intelligence(IEEE T PAM I),2012,34(11):2274-2282.
[13]Boykov Y Y,Jolly M P. Interactive graph cuts for optimal bound-ary®ion segmentation of objects in ND images[C]. IEEE In-ternational Conference on Computer Vision(IEEE ICCV),2001,1:105-112.
[14]He,Kaiming,Jian Sun. Fast guided filter[J/OL]. ar Xiv preprint,http://arxiv. org/abs/1505,00996,2015.
[15] Gao C,Zhang X,Wang H. A combined method for multi-classimage semantic segmentation[J]. IEEE Transactions on ConsumerElectronics(IEEE T Consum Electr),2012,58(2):596-604.
[16]Li C,Wang P,Zhu X,et al. Three-layer graph framework withthe sumd feature for alpha matting[J]. Computer Vision and Im-age Understanding(Comput Vis Image Und),2017,162:34-45.