Using Hidden Markov Models and Dynamic Size Functions for Gesture Recognition