Removing video background

Hi!

New to Mars. I was wondering if there’s an easy way to remove video background? Interested in both:

  1. Detect human and make all other pixels in video feed transparent.
  2. Make pixels in video feed beyond certain depth transparent

Grateful for even some vague directions on how to approach. Manipulating the video feed seems like a mystery.

Hey there,

to access the camera texture you can check on Access Camera Image and/or Environment Probes where @amydigiov_Unity mentions that you can grab your camera image directly from
MarsRuntimeUtils.GetActiveCamera(true).GetComponent<ARCameraManager>()

MARS supports body tracking (iOS only), so you could perhaps use a body avatar Body Tracking | Unity MARS | 1.3.1 that uses an unlit shader, then after grabbing the texture (as I mentioned above) you can discern pixel by pixel which part of the image belongs to the tracked avatar and one that belongs to the camera feed.

There are lots of way to achieve that; this is one approach. Hope it helps! :slight_smile:

@jmunozarUTech Thank you so much for your help! :slight_smile:

1 Like

Everything necessary is a couple of snaps. Open the Kapwing Studio and transfer your own video, or utilize one you found on the web to remove background from image for free. With your video layer chosen, click the “Impacts” tab and select the “Eliminate Background” choice. Utilize the see to pick the edge that best works for you, and commodity for a foundation free video.

The only free tool that I found is imgaix.com

Demolition ML Kit may solve your task. Check it out: Awesome ML Kit | AI-ML Integration | Unity Asset Store