A great project to do when learning computer vision is to do a Green Screen, and in fact is one of the first projects I give my students to work on, and by the way, I’m still waiting for some students to deliver this project.

This is the typical screen used when recording scenes, where the background is completely green, and because of that it can be post-processed later to change the background and place anything in there.

Of course, this can also be done in real-time, like for example when you see the weather report on TV, the maps you see are being rendered in real-time, and the person presenting the weather is just pointing to a green wall.

Big Data Jobs

Requirements

  • Python 3

  • OpenCV 4.5.2

  • A green screen video. You can use this one:

  • An image to replace the background. You can use this one:

Step one: Load the resources

Step two: Iterate frames and create a mask

Step Three: Apply the mask and combine images

#ai #computer-vision #videos #opencv #artificial-intelligence

How I‘m Replacing a Green Screen Background On a Video With OpenCV in 3 Simple Steps
1.95 GEEK