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; accesses a third pixel having a third depth location; determines that the second pixel is an outlier among the first pixel and the third pixel based upon the first depth location, the second depth location, and the third depth location; discards the second pixel from the image based at least in part upon the determination.