1 | initial version |
There is OpenCV functionality for calculating background subtraction. However, you would need an image of the plain green background. This would be the bottleneck as I am assuming that you have only the one picture to work with.
Take a look at this link, it might be of some help --> http://docs.opencv.org/trunk/doc/tutorials/video/background_subtraction/background_subtraction.html
What this functionality does is that it calculates the foreground over a sequence of images and through a thresholding function, gives you the output you desire.
Everything is well documented and well explained. There might be a different way to implement it because of the changes with OpenCV 3.0.0. If you choose this method and have trouble implementing it, do not hesitate to ask,