Methods and systems are disclosed for controlling a milking installation having a movable element that performs a procedure related to extracting milk from milking animals. An exemplary method includes capturing a three-dimensional image of a detected entity present in an operating zone of the movable element, and comparing the captured three-dimensional image to stored image reference data. Based on the comparison, the detected entity is categorized entity as one of a first predefined entity and a second predefined entity. The first predefined entity corresponds to a milking animal and the second predefined entity corresponds to an entity other than a milking animal. Based on the categorization, a control determination is made of whether to allow the movable element to continue the procedure related to milk extraction or to initiate a safety measure. Then, the control determination is implemented.