Detecting Raised Finger using Vision

Hi, I am using Vision to detect fingers for counting. I am able to detect the finger joints. However when the finger is closed it also seems to detect the finger joints. So I am not able to differentiate and it is not reliable. I have tried to detect all the joints of a finger before determining the finger is raised, but doesn't seem to work. Any ideas on how I can improve the accuracy of detection of raised finger.

Thanks

Detecting Raised Finger using Vision
 
 
Q