A method for implementing group pig individual track tracking in a video stream

By using UWB positioning and coordinate transformation modules, the accuracy and precision of tracking pig trajectories within pigsties were solved, enabling real-time monitoring of pigs and their growth status within the pig farm, thus improving recognition speed and accuracy.

CN115526907BActive Publication Date: 2025-12-16SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211109249.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2025-12-16
Estimated Expiration
2042-09-13

AI Technical Summary

Technical Problem

Existing tracking methods for group pig farming in pigsties suffer from low accuracy, and are prone to trajectory misalignment and missing data, especially when pigs are stuck together in a confined space, making accurate tracking difficult.

Method used

By employing a UWB positioning module combined with a coordinate transformation module, the three-dimensional coordinates of the pigs are calculated using UWB positioning tags, base stations, and engine servers. Combined with depth camera images, this enables precise trajectory tracking of the pigs within the video stream.

Benefits of technology

It improves the accuracy and precision of tracking the trajectory of pigs in the pigsty, reduces trajectory loss, realizes real-time monitoring of the pig farm and the growth status, and improves the speed and accuracy of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115526907B_ABST
    Figure CN115526907B_ABST
Patent Text Reader

Abstract

The application discloses a method for realizing group pig individual track tracking in a video stream. First, UWB positioning anchors are arranged around a pig house, and each pig is provided with a UWB tag to obtain three-dimensional coordinates of the pig in the pig house; second, a monitoring video is arranged on the pig house, and the depth information in the image is determined through a Zhang Zhengyou calibration method; then, according to the track information of the pig in the video stream, the virtual space-time track of the pig is obtained through coordinate conversion; finally, the track of the corresponding pig is determined according to the UWB positioning information. The application can realize real-time positioning and track tracking of group pigs in the pig house. When the pig in the pig house is sick, the remote monitoring personnel can quickly and timely check the close contact of the sick pig through the movement track of each pig in the video stream, so that the problem pig is quickly positioned, and the loss of the pig farm is reduced. The application can reliably and efficiently solve the track tracking problem of group pigs in the pig farm under the condition of high density of the pig farm in a non-contact and non-perception manner.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of indoor positioning technology of carrier-free communication and the field of image processing, in particular to a method for tracking individual trajectories of group-raised pigs in a video stream. BACKGROUND

[0002] The pig industry is an important industry in China's agriculture and plays an important role in ensuring meat food safety supply. At present, China's pig industry is changing from traditional pig industry to modern pig industry, whether in breeding mode, regional layout or production method, production capacity is changing significantly. Large pig farms do not have an accurate and effective tracking method for the activity trajectory of pigs, which leads to the inability to quickly and timely investigate close contacts when pigs in the farm become ill, causing unnecessary losses. In order to realize the trajectory tracking method of group-raised pigs in the farm, it is necessary to first locate the pigs in the farm in real time.

[0003] One of the earliest published systems for pig indoor positioning is based on radar technology. The accuracy of this system is less than 1 meter, and the battery life of the system running continuously is only 12 hours. In addition, due to the use of metal frames and materials to build pig houses, the transmission signal is reflected, shielded, etc. Therefore, the pig house environment, building materials pose some challenges to the indoor positioning system. With the further development of wireless communication, people began to use more efficient and accurate ways to transmit and locate, and UWB as a carrier-free communication technology has the advantages of low power consumption, strong penetration, high time resolution and high transmission data rate, and can provide a larger coverage range. Indoor positioning technology based on UWB has also become a research hotspot in recent years.

[0004] The commonly used trajectory tracking method mainly uses a video instance segmentation algorithm. The goal of this algorithm is to segment each instance of the video frame and track the same target between frames. This algorithm combines detection, segmentation, and tracking, which are the most common computer vision tasks. The mainstream method is mainly based on Mask R-CNN+Track, and the main idea is to use Mask R-CNN as the basic framework and add a tracking module to complete video instance segmentation.

[0005] This algorithm is used for trajectory tracking of group-raised pigs in the farm. Not only is the calculation amount huge, but also due to the relatively narrow space in the pig farm, pigs often appear to be stuck in this situation. In this case, the current mainstream track module is difficult to achieve accurate tracking of the same object in front and back frames, resulting in problems such as trajectory misplacement and trajectory loss in the final pig movement trajectory. SUMMARY

[0006] In order to solve the above problems, the application provides a method for tracking single trajectory of group pigs in a video stream, which has low dependence on environment and high efficiency, and improves the precision and accuracy of tracking group pig trajectory in a pig house.

[0007] In order to achieve the above purpose, the application adopts the following specific technical solutions:

