Unistroke Gesture Recognition Through Polyline Approximation and Alignment