A method for recognizing and determining the position of at least one teat of a milking animal, including the steps: moving a scanning head including a light source to a region containing the teat or teats, capturing at least one image formed by said light, evaluating the image or images so as to determine if each image describes said teat or teats. The scanning head (1) is moved to a fixed initial position (A) in the room which is under the animal and clearly in front of an udder and thereby the teats of all known relevant animals, thereafter the scanning head is moved in determined steps (A-J) under the animal: upwards towards the animal, downwards, backwards towards the udder, upwards, downwards etc., while carrying out the scanning procedure. The invention also concerns an apparatus carrying out the process and a milking robot including such an apparatus.