We used the Needleman-Wunsch algorithm with values of 1 for match, 0 for mismatch, and 0 for gap penalty. The following is the algorithm in pseudo code used to analyze the human motion similarity. HumanMotionSimilarity(hm1, hm2) For Do each marker on hm1 and hm2 seq1 = chain codes for this marker on hm1 seq2 = chain codes for this marker on hm2 Needleman-Wunsch(seq1, seq2, seq1_al, seq2_al) /*Intuition 3*/ If Then seq1_al = seq2_al similarity_value = 1.0 Else /*Intuition 1 and 2*/ seq_length = length_of(seq1_al) For Do i = 1; i <= seq_len If Then seq1_al[i] = seq2_al[i] sim = sim + 1 EndIf EndFor similarity_value = sim / seq_length EndIf sum_sim_value = sum_sim_value + similarity_value counter = counter + 1 EndFor sum_sim_value = sum_sim_value / counter
We used the Needleman-Wunsch algorithm with values of 1 for match, 0 for mismatch, and 0 for gap penalty. The following is the algorithm in pseudo code used to analyze the human motion similarity. HumanMotionSimilarity(hm1, hm2) For each marker on hm1 and hm2 Do seq1 = chain codes for this marker on hm1 seq2 = chain codes for this marker on hm2 Needleman-Wunsch(seq1, seq2, seq1_al, seq2_al) /*Intuition 3*/ If seq1_al = seq2_al Then similarity_value = 1.0 Else /*Intuition 1 and 2*/ seq_length = length_of(seq1_al) For i = 1; i <= seq_len Do If seq1_al[i] = seq2_al[i] Then sim = sim + 1 EndIf EndFor similarity_value = sim / seq_length EndIf sum_sim_value = sum_sim_value + similarity_value counter = counter + 1 EndFor sum_sim_value = sum_sim_value / counter