Clustering for hand detection