Abstract
In this paper, we propose a trimap optimization method that can optimize manually created rough trimaps. Most matting algorithms require the user to intervene by using a trimap to generate an alpha mask from the input image. An accurate trimap guarantees a high-quality alpha mask. However, creating a trimap is undoubtedly a very tedious task, and a rough trimap will reduce the accuracy of the matting algorithm. We optimize the manually created trimap based on the local weighted Citation-KNN algorithm, which enables the matting method to obtain results quickly and accurately. The experiments performed show that the method proposed in this paper can better optimize rough trimap created by manual manipulation, thus improving the alpha mask estimation accuracy. We validate our results by replacing our optimized trimap with a manually created trimap while using the same image matting algorithm.
Similar content being viewed by others
References
Acevedo D, Negri P, Buemi ME, Fernàndez FG, Mejail M (2017) A Citation k-NN Approach for Facial Expression Recognition. Iberoamerican CongressPattern Recogn:1–9
Achanta R, Shaji A, Smith K, Lucchi A, Fua P, Su̇sstrunk S (2012) SLIC Superpixels compared to state-of-the-art superpixel methods. IEEE Trans Pattern Anal Mach Intell 34(11):2274–2282
Agarwal PK, Fox K, Nath A, Sidiropoulos A, Wang Y (2018) Computing the Gromov-Hausdorff distance for metric trees. ACM Trans Algorithm 14(2):24
Aksoy Y, Aydin TO, Pollefeys M (2017) Designing effective interpixel information flow for natural image matting. IEEE Conf Comput Vis Pattern Recogn:228–236
Al-Kabbany A, Dubois E (2015) A novel framework for automatic trimap generation using the Gestalt laws of grouping. Vis Inf Process Commun VI:94100G-94100G-9
Alelyani S, Tang J, Liu H (2013) Feature selection for clustering: a review. Data Clustering: Chapman and Hall/CRC, pp 29–60
Amin B, Riaz M, Ghafoor A (2020) Automatic aircraft extraction using video matting and frame registration. IET Image Process 14(8):1628–1635
Amin B, Riaz M, Ghafoor A (2021) Fuzzy based iterative matting technique for underwater images. IET Image Processing
Cai S, Zhang X, Fan H, Huang H, Liu J, Sun J (2019) Disentangled image matting. IEEE Conf Comput Vis Pattern Recogn:8819–8828
Chen Q, Li D, Tang C-K (2013) KNN matting. IEEE Trans Pattern Anal Mach Intell 35(9):2175–2188
Cho D, Kim S, Tai Y-W, Kweon I (2017) Automatic trimap generation and consistent matting for light-field images. IEEE Trans Pattern Anal Mach Intell 39(8):1504–1517
Cho D, Tai Y-W, Kweon I (2016) Natural image matting using deep convolutional neural networks. Eur Conf Comput Vis:626–643
Chuang Y, Curless B, Salesin DH, Szeliski R (2001) A bayesian approach to digital matting. IEEE Conf Comput Vis Pattern Recogn:264–271
Dai Y, Lu H, Shen C (2020) Learning Affinity-Aware Upsampling for Deep Image Matting, arXiv:2011.14288
Ding J, Cheng H, Xian M, Zhang Y, Xu F (2015) Local-weighted citation-kNN algorithm for breast ultrasound image classification. Optik 126(24):5188–5193
Gastal ES, Oliveira MM (2010) Shared sampling for real-time alpha matting. Comput Graph Forum 29(2):575–584
Ghosh D, Bandyopadhyay S (2015) A fuzzy citation-KNN algorithm for multiple instance learning. IEEE Int Conf Fuzzy Syst:1–8
Guillaumin M, Verbeek J, Schmid C (2010) Multiple instance metric learning from automatically labeled bags of faces. Eur Conf Comput Vis:634–647
Gupta V, Raman S (2016) Automatic trimap generation for image matting. Int Conf Signal Inf Process:1–5
He K, Rhemann C, Rother C, Tang X, Sun J (2011) A global sampling method for alpha matting. IEEE Conf Comput Vis Pattern Recogn:2049–2056
He K, Sun J, Tang X (2010) Fast matting using large kernel matting laplacian matrices. IEEE Conf Comput Vis Pattern Recogn:2165–2172
Hou Q, Liu F (2019) Context-aware image matting for simultaneous foreground and alpha estimation. IEEE Int Conf Comput Vis:4130–4139
Hsieh CL, Lee MS (2013) Automatic trimap generation for digital image matting. Signal Inf Process Assoc Ann Summit Conf:1–5
Hu H, Pang L, Shi ZJK-BS (2016) Image matting in the perception granular deep learning. Knowl-Based Syst 102:51–63
Huttenlocher DP, Rucklidge WJ, Klanderman GA (1992) Comparing images using the Hausdorff distance under translation. CIEEE Conf Comput Vis Pattern Recogn:654–656
Jaime M, et al. (2015) A novel multiple-instance learning-based approach to computer-aided detection of tuberculosis on chest X-rays. IEEE Trans Med Imaging 34(1):179–92
Jiang L, Cai Z, Wang D, Zhang H (2014) Cybernetics, Bayesian Citation-KNN with distance weighting. Int J Mach Learn Cybern 5(2):193–199
Katsamanis A, Gibson J, Black MP, Narayanan SS (2011) Multiple instance learning for classification of human behavior observations. Int Conf Affect Comput Intell Interact:145–154
Kyurkchiev N, Markov S (2016) On the Hausdorff distance between the Heaviside step function and Verhulst logistic function. J Math Chem 54(1):109–119
Lee P, Wu Y (2011) Nonlocal matting. IEEE Conf Comput Vis Pattern Recogn:2193–2200
Levin A, Lischinski D, Weiss Y (2008) A closed-form solution to natural image matting. IEEE Trans Pattern Anal Mach Intell 30(2):228–242
Levin A, Rav-Acha A, Lischinski D (2008) Spectral matting. IEEE Trans Pattern Anal Mach Intell 30(10):1699–1712
Li Y, Lu H (2020) Natural image matting via guided contextual attention. Proc AAAI Conf Artif Intell 34(07):11450–11457
Li C, Wang P, Zhu X, Pi H (2017) Three-layer graph framework with the sumD feature for alpha matting. Comput Vis Image Underst 162:34–45
Li H, Zhu W, Jin H, Ma Y (2021) Illumination-Invariant And Real-Time Green-Screen keying using deeply guided linear models. Symmetry 13 (8):1454
Lin S, Ryabtsev A, Sengupta S, Curless BL, Seitz SM, Kemelmacher-Shlizerman I (2021) Real-time high-resolution background matting. IEEE Conf Comput Vis Pattern Recogn, pp 8762–8771
Lu H, Dai Y, Shen C, Xu S (2019) Indices matter: Learning to index for deep image matting. IEEE Conf Comput Vis Pattern Recogn:3266–3275
Lutz S, Amplianitis K, Smolic A (2018) AlphaGAN: Generative adversarial networks for natural image matting, arXiv:1807.10088
Lutz S, Amplianitis K, Smolic A (2018) Alphagan: Generative adversarial networks for natural image matting. arXiv:1807.10088
Qiao Y, Liu Y, Yang X, Zhou D, Xu M, Zhang Q, Wei X (2020) Attention-guided hierarchical structure aggregation for image matting. IEEE Conf Comput Vis Pattern Recogn:13676–13685
Quellec G, Cazuguel G, Cochener B, Lamard M (2017) Multipleinstance learning for medical image and video analysis. IEEE Rev Biomed Eng 10:213–234
Rhemann C, Rother C, Gelautz M (2008) Improving color modeling for alpha matting. British Mach Vis Conf:1155–1164
Rhemann C, Rother C, Wang J, Gelautz M, Kohli P, Rott P (2009) A perceptually motivated online benchmark for image matting. IEEE Conf Comput Vis Pattern Recogn:1826–1833
Sengupta S, Jayaram V, Curless B, Seitz SM, KemelmacherShlizerman I (2020) Background matting: The world is your green screen. IEEE Conf Comput Vis Pattern Recogn:2291–2300
Shahrian E, Rajan D (2012) Weighted color and texture sample selection for image matting. IEEE Conf Comput Vis Pattern Recogn:718–725
Shahrian E, Rajan D, Price B, Cohen S (2013) Improving image matting using comprehensive sampling sets. IEEE Conf Comput Vis Pattern Recogn:636–643
Shen X, Tao X, Gao H, Zhou C, Jia J (2016) Deep automatic portrait matting. Eur Conf Comput Vis:92–107
Singh S, Jalal AS (2014) Automatic generation of trimap for image matting. Int J Mach Intell Sens Signal Process 1(3):232–250
Sudharshan P, Petitjean C, Spanhol F, Oliveira LE, Heutte L, Honeine P (2019) Multiple instance learning for histopathological breast cancer image classification. Expert Syst Appl 117:103111
Sun J, Jia J, Tang CK, Shum HY (2004) Poisson matting. ACM Trans Graph 23(3):315–321
Tang J, Aksoy Y, Oztireli C, Gross M, Aydin TO (2019) Learningbased sampling for natural image matting. IEEE Conf Comput Vis Pattern Recogn:3055–3063
Tang H, Huang Y, Fan Y, Zeng X (2019) Very deep residual network for image matting. IEEE Int Conf Image Process:4255–4259
Vezhnevets A, Buhmann JM (2010) Towards weakly supervised semantic segmentation by means of multiple instance and multitask learning. IEEE Conf Comput Vis Pattern Recogn:3249–3256
Villar P, Montes R, Sanchez AM, Herrera F (2016) Fuzzy-citationKNN: a fuzzy nearest neighbor approach for multi-instance classification. IEEE Int Conf Fuzzy Syst:946–952
Wang J, Cohen MF (2005) An iterative optimization approach for unified image segmentation and matting. IEEE Int Conf Comput Vis:936–943
Wang J, Cohen MF (2007) Optimized color sampling for robust matting. IEEE Conf Comput Vis Pattern Recogn:1–8
Wang J, Cohen MF (2008) Image and video matting: a survey. Found Trends Comput Graph Vis 3(2):97–175
Wang J, Zucker JD (2000) Solving the Multiple-Instance problem: a lazy learning approach. Seventeenth Int Conf Mach Learn:1119–1125
Wei XS, Wu J, Zhou ZH (2014) Scalable Multi-instance Learning. Int Conf Data Min:1037–1042
Xu N, Price B, Cohen S, Huang TS (2017) Deep Image Matting. arXiv:1703.03872
Xu C, Qi S, Feng J, Xia S, Kang Y, Yao Y, Qian W (2020) DCT-MIL: Deep CNN transferred multiple instance learning for COPD identification using CT images. Phys Med Biol 65(14):145011
Yang S, Shen X (2018) Falcon: a fast drop-in replacement of citation knn for multiple instance learning. Int Conf Inf Knowl Manag:67–76
Yao G, Su X, Xin H, Sun J (2021) Adaptively and spatially constrained dual-level trimap generation from sparse inputs. Inf Sci 580:720–733
Zhang Y, Gong L, Fan L, Ren P, Huang Q, Bao H, Xu W (2019) A late fusion cnn for digital matting. IEEE Conf Comput Vis Pattern Recogn:7469–7478
Zheng Y, Kambhamettu C (2009) Learning based digital matting. IEEE Conf Comput Vis Pattern Recogn:889–896
Zhou W, Alan Conrad B, Hamid Rahim S, Simoncelli EP (2004) Image quality assessment: from error visibility to structural similarity. IEEE Trans Image Process 13(4):600–612
Zhou F, Tian Y, Qi Z (2020) Attention transfer network for nature image matting. IEEE Trans Circ Syst Video Technol 31(6):2192–2205
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Xiaoyu Guo and Songyang Xiang contributed equally to this work.
Rights and permissions
About this article
Cite this article
Li, Z., Guo, X. & Xiang, S. Robust trimap optimization algorithm based on Superpixel Citation-KNN. Multimed Tools Appl 81, 33483–33511 (2022). https://doi.org/10.1007/s11042-022-12469-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-022-12469-z