A Matching-Based Approach for Human Motion Analysis