Constrained contour matching in hand posture recognition