Updated code.

Tracks objects, finds their middle points, finds average of all objects
of a certain color and returns that distance from the center.