Image Segmentation based Background Removal and Replacement

Meenal Gupta, Ritik Goyal, Siddharth Shekhar, R. Krishnamurthi
{"title":"Image Segmentation based Background Removal and Replacement","authors":"Meenal Gupta, Ritik Goyal, Siddharth Shekhar, R. Krishnamurthi","doi":"10.1145/3474124.3474135","DOIUrl":null,"url":null,"abstract":"Privacy is a great cause of concern. As many of us are concerned and self-conscious about what is visible in our background while having an online meeting. To provide some privacy during an online meeting our main objective is to blur/remove/replace the background of a live webcam video stream using a machine learning model trained to segment out persons in an image, whose results are then refined using image processing techniques. Currently, it is available in online meeting apps like Zoom, Google Meet, Microsoft Teams, etc., but there is no open-source code available for it so we also want to make an online repository, from where anyone can take our code, and implement it in their project. Our program uses a webcam on a computer and proceeds in the following way. First, we capture a live frame from the webcam, and then pre-process it, so that it is suitable for supplying as input to the machine-learning model. This provides us with a rough predicted foreground mask. Then, to refine it, we perform morphological closing, which is used to remove small imperfections in the mask. We then obtain the outline of the detected person using contour finding and fill its interior region with white by using a flood-fill operation. After all, of this, we have generated a foreground mask layer in an alpha channel whose white area shows the foreground, which we have to leave as it, is and the black area shows background, which we have to change. Therefore, we combine this generated mask along with its corresponding frame and, optionally, a background image, to generate its corresponding frame. Repeatedly doing this for every frame we receive from the webcam continuously, we have a live video with edited background with a decent frame rate of 26-28 FPS.","PeriodicalId":144611,"journal":{"name":"2021 Thirteenth International Conference on Contemporary Computing (IC3-2021)","volume":"56 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 Thirteenth International Conference on Contemporary Computing (IC3-2021)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3474124.3474135","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Privacy is a great cause of concern. As many of us are concerned and self-conscious about what is visible in our background while having an online meeting. To provide some privacy during an online meeting our main objective is to blur/remove/replace the background of a live webcam video stream using a machine learning model trained to segment out persons in an image, whose results are then refined using image processing techniques. Currently, it is available in online meeting apps like Zoom, Google Meet, Microsoft Teams, etc., but there is no open-source code available for it so we also want to make an online repository, from where anyone can take our code, and implement it in their project. Our program uses a webcam on a computer and proceeds in the following way. First, we capture a live frame from the webcam, and then pre-process it, so that it is suitable for supplying as input to the machine-learning model. This provides us with a rough predicted foreground mask. Then, to refine it, we perform morphological closing, which is used to remove small imperfections in the mask. We then obtain the outline of the detected person using contour finding and fill its interior region with white by using a flood-fill operation. After all, of this, we have generated a foreground mask layer in an alpha channel whose white area shows the foreground, which we have to leave as it, is and the black area shows background, which we have to change. Therefore, we combine this generated mask along with its corresponding frame and, optionally, a background image, to generate its corresponding frame. Repeatedly doing this for every frame we receive from the webcam continuously, we have a live video with edited background with a decent frame rate of 26-28 FPS.
基于背景去除和替换的图像分割
隐私是一个令人担忧的大问题。因为我们中的许多人在进行在线会议时,都会对自己的背景中可见的内容感到担忧和不安。为了在在线会议期间提供一些隐私,我们的主要目标是使用经过训练的机器学习模型来模糊/删除/替换实时网络摄像头视频流的背景,以分割图像中的人物,然后使用图像处理技术对其结果进行改进。目前,它可以在Zoom、Google Meet、Microsoft Teams等在线会议应用程序中使用,但没有可用的开源代码,所以我们也想做一个在线存储库,任何人都可以从中获取我们的代码,并在他们的项目中实现它。我们的程序使用计算机上的网络摄像头,并以以下方式进行。首先,我们从网络摄像头捕获一个实时帧,然后对其进行预处理,使其适合作为机器学习模型的输入。这为我们提供了一个粗略的预测前景蒙版。然后,为了改进它,我们执行形态学关闭,用于去除掩模中的小缺陷。然后,我们使用轮廓查找获得被检测人的轮廓,并使用洪水填充操作将其内部区域填充为白色。毕竟,我们已经在alpha通道中生成了一个前景蒙版层,其中白色区域显示前景,我们必须保持原样,黑色区域显示背景,我们必须改变。因此,我们将这个生成的蒙版与其相应的帧以及可选的背景图像结合起来,以生成其相应的帧。对我们从网络摄像头接收到的每一帧重复这样做,我们就得到了一个具有编辑背景的实时视频,帧率为26-28帧/秒。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信