2.3. Image segmentation
The captured video images were subsequently processed offline
in the MATLAB 2010A environment to extract the outline of the
body area, which consisted of a two-step process. First, pigs were
localized and segmented in the image using an ellipse fitting algorithm.
Second, head and neck in the image were separated from the
body to maximize correlation to BW (Schofield, 1990).