Quantification of collective dynamics in ball sports based on visual information