Cattle herd density abnormity early warning method based on multi-camera data fusion

By using multi-camera data fusion and risk mapping models, the system monitors and issues early warnings about changes in cattle density in real time, solving the problems of disease transmission and congestion accidents in cattle farms and improving the effectiveness of risk management and production.

CN120997463AActive Publication Date: 2025-11-21BEIJING CENTURY ELINK ELECTRONICS TECH CO LTD

Patent Information

Application Number
CN202511268909.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-06
Publication Date
2025-11-21
Estimated Expiration
2045-09-06

AI Technical Summary

Technical Problem

In beef cattle farms, traditional monitoring methods cannot monitor changes in cattle density in a timely manner, leading to increased risk of disease transmission and frequent trampling and congestion accidents. Existing solutions lack an effective early warning mechanism for risk events.

Method used

By employing multi-camera data fusion technology, a two-dimensional coordinate system is established, and the density of beef cattle within the grid is statistically analyzed. A risk mapping model is introduced, thresholds are set, and early warning signals are generated in advance. The probability of risk is quantified through a logistic regression model, and the model is optimized by combining closed-loop feedback.

Benefits of technology

It enabled real-time monitoring of cattle density changes, reduced the incidence of risk events in cattle breeding farms, and increased beef cattle output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997463A_ABST
    Figure CN120997463A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and provides a cattle herd density abnormity early warning method based on multi-camera data fusion, which utilizes a multi-camera data fusion technology to convert cattle herd pixel data into two-dimensional coordinates in a unified coordinate system to form a beef cattle global movement track, and meanwhile, divides a field area according to grid units to form a beef cattle density abnormity early warning system. Calculating the density of each grid, delimiting the degree of congestion according to the density, calculating the characteristic values of the grids, introducing a logistic regression model, monitoring and labeling the grids with high characteristic values, combining the grid data and the global motion track, calculating the risk probability, making early warning arrangement according to the level of the risk probability, and counting the false alarm and missing alarm conditions. And retraining the model to complete closed-loop iteration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to a method for early warning of abnormal cattle density based on multi-camera data fusion. Background Technology

[0002] Multi-camera data fusion technology aligns, extracts, and infers images or videos from multiple cameras, leveraging the complementarity of multiple visual sources to achieve cross-view synthesis and enhancement of the same target or scene. In the beef cattle farming sector, due to the generally high density of cattle in feedlots and the large range of cattle movement, traditional monitoring methods cannot detect density changes in a timely manner, easily leading to increased risks of disease transmission, trampling, and congestion accidents. Furthermore, existing solutions lack relationship modeling between changes in cattle density and risk events, failing to provide early warnings of such events.

[0003] Based on the above considerations, the present invention proposes a cattle density anomaly early warning method based on multi-camera data fusion. This method uses multi-camera data fusion technology to establish a two-dimensional coordinate system for cattle farms, divides the grid to count the density of beef cattle within the grid, forms a mapping relationship and introduces model verification, sets a threshold for risk probability and generates early warning signals in advance, thereby effectively avoiding the above-mentioned problems. Summary of the Invention

[0004] This invention provides a method for early warning of abnormal cattle density based on multi-camera data fusion, aiming to solve the problems of abnormal cattle density in beef cattle breeding farms, which increase the risk of disease transmission and cause trampling and congestion accidents.

[0005] To address the aforementioned technical problems, this invention provides a method for early warning of abnormal cattle density based on multi-camera data fusion: multi-camera data fusion to establish a cattle movement model; gridding of the pasture space, calculation of grid density and feature extraction; introduction of a risk mapping model to establish a mapping relationship between cattle density and risk probability; early warning generation, closed-loop feedback, and model optimization.

[0006] As a preferred embodiment, the specific steps of multi-camera data fusion are as follows: Multiple cameras are statically calibrated; the camera positions are fixed; a static calibration plate is placed at different angles of the cameras for shooting; pixel coordinates are extracted from the captured images; and the coordinates are input into the calibration algorithm for solving. The calibration algorithm formula is:

