Patent ID: 8210122

Claim:
An arrangement for determining a position of a teat of a milking animal in a milking system including a robot arm for automatically attaching a teat cup to the teat of the milking animal when being located in a position to be milked, and a control device for controlling a movement of said robot arm based on determined positions of the teats of the milking animal, said arrangement comprising: a first camera pair having cameras located near each other in a substantially vertical direction and having image planes that are substantially coplanar with respect to one another, wherein the cameras are thereby directed to record substantially coplanar images and are directed towards the teat of the milking animal when being located in the position to be milked, and wherein the first camera pair is provided to repeatedly record pairs of vertically-aligned images with overlapping fields of vision; and an image processing device provided for repeatedly detecting the teat of the milking animal and stereoscopically determining the position of the teat based on said repeatedly recorded pairs of images, wherein said first camera pair is mounted below and behind the teat of the milking animal when being located in the position to be milked so that said first camera pair is directed diagonally upwards towards the teat of the milking animal when being located in the position to be milked.