Feature Weighting via Optimal Thresholding for Video Analysis