Motility, chemotaxis and phototaxis measurements by image analysis