Cow gait and posture three-dimensional reconstruction and limp discrimination method and device
By reconstructing the gait and posture of dairy cows using a five-node inertial measurement unit and combining it with machine learning to determine the level of lameness, the high cost and non-all-weather nature of traditional monitoring methods are solved, enabling accurate and automated identification of lameness in dairy cows.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies cannot synchronously and accurately reconstruct the gait and posture of dairy cows with low sensor configuration and perform integrated limp identification. Furthermore, traditional monitoring methods are costly and difficult to achieve continuous motion monitoring around the clock.
A five-node inertial measurement unit is used to generate posture information through time alignment and error compensation, reconstruct the three-dimensional motion trajectory of the limbs, construct a virtual body reference frame, combine head and neck posture information and kinematic constraints, extract gait and posture features, calculate symmetry index, and combine machine learning to determine the limp level.
It enables three-dimensional reconstruction of the whole-body movement of dairy cows and automated lameness level determination, improving the accuracy and robustness of lameness identification, and is suitable for low-cost, all-weather monitoring in large-scale livestock farms.
Smart Images

Figure CN121725136A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent livestock, and in particular to a method and device for three-dimensional reconstruction of cow gait and posture and lameness identification. BACKGROUND
[0002] Cow lameness is a common health problem in large-scale livestock farming, which seriously affects the milk yield, reproductive efficiency and animal welfare of cows. Early, accurate and automatic identification of cow lameness is of great significance to improve the management level and economic benefits of the farm, and is a key issue in the current field of intelligent livestock.
[0003] Currently, the monitoring methods for cow lameness mainly include manual visual inspection, pressure plate analysis and fixed camera system. Manual visual inspection is highly subjective and relies on experience, making it difficult to achieve large-scale and standardized application. Although pressure plate and fixed camera equipment can provide objective data, they are limited by installation location, monitoring range and lighting conditions, and have high deployment and maintenance costs, making it difficult to achieve continuous motion monitoring of individual cows.
[0004] In recent years, motion analysis schemes based on wearable inertial measurement units have shown potential in animal gait research due to their low cost and ease of deployment. However, in the actual cow farming scenario, such schemes still face a series of technical challenges. SUMMARY
[0005] The present application provides a method and device for three-dimensional reconstruction of cow gait and posture and lameness identification, which solves the problem of not being able to synchronize and accurately reconstruct the full-body gait and posture of cows and conduct integrated lameness identification under low sensor configuration in the prior art, and realizes three-dimensional reconstruction of cow full-body motion and automatic lameness grade determination based on five-node inertial measurement.
[0006] The present application provides a method for three-dimensional reconstruction of cow gait and posture and lameness identification, comprising the following steps: Collecting inertial measurement data distributed at the nodes of the cow's limbs and head and neck, and generating posture information for each node after time alignment and error compensation of the inertial measurement data; Reconstructing the three-dimensional motion trajectory of the limbs in the ground coordinate system according to the posture information of the limb nodes; Constructing a virtual body reference frame according to the three-dimensional motion trajectory, and combining the posture information of the head and neck nodes with the kinematic constraints to solve the three-dimensional motion curve of the head and neck; Extracting gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve; Calculating a symmetry index based on the gait and posture features, and determining the lameness grade based on the symmetry index.
[0007] According to the method, the inertial measurement data distributed at the nodes of the limbs and the head and neck of the dairy cow is collected, the attitude information of each node is generated after time alignment and error compensation of the inertial measurement data, and the method specifically comprises the following steps: collecting the inertial measurement data distributed at the nodes of the limbs and the head and neck of the dairy cow; performing unit standardization and magnetic field interference compensation on the inertial measurement data; processing the compensated data by using a quaternion attitude filtering algorithm to fuse acceleration, angular velocity and magnetic field data, and generating the attitude information of each node in the body coordinate system of each node; and performing time synchronization alignment on the attitude information of each node based on the time stamp information of wireless transmission.
[0008] According to the method, the inertial measurement data distributed at the nodes of the limbs and the head and neck of the dairy cow is collected, the attitude information of each node is generated after time alignment and error compensation of the inertial measurement data, and the method specifically comprises the following steps: collecting the inertial measurement data distributed at the nodes of the limbs and the head and neck of the dairy cow; performing unit standardization and magnetic field interference compensation on the inertial measurement data; processing the compensated data by using a quaternion attitude filtering algorithm to fuse acceleration, angular velocity and magnetic field data, and generating the attitude information of each node in the body coordinate system of each node; and performing time synchronization alignment on the attitude information of each node based on the time stamp information of wireless transmission.
[0009] According to the method, the inertial measurement data distributed at the nodes of the limbs and the head and neck of the dairy cow is collected, the attitude information of each node is generated after time alignment and error compensation of the inertial measurement data, and the method specifically comprises the following steps: collecting the inertial measurement data distributed at the nodes of the limbs and the head and neck of the dairy cow; performing unit standardization and magnetic field interference compensation on the inertial measurement data; processing the compensated data by using a quaternion attitude filtering algorithm to fuse acceleration, angular velocity and magnetic field data, and generating the attitude information of each node in the body coordinate system of each node; and performing time synchronization alignment on the attitude information of each node based on the time stamp information of wireless transmission.
[0010] According to the method, the three-dimensional motion trajectory and the three-dimensional motion curve are used to extract gait and posture features, and the gait and posture features are combined to generate gait and posture features.
[0011] According to the method, the three-dimensional motion trajectory and the three-dimensional motion curve are used to extract gait and posture features, and the gait and posture features are combined to generate gait and posture features.
[0012] According to the method, the three-dimensional motion trajectory and the three-dimensional motion curve are used to extract gait and posture features, and the gait and posture features are combined to generate gait and posture features.
[0013] The application further provides a device for three-dimensional reconstruction of gait and posture of a dairy cow and lameness identification, which comprises the following modules. A data acquisition module is configured to acquire inertial measurement data of nodes distributed on limbs and a head and neck of the dairy cow, and generate posture information of each node after time alignment and error compensation of the inertial measurement data. A motion trajectory establishment module is configured to reconstruct three-dimensional motion trajectories of the limbs in a ground coordinate system according to the posture information of the limb nodes. The motion curve solving module is configured to construct a virtual body reference system according to the three-dimensional motion trajectory, and solve the three-dimensional motion curve of the head and neck in combination with the posture information of the head and neck node and the kinematic constraint; The gait posture extraction module is configured to extract gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve. The lameness grade determination module is configured to calculate a symmetry index according to the gait and posture features, and determine the lameness grade according to the symmetry index.
[0014] The present application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned any one of the cow gait and posture three-dimensional reconstruction and lameness discrimination method when executing the computer program.
[0015] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the above-mentioned any one of the cow gait and posture three-dimensional reconstruction and lameness discrimination method.
[0016] The present application also provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the above-mentioned any one of the cow gait and posture three-dimensional reconstruction and lameness discrimination method.
[0017] The present application provides a cow gait and posture three-dimensional reconstruction and lameness discrimination method and device, which has the following beneficial effects: by collecting the inertial measurement data of the cow's limbs and head and neck nodes and performing time alignment and error compensation, a unified and accurate data basis is provided for subsequent processing, effectively improving the consistency of multi-source heterogeneous motion data. On this basis, by reconstructing the three-dimensional motion trajectory of the limbs in the ground coordinate system, the spatial motion restoration of the cow's gait is realized, overcoming the shortcomings of traditional methods in three-dimensional motion modeling. By constructing a virtual body reference system based on the reconstructed trajectory, and solving the three-dimensional motion curve of the head and neck in combination with the posture information of the head and neck node and the kinematic constraint, the collaborative modeling of the cow's whole body posture is realized, enhancing the system's ability to capture the "head and neck-limb" coupling motion characteristics. Based on the above three-dimensional motion trajectory and curve, gait and posture features are extracted, and a symmetry index is calculated to determine the lameness grade, so that the lameness judgment is no longer dependent on single-dimensional information, but integrates the comprehensive evaluation of gait spatiotemporal features and head and neck posture changes, thereby significantly improving the accuracy and robustness of lameness discrimination. BRIEF DESCRIPTION OF DRAWINGS
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is one of the flowcharts illustrating the three-dimensional reconstruction of gait and posture of dairy cows and the method for limp identification provided by the present invention.
[0020] Figure 2 This is a schematic diagram of the calculation process for synthesizing a symmetry index by extracting key gait and posture features, provided by the present invention.
[0021] Figure 3 This is a schematic diagram of the interface of the three-dimensional visualization human-computer interaction system for monitoring lameness in dairy cows provided by the present invention.
[0022] Figure 4 This is the second schematic diagram of the workflow of the three-dimensional reconstruction of gait and posture of dairy cows and the method for limp discrimination provided by the present invention.
[0023] Figure 5 This is a schematic diagram of the structure of the three-dimensional reconstruction and lameness discrimination device for dairy cow gait and posture provided by the present invention.
[0024] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] The terminology involved in this invention will be explained below.
[0027] BLE (Bluetooth Low Energy) is a low-power wireless communication technology used for data transmission and synchronization between sensor nodes in this invention.
[0028] In gait analysis, HS (Heel-Strike) specifically refers to the ground contact event, that is, the instant when the hoof makes contact with the ground, which is the key node for dividing the gait cycle.
[0029] An IMU (Inertial Measurement Unit) is an electronic device that includes sensors such as accelerometers and gyroscopes, used to measure the specific force, angular velocity, and orientation of an object.
[0030] IP67 (Ingress Protection 67) is a protection rating that indicates the device enclosure is completely dustproof and can be submerged in one meter of water for 30 minutes without damage.
[0031] LF (Left Fore hoof) refers to the left forefoot.
[0032] LightGBM (Light Gradient Boosting Machine) is a machine learning algorithm based on the gradient boosting framework, known for its high efficiency and low memory consumption.
[0033] LR (Left Rear hoof) refers to the left hind hoof.
[0034] MQTT (Message Queuing Telemetry Transport) is a lightweight, publish / subscribe-based message transport protocol commonly used in Internet of Things (IoT) scenarios.
[0035] PGP (Pretty Good Privacy) is a data encryption and digital signature program.
[0036] RTS (Rauch–Tung–Striebel) is an optimal estimation algorithm used to smooth observation data.
[0037] RF (Right Fore Hoof) refers to the right forefoot.
[0038] RR (Right Rear hoof) refers to the right hind hoof.
[0039] A socket is a communication interface provided by an operating system that allows processes on different hosts or the same host to exchange data over a network.
[0040] TO (Toe-Off) in gait analysis specifically refers to the off-ground event, that is, the instant the hoof leaves the ground.
[0041] Unity3D (Unity 3D), a powerful cross-platform 3D game development and real-time content creation engine, is used in this invention for the visualization and rendering of a 3D cow body model and its motion trajectory.
[0042] ZUPT (Zero-Velocity Update) is an inertial navigation error correction technique that suppresses integral drift in navigation solutions by resetting the velocity to zero at detected moments of rest. It is one of the key technologies of this invention.
[0043] This invention proposes a method and system for three-dimensional reconstruction of gait and posture of dairy cows and comprehensive limp discrimination based on five-node IMUs. The system installs one IMU each at the left and right forehooves, left and right hindhooves, and head and neck, achieving data synchronization and aggregation through a low-power wireless network. The edge computing end first performs unit standardization and soft / hard iron compensation on the acceleration, angular velocity, and magnetic field of each node, and uses a quaternion attitude filter to obtain a high-confidence attitude. Subsequently, ZUPT-triggered inertial navigation and constraint fusion are performed with the four hoof nodes as the core, reconstructing the centimeter-level three-dimensional trajectory of each hoof in the ground coordinate system. The virtual machine reference frame is estimated using the spatial geometric relationship of the four hoof point sets. Under this reference frame, combined with the attitude and length / joint priors of the head and neck nodes, the three-dimensional motion curve of the head nodding and its pitch time series are calculated. The system detects ground contact (HS) and takeoff (TO) by detecting the zero-crossing and hysteresis of the hoof's vertical velocity. It segments the gait cycle and extracts spatiotemporal features such as stride length, stride duration, stance phase percentage, and peak hoof height. Simultaneously, it extracts posture features such as head and neck nodding amplitude, frequency, and phase. It then calculates the left-right / forward-backward symmetry index and uses a "rule-based threshold + machine learning classifier" to determine limpness levels from 0 to 3. To adapt to individual differences and changing scenarios, the system automatically accumulates individual health baselines and adaptively updates thresholds and model biases. The human-computer interaction terminal uses a 3D cow model for visualization, presenting a synchronized animation of the four hooves' 3D trajectory and head and neck curves driven by a skeleton, and provides a time slider, viewpoint control, and indicator overlay. Alarms are pushed to the mobile device when multiple consecutive cycles of abnormality occur.
[0044] Compared with existing technologies, this invention, with a hardware configuration of only five sensing nodes, can still stably output the three-dimensional trajectory reconstruction results of the hoof and simultaneously provide the three-dimensional head and neck nodding curve, achieving mutual verification of gait and posture information. By effectively suppressing inertial navigation drift through a rigid chassis and virtual machine reference frame, it balances accuracy, power consumption, and deployability, making it suitable for large-scale ranching applications.
[0045] The following is combined Figures 1-6 The embodiments of the present invention are described in detail.
[0046] Figure 1 This is one of the flowcharts illustrating the three-dimensional reconstruction of gait and posture of dairy cows and the method for limp detection provided by this invention, such as... Figure 1 As shown, the method includes the following steps: S110. Collect inertial measurement data distributed at the limb nodes and head and neck nodes of the dairy cow. After time alignment and error compensation of the inertial measurement data, generate the attitude information of each node.
[0047] According to the present invention, a method for three-dimensional reconstruction of gait and posture of dairy cows and limp discrimination is provided. This method collects inertial measurement data distributed across the limb and head / neck nodes of the dairy cow. After time alignment and error compensation of the inertial measurement data, posture information of each node is generated. Specifically, the method includes: collecting inertial measurement data distributed across the limb and head / neck nodes of the dairy cow; standardizing the inertial measurement data and compensating for magnetic field interference; processing the compensated data using a quaternion posture filtering algorithm to fuse acceleration, angular velocity, and magnetic field data to generate posture information of each node in its respective body coordinate system; and synchronizing the posture information of each node based on the wirelessly transmitted timestamp information.
[0048] Specifically, the system has one IMU installed in each of the left and right forelegs (LF, RF), left and right hindlegs (LR, RR), and the head and neck. The sampling frequency is preferably 100Hz. The node housing meets IP67 standards. The hooves are secured with a ring strap and anti-slip pads, and the head and neck nodes are secured with a collar / cowbell strap. The nodes communicate via BLE Mesh or equivalent low-power network, and a single button battery can operate continuously for at least 7 days. After installation, a short-range, constant-speed calibration walk is performed to estimate the relative positional offset of the nodes and write it into the individual configuration.
[0049] This embodiment ensures the integrity, stability, and long-term reliability of sensor data acquisition in dairy cow activity scenarios by optimizing the sampling frequency to 100Hz and employing an IP67 protective shell, a ring-shaped anti-slip strap, and a collar. The combination of a BLE Mesh low-power network and button battery power enables continuous operation of the sensor node for at least 7 days, significantly improving the system's deployability and endurance in pasture environments. Short-range constant-speed calibration walks after installation effectively estimate the relative positional offset of the node and write it into the individual configuration, providing a personalized initial parameter basis for subsequent accurate 3D motion reconstruction.
[0050] Acceleration, angular velocity, and magnetic field data acquired by each IMU were standardized to local units, compensated for with both hard and soft iron, and gyroscope bias was estimated. An improved Mahony / Madgwick quaternion filter was used to obtain attitude, with gain adaptively varying with angular velocity amplitude. Wireless sideband timestamps were added, and time alignment at the edge was performed using a least-squares method. Residual jitter was compensated using linear interpolation. Acceleration, angular velocity, and magnetic field data were unified to m / s². 2 The units are rad / s and μT to ensure consistency across devices.
[0051] At the data processing level, by implementing local execution unit standardization, soft and hard iron compensation, and zero-bias estimation, combined with an improved adaptive quaternion attitude filtering algorithm, inherent sensor errors and environmental magnetic interference were effectively suppressed, resulting in high-confidence node attitude information. Furthermore, through timestamped wireless transmission and least-squares time alignment at the edge, supplemented by linear interpolation compensation, high-precision synchronization of multi-node data was achieved, ultimately unifying acceleration, angular velocity, and magnetic field data to m / s². 2 The use of SI units such as rad / s and μT fundamentally ensures the spatiotemporal consistency and cross-device comparability of multi-source heterogeneous data, laying a solid data foundation for subsequent trajectory reconstruction and feature extraction.
[0052] S120. Based on the posture information of the limb nodes, reconstruct the three-dimensional motion trajectory of the limbs in the ground coordinate system.
[0053] According to the present invention, a method for three-dimensional reconstruction of gait and posture of dairy cows and for limp discrimination is provided. Based on the posture information of the limb nodes, the method reconstructs the three-dimensional motion trajectory of the limbs in the ground coordinate system. Specifically, the method includes: rotating the force data of the limb nodes in the body coordinate system to the ground coordinate system based on the corresponding posture information, and removing the gravity component to obtain linear acceleration; performing numerical integration on the linear acceleration to obtain velocity sequence and position sequence in sequence; and performing drift suppression and trajectory optimization on the velocity sequence and position sequence through zero-velocity update correction based on motion state and trajectory constraints based on multi-hoof spatial geometric relationship to obtain the three-dimensional motion trajectory of the limbs in the ground coordinate system.
[0054] Specifically, the origin, forward axis, and vertical axis of the virtual machine reference system are estimated based on the hoof point set in the supported state. Then, in this reference system, the three-dimensional motion curve of the head and neck nodding and its pitch angle time series are solved by combining the head and neck node attitude and connection length / range of motion prior.
[0055] This invention is based on the ground coordinate system. The three-dimensional trajectory of each hoof is reconstructed in the body coordinate system. First, the relative forces in the body coordinate system are... Quaternions Rotate to the ground system to obtain ,in, To represent the conjugate of a quaternion, Represents the specific force in the ground coordinate system; then Removing gravity, among which, A scalar value representing the local gravitational acceleration. This represents the unit vector indicating the direction of gravity in the ground coordinate system. This represents linear acceleration in the ground coordinate system. Velocity and position are numerically integrated using the following formula (preferably fourth-order Runge–Kutta). in, This represents the velocity of an object in the ground coordinate system. This represents the object's position in the ground coordinate system, where k and k+1 represent the indices of the discrete time step. t represents the time derivative; t represents time.
[0056] This embodiment constructs a virtual body reference frame, unifying the movements of the four hooves and head / neck under the same spatial reference, effectively solving the reference frame consistency problem in multi-node motion data fusion and providing a stable coordinate foundation for overall attitude analysis. In the ground coordinate system, the sensor specific force is converted into linear acceleration caused by pure motion through quaternion rotation and gravity removal, and then velocity and position are initially obtained through numerical integration, establishing a basic mapping relationship from inertial data to spatial motion.
[0057] Using the four hooves as the core, inertial navigation and geometric constraint fusion triggered by Zero-Voltage Update (ZUPT) are performed to reconstruct the three-dimensional trajectory of the four hooves in the ground coordinate system. ZUPT determines that within a preset time window, when the root mean square of the angular velocity is below a first threshold and the magnitude of acceleration is within a preset range of gravitational acceleration, the hoof is determined to be stationary and its velocity is reset to zero. At the same time, the current position is projected onto a dynamically estimated ground plane to suppress position drift. Geometric constraints utilize the rigid chassis characteristics of the gait support phase, using two to three hooves in the support state at the same time as stable anchor points. Three-dimensional Procrustes registration and ground plane fitting are used to update the ground normal, and soft constraint corrections are applied to the trajectory of the non-support hooves.
[0058] To suppress drift, a dual-layer ZUPT and geometric constraints are employed: firstly, within a sliding window of approximately 0.2 s, when the root mean square of the angular velocity is below approximately... And the acceleration modulus is in When the gait is stationary, the velocity is reset to zero. Simultaneously, a "standing constraint" is introduced to project the current position onto a dynamically estimated ground plane. Secondly, utilizing the rigid chassis characteristics of the gait support phase, two to three hooves simultaneously in support are used as stable anchor points. Three-dimensional Procrustes registration and plane fitting are performed to update the ground normal, thus providing soft constraint correction for the trajectory of the non-supporting hooves. To improve cross-cycle consistency, a "closure error redistribution" is introduced. At the end of an HS–HS cycle, the trajectory closure deviation is distributed to the continuous trajectory segments of that cycle according to the principle of minimizing energy. A back-smoothing effect (RTS) smoother is used at multiple cycle levels to significantly reduce high-frequency noise and low-frequency drift. The reconstructed coordinate origin is selected as the geometric center of the first effective support polygon. The forward axis is taken as the direction of the line connecting the midpoints of the front and rear hooves, and the vertical axis is taken as the fitted ground normal, thus determining a unified virtual machine reference system. After the above processing, the system outputs four centimeter-level three-dimensional trajectory curves in real time: left front, left rear, right front, and right rear. Axis height, swing amplitude, and forward propulsion can be directly used for gait spatiotemporal characteristic calculation and symmetry analysis.
[0059] To overcome the inherent integral drift of inertial navigation, this embodiment employs a two-layer correction mechanism consisting of zero-velocity updates and multi-hoof geometric constraints: by detecting the reset velocity at a stationary instant and projecting it onto the ground plane, low-frequency divergence between velocity and position is directly suppressed; further, utilizing the rigidity of the cow's torso in the supporting phase, the ground orientation is updated in real time through three-dimensional registration and planar fitting using the supporting hoof as an anchor point, and soft constraints are applied to the swinging hoof trajectory, significantly improving the spatial consistency of trajectory reconstruction. The introduced redistribution of closure error and multi-cycle smoothing effectively eliminate cumulative errors and high-frequency noise within the cycle, thus achieving centimeter-level accuracy in reconstructing the three-dimensional trajectory of the four hooves even under complex motion conditions.
[0060] Finally, based on the virtual body reference frame generated by high-precision trajectory and combined with the prior kinematics of the head and neck, a stable solution for the head and neck nodding motion curve was achieved. This enabled the system to simultaneously output quantitative data of the four hooves' movements and the head and neck posture, providing a comprehensive and reliable kinematic data foundation for subsequent gait symmetry analysis and limp discrimination.
[0061] S130. Construct a virtual machine reference frame based on the three-dimensional motion trajectory, and solve the three-dimensional motion curve of the head and neck by combining the attitude information and kinematic constraints of the head and neck nodes.
[0062] According to the present invention, a method for three-dimensional reconstruction of gait and posture of dairy cows and limp discrimination is provided. A virtual body reference frame is constructed based on the three-dimensional motion trajectory, and the three-dimensional motion curve of the head and neck is solved by combining the posture information and kinematic constraints of the head and neck nodes. Specifically, the method includes: determining the origin, forward axis, and vertical axis of the virtual body reference frame based on the spatial geometric relationship formed by the hoof points in the supporting state; transforming the posture information of the head and neck nodes in their own coordinate system to the virtual body reference frame in the virtual body reference frame to obtain the head and neck direction vector; combining the prior knowledge of the head and neck length and the single-joint kinematic model, using the direction vector as the main constraint and integral acceleration drift as the auxiliary correction, the three-dimensional motion curve of the head and neck endpoints relative to the virtual body reference frame is obtained through kinematic calculation.
[0063] Specifically, the position of the head and neck endpoints is estimated using a fusion strategy of "attitude-driven and acceleration-assisted": the main observation direction is given by the quaternion of the head and neck nodes, and the low-frequency displacement component of the acceleration integral of the connection length from the head and neck to the chest belt and the range of motion prior constraint line is combined to obtain the three-dimensional motion curve of the head and neck nodding and the pitch angle time series.
[0064] The origin of the virtual body reference frame is chosen as the geometric center of the first effective supporting polygon. The forward axis is taken as the direction of the line connecting the midpoint of the forehoof and the midpoint of the hindhoof, and the vertical axis is taken as the fitted ground normal. Within the virtual body reference frame, the head and neck node quaternions are the primary observations. Combined with prior knowledge of the connection length and range of motion from the head and neck to the chest girdle, the three-dimensional trajectory of the head and neck endpoints is obtained through a kinematic model of a single-joint chain. To suppress position integral drift, position is estimated using a "attitude-dominant, acceleration-assisted" strategy: linear acceleration is integrated within the mechanical system to obtain the low-frequency components of relative displacement, and soft constraints on joint length and movable domain are used to suppress high-frequency noise; pitch angle time series... By calculating the angle between the head and neck posture and the forward and vertical axes of the body system, the three-dimensional motion curve and amplitude / frequency of head nodding can be directly obtained, enriching the observation dimensions of forelimb-related lameness signs.
[0065] This embodiment constructs a virtual body reference system with the geometric center of the first effective supporting polygon as the origin, the line connecting the midpoints of the fore and hind hooves as the forward axis, and the fitted ground normal as the vertical axis. This provides a stable spatial reference for head and neck motion analysis that is synchronized with body motion, effectively overcoming the dynamic bias problems that may exist when directly using the ground coordinate system. Under this unified reference system, a fusion estimation strategy of "attitude-dominant, acceleration-assisted" is adopted. The quaternions of the head and neck nodes provide high-confidence primary observations of the motion direction, while physical priors such as the connection length and range of motion from the head and neck to the chest girdle are used as strong constraints. This effectively suppresses the drift problem that is prone to occur when relying solely on acceleration integrals, significantly improving the estimation accuracy and stability of the three-dimensional motion trajectory of the head and neck endpoints.
[0066] Furthermore, by using a single-joint chain kinematic model, the head and neck posture information is transformed into three-dimensional head nodding curves and pitch angle time series that can be directly used for gait analysis. This not only achieves a quantitative description of head and neck movements, but also enriches the observation dimensions of forelimb limp compensation behavior by introducing key posture features such as head nodding amplitude and frequency. This provides important observation indicators that complement traditional gait features for the comprehensive discrimination model.
[0067] S140. Based on the three-dimensional motion trajectory and three-dimensional motion curve, extract gait and posture features.
[0068] The present invention provides a method for three-dimensional reconstruction of gait and posture of dairy cows and lameness discrimination. Based on three-dimensional motion trajectories and three-dimensional motion curves, gait and posture features are extracted. Specifically, the method includes: detecting the ground contact and take-off events of each hoof based on the three-dimensional motion trajectories of the limbs, and dividing continuous gait cycles based on the ground contact events; within each gait cycle, extracting the spatiotemporal features of the limbs from the three-dimensional motion trajectories of the limbs; the spatiotemporal features include stride length, stride duration, proportion of the support phase, and maximum hoof height; extracting head and neck posture features from the three-dimensional motion curves of the head and neck, the head and neck posture features including the amplitude of head nodding movement, nodding frequency, and the time difference between the nodding phase and the ground contact events of the limbs; and combining the spatiotemporal features of the limbs and the head and neck posture features to generate gait and posture features.
[0069] Specifically, energy-minimizing redistribution is performed on the trajectory closure error for each HS–HS cycle, and an RTS smoother is used at the multi-cycle level to backsmooth the velocity and position, thereby reducing both high-frequency noise and low-frequency drift.
[0070] Based on the vertical velocity zero-crossing and hysteresis detection of each hoof (HS / TO), the gait cycle is divided into HS–HS. Features such as stride length, stride duration, stance phase percentage, hoof peak height, and propulsion speed are calculated from the three-dimensional trajectory of the four hooves. The amplitude and frequency of head nodding and their phase relationship with hoof events are calculated from the head and neck curve.
[0071] This embodiment accurately detects landing and takeoff events based on the zero-crossing and hysteresis characteristics of hoof vertical velocity, achieving objective and automatic segmentation of continuous gait cycles. This provides a standardized time reference for subsequent feature extraction, effectively overcoming the subjectivity and inefficiency of manual cycle segmentation. Building upon cycle segmentation, energy-minimizing redistribution is performed on the trajectory closure error within each HS-HS cycle, and backward smoothing is achieved using an RTS smoother at the multi-cycle level. This systematically suppresses both high-frequency noise and cumulative low-frequency drift in the trajectory, significantly improving the accuracy and reliability of gait spatiotemporal feature calculation.
[0072] Key gait parameters such as stride length, stride duration, and stance phase percentage are extracted from the optimized four-hoof three-dimensional trajectory. Simultaneously, head nodding amplitude, frequency, and their phase relationship with hoof events are obtained from the head and neck motion curve, thus constructing a multi-dimensional feature set integrating limb movements and head and neck posture. This processing not only achieves robust detection of gait cycle events but also provides a high-precision, multi-perspective data foundation for subsequent symmetry analysis and limpness level determination through trajectory optimization and multi-source feature fusion.
[0073] S150. Calculate the symmetry index based on gait and posture characteristics, and determine the limp level based on the symmetry index.
[0074] According to the present invention, a method for three-dimensional reconstruction of gait and posture of dairy cows and for lameness discrimination is provided. The method calculates a symmetry index based on gait and posture features, and determines the lameness level based on the symmetry index. Specifically, it includes: calculating a left-right symmetry index based on the corresponding feature values of the left and right limbs in the gait and posture features; and / or calculating an anterior-posterior symmetry index based on the corresponding feature values of the hind and posterior limbs; comparing the symmetry index with a preset rule threshold, and determining suspected lameness if the threshold is exceeded; inputting the symmetry index and the multi-source feature vector of gait and posture features into a pre-trained machine learning classifier, and outputting the lameness level; and combining the judgment result of the rule threshold with the discrimination result of the machine learning classifier to determine the final lameness level.
[0075] Specifically, gait events are detected based on the zero-crossing and hysteresis of the vertical velocity of the hoof point, the gait cycle is segmented, and spatiotemporal and posture features are extracted from the reconstructed trajectory and head and neck curves to calculate the left-right and front-back symmetry indices.
[0076] The stride length, stride duration, stance phase percentage, peak hoof height, and propulsion speed are calculated from the three-dimensional trajectory of the four hooves. The amplitude and frequency of head nodding and their phase relationship with the four-hoof events are calculated from the head and neck curve, and a left-right / forward-backward symmetry index is constructed based on this. : in, The symmetry index , These are the corresponding feature values for left and right or front and back, respectively.
[0077] Features are input into a discriminative model combining "rule-based thresholding + machine learning classifier," which outputs a tiered result of limping levels 0–3. The threshold and model bias are adaptively updated based on the individual's health baseline. The rule-based thresholding channel will... If the percentage exceeds the first threshold and / or the peak-to-peak value of the head and neck pitch angle exceeds the first angle threshold, it is judged as suspected limping; the machine learning classifier is random forest or LightGBM, which outputs a limping level of 0-3 for the multi-source feature vector.
[0078] The system employs a dual-channel output of limpness level, combining rule-based thresholding and machine learning. When... or When a condition is met, a suspected condition is identified, and random forest or LightGBM is used to classify multi-source feature vectors at levels 0–3. After inclusion in the database, a health baseline of at least three days is automatically accumulated. The threshold and model bias are adaptively updated over time, balancing sensitivity and specificity. A terminal alarm is triggered when the condition reaches level 2 or higher for several consecutive periods.
[0079] like Figure 2The diagram illustrates the calculation process for extracting key gait and posture features from raw motion data and ultimately synthesizing the symmetry index. The 3D hoof trajectory is reconstructed using inertial navigation. First, the "vertical velocity" component is extracted from the trajectory as the core analysis signal. Potential landing and takeoff event points are identified by performing "peak-valley / zero-crossing candidate" detection on the velocity curve. Based on this, and combined with criteria such as hysteresis logic, the "landing" (HS) and "takeoff" (TO) events are accurately determined.
[0080] "Step duration" can be calculated using "periodic slicing"; "step length" is obtained by analyzing the trajectory spatial span; "support ratio" is determined based on the duration ratio of the support phase to the swing phase; and "hoof peak height" is extracted from the trajectory height information. Simultaneously, the important posture feature of "head and neck amplitude" is extracted in parallel from the three-dimensional head and neck motion curve. The extracted gait features of the left and right limbs, as well as the relevant features of the fore and aft limbs, are substituted into the symmetry index formula for calculation, ultimately outputting a quantified "symmetry index," providing the most direct and effective input features for subsequent rule-based judgment and machine learning classification.
[0081] This embodiment accurately segments the gait cycle based on the zero-crossing and hysteresis characteristics of hoof vertical velocity, and systematically extracts spatiotemporal and posture features based on the reconstructed trajectory and head and neck curve, constructing a multi-dimensional feature set that comprehensively quantifies the movement state of dairy cows. Furthermore, by introducing a symmetry index calculation formula, the movement differences of the left and right limbs and the fore and hind limbs are transformed into quantifiable percentage indicators, providing an objective and unified comparison benchmark for lameness detection.
[0082] By constructing a dual-channel discrimination model combining "rule-based thresholding + machine learning classifier," multi-level processing for limp detection was achieved. The rule-based thresholding channel performs rapid initial screening based on key indicators such as symmetry index and changes in head and neck pitch angle, effectively ensuring the system's response speed and ability to capture obvious anomalies. The machine learning channel, on the other hand, uses algorithms such as random forest or LightGBM to deeply mine multi-source feature vectors, achieving fine-grained limp level discrimination from 0 to 3, significantly improving the accuracy and robustness of the discrimination.
[0083] By introducing an adaptive update mechanism based on individual health baselines, the thresholds and model parameters can be dynamically adjusted according to the cow's own condition, effectively overcoming the interference caused by individual differences and state changes, and achieving an optimal balance between specificity and sensitivity. Finally, by setting alarm trigger conditions of level 2 or higher for consecutive multiple cycles, the system ensures that it only issues an alarm when it reliably identifies persistent limpness problems, greatly improving the reliability and practical value of the early warning information.
[0084] According to the present invention, a method for three-dimensional reconstruction of gait and posture of dairy cows and limp discrimination is provided, which binds three-dimensional motion trajectory and three-dimensional motion curve to a preset three-dimensional cow body model; the three-dimensional cow body model animation with time axis is synchronously presented on the interactive terminal through a rendering engine, and the limp level, symmetry index and abnormal moment are superimposed in the form of layers; when the limp level of multiple consecutive gait cycles is not lower than a set threshold, the edge computing node pushes alarm information to the mobile terminal through a message queue.
[0085] Specifically, a 3D cow model is used for visualization, and a mobile alarm is triggered when a preset level threshold is reached for several consecutive cycles.
[0086] The human-computer interaction terminal uses a 3D cow model for real-time visualization. Using skeletal drive, the 3D trajectories of LF, RF, LR, and RR are bound to the 3D head and neck nodding curves and rendered in Three.js or Unity3D. The 3D trajectories of the four hooves and the head and neck nodding curves are displayed synchronously, providing a time slider, view control, and indicator overlay. Users can freely rotate, zoom, and pan the view using a mouse / touch, and use the time slider to replay historical segments. The system's end-to-end latency is controlled within 100 ms. Continuous anomalies automatically push alarm messages containing timestamps, levels, confidence levels, and 3D preview animations to mobile devices via MQTT or equivalent protocols, facilitating rapid on-site handling and verification.
[0087] like Figure 3 This invention showcases the interface of a 3D visualization human-computer interaction system for monitoring lameness in dairy cows. The interface features a central 3D model of the cow, with a legend clearly defining the visual indicators for "no lameness," "mild lameness," and "severe lameness," allowing users to intuitively distinguish different health levels of the cows. Lines in the diagram illustrate the movement trajectories of the cow's limbs and head. The overall interface integrates the 3D model, status indicators, and interactive controls, effectively transforming lameness assessment results from data into intuitive graphics, providing farm managers with an efficient decision support tool.
[0088] This embodiment binds the three-dimensional trajectories of the four hooves and the head-neck nodding curve to a three-dimensional cow model using a skeletal-driven approach, and utilizes a mature rendering engine for real-time visualization. This constructs a dynamic three-dimensional view that intuitively reflects the overall movement state of the dairy cow, greatly improving the interpretability of movement data and lameness characteristics. By providing multi-angle view control, time slider playback, and index overlay functions, users can interactively observe and analyze the movement details and characteristic changes at any given moment, significantly enhancing the system's auxiliary decision-making capabilities in lameness diagnosis and review.
[0089] By strictly controlling the system's end-to-end latency to within 100 milliseconds, real-time performance from data acquisition to visual feedback is ensured, providing technical support for on-site real-time monitoring. When continuous multi-cycle anomalies are detected, the system automatically pushes structured alarm information containing timestamps, levels, confidence levels, and 3D preview animations to mobile devices via a lightweight messaging protocol. This not only achieves real-time proactive early warning of limp-out risks but also greatly facilitates rapid location and handling by on-site personnel through the accompanying dynamic visual context, effectively improving the intelligence level of ranch management and emergency response efficiency.
[0090] like Figure 4 The diagram shown is the second part of the workflow for the 3D reconstruction of gait and posture of dairy cows and the method for limp detection. Sensor installation and individual parameter initialization are completed by equipping dairy cows with inertial measurement units (IMUs) and performing a short-term calibration walk. Subsequently, the system enters the core data processing stage, achieving high-precision time synchronization and data aggregation across multiple nodes through a Bluetooth Low Energy Mesh (BLE Mesh) network. Zero-rate update technology combined with extended Kalman filtering incorporates multi-hoof geometric constraints into the inertial navigation solution, effectively suppressing integral drift and thus stably reconstructing the 3D motion trajectory of all four hooves with centimeter-level accuracy.
[0091] Based on the reconstructed trajectory, the system automatically detects hoof landing and takeoff events, accurately segments the gait cycle, and extracts key spatiotemporal and posture features. At the analysis and decision-making level, the system employs a dual-channel parallel discrimination mechanism. On one hand, it rapidly screens key indicators such as symmetry index using preset threshold rules; on the other hand, it utilizes a machine learning model to perform fine-grained grading of multi-source feature vectors, outputting a 0-3 level limpness judgment result. The discrimination results from the two channels are fused, visually presenting the cow's movement status and historical playback through a 3D visualization interface, and also generating mobile push notifications with 3D animated previews for abnormal situations that meet the alarm conditions.
[0092] To ensure long-term applicability, the system also incorporates a closed-loop adaptive optimization module. This module generates a health baseline by continuously accumulating historical data of individuals and periodically updates the discrimination threshold and model parameters accordingly. This allows the system to dynamically adapt to the behavioral characteristics and state changes of different individuals, ultimately achieving continuous accuracy and high reliability in limpness discrimination.
[0093] The following describes the three-dimensional reconstruction and lameness discrimination device for dairy cow gait and posture provided by the present invention. The three-dimensional reconstruction and lameness discrimination device for dairy cow gait and posture described below can be referred to in correspondence with the three-dimensional reconstruction and lameness discrimination method for dairy cow gait and posture described above.
[0094] like Figure 5 The image shows a three-dimensional reconstruction and lameness discrimination device for cow gait and posture provided by the present invention, comprising: The data acquisition module 510 is used to collect inertial measurement data distributed at the limb nodes and head and neck nodes of the dairy cow. After time alignment and error compensation of the inertial measurement data, the attitude information of each node is generated. The motion trajectory establishment module 520 is used to reconstruct the three-dimensional motion trajectory of the limbs in the ground coordinate system based on the posture information of the limb nodes. The motion curve solving module 530 is used to construct a virtual machine reference frame based on the three-dimensional motion trajectory, and solve the three-dimensional motion curve of the head and neck by combining the attitude information and kinematic constraints of the head and neck nodes. Gait and posture extraction module 540 is used to extract gait and posture features based on three-dimensional motion trajectory and three-dimensional motion curve; The limp grade determination module 550 is used to calculate the symmetry index based on gait and posture characteristics, and determine the limp grade based on the symmetry index.
[0095] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, communication interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a method for three-dimensional reconstruction of cow gait and posture, and for determining lameness. This method includes: collecting inertial measurement data distributed at the limb nodes and head and neck nodes of the cow; performing time alignment and error compensation on the inertial measurement data to generate posture information for each node; reconstructing the three-dimensional motion trajectory of the limbs in a ground coordinate system based on the posture information of the limb nodes; constructing a virtual machine reference frame based on the three-dimensional motion trajectory, and solving the three-dimensional motion curve of the head and neck by combining the posture information and kinematic constraints of the head and neck nodes; extracting gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve; calculating a symmetry index based on the gait and posture features; and determining the lameness level based on the symmetry index.
[0096] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0097] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the three-dimensional reconstruction and lameness discrimination method for cow gait and posture provided by the above methods. The method includes: collecting inertial measurement data distributed at the limb nodes and head and neck nodes of the cow; performing time alignment and error compensation on the inertial measurement data to generate posture information for each node; reconstructing the three-dimensional motion trajectory of the limbs in a ground coordinate system based on the posture information of the limb nodes; constructing a virtual machine reference frame based on the three-dimensional motion trajectory, and solving the three-dimensional motion curve of the head and neck by combining the posture information and kinematic constraints of the head and neck nodes; extracting gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve; calculating a symmetry index based on the gait and posture features; and determining the lameness level based on the symmetry index.
[0098] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the three-dimensional reconstruction and lameness discrimination method for cow gait and posture provided by the above methods. The method includes: collecting inertial measurement data distributed at the limb nodes and head and neck nodes of the cow; performing time alignment and error compensation on the inertial measurement data to generate posture information for each node; reconstructing the three-dimensional motion trajectory of the limbs in a ground coordinate system based on the posture information of the limb nodes; constructing a virtual machine reference frame based on the three-dimensional motion trajectory, and solving the three-dimensional motion curve of the head and neck by combining the posture information and kinematic constraints of the head and neck nodes; extracting gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve; calculating a symmetry index based on the gait and posture features; and determining the lameness level based on the symmetry index.
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for three-dimensional reconstruction of gait and posture of dairy cows and for limp detection, characterized in that, include: Inertial measurement data distributed at the limb nodes and head and neck nodes of dairy cows are collected. After time alignment and error compensation of the inertial measurement data, attitude information of each node is generated. Based on the pose information of the limb nodes, the three-dimensional motion trajectory of the limbs is reconstructed in the ground coordinate system; A virtual machine reference frame is constructed based on the three-dimensional motion trajectory, and the three-dimensional motion curve of the head and neck is solved by combining the attitude information of the head and neck nodes with kinematic constraints. Based on the three-dimensional motion trajectory and the three-dimensional motion curve, gait and posture features are extracted; The symmetry index is calculated based on the gait and posture characteristics, and the limp level is determined based on the symmetry index.
2. The method for three-dimensional reconstruction of dairy cow gait and posture and lameness discrimination according to claim 1, characterized in that, The inertial measurement data collected from the limb nodes and head and neck nodes of the dairy cow is time-aligned and error-compensated to generate attitude information for each node, specifically including: Inertial measurement data were collected from the limb nodes and head and neck nodes of dairy cows; The inertial measurement data are standardized in units and compensated for magnetic field interference. The quaternion attitude filtering algorithm is used to process the compensated data to fuse acceleration, angular velocity and magnetic field data and generate attitude information of each node in its own body coordinate system. Based on the timestamp information transmitted wirelessly, the attitude information of each node is synchronized and aligned in time.
3. The method for three-dimensional reconstruction of dairy cow gait and posture and lameness discrimination according to claim 1, characterized in that, The process of reconstructing the three-dimensional motion trajectory of the limbs in the ground coordinate system based on the posture information of the limb nodes specifically includes: The force data of the limb nodes in the body coordinate system are rotated to the ground coordinate system based on the corresponding attitude information, and the gravity component is removed to obtain the linear acceleration. Numerical integration of the linear acceleration yields velocity and position sequences in sequence. By performing zero-velocity update correction based on motion state and trajectory constraints based on multi-hoof spatial geometric relationships, the velocity sequence and position sequence are drift suppressed and trajectory optimized to obtain the three-dimensional motion trajectory of the limbs in the ground coordinate system.
4. The method for three-dimensional reconstruction of dairy cow gait and posture and lameness discrimination according to claim 1, characterized in that, The step of constructing a virtual machine reference frame based on the three-dimensional motion trajectory, and combining the attitude information and kinematic constraints of the head and neck nodes to solve the three-dimensional motion curve of the head and neck, specifically includes: Based on the spatial geometric relationship formed by the hoof points in the supported state, determine the origin, forward axis, and vertical axis of the virtual machine reference system; In the virtual machine reference system, the attitude information of the head and neck nodes in their own coordinate system is transformed to the virtual machine reference system to obtain the head and neck direction vector; By combining the prior knowledge of head and neck length with the single-joint kinematic model, using the direction vector as the main constraint and the integral acceleration drift as the auxiliary correction, the three-dimensional motion curve of the head and neck endpoints relative to the virtual machine reference frame is obtained through kinematic calculation.
5. The method for three-dimensional reconstruction of dairy cow gait and posture and lameness discrimination according to claim 1, characterized in that, The extraction of gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve specifically includes: Based on the three-dimensional motion trajectory of the limbs, the ground contact event and ground departure event of each hoof are detected, and continuous gait cycles are divided based on the ground contact event; Within each gait cycle, spatiotemporal features of the limbs are extracted from the three-dimensional motion trajectories of the limbs; the spatiotemporal features include stride length, stride duration, proportion of the support phase, and maximum hoof height; Head and neck posture features are extracted from the three-dimensional motion curve of the head and neck, including the head nodding amplitude, nodding frequency, and the time difference between the nodding phase and the limb landing event. The spatiotemporal features of the limbs and the head and neck posture features are combined to generate gait and posture features.
6. The method for three-dimensional reconstruction of dairy cow gait and posture and lameness discrimination according to claim 1, characterized in that, The step of calculating a symmetry index based on the gait and posture characteristics, and determining the limp level based on the symmetry index, specifically includes: The left-right symmetry index is calculated based on the corresponding feature values of the left and right limbs in the gait and posture features; and / or the front-back symmetry index is calculated based on the corresponding feature values of the front and back limbs. The symmetry index is compared with a preset rule threshold. If it exceeds the threshold, it is determined to be a suspected limp. The symmetry index and the multi-source feature vectors of the gait and posture features are input into a pre-trained machine learning classifier, which outputs the limp level. The final limpness level is determined by combining the judgment results of the rule threshold and the discrimination results of the machine learning classifier.
7. The method for three-dimensional reconstruction of gait and posture of dairy cows and lameness discrimination according to claim 1, characterized in that, The method further includes: The three-dimensional motion trajectory and the three-dimensional motion curve are bound to a preset three-dimensional cow model; The rendering engine synchronously presents a 3D bovine model animation with a timeline on the interactive terminal, and displays the limp level, symmetry index and abnormal moments in the form of layers. When the limp level of multiple consecutive gait cycles is not lower than the set threshold, the edge computing node pushes alarm information to the mobile device via a message queue.
8. A device for three-dimensional reconstruction of gait and posture of dairy cows and for lameness discrimination, characterized in that, include: The data acquisition module is used to collect inertial measurement data distributed at the limb nodes and head and neck nodes of the cow. After time alignment and error compensation of the inertial measurement data, the attitude information of each node is generated. The motion trajectory establishment module is used to reconstruct the three-dimensional motion trajectory of the limbs in the ground coordinate system based on the posture information of the limb nodes. The motion curve solving module is used to construct a virtual machine reference system based on the three-dimensional motion trajectory, and solve the three-dimensional motion curve of the head and neck by combining the attitude information and kinematic constraints of the head and neck nodes. The gait and posture extraction module is used to extract gait and posture features based on the three-dimensional motion trajectory and the three-dimensional motion curve. The limp level determination module is used to calculate a symmetry index based on the gait and posture characteristics, and to determine the limp level based on the symmetry index.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the three-dimensional reconstruction of cow gait and posture and the limp discrimination method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the three-dimensional reconstruction of cow gait and posture and the limp discrimination method as described in any one of claims 1 to 7.