Blur Webcam Background Software

HELP FILE

Blur & remove webcam background Planned; Subscribe; G. G N: I would love to have a free blur or remove background like on Teams - A. 1) ManyCam ManyCam is a live streaming software that enables you to deliver professional video, streams, online classes with ease. The tool allows you to remove, replace, or blur background during a web conference.

How do I change my webcam background?

You can customize, replace, or blur your webcam background during meetings with a third-party service, ChromaCam! If you have a paid GoToMeeting account, you can use your credentials to download and access ChromaCam Pro for free.

If you are an attendee joining someone else's meeting (i.e., you do not have your own GoToMeeting account), you can download ChromaCam Lite for free.

Hardware recommendations

HardwareRequirement
OSWindows 7-10 or macOS Mojave (10.14) or newer
ProcessorIntel 6th gen i5 quad-core or higher processor running at 3.3GHz or higher
GPUOpenCL 1.2
Memory4GB + RAM
WebcamAny RGB webcam (e.g., embedded computer webcam)

Download ChromaCam Pro

Your GoToMeeting account comes with ChromaCam Pro. If you do not see the 'Custom background' setting, your admin may have disabled the feature. Please reach out to your account admin to enable it.
Note: You need admin rights to install ChromaCam. If you cannot install ChromaCam, please contact your IT admin.
  1. Log in to your account at https://global.gotomeeting.com.
  2. Click the Settings icon in the left menu.
  3. Scroll and open Custom Background, and click Download ChromaCam.
  4. Go through the installation flow.
  5. To access ChromaCam Pro, sign in using your GoToMeeting credentials and AllowLogMeIn to connect to ChromaCam.
  6. The next time you join or host a meeting, ChromaCam will be available as a webcam device.

Use ChromaCam during a meeting

We recommend testing your webcam before the meeting to choose your preferred background or filter.
  1. Start or join a meeting.
  2. Click the Settings icon In the top menu.
  3. In the Webcam drop-down menu, click ChromaCam.
  4. Your webcam background will automatically blur.
    Note: You can change the blur level in the settings, choose other filters or upload your own customized background.
  5. Click the Camera icon in GoToMeeting to begin sharing.

What if my computer starts to lag?

If you are experiencing low bandwidth or the GoToMeeting app lags, follow these best practices. Learn more tips and tricks or view ChromaCam's FAQs.
  • If you are using the blur filter, lower the blurriness level or switch to another background.
  • Close other applications in the background.
  • Switch back to your standard camera.
:linux::movie-camera:

April 9th, 2020

With many of us around the globe under shelter in place due to COVID-19video calls have become a lot more common. In particular, ZOOM hascontroversially become very popular. Arguably Zoom’s most interesting featureis the “Virtual Background” support which allows users to replacethe background behind them in their webcam video feed with any image (or video).

I’ve been using Zoom for a long time at work for Kubernetes open source meetings,usually from my company laptop. With daily “work from home” I’m now inclined touse my more powerful and ergonomic personal desktop for some of my open source work.

Unfortunately, Zoom’s linux client only supports the “chroma-key” A.K.A. “green screen”background removal method. This method requires a solid color backdrop, ideallya green screen with uniform lighting.

Since I do not have a green screen I decided to simply implement my own backgroundremoval, which was obviously better than cleaning my apartment or just usingmy laptop all the time. :grin:

It turns out we can actually get pretty decent results with off the shelf, open sourcecomponents and just a little of our own code.

# Reading The Camera

Blur

First thing’s first: How are we going to get the video feed from our webcam forprocessing?

Since I use Linux on my personal desktop (when not playing PC games) I chose touse the OpenCVpython bindings as I’m already familiar with them and they includeuseful image processing primatives in addition to V4L2 bindings for reading fromwebcams.

Reading a frame from the webcam with python-opencv is very simple:

For better results with my camera before capturing set:

Most video conferencing software seems to cap video to 720p @ 30 FPS or lower,but we won’t necessarily read every frame anyhow, this sets an upper limit.

Put the frame capture in a loop and we’ve got our video feed!

We can save a test frame with just:

And now we can see that our camera works. Success!

# Finding The Background

OK, now that we have a video feed, how do we identify the background so we canreplace it? This is the tricky part …

While Zoom doesn’t seem to have commented anywhere about how they implementedthis, the way it behaves makes me suspect that a neural network is involved,it’s hard to explain but the results look like one.Additionally, I found an article about Microsoft Teams implementing background blur with a convolutional neural network.