[0007]

[0008] Where (u, v) represent pixel coordinates, (i, j) are global coordinates, R and T represent rotation and horizontal parameters, and f r f represents the horizontal focal length. t Indicates the vertical focal length, (c x cy ) represents the principal point coordinates, s represents the slope value of the pixel coordinate system, and the PTP protocol is enabled on the network switch and camera.

[0009] As a preferred embodiment, the specific steps for establishing the cattle herd movement model are as follows: A corner point of the field is selected as the origin to establish a global coordinate system; the pixel coordinates observed by the camera are restored to normalized coordinates in the camera coordinate system; then, through rotation and horizontal parameters and the slope value of the pixel coordinate system, the camera coordinates are transformed to reference coordinates in the same global coordinate system; velocity (v) is introduced for the cattle whose position changes between consecutive frames. x ,v y ) and acceleration (a x ,a y The motion parameters form the state vector S(t) = [x, y, v] x ,v y ,a x ,a y The state vector of the cattle is recorded every 300ms, forming a time-ordered state sequence S(t0), S(t1)...S(t2). n S(t) represents the state vector at time t. The state sequences of different beef cattle are generated, the similarity of beef cattle features is compared, and the spatial distance is combined to match the multiple camera shots of the same beef cattle to form the global trajectory of the beef cattle.

[0010] As a preferred embodiment, the specific steps of the field space gridding are as follows: A grid is divided in the global coordinate system, starting from the origin and with a unit length of 1.5m in each direction, forming a 1.5m * 1.5m grid; in the global coordinate system, the outer contour projection of the cattle is taken as a rectangle; for cattle spanning multiple grid units, they are counted in different grids according to the proportion of their projected area in different grids; the density of each grid is calculated by combining the grid area and the number of cattle, and the formula for calculating the density within a grid is: [Grid Density] Where ρ represents the grid density and Count represents the number of cattle; the grade is determined based on the grid density, with ρ ≤ 0.28 head / m². 2 At this time, it falls within the safe level, when 0.28 < ρ ≤ 0.46 heads / m 2 At this time, it belongs to the mild congestion level, when 0.46 < ρ ≤ 0.69 heads / m 2 At that time, it belongs to the moderate congestion level, when ρ>0.69 heads / m 2 At that time, it belonged to the severely crowded level; features were extracted from the grid density, and the eigenvalue formula was used. Where L quality ρ represents the eigenvalue magnitude of the mesh. highThe unsafe mesh density is defined as greater than 0.46. T represents time, and Δρ represents the range of mesh density variation. The eigenvalues ​​of all meshes are calculated every 120 seconds, sorted by value, and the top 20% are selected as the characteristic meshes.

[0011] As a preferred implementation, the specific steps of introducing the risk mapping model are as follows: select a logistic regression model as the risk probability mapping model, use the calculation method of the weight coefficients in the logistic regression model to quantify the impact of risk probability, transparently analyze and verify the model decision logic, and use vector inner product calculation and log probability mapping to reason about large-scale gridded scenarios such as cattle farms.

[0012] As a preferred implementation, the specific steps for establishing the mapping relationship between cattle herd density and risk probability are as follows: The top 20% of the feature grids ranked in the above steps are continuously monitored. All grid numbers that meet the conditions are written into the same feature grid table and assigned a unique identifier. If a risk event such as stampede or herd disturbance occurs within the next 5 minutes, the time of the risk event is recorded, and the grid data involved in the risk event is marked as a positive example (represented by the value 1), and vice versa (represented by the value 0). The grids marked with a value of 1 are selected, and the global trajectories of all individual cattle within the grid are extracted to analyze the risk event occurrence. The changes in the state vector values ​​of individual beef cattle before and after birth were studied. In the grid where the risk event occurred, each frame of the image was extracted, and each beef cattle appearing in the grid was identified. Using 50 seconds before and after the risk event as a comparison space, the state vectors of the same beef cattle in different time periods were compared to clearly observe in which frame before and after the risk event the beef cattle's motion parameters showed a significant trend, and the relationship with the grid density at the time of the risk event was observed. The velocity and acceleration motion parameters were combined with the grid density feature values ​​as sample data, and combined with the label values ​​Label∈{0,1} to form the feature vector f(o)=[v x ,v y ,a x ,a y Label, L quality [,ρ], where o represents the current time. The feature vector f(o) is calculated using the weight parameters w = [w1, w2, w3, w4, w5, w6, w7], where w1, w2, w3, w4, w5, w6, w7 represent the weights in the corresponding feature vectors. The linear score is then calculated.

[0013] z(o) = [v x ,v y ,a x ,a y Label, L quality ,ρ][v x ,v y,a x ,a y Label, L quality ,ρ] T ,

[0014] As the input activation probability function, the probability function formula is: Where P risk This represents the probability of a risk occurring, derived through a logarithmic probability mapping; a range is set for determining the probability of a risk occurring, where P... risk When the probability is less than 0.2, it is considered a low probability level; when 0.2 ≤ P... risk When P < 0.5, it is considered a medium probability level. risk A value ≥0.5 is considered a high probability level.

[0015] As a preferred implementation method, the specific steps for generating early warnings are as follows: P risk Grids with a probability of ≥0.2 are considered to require manual intervention. Staff can view the risk probability of each grid in real time via a smart screen, marking high-probability grids in red, medium-probability grids in orange, and low-probability grids in yellow. Warning events are recorded and written into the database, and a feedback function is set up on mobile terminals. On-site personnel update the status based on the handling situation, completing the warning loop.

[0016] As a preferred implementation method, the specific steps of the closed-loop feedback and model optimization are as follows: deploy automated log capture, combine the early warning information in the database with the handling situation reported by on-site personnel, score the risk probability given by the risk mapping model, calculate the risk hit rate, count the false alarms or missed alarms in the cattle farm, and iteratively optimize the model.

[0017] The beneficial effects of this invention are:

[0018] 1. By integrating data from multiple cameras and synchronizing with a clock using high-precision calibration, the pixel information of the cattle herd is converted into a unified coordinate system, covering the entire area without blind spots, and enabling real-time monitoring of changes in cattle density.

[0019] 2. Introduce a risk mapping model to map grid density features to risk probabilities, achieve quantitative correlation, provide early warning of risk events, reduce the incidence of risk events in cattle farms, and increase beef cattle output. Attached Figure Description

[0021] Figure 1 It is a method for early warning of abnormal cattle density based on multi-camera data fusion. Detailed Implementation

[0022] To make the technical means, creative features, objectives, and effects of this invention easier to understand, the invention is further described below with reference to specific embodiments. However, the following embodiments are merely preferred embodiments of this invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments described herein without creative effort are all within the protection scope of this invention.

[0023] Example 1, as Figure 1 This is a method for early warning of abnormal cattle density based on multi-camera data fusion. First, multi-camera data fusion technology is used to convert the cattle pixel data into two-dimensional coordinates, forming the global movement trajectory of the cattle. Simultaneously, the area is divided into grid cells, the density of each grid is calculated, and the degree of crowding is determined based on the density. Feature values ​​of the grids are also calculated, and a logistic regression model is introduced to monitor and label grids with high feature values. Combining grid data with the global movement trajectory, the risk probability is calculated. Early warning arrangements are made based on the risk probability level, false alarms and missed alarms are statistically analyzed, and the model is retrained to complete the closed-loop iteration. The specific implementation steps are as follows:

[0024] Step 1: Fusion of data from multiple cameras to establish a cattle herd movement model;

[0025] Step 2: Spatial gridding of the field area, calculation of grid density and extraction of features;

[0026] Step 3: Introduce a risk mapping model to establish a mapping relationship between cattle density and risk probability;

[0027] Step 4: Generate early warnings, implement closed-loop feedback, and optimize the model.

[0028] A method for early warning of abnormal cattle density based on multi-camera data fusion is proposed. The method involves multi-camera data fusion to establish a cattle herd movement model. The specific steps of multi-camera data fusion are as follows: The cameras in the cattle farm are statically calibrated. First, the positions of the cameras are fixed. Then, a stationary calibration board is placed at different angles of the cameras to capture images. Next, the pixel coordinates of the captured images are extracted and input into the calibration algorithm for solving. The calibration algorithm formula is as follows:

[0029]

[0030] Where (u, v) represent pixel coordinates, (i, j) are global coordinates, R and T represent rotation and horizontal parameters, and f r f represents the horizontal focal length. t Indicates the vertical focal length, (c x c y() represents the principal point coordinates, and s represents the slope value of the pixel coordinate system. Based on the solved parameters, the shooting data of multiple cameras are fused under a unified global coordinate system to ensure that the spatial alignment error is minimized, thereby improving the overall accuracy and robustness of target positioning, data extraction, and risk warning. The PTP protocol is enabled on the network switch and cameras to ensure that the frame timestamps of the multi-camera system are consistent, laying the foundation for subsequent time alignment and accurate density monitoring. The specific steps for establishing the cattle herd movement model are as follows: Select the corner point of the field as the origin, establish a global coordinate system, restore the pixel coordinates observed by the camera to the normalized coordinates under the camera coordinate system to obtain a line of sight on the image plane, and then transform the camera coordinates to the reference coordinates (x, y) under the same global coordinate system through rotation and horizontal parameters and the slope value of the pixel coordinate system. The velocity (v) of the cattle is introduced into the position changes between consecutive frames. x ,v y ) and acceleration (a x ,a y The motion parameters form the state vector S(t) = [x, y, v] x ,v y ,a x ,a y The state vector of the cattle is recorded every 300ms, forming a time-ordered state sequence S(t0), S(t1)...S(t2). n S(t) represents the state vector at time t. The state sequences of different beef cattle are generated, the similarity of beef cattle features is compared, and the spatial distance is combined to match the multiple camera shots of the same beef cattle to form the global trajectory of the beef cattle.

[0031] Based on the above steps, the specific steps for gridding the field space are as follows: Divide the area into a grid using a global coordinate system, with the origin selected in the previous steps as the starting point. Form a 1.5m x 1.5m grid in each direction, with a unit length of 1.5m. After confirming the grid size, adjust the installation height and viewing angle of each camera before data fusion, ensuring coverage of 10 grid units within the field of view. Taking an adult beef cattle as an example, with a body length of approximately 1.8m to 2.2m and a shoulder width of approximately 0.5m to 0.8m, its outer contour can be roughly approximated as a rectangle, with a projected area of ​​approximately 0.9m² in the global coordinate system. 2 Up to 1.8m 2 To balance simplicity and accuracy in statistical analysis, 1.3m was chosen. 2 The area of ​​a single grid cell is 2.25m², representing the average projected area of ​​the beef cattle. 2 When a cow is on two or more grids, the number of cows in each grid is counted based on the ratio of its projected area in each grid to the average projected area of ​​the cow. The specific steps for calculating grid density and extracting features are as follows: Grid density Where ρ represents the grid density and Count represents the number of cattle; it is generally accepted that there is one cattle within two grids, and the projected area of ​​one cattle is 1.3m². 2 The area of ​​the two grids is 4.5m². 2 Based on the grid density calculation, ρ = 0.28 heads / m 2 A single cow within a grid is considered slightly crowded, and based on the grid density calculation, ρ = 0.46 cows / m². 2 When there are three cows in two grids, it is considered moderately crowded, and the calculated grid density is ρ = 0.69 cows / m. 2 The levels are determined based on grid density; when ρ≤0.28 heads / m 2 At this time, it falls within the safe level, when 0.28 < ρ ≤ 0.46 heads / m 2 At this time, it belongs to the mild congestion level, when 0.46 < ρ ≤ 0.69 heads / m 2 At that time, it belongs to the moderate congestion level, when ρ>0.69 heads / m 2 At that time, it belonged to the severely crowded level; features were extracted from the grid density, and the eigenvalue formula was used. Where L quality ρ represents the eigenvalue magnitude of the mesh. high The grid density represents insecurity, with values ​​greater than 0.46 indicating insecurity. T represents time, and Δρ represents the magnitude of grid density change. The feature values ​​of all grids are calculated every 120 seconds and arranged numerically. In many risk monitoring or event distribution scenarios, approximately 80% of risk events tend to concentrate in the most severe 20% of the region. Therefore, selecting the top 20% as the feature grids can significantly reduce false alarms and resource waste while maintaining a high recall rate.

[0032] Based on the above steps, the specific steps for introducing a risk mapping model are as follows: Logistic regression is selected as the risk probability mapping model because it includes a weight coefficient calculation method that directly quantifies the impact of risk probability. This allows for transparent analysis and verification of the model's decision-making logic. Furthermore, logistic regression includes vector inner product calculation and log-odds mapping, making it suitable for inference in large-scale gridded scenarios like cattle ranches. The output of logistic regression has lower requirements for the quantity and accuracy of training data, and its probability values ​​can be directly used for risk classification and threshold judgment without calibration. Compared to other models, when adapted to cattle ranch scenarios, it can be periodically and quickly retrained and updated during operation, meeting comprehensive requirements in terms of performance, reliability, and engineering implementation. The specific steps for establishing the mapping relationship between cattle density and risk probability are as follows: The top 20% of the feature grids ranked in the above steps are continuously monitored. All grid numbers that meet the conditions are written into the same feature grid table and assigned a unique identifier. A stampede occurs within the next 5 minutes. For risk events such as mass disturbances, the time of occurrence of the risk event is recorded, and the grid data involved in the risk event is marked as a positive example (represented by the value 1), and vice versa (represented by the value 0). The grid marked with a value of 1 is selected, and the global trajectory of all individual cattle within the grid is extracted. The changes in the state vector values ​​of the individual cattle before and after the risk event are analyzed. Specifically, in the grid of the risk event, each frame of the image is extracted, and each cattle appearing in the grid is identified. Using 50 seconds before and after the risk event as a comparison space, the state vectors of the same cattle in different time periods are compared to clearly observe in which frame before and after the risk event the cattle's motion parameters show a significant trend, and this trend is related to the grid density at the time of the risk event. This establishes a specific numerical connection between the risk event and the global motion trajectory of the cattle. The velocity and acceleration motion parameters are combined with the grid density feature values ​​as sample data, and combined with the label values ​​Label∈{0,1} to form the feature vector f(o)=[v x ,v y ,a x ,a y Label, L quality [,ρ], where o represents the current time. The feature vector f(o) is calculated using the weight parameters w = [w1, w2, w3, w4, w5, w6, w7], where w1, w2, w3, w4, w5, w6, w7 represent the weights in the corresponding feature vectors. These weights can be adjusted according to actual production conditions. The linear score is then calculated.

[0033] z(o) = [v x ,v y ,a x ,a y Label, L quality ,ρ][vx ,v y ,a x ,a y Label, L quality ,ρ] T As the input activation probability function, the probability function formula is: Where P risk This represents the probability of a risk occurring, derived through logarithmic probability mapping. During model training and iteration, the cumulative distribution analysis of risk probabilities reveals a clear boundary between 0.2 and 0.5 for risk events. Therefore, a range is set for determining the probability of a risk occurring, where P... risk When the probability is less than 0.2, it is considered a low probability level. Monitor the grid's progress closely. If more than 10 minutes have passed and the grid's risk probability increases instead of decreasing, arrange for on-site staff to check. When 0.2 ≤ P... risk When P < 0.5, it is considered a medium probability level, and on-site staff need to be dispatched to investigate. risk When the value is ≥0.5, it is considered a high probability level, requiring the linkage of terminal equipment to promptly generate an early warning signal for the site and notify the area staff to intervene.

[0034] Based on the above steps, the specific steps for generating an early warning are as follows: P risk A risk level ≥0.2 is considered to require manual intervention. Therefore, a smart screen is installed in the cattle farm to allow staff to view the real-time risk probability of each grid. Grids with high probability are marked in red, medium probability in orange, and low probability in yellow. When an orange or red alert is triggered, the smart screen displays a response animation for each grid, and the grid trajectory is drawn on a mobile device, facilitating staff access to address the alert. Electric gates or controllable feed barriers are installed at frequently used cattle passages. When an alert is triggered, the gates automatically open or close, forcibly dispersing the herd and reducing congestion. Alert events are recorded and written to a database, with feedback functionality on mobile devices, allowing on-site personnel to update the status promptly based on the handling situation, completing the alert closed loop. The specific steps for closed-loop feedback and model optimization are as follows: Automated log capture is deployed, combining alert information from the database with on-site personnel feedback to score the risk probability given by the risk mapping model, calculate the risk hit rate, and simultaneously track false alarms or missed alarms within the cattle farm. When the false alarm or missed alarm rate continues to rise, the model is prompted to be re-examined or the risk threshold adjusted.

[0035] Example 2, based on Example 1 above, optimizes the method for early warning of abnormal cattle density through multi-camera data fusion, specifically as follows:

[0036] Step 1: Multi-camera data fusion to establish a cattle herd movement model. The content captured by multiple cameras is projected onto the same ground reference plane. The perspective transformation matrix is ​​used to convert the captured pixel coordinates into two-dimensional ground coordinates. The positions of each cattle appearing continuously in the image are recorded. The average speed and acceleration and other motion parameters are calculated using a sliding window to construct the cattle movement trajectory sequence curve. The fitting model is then established by combining LSTM (Long Short-Term Memory Network) prediction.

[0037] Step 2: Spatial gridding of the farm area, calculation of grid density and feature extraction. Using the location of beef cattle as seed points, a Voronoi diagram is constructed to divide the farm area into dynamic regions centered on beef cattle. Specifically, the grid size is dynamically adjusted according to the frequency of beef cattle appearance and high-density clustering areas. A time-series heat map is constructed, and the frequency of beef cattle appearance is superimposed for calculation. The grid density is smoothed by time weighting, and the heat evolution trend is extracted as feature values ​​for subsequent steps.

[0038] Step 3: Introduce a risk mapping model to establish a mapping relationship between cattle density and risk probability. Select a risk level assessment model based on fuzzy logic. Instead of treating the input density and output risk as specific numerical values, divide them into fuzzy sets. Fuzzify data such as high density and rapid flow rate changes as input features, construct fuzzy rules, and judge the risk through the set of fuzzy rules. Finally, output the risk level directly instead of the probability.

[0039] Step four involves generating early warnings, implementing closed-loop feedback and model optimization. Based on environmental parameters such as weather, time period, and beef cattle behavior characteristics, the system automatically adjusts the grid density and risk level classification thresholds to achieve dynamic threshold setting. After providing the risk level, only high-risk levels are pushed to on-site staff for confirmation, along with historical beef cattle movement trajectories, grid density maps, and other information to aid in the judgment. For other levels, automated equipment disperses and physically isolates the grids with high beef cattle density.

[0040] The embodiments of the present invention described above are subject to modification and change of method by those skilled in the art without departing from the embodiments and broader aspects of the present invention. The appended claims are intended to include all such modifications and changes of method that do not depart from the present invention.

Claims

1. A method for early warning of abnormal cattle density based on multi-camera data fusion, characterized in that: Multi-camera data fusion to establish a cattle movement model involves fusing data captured by multiple cameras and transforming global coordinates through static calibration to model and analyze the movement trajectory of beef cattle. The field area is spatially gridded, the grid density is calculated and features are extracted. This involves dividing the field area space into grids, calculating the grid density, and analyzing the grid density to calculate feature values. Introducing a risk mapping model to establish a mapping relationship between cattle density and risk probability involves selecting a logistic regression model, using weight coefficient calculation to quantify the probability of risk occurrence, statistically labeling grids with high feature values, combining feature vectors and motion parameters to generate sample data to train the model, and using probability functions to calculate risk probability and classify risk occurrence probability levels. Early warning generation, closed-loop feedback and model optimization involve generating warning signals based on the probability level of risk occurrence, calculating the model's risk hit rate, and iteratively optimizing the model.

2. The method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 1, characterized in that: The specific steps of multi-camera data fusion are as follows: Static calibration is performed on multiple cameras, fixing their positions. A static calibration plate is placed at different angles of the cameras to capture images. Pixel coordinates are extracted from the captured images and input into the calibration algorithm for solving. The calibration algorithm formula is: Where (u, v) represent pixel coordinates, (i, j) are global coordinates, R and T represent rotation and horizontal parameters, and f r f represents the horizontal focal length. t Indicates the vertical focal length, (c x c y ) represents the principal point coordinates, s represents the slope value of the pixel coordinate system, and the PTP protocol is enabled on the network switch and camera; The specific steps for establishing the cattle herd movement model are as follows: select the corner point of the field as the origin, establish a global coordinate system, restore the pixel coordinates observed by the camera to the normalized coordinates under the camera coordinate system, and then transform the normalized coordinates of the camera coordinates to the reference coordinates under the global coordinate system through rotation and horizontal parameters and the slope value of the pixel coordinate system.

3. The method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 2, characterized in that: The specific steps for establishing the cattle herd movement model also include: introducing velocity (v) to the cattle's positional changes between consecutive frames. x ,v y ) and acceleration (a x ,a y The motion parameters form the state vector S(t) = [x, y, v] x ,v y ,a x ,a y The state vector of the cattle is recorded every 300ms, forming a time-ordered state sequence S(t0), S(t1)...S(t2). n S(t) represents the state vector at time t. The state sequences of different beef cattle are generated, the similarity of beef cattle features is compared, and the spatial distance is combined to match the multiple camera shots of the same beef cattle to form the global trajectory of the beef cattle.

4. The method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 1, characterized in that: The specific steps for the field area spatial gridding are as follows: divide the grid in the global coordinate system, with the origin as the starting point and each direction having a unit length of 1.5m, forming a 1.5m*1.5m grid; In the global coordinate system, the outline projection of the beef cattle is taken as a rectangle. For beef cattle that spans multiple grid cells, the projection area of ​​the beef cattle in different grid cells is statistically analyzed and assigned to different grid cells respectively. The specific steps for calculating grid density and extracting features are as follows: The density of each grid is calculated by the ratio of the grid area to the number of cattle. The formula for calculating the density within a grid is: [Grid Density] Where ρ represents the grid density and Count represents the number of cattle.

5. The method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 4, characterized in that: The specific steps for calculating grid density and extracting features also include: classifying levels according to grid density, when ρ≤0.28 heads / m 2 At this time, it falls within the safe level, when 0.28 < ρ ≤ 0.46 heads / m 2 At this time, it belongs to the mild congestion level, when 0.46 < ρ ≤ 0.69 heads / m 2 At that time, it belongs to the moderate congestion level, when ρ>0.69 heads / m 2 At that time, it belonged to the severely crowded level; features were extracted from the grid density, and the eigenvalue formula was used. Where L quality ρ represents the eigenvalue magnitude of the mesh. high The unsafe mesh density is defined as greater than 0.

46. T represents time, and Δρ represents the range of mesh density variation. The eigenvalues ​​of all meshes are calculated every 120 seconds, sorted by value, and the top 20% are selected as the characteristic meshes.

6. The method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 1, characterized in that: The specific steps for introducing the risk mapping model are as follows: select the logistic regression model as the risk probability mapping model, use the calculation method of the weight coefficients in the logistic regression model to quantify the impact of risk probability, transparently analyze and verify the model decision logic, and infer the large-scale gridded scenario of cattle breeding farm through vector inner product calculation and log probability mapping. The specific steps for establishing the mapping relationship between cattle density and risk probability are as follows: continuously monitor the top 20% of the feature grids in the above steps, write all grid numbers that meet the conditions into the same feature grid table and assign them a unique identifier. If a risk event such as stampede, herd disturbance, or overcrowding occurs within the next 5 minutes, record the time of the risk event and mark the grid data involved in the risk event as a positive example, represented by the value 1; otherwise, mark it as a negative example, represented by the value 0. Select a grid with a marked value of 1, extract the global trajectory of all individual beef cattle within the grid, and analyze the changes in the state vector values ​​of individual beef cattle before and after the occurrence of the risk event.

7. The method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 6, characterized in that: The specific steps for establishing the mapping relationship between cattle density and risk probability also include: extracting each frame of image in the grid where the risk event occurs, identifying each beef cattle appearing in the grid, using 50 seconds before and after the risk event as a comparison space, comparing the state vector of the same beef cattle in the data, recording the timestamp of the risk event, and observing the changing trend of the beef cattle's movement parameters.

8. A method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 6, characterized in that: The specific steps for establishing the mapping relationship between cattle herd density and risk probability also include: combining velocity and acceleration motion parameters with grid density feature values ​​as sample data, and combining them with label values ​​Label∈{0,1} to form a feature vector f(o)=[v x ,v y ,a x ,a y Label, L quality [,ρ], where o represents the current time. The feature vector f(o) is calculated using the weight parameters w = [w1, w2, w3, w4, w5, w6, w7], where w1, w2, w3, w4, w5, w6, w7 represent the weights in the corresponding feature vectors. The linear score is then calculated. z(o) [v x ,v y ,am x ,am y ,Label,L quality ,ρ][v x ,v y ,am x ,am y ,Label,L quality ,ρ] T , As the input activation probability function, the probability function formula is: Where P risk This represents the probability of a risk occurring, derived through a logarithmic probability mapping; it also categorizes the probability of risk occurrence into different levels, such as when P... risk When the probability is less than 0.2, it is considered a low probability level; when 0.2 ≤ P... risk When P < 0.5, it is considered a medium probability level. risk A value ≥0.5 is considered a high probability level.

9. A method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 1, characterized in that: The specific steps for generating early warnings are as follows: P risk Grids with a probability of ≥0.2 are considered to require manual intervention. Staff can view the risk probability of each grid in real time via a smart screen, marking high-probability grids in red, medium-probability grids in orange, and low-probability grids in yellow. Warning events are recorded and written into the database, and a feedback function is set up on mobile terminals. On-site personnel update the status based on the handling situation, completing the warning loop.

10. A method for early warning of abnormal cattle density based on multi-camera data fusion according to claim 1, characterized in that: The specific steps of the closed-loop feedback and model optimization are as follows: deploy automated log capture, combine the early warning information in the database with the handling situation reported by on-site personnel, score the risk probability given by the risk mapping model, calculate the risk hit rate, count the false alarms or missed alarms in the cattle farm, and iteratively optimize the model.

Citation Information

Patent Citations

  • Crowd flow multidirectional counting method based on computer vision technology

    CN117351408A

  • Quantification and early warning analysis method for high-density crowd trampling risk of subway platform

    CN118230260A

  • Exhibition building crowd evacuation simulation method and system based on risk perception, electronic equipment and medium

    CN119962375A

  • Chicken flock state inspection monitoring system and method

    CN119989281A

  • Pig farm anomaly detection system based on multi-sensor data fusion

    CN120123958A

Cited By

  • Wetland waterfowl automatic identification statistical method and system based on unmanned aerial vehicle aerial image

    CN121353965A