gesture recognition on 2d and 3d