Patent ID: 8624744

Claim:
An arrangement for attaching teat cups to teats of a milking animal in a rotary milking system having a rotatable milking stall for housing the milking animal during milking, the arrangement comprising: a three-dimensional camera configured to be directed towards the udder of the milking animal in the rotatable milking stall and to repeatedly record three-dimensional images of the udder of the milking animal in real time, said three-dimensional camera further configured to be directed towards the teat cups located in a magazine, configured to rotate with the rotatable milking stall, and to repeatedly record three-dimensional images of the teat cups in real time, wherein the three-dimensional camera is configured to not rotate along with the rotatable milking stall and the rotatable magazine; an image processing device configured to: repeatedly detect the teats of the milking animal in the rotatable milking stall and determine the positions of the teats in three spatial dimensions based on said repeatedly recorded three-dimensional images of the teats, and repeatedly detect the plurality of teat cups in the rotatable magazine and determine the positions of the teat cups in three spatial dimensions based on said repeatedly recorded three-dimensional images of the teat cups located in the rotatable magazine; and a control device configured to control a robot arm, based on the determined positions of the teats of the milking animal and the determined positions of the teat cups, to automatically attach at least one teat cup to at least one teat of the milking animal in the rotatable milking stall.