Automatic analysis of the motion of microorganisms