[0008] A method for tracking single trajectory of group pigs in a video stream, the key of which lies in a UWB positioning module:

[0009] The method comprises a positioning tag, a positioning base station, a positioning engine server and a monitoring terminal, wherein the positioning tag is installed on a pig and used for sending a UWB pulse signal to the positioning base station; the positioning base station is in a number of three and used for synchronously receiving the UWB pulse signal and transmitting the UWB pulse signal to the positioning engine server; the positioning engine server is used for collecting all UWB pulse signals and calculating target position coordinates according to signal strength and a TDOA / TOF algorithm; and the monitoring terminal is used for marking the target position coordinates; wherein the positioning tag, the positioning base station and the positioning engine server are connected wirelessly by using UWB pulse signals, and the positioning engine server and the monitoring terminal are connected by using an API interface.

[0010] Further, the UWB positioning tag is fixed on a collar, the collar is worn on the neck of the pig, the collar comprises a pendant section and an exposed section, and the UWB positioning tag is fixed on the exposed section. The material density of the pendant section is greater than that of the exposed section, and the weight of the pendant section is greater than that of the exposed section, so as to ensure that the pendant section always remains at the lowest end of the collar, and the UWB positioning tag always remains at the back of the pig, thereby reducing the shielding of the pig's body to the signal as much as possible.

[0011] Further, the positioning base station is installed at three corners of the pig house, so that the three-dimensional coordinates obtained can be better corresponded to the pictures taken by the depth camera, and the subsequent coordinate conversion module is facilitated.

[0012] Further, the positioning tag comprises a tag data processing unit and a tag UWB radio frequency processing unit.

[0013] Further, the positioning base station comprises a base station data processing unit, a base station UWB radio frequency processing unit and a base station UWB base station antenna.

[0014] Further, the working frequency of the tag data processing unit and the base station UWB radio frequency processing unit is 4.3GHZ-6.5GHZ.

[0015] A group pig trajectory tracking method based on UWB positioning, the key of which lies in a coordinate conversion module:

[0016] According to the three-dimensional coordinates of the tag obtained by the UWB positioning, the position of the pixel point of the tag in the corresponding depth image is calculated; and according to the number of the UWB tag, the position of each pig in the depth image is obtained.

[0017] Further, the Zhang Zhengyou calibration method is used to obtain the depth information in the image, the internal parameter matrix, the external parameter matrix and the distortion parameter are determined according to the analytical solution estimation method, the corresponding calculation formula is obtained, and the coordinate conversion from the coordinate point in the world coordinate system to the pixel point in the image is realized.

[0018] Compared with the prior art, the present application has the following advantages and beneficial effects:

[0019] 1. The UWB positioning technology is applied to the trajectory tracking field, and the trajectory tracking of pigs is realized. Compared with some existing trajectory tracking algorithms based on artificial intelligence and images, the present application is less likely to lose the target, has higher accuracy and faster recognition speed.

[0020] 2. Based on the present application, the trajectory tracking of pigs in a pig farm can be realized, and real-time monitoring of the pig farm in a true sense can be realized. Meanwhile, based on the present application, the pig farm can realize real-time monitoring of the growth trend and living habits of pigs, which is more conducive to the cultivation of pigs and the development of the pig farm. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 is a method flowchart of the present application.

[0022] Figure 2 is a UWB positioning flowchart. DETAILED DESCRIPTION

[0023] The pig trajectory tracking method based on UWB positioning comprises the following steps:

[0024] S1: arranging UWB positioning anchors around the pig house, and selecting three corners of the pig house as the arrangement positions of the UWB positioning anchors;

[0025] S2: wearing UWB tags on each pig in the pig house, and sequentially marking the tags with numbers 1~n, wherein n is the number of pigs in the pig house;

[0026] S3: executing the UWB positioning module to obtain the real-time three-dimensional coordinates of each pig in the pig house plane;

[0027] S4: setting up a monitoring video in the pig house, and determining the depth information in the image by the Zhang Zhengyou calibration method;

[0028] S5: collecting the video stream, processing the video stream, taking a picture every 25 frames, and sorting the obtained pictures according to time;

[0029] S6: Select the target pig, according to the time point corresponding to each picture in S5, obtain the three-dimensional coordinates of the UWB tag of the target pig at the corresponding time point in S3;

[0030] S7: According to the depth information obtained in S4, execute the coordinate conversion module to obtain the coordinate point position of the UWB tag of the target pig in each picture, and superimpose all pictures in time sequence in one picture, and the obtained series of coordinate points are the motion trajectory of the target pig;

