Based on hand location detection after background subtraction I have constructed a series of decision rules to recognize hand gestures. I think that it can be used to modify neural network or to train a deep one.
Decision Rules have two parts.
if(max_x-min_x < POSSIBLE_MOVEMENT_THRESHOLD){ // not possible to be a horizontal movement
if(max_y-min_y < POSSIBLE_MOVEMENT_THRESHOLD){ // not possible to be a vertical movement
return JudgeCentalMovement(a_s,va_s);
}else{ // possible to be a vertical movement
if(max_y-min_y < CERTAIN_MOVEMENT_THRESHOLD){
string s=JudgeVerticalMovement(vy_s)+ " OR " + JudgeCentalMovement(a_s,va_s);
return s;
}else{
return JudgeVerticalMovement(vy_s);
}
}
}else{// possible to be a horizontal movement
if(max_y-min_y < POSSIBLE_MOVEMENT_THRESHOLD){ // not possible to be a vertical movement
if(max_x-min_x < CERTAIN_MOVEMENT_THRESHOLD){
string s = JudgeHorizontalMovement(vx_s)+ " OR " + JudgeCentalMovement(a_s,va_s);
return s;
}else{
return JudgeHorizontalMovement(vx_s);
}
}else{ // possible to be a vertical movement
if(max_x-min_x > CERTAIN_MOVEMENT_THRESHOLD){
if(max_y-min_y > CERTAIN_MOVEMENT_THRESHOLD)
return "REJ";
else{
return JudgeHorizontalMovement(vx_s);
}
}else{
if(max_y-min_y > CERTAIN_MOVEMENT_THRESHOLD)
return JudgeVerticalMovement(vy_s);
else{
string s=JudgeHorizontalMovement(vx_s)+" OR ";
s=s+JudgeVerticalMovement(vy_s)+" OR ";
s=s+JudgeCentalMovement(a_s,va_s);
return s;
}
}
}
}
The attachment contains the location and area sequence of each gesture and the result of decision rules. (479 bag files)