It is obvious that the image
segmentation technique works well in a controllable environment,
such as with a dark-colored background. However, in practice, the
level of illumination in animal housing is quite low, and the actual
environments could not yield high-quality image segmentation.
For example, a pig image taken in a farm (Fig. 4(a)) was processed
by the Sobel, Canny, and Prewit algorithms, which are embedded
in the edge function of the MATLAB program. The edges in the
pig images were detected as shown in Fig. 4(b)–(d), respectively.
The qualities of the image segmentations were not good enough
to be processed. Our proposed method, which is based on the operator’s
vision using the naked eye to manually detect the image
boundary, is more flexible and practical. The environment has a
low effect on the quality of the boundary solution.