An optimized implementation of camshift tracking algorithm for Javascript