A teat location system for automated milking systems comprises a light
projection source and a camera having a two dimensional array of pixels,
each of which is capable of returning time of flight information as well
as intensity. Depth of field limitations and the problem of overlapping
teat images are thereby overcome or minimized.