The invention discloses a multi-pig motion trail extraction and behavior
analysis method in a group environment, and the method comprises the following steps: improving a known single-target trackingalgorithm, and proposing an
algorithm for simultaneously tracking multiple live pigs in the group environment; according to a tracking result, extracting a central point coordinate of each frame of each pig, and drawing a motion trail diagram and an
instantaneous speed diagram of each pig; extracting a
region of interest according to a target frame obtained by tracking the pig body, segmenting a target contour of each pig, and judging whether the current morphological characteristic of the pig body is standing or
lying; judging the motion behaviors of each pig in each time period by combiningthe motion trail, the motion speed and the
contour form of the pig body and combining the motion law of the pig body and expert suggestions, and the motion behaviors mainly comprising pig body standing,
lying, slow walking, rapid running and abnormal restlessness. According to the invention, how to monitor behaviors of pigs in a group environment by using a precise and robust tracking
algorithm isdisplayed, abnormal movement of the pigs can be detected in real time, and judgment of health conditions of pig bodies is assisted.