An apparatus for raising livestock includes one or more confinement pens together with alleyways for transfer of the animals from one location to another. The apparatus includes one or more cameras for obtaining images of all animals in the containment area. A processor is provided for analyzing the images, the processor being arranged to allocate an arbitrary identification to each animal and to track all animals continually to maintain the allocation. From this tracking various data related to individual animals or the animals as a group can be obtained to assess their characteristics and to provide an indication to the worker of the animal to be extracted. The processor can be arranged to detect by image analysis of the image a quantity of feed and/or water in a feeder and to obtain images of the farrowing pen including the sow confinement area and at least one piglet confinement area.