A system, comprising: a controller having one or more processing modules, the controller operable to: access an image signal generated by a camera, the image signal corresponding to one or more features of the rear of a dairy livestock; determine, based on the image signal, positions of each of the hind legs of the dairy livestock; determine, based on the image signal and the determined positions of the hind legs of the dairy livestock, a position of an udder of the dairy livestock; determine, based on the image signal and the determined position of the udder of the dairy livestock, a spray position from which a spray tool may apply disinfectant to the teats of the dairy livestock, determine positions of each of the hind legs of the dairy livestock by processing the accessed image signal to locate edges in depth, the edges in depth corresponding to the edges of the hind legs of the dairy livestock, characterised in that the controller is operable to determine the position of the udder of the dairy livestock by processing the accessed image signal to trace one or more of the located edges in depth upwardly until they intersect with the udder. a controller having one or more processing modules, the controller operable to: access an image signal generated by a camera, the image signal corresponding to one or more features of the rear of a dairy livestock; determine, based on the image signal, positions of each of the hind legs of the dairy livestock; determine, based on the image signal and the determined positions of the hind legs of the dairy livestock, a position of an udder of the dairy livestock; determine, based on the image signal and the determined position of the udder of the dairy livestock, a spray position from which a spray tool may apply disinfectant to the teats of the dairy livestock, determine positions of each of the hind legs of the dairy livestock by processing the accessed image signal to locate edges in depth, the edges in depth corresponding to the edges of the hind legs of the dairy livestock, characterised in that the controller is operable to determine the position of the udder of the dairy livestock by processing the accessed image signal to trace one or more of the located edges in depth upwardly until they intersect with the udder. access an image signal generated by a camera, the image signal corresponding to one or more features of the rear of a dairy livestock; determine, based on the image signal, positions of each of the hind legs of the dairy livestock; determine, based on the image signal and the determined positions of the hind legs of the dairy livestock, a position of an udder of the dairy livestock; determine, based on the image signal and the determined position of the udder of the dairy livestock, a spray position from which a spray tool may apply disinfectant to the teats of the dairy livestock, determine positions of each of the hind legs of the dairy livestock by processing the accessed image signal to locate edges in depth, the edges in depth corresponding to the edges of the hind legs of the dairy livestock, characterised in that the controller is operable to determine the position of the udder of the dairy livestock by processing the accessed image signal to trace one or more of the located edges in depth upwardly until they intersect with the udder.