Creating our own network wouldn’t be too hard in principle – There are manyarticles and papers on the topic of image segmentation and plenty of opensource libraries and tools, but we need a fairly specialized dataset to getgood results.

Specifically we’d need lots of webcam like images with the idealhuman foreground marked pixel by pixel versus the background.

Building this sort of dataset in prepartion for training a neural net probably wouldbe a lot of work. Thankfully a research team at Google has already done all of this hardwork and open sourced a pre-trained neural network for “person segmentation”called BodyPix that works pretty well! ❤️

BodyPix is currently only available in TensorFlow.js form, so the easiestway to use it is from the body-pix-node library.

Blur Webcam Background Software

To get faster inference (prediction) in the browser a WebGL backend is preferred, but innode we can use the Tensorflow GPU backend(NOTE: this requires a NVIDIA Graphics Card, which I have).

To make this easier to setup, we’ll start by setting up a small containerizedtensorflow-gpu + node environment / project. Using this with nvidia-docker ismuch easier than getting all of the right dependencies setup on your host, itonly requires docker and an up-to-date GPU driver on the host.

Now to serve the results… WARNING: I am not a node expert! This is justmy quick evening hack, bear with me :-)

The following simple script replies to an HTTP POSTed image with a binary mask(an 2d array of binary pixels, where zero pixels are the background).

We can use numpy and requests to convert a frame to a mask from ourpython script with the following method:

Which gives us a result something like:

While I was working on this, I spotted this tweet:

This is definitely the BEST background for video calls. 💯 pic.twitter.com/Urz62Kg32k

— Ashley Willis (McNamara) (@ashleymcnamara) April 2, 2020

Now that we have the foreground / background mask, it will be easy to replacethe background.

After grabbing the awesome “Virtual Background” picture from that twitter thread andcropping it to a 16:9 ratio image …

… we can do the following:

Which gives us:

Blur Webcam Background Software Mac

The raw mask is clearly not tight enough due to the performance trade-offswe made with our BodyPix parameters but .. so far so good!

Blur Webcam Background Software Online

This background gave me an idea …

# Making It Fun

Now that we have the masking done, what can we do to make it look better?

The first obvious step is to smooth the mask out, with something like:

This can help a bit, but it’s pretty minor and just replacing the backgroundis a little boring, since we’ve hacked this up ourselves we can do anythinginstead of just a basic background removal …

Given that we’re using a Star Wars “virtual background” I decided to createhologram effect to fit in better. This also lets lean into blurring the mask.

First update the post processing to:

Now the edges are blurry which is good, but we need to start building the hologrameffect.

Hollywood holograms typically have the following properties:

  • washed out / monocrhomatic color, as if done with a bright laser
  • scan lines or a grid like effect, as if many beams created the image
  • “ghosting” as if the projection is done in layers or imperfectly reaching the correct distance

We can add these step by step.

First for the blue tint we just need to apply an OpenCV colormap:

Then we can add the scan lines with a halftone-like effect:

Next we can add some ghosting by adding weighted copies of the current effect,shifted along an axis:

Last: We’ll want to keep some of the original color, so let’s combinethe holo effect with the original frame similar to how we added the ghosting:

A frame with the hologram effect now looks like:

On it’s own this looks pretty :shrug:

But combined with our virtual background it looks more like:

There we go! :tada: (I promise it looks cooler with motion / video :upside_down_face:)

# Outputting Video

Now we’re just missing one thing … We can’t actually use this in a call yet.

To fix that, we’re going to use pyfakewebcam and v4l2loopback to create a fake webcam device.

Blur

We’re also going to actually wire this all up with docker.

First create a requirements.txt with our dependencies:

And then the Dockerfile for the fake camera app:

We’re going to need to install v4l2loopback from a shell:

And then configure a fake camera device:

We need the exclusive_caps setting for some apps (chrome, zoom) to work, the labelis just for our convenience when selecting the camera in apps, and the video numberjust makes this /dev/video20 if available, which is unlikely to be already in use.

Now we can update our script to create the fake camera:

We also need to note that pyfakewebcam expects images in RGB (red, green, blue)while our OpenCV operations are in BGR (blue, green, red) channel order.

We can fix this before outputting and then send a frame with:

All together the script looks like:

Now build the images:

And run them like:

Now make sure to start this before opening the camera with any apps, andbe sure to select the “v4l2loopback” / /dev/video20 camera in Zoom etc.

# The Finished Result

Here’s a quick clip I recorded of this in action:

Look! I’m dialing into the millenium falcon with an open source camera stack!

I’m pretty happy with how this came out. I’ll definitely be joining all of my meetings this way in the morning. :grin: