Efficient Template Generation for Object Classification in Video Surveillance