Skip to content

Remove and Replace background in live video in real-time. Using webcam and python

Notifications You must be signed in to change notification settings

Shlok-crypto/Background-Remover-RealTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Background-Remover-RealTime

Prerequisite

OpenCv Python Numpy

Input

Live Video

Output

Foreground frame Background frame New Background frame w/ Foreground

Procedure

Read in the live frame Read in the replacement frame(background) Apply Thresholding on to the live frame Dilate the thresholded frame find Contoues in the dilated frame optimize/process the contours Draw(fill) the contour => this will be the foreground roi separate the foreground from Background (cv.bitwize_and) remove the foreground Roi from the New Background (cv.bitwize_and(inverseRoi, NewBackground) Combine the New Background Roi and foreground Roi (cv.bitwize_or(NewBackground, Foreground)

Output

BackgroundChanger_2.mp4

About

Remove and Replace background in live video in real-time. Using webcam and python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages