1. A system for processing an image, comprising: a three-dimensional camera that captures an image of a dairy livestock; a processor communicatively coupled to the three-dimensional camera, wherein the processor: accesses a first pixel having a first depth location; accesses a second pixel having a second depth location; determines that the second depth location is not within a threshold distance of the first depth location; discards the second pixel from the image based at least in part upon the determination.