Hi,
I want to do background subtraction in a video file using Opencv method. Right now i'm able to do background subtraction, but the problem is that i couldn't get the output in color mode. All the output after subtracting the background is coming in grayscale color mode :(. I want to get the color information to the foreground which is the resulting output after background got subtracted.
Can i do it using masking technique?? like the following procedure which i'm thinking about.
- Capture Input -- InputFrame (RGB)
- Process InputFrame
- Subtract background, store forground in TempFrame ( which is coming in grayscale :( )
- Create a mask using TempFrame
- Apply the created mask to the InputFrame
- Get colored foreground as OutFrame
I'm struck up with doing the masking using Opencv. I'm just a very beginner in OpenCV. Please help me to overcome this.
Thanks in advance.