Decision Rules based on hand location and area change

0 views
Skip to first unread message

周游

unread,
Jun 10, 2013, 4:23:24 AM6/10/13
to praktikum-masc...@googlegroups.com
Hallo everyone,

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.

First part classifies gestures in 4 classes (Horizontal, Vertical, Cental, REJ)
Second part classifies gestures in each class

The following is the code of first part decision rules:
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)


Best regards


--
Zhou You
周 游
extractedInfo.tar.gz
Reply all
Reply to author
Forward
0 new messages