[0031] S8: Display the real position and final position of the target pig in each processed frame of picture in the video stream, which can realize the trajectory tracking of the target pig in the video stream;

[0032] S9: Take the pigs numbered 1~n as the target pig in turn, and repeat S6 to S8, which can realize the tracking of the single trajectory of the group pigs in the video stream.

[0033] Among them, the UWB positioning module in the step S3 is specifically:

[0034] S3-1, select three corners of the pig house and install UWB base stations;

[0035] S3-2, obtain the three-dimensional space coordinates of the three UWB base stations, respectively denoted as (x1, y1, z1), (x2, y2, z2), (x3, y3, z3);

[0036] S3-3, obtain the distances of the to-be-positioned tag to the three UWB base stations, respectively denoted as r1, r2, r3;

[0037] S3-4, calculate the three-dimensional space coordinates of the tag, the formula is as follows:

[0038]

[0039] S3-5, obtain the three-dimensional coordinates (x, y, z) of the tag in the pig house plane;

[0040] The coordinate conversion module in the step S7 is specifically:

[0041] S7-1, prepare a Zhang's calibration board, take pictures at different angles with a camera, and collect 16 pictures as a group of calibration pictures;

[0042] S7-2, detect the image feature points such as the corner points of the calibration board, obtain the pixel coordinate values of each corner point, and calculate the physical coordinate values of the corner points through the corresponding relationship between the grid actual size and the world coordinate system;

[0043] S7-3, according to the analytical solution estimation method, the internal parameter matrix, the external parameter matrix and the distortion parameter are calculated, the corresponding calculation formula is obtained, so that the coordinate point in the world coordinate system to the pixel point coordinate conversion in the image is realized.

Claims

1. A method for implementing group pig individual track tracking in a video stream, characterized in that, Based on two calculation modules: UWB positioning module, coordinate conversion module, specifically comprising the following steps: S1, arranging UWB positioning anchor points around the pig house, selecting three corners of the pig house as the arrangement position of the UWB positioning anchor points; S2, wearing UWB tags for each pig in the pig house, and giving the tags with numbers 1~n in turn, wherein n is the number of pigs in the pig house; S3, executing the UWB positioning module to obtain the real-time three-dimensional coordinates of each pig in the pig house plane; S4, setting up a monitoring video in the pig house, determining the depth information in the image by Zhang Zhengyou calibration method; S5, collecting video stream, processing the video stream, taking a picture every 25 frames, and sorting the obtained pictures according to time; S6, selecting a target pig, obtaining the three-dimensional coordinates of the UWB tag of the target pig at the corresponding time point in S3 according to the time point corresponding to each picture in S5; S7, executing the coordinate conversion module according to the depth information in the image obtained in S4 to obtain the coordinate point position of the UWB tag of the target pig in each picture, superimposing all pictures in time sequence in one picture, and obtaining a series of coordinate points as the motion trajectory of the target pig; S8, displaying the real position and final position of the target pig in each processed frame of picture in the video stream to realize the trajectory tracking of the target pig in the video stream; S9, taking the pigs numbered 1~n as the target pig in turn, and repeating S6 to S8, that is, realizing the tracking of the single trajectory of the group pigs in the video stream.

2. The method for realizing group pig individual track tracking in video stream according to claim 1, characterized in that, The UWB positioning module comprises a UWB tag, a UWB positioning anchor point, a positioning engine server and a monitoring terminal, the UWB tag is installed on the pig, the number of positioning anchor points is three.

3. The method of claim 1, wherein, The erection position of the monitoring video is on the ceiling of the pig house, which can ensure that the four corners of the pig house can be shot.

4. The method for realizing group pig individual track tracking in video stream according to claim 2, characterized in that, The UWB tag is fixed on the collar, the collar is worn on the neck of the pig, the collar comprises a pendant section and an exposed section, and the UWB tag is fixed on the exposed section; the material density of the pendant section is greater than that of the exposed section, and the weight of the pendant section is greater than that of the exposed section, so as to ensure that the pendant section always remains at the lowest end of the collar, and the UWB tag always remains at the back of the pig, reducing the shielding of the pig's body to the signal.

5. The method of claim 2, wherein, The positioning anchor points are installed in the corners of the pig house, and the obtained three-dimensional coordinates can be better corresponded to the pictures intercepted in the video stream, facilitating the execution of the subsequent coordinate conversion module.

Citation Information

Patent Citations

  • Target tracking and target image reconstruction technology based on UWB

    CN113115208A

  • Integrated Camera and Ultra-Wideband Location Devices and Related Systems

    US20210304577A1