Reputation: 616
I have used gaussian mixture model explained in this link to seperate fingers from the back-ground. It works decently if the backgroud is plain as below examples.
Input Image:
Output Image:
Actually, in my project environment, the user will be sitting in front of the webcam with hand in foreground and face behind(in background).
Input Image ( User Sitting In front of Camera ):
So i have to extract only the hand part and i am trying to do with Gaussian Mixture Model. But the implementation doesn't work well here.
Output After Applying Gaussian Mixture Model:
So how to extract only the fingers from the output like below:
Upvotes: 2
Views: 1226
Reputation: 2106
looking from the "press Esc to exit application" words, I am going to make an assumption that your application is real time? If so, have you considered real time background substraction?
More details about background subtraction can be found here: http://web.bii.a-star.edu.sg/~chengli/BkgSbt.htm.
To my knowledge, this should be sufficient to track and extract the hand. But it's not that robust, for instance, considering the user keep bobbing his head, or shifting it left and right. (the user head will be then considered a foreground object instead of background)
But if you are not going to do something so complicated like your question posed, then if the user just gonna sit there not moving while the hand comes into frame, then I believe you will find the background subtraction method extremely useful. Cheers.
Upvotes: 1