REVERSE GREEN SCREENING USING OPENCV
In green screening we remove the background, whereas here we remove the foreground frames. It is a step-by-step process.
- Firstly,it captures and store the background frame.
- Detects the defined color using color segmentation algorithm.
- It segment out the defined colored part by generating a mask.
- Finally, the generated augmented output to create a effect.
Lets look at the LIBRARIES.
Mainly in this project we require 3 libraries: CV, NUMPY, TIME
- CV: It is an open source computer vision and machine learning software library, in this project the objects (foreground frames) gets detected by using this library.
- TIME: It is used to calculate the time required for the system to detect and keep an eye on each and every second in the program to generate an output.
- NUMPY: This Numerical Python is used to work with arrays.
NOTE: one need to adjust the value of HSV of the color you choose accordingly in the code.
well, “What is HSV???”
Hue Saturation Value
HUE: it is the color portion falls between 0 to 360 degrees,
. RED: 0 to 60 degrees,
- YELLOW: 61 to 120 degrees,
- GREEN : 121 to 180 degrees,
- CYAN : 181 to 240 degrees,
- BLUE: 241 to 300 degrees,
- MAGENTA: 301 to 360 degrees.
SATURATION: It describes the amount of grey in a particular color ,from 0 to 100 percent .Reducing this content towards 0 produces a faded effect by introducing more grey content and it appears from 0 to 1 where 0 is grey and 1 is the primary color.
VALUE: It describes the intensity if the color from 0 to 100 percent ,where 0 is completely black and 100 is the most brightest color .
GITHUB LINK — — https://github.com/Anjum-Shaik/Reverse-green-screening-using-opencv
Follow the link to see full code and its output.
NOTE: Once you run the code ,wait for a few seconds, let the webcam capture your background image and then you come inside.