A teat locating sensor for use in farming equipment such as robotic
milking machines and teat disinfection units. One or more cameras capture
an image of the udder. The captured image is processed by applying an
edge detector to provide an edge image. A Hough transform is applied for
detecting edges using semi-circles and near vertical forms. A feature
detector then matches these to provide teat ends and teat sides and thus
produces a teat location map. Colour or monochrome cameras can be used
and a 2D or 3D map can be generated. Filtering is described to improve
the accuracy if required.