Method for identifying abnormal behaviors of sheep flock

By detecting and matching corners of sheep eating images and calculating the sheep's health index, the problem of too much information in the sheep behavior monitoring system is solved, and efficient identification of abnormal sheep behavior and timely feedback on health status are achieved.

CN118658210AActive Publication Date: 2024-09-17KUNMING YIXINGHENG ANIMAL HUSBANDRY TECH CO LTD

Patent Information

Application Number
CN202411147095.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-09-17
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

The existing sheep behavior monitoring system feeds back too much information, which leads to a decrease in the efficiency and timeliness of identifying abnormal sheep behavior, making it difficult for users to extract useful health status information.

Method used

By detecting and matching corner points on the eating images of the sheep, the location, movement desire and eating desire of each sheep are obtained. Based on the eating duration and frequency, the health index of each sheep is calculated to identify abnormal behavior of the sheep.

Benefits of technology

It simplifies information feedback, improves the efficiency and immediacy of identifying abnormal sheep behaviors, helps users promptly detect unhealthy sheep, and optimizes resource allocation and health management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658210A
    Figure CN118658210A
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a sheep flock abnormal behavior recognition method, which comprises the following steps: acquiring a plurality of sheep flock feeding images; acquiring the feeding position of the same sheep in different sheep flock feeding images; obtaining the eating desire of each sheep; according to the eating desire, the eating duration and the eating frequency of each sheep, obtaining the health index of each sheep; and identifying abnormal behaviors of the sheep flock according to the health indexes of all the sheep. The feeding enthusiasm of the sheep is reflected through the feeding desire of the sheep; calculating the health index of the sheep according to the eating desire, the eating duration and the eating frequency of each sheep; the health condition of the sheep is reflected by judging whether the feeding process of the sheep is abnormal or not, a user is helped to simply and timely know whether the sheep flock is abnormal or not in the feeding process, unhealthy sheep in the sheep flock are timely found, and abnormal behaviors of the sheep flock are recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for identifying abnormal behavior of a flock of sheep. Background Art

[0002] Real-time monitoring of sheep behavior is an important aspect of modern animal husbandry management, especially for ensuring animal health and improving production efficiency. Identifying the feeding status of the sheep can timely detect abnormal conditions in the sheep and promptly check for illnesses in the sheep, which is of great significance for ensuring the health of the sheep, improving production efficiency and optimizing resource allocation. To identify abnormal behavior of sheep, the behavior of the sheep must be monitored first. Most of the sheep behavior monitoring systems on the market currently only have the function of capturing moving targets in the video screen, detecting or tracking to obtain the location information of the sheep, and directly feeding back the location information of the sheep to the user. The feedback information is complex and contains too much useless information. It still takes a lot of energy for users to observe the status of the sheep and obtain the health status of the sheep from the redundant information, which affects the efficiency of identifying abnormal behavior of the sheep and reduces the immediacy of identifying abnormal behavior of the sheep. Summary of the invention

[0003] The invention provides a method for identifying abnormal behavior of a flock of sheep, so as to solve the problem that the existing flock behavior monitoring system feeds back too much useless information, resulting in reduced efficiency in identifying abnormal behavior of the flock and reduced immediacy in identifying abnormal behavior of the flock.

[0004] A method for identifying abnormal behavior of a flock of sheep of the present invention adopts the following technical solution: An embodiment of the present invention provides a method for identifying abnormal behavior of a flock of sheep, the method comprising the following steps: Obtain several images of sheep eating; Corner point matching is performed on the corner points obtained after corner point detection of each two adjacent images of the flock of sheep eating, so as to obtain all corner points and matching corner points of each sheep in each image of the flock of sheep eating; and the position of the same sheep in different images of the flock of sheep eating is obtained according to the corner points and matching corner points of each sheep in each image of the flock of sheep eating; The movement desire of each sheep is obtained according to the number of sheep flock eating images obtained in the process of each sheep going to the eating position and the consistency of the moving direction in different sheep flock eating images; the eating desire of each sheep is obtained according to the movement desire of each sheep and the speed at which each sheep passes through all the sheep flock eating images to the eating position; The duration and frequency of each sheep's eating are analyzed by multiple images of the sheep's eating. The health index of each sheep is obtained based on the sheep's desire to eat, duration and frequency of eating. The abnormal behavior of the sheep can be identified based on the health index of all the sheep.

[0005] Furthermore, the corner points obtained after performing corner point detection on each two adjacent images of the flock of sheep eating are matched to obtain all corner points and matching corner points of each sheep in each image of the flock of sheep eating, including: Corner point detection is performed on each image of the flock of sheep eating to obtain corner points in each image of the flock of sheep eating; corner point matching is performed on all the images of the flock of sheep eating except the first image of the flock of sheep eating with the corner points of the previous image of the flock of sheep eating through a corner point matching algorithm to obtain matching corner points of all corner points of each image of the flock of sheep eating.

[0006] Furthermore, the obtaining of the position of the same sheep in different sheep flock eating images according to the corner points and matching corner points of each sheep in each sheep flock eating image includes: The other corner point closest to each corner point in each image of the flock of sheep eating is recorded as the adjacent corner point of each corner point; any corner point in any image of the flock of sheep eating is recorded as the first corner point, if the distance between the first corner point and the adjacent corner point is the same as the distance between the matching corner point of the first corner point and the adjacent corner point of the matching corner point, and when the first corner point and the matching corner point are mapped to the same image, when the direction of the first corner point pointing to the matching corner point is the same as the direction of the adjacent corner point of the first corner point pointing to the adjacent corner point of the matching corner point of the first corner point, the first corner point and the adjacent corner point are recorded as the corner points of the same sheep, the matching corner point of the first corner point and the adjacent corner point of the matching corner point of the first corner point are recorded as the corresponding corner points of the same sheep, and the centroid of the area connected by all the corner points of each sheep in each image of the flock of sheep eating is recorded as the position of each sheep in each image of the flock of sheep eating.

[0007] Furthermore, the step of obtaining the movement desire of each sheep according to the number of sheep flock eating images obtained in the process of each sheep going to the eating position and the consistency of the moving direction in different sheep flock eating images includes: The nth sheep's desire to move The calculation method is: Where: It represents the time it takes for the nth sheep to go from the starting position to the eating position. It represents the moving angle of the n-th sheep in the t-th image of the flock eating; Represents an exponential function with a natural constant as its base.

[0008] Furthermore, the specific method for obtaining the elapsed time from the starting position to the eating position is: The area formed by the stone trough in the sheep flock eating image is recorded as the stone trough rectangle. In a sheep flock eating image, when the minimum Euclidean distance between the position of each sheep and the connecting line of all points on each side of the stone trough rectangle is less than a preset distance threshold, the current sheep flock eating image is recorded as the eating starting image of each sheep; the position of each sheep in the first sheep flock eating image is recorded as the starting position of each sheep, and the position of the same sheep in the eating starting image is recorded as the eating position of each sheep; the product of the number of sheep flock eating images between the starting position and the eating position of each sheep and the collection interval is recorded as the time consumed by each sheep from the starting position to the eating position.

[0009] Furthermore, the specific method for obtaining the moving angle is: The position of each sheep in the current sheep flock eating image is pointed to the direction of the position of the same sheep in the next sheep flock eating image, which is recorded as the moving direction of each sheep in each sheep flock eating image; the position of each sheep in each sheep flock eating image is pointed to the direction of the center of mass of the stone trough rectangle, which is recorded as the target direction; the angle between the moving direction of each sheep in each sheep flock eating image and the target direction is recorded as the moving angle of each sheep in each sheep flock eating image.

[0010] Furthermore, the method of obtaining the eating desire of each sheep according to the movement desire of each sheep and the speed at which each sheep passes through all the sheep eating images to the eating position includes: The nth sheep's desire to eat The calculation method is: Where: represents the movement desire of the nth sheep, represents the moving speed of the nth sheep, and the moving speed is obtained by taking the ratio of the Euclidean distance from the starting position to the feeding position of the nth sheep to the time consumed from the starting position to the feeding position as the moving speed of the nth sheep; represents the average movement speed of all sheep, represents the linear normalization function.

[0011] Furthermore, the analysis of the multiple sheep feeding images to obtain the feeding time and feeding times of each sheep includes: With the shooting time of each sheep flock eating image as the horizontal axis and the eating action amplitude of each sheep in each sheep flock eating image as the vertical axis, a line graph of each sheep's eating action is drawn; the process from a maximum point with a ordinate greater than 0 to a minimum point with a ordinate less than 0 in the line graph is recorded as a head-lowering action of the sheep, and the process from a minimum point with a ordinate less than 0 to a maximum point with a ordinate greater than 0 is recorded as a head-raising action of the sheep, a pair of head-lowering actions and head-raising actions are recorded as an eating action, the shooting time of the first head-lowering maximum point is the time to start eating, the time when each sheep is greater than the preset distance from the stone trough rectangle after the start of eating is recorded as the time to end eating, the time interval from the start of eating to the end of eating is recorded as the eating time of each sheep, and the number of eating actions of each sheep during the eating time is obtained and recorded as the number of eating times.

[0012] Furthermore, the specific method for obtaining the eating action amplitude is: In all the sheep flock eating images after the eating start image of each sheep, the Euclidean distance between each corner point and the matching corner point is recorded as the offset difference of each corner point. In all the sheep flock eating images after the eating start image of each sheep, when the mean of the offset difference of the same corner point of the same sheep is greater than the preset offset threshold, the corner point is recorded as the sheep's head corner point; all the head corner points of each sheep are obtained, and the centroid of the area connected by all the head corner points of each sheep in each sheep flock eating image is recorded as the head position of each sheep in each sheep flock eating image; the head position of each sheep in the eating start image is recorded as the initial head position of each sheep; the difference between the Euclidean distance between the head position of each sheep in each sheep flock eating image and the centroid of the stone trough rectangle and the Euclidean distance between the initial head position of each sheep and the centroid of the stone trough rectangle is recorded as the eating action amplitude of each sheep in each sheep flock eating image, and the eating action amplitude of each sheep in all sheep flock eating images is obtained; Furthermore, the health index of each sheep is obtained according to the eating desire, eating time and eating frequency of each sheep, including: The health index of the nth sheep The calculation method is: Where: represents the eating desire of the nth sheep, It indicates the feeding time of the nth sheep. represents the mean eating time of all sheep, represents the number of times the nth sheep eats. It represents the mean number of times each sheep eats.

[0013] The beneficial effects of the technical solution of the present invention are: obtaining the position of each sheep on the image through corner point detection, and obtaining the sheep's desire to eat to reflect the sheep's enthusiasm for eating according to the time, moving direction and moving speed of each sheep going to the feeding position; calculating the sheep's health index by combining the eating desire, eating time and eating times of each sheep; monitoring the behavior of the flock and reflecting the health status of the sheep by whether there is any abnormality in the sheep's eating process, and feeding back the health status of the sheep to the user as key information, so as to help the user to simply and timely understand whether there is any abnormality in the sheep's eating process, timely discover unhealthy sheep in the sheep flock, and realize the identification of abnormal behavior of the sheep flock. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 The present invention is a flowchart of the steps of a method for identifying abnormal behavior of a flock of sheep. DETAILED DESCRIPTION

[0016] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method for identifying abnormal behavior of a flock of sheep proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0017] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0018] The specific scheme of the method for identifying abnormal behavior of a flock of sheep provided by the present invention is described in detail below with reference to the accompanying drawings.

[0019] See also Figure 1 , which shows a flowchart of a method for identifying abnormal behavior of a flock of sheep provided by an embodiment of the present invention, the method comprising the following steps: Step S001, obtaining a number of images of sheep eating.

[0020] The purpose of this embodiment is to identify abnormal behavior of the sheep according to the eating conditions of the sheep. Therefore, firstly, the camera at the feeding place of the sheep is used to capture images of the sheep eating within the shooting time after the feeding is released, with the time of feeding as the starting time and every other collection interval as a shooting time within the feeding time period, to obtain a number of images of the sheep eating arranged in time sequence; in this embodiment, the collection interval is set to 3 seconds, and the shooting time is set to 30 minutes. Other embodiments can be set to other values, which are not specifically limited in this embodiment.

[0021] Step S002, obtaining all corner points and matching corner points of each sheep in each sheep flock eating image; obtaining the position of the same sheep in different sheep flock eating images according to the corner points and matching corner points of each sheep in each sheep flock eating image.

[0022] It should be noted that the position of the sheep will change in the several collected images of sheep eating. First, the individuals of the sheep in the several images of sheep eating are identified to distinguish each sheep in the image; different sheep have different movement directions and speeds. By tracking the corner points on the sheep's body and matching the corner points on multiple images, the position of the same sheep in the several images of sheep eating is obtained, and then the movement of each sheep is analyzed.

[0023] Specifically, corner point detection is performed on each image of the flock of sheep eating to obtain corner points in each image of the flock of sheep eating; corner point matching is performed on the corner points of all images of the flock of sheep eating except the first image of the flock of sheep eating with the corner points of the previous image of the flock of sheep eating through a corner point matching algorithm to obtain matching corner points of all corner points of each image of the flock of sheep eating; Furthermore, the other corner point closest to each corner point in each image of the flock of sheep eating is recorded as the adjacent corner point of each corner point; any corner point in any image of the flock of sheep eating is recorded as the first corner point, if the distance between the first corner point and the adjacent corner point is the same as the distance between the matching corner point of the first corner point and the adjacent corner point of the matching corner point in the previous image of the flock of sheep eating, and when the first corner point and the matching corner point are mapped to the same image, the direction of the first corner point pointing to the matching corner point is the same as the direction of the adjacent corner point of the first corner point pointing to the adjacent corner point of the matching corner point of the first corner point, then The first corner point and the adjacent corner points are recorded as the corner points of a sheep, and the matching corner point of the first corner point and the adjacent corner points of the matching corner point of the first corner point are recorded as the corresponding corner points of the same sheep; similarly, all corner points and corresponding corner points of each sheep in each image of the sheep flock eating are obtained, and the centroid of the area connected by all corner points of each sheep in each image of the sheep flock eating is recorded as the position of each sheep in each image of the sheep flock eating, and the centroid of the area connected by the corresponding corner points of each sheep is recorded as the position of the same sheep in each image of the sheep flock eating at the last time it was collected. Similarly, the position of each sheep in each image of the sheep flock eating is obtained.

[0024] Step S003, obtaining the movement desire of each sheep according to the number of sheep flock eating images obtained in the process of each sheep going to the feeding position and the consistency of the moving direction in different sheep flock eating images; obtaining the eating desire of each sheep according to the movement desire of each sheep and the speed of each sheep passing through different sheep flock eating images on its way to the feeding position.

[0025] It should be noted that after the feed is placed, healthy sheep usually respond positively to the food and show a strong desire to eat, so they will move quickly towards the stone trough where the feed is placed; for some sheep that may have health problems, their desire to eat is relatively weak, so they will move slowly towards the stone trough, or show signs of hesitation and unwillingness to move; the desire to eat of each sheep is evaluated based on the direction, time and distance of different sheep in the flock moving to the stone trough.

[0026] Specifically, the area formed by the stone trough in the sheep flock eating image is recorded as the stone trough rectangle. In one sheep flock eating image, when the minimum distance between the position of a sheep and the line connecting all the points on the edge of the stone trough rectangle is greater than or equal to the preset distance threshold, it means that the sheep is far away from the stone trough, and the next image is judged; when the minimum Euclidean distance between the position of each sheep and the line connecting all the points on each side of the stone trough rectangle is less than the preset distance threshold, it means that the sheep has reached the stone trough, and the current sheep flock eating image is recorded as the sheep's eating start image; the preset distance threshold in this embodiment is 0.2 meters, and other embodiments can be set to other values, which are not specifically limited in this embodiment; the position of each sheep in the first sheep flock eating image is recorded as the starting position of each sheep, and the position of the same sheep in the eating start image is recorded as the eating position of each sheep; the product of the number of images between the starting position and the eating position of each sheep and the acquisition interval is recorded as the time consumed by each sheep from the starting position to the eating position; The position of each sheep in the current flock eating image is pointed to the direction of the position of the same sheep in the next flock eating image, which is recorded as the moving direction of each sheep in each flock eating image. It should be noted that the moving direction of each sheep in the last flock eating image is the same as the moving direction of the previous flock eating image; the position of each sheep in each flock eating image is pointed to the direction of the center of mass of the stone trough rectangle, which is recorded as the target direction; the angle between the moving direction of each sheep in each flock eating image and the target direction is recorded as the moving angle of each sheep in each flock eating image; the movement desire of the nth sheep The calculation method is: Where: It represents the time it takes for the nth sheep to go from the starting position to the eating position. It represents the moving angle of the n-th sheep in the t-th image of the flock eating; represents an exponential function with a natural constant as base; It should be noted that It represents the average value of the angle between the moving direction of the nth sheep from the starting position to the feeding position and the target direction. The smaller the value, the smaller the change in direction of the sheep in the process of running towards the stone trough, and the stronger the sheep's desire to move. Furthermore, the food desire of the nth sheep The calculation method is: Where: represents the movement desire of the nth sheep, represents the moving speed of the nth sheep, and the moving speed is obtained by taking the ratio of the Euclidean distance from the starting position to the feeding position of the nth sheep to the time consumed from the starting position to the feeding position as the moving speed of the nth sheep; represents the average movement speed of all sheep, represents the linear normalization function; It should be noted that The larger the value of , the clearer the eating goal of the nth sheep when it goes to the eating position, and the stronger its desire to eat; It represents the difference between the speed of the nth sheep and the moving speed of each sheep. The larger the value, the faster the sheep moves, and the stronger the sheep's desire to eat. Similarly, obtain the eating desire of each sheep.

[0027] Step S004, obtaining the eating time and eating frequency of each sheep; obtaining the health index of each sheep according to the eating desire, eating time and eating frequency of each sheep; and identifying abnormal behavior of the flock according to the health index of all sheep.

[0028] It should be noted that it is possible that the sheep may arrive at the stone trough but not eat. Therefore, it is not accurate to indicate that the sheep has started eating only by the distance relationship between the sheep and the stone trough; when the sheep starts to eat feed, the position of the body part will no longer change significantly, but the head will move up and down regularly; when the head is lowered to eat feed, the minimum distance between the corner points of the head and the lines connecting all the points on the sides of the stone trough rectangle will decrease; when the head is raised to chew feed, the minimum distance between the corner points of the head and the lines connecting all the points on the sides of the stone trough rectangle will increase; the eating time of each sheep is judged by the changes in the head posture of the sheep during the eating process; the health status of each sheep is further evaluated based on the eating desire of each sheep, the eating time and the number of times the sheep eats; if the sheep has a strong desire to eat and the eating time and number of times the sheep eat are normal, then the sheep is in good health.

[0029] Specifically, the Euclidean distance between each corner point and the matching corner point in all eating images after the eating start image of each sheep is recorded as the offset difference of the corner point. In all eating images after the eating start image of each sheep, when the average offset difference of the same corner point of the same sheep is greater than the corner point of the preset offset threshold, the corner point is recorded as the head corner point of the sheep; all the head corner points of each sheep are obtained, and the centroid of the area connected by all the head corner points of each sheep in each sheep flock eating image is recorded as the head position of each sheep in each sheep flock eating image; for any sheep, its head position in the eating start image is recorded as the initial head position of the sheep; the difference obtained by subtracting the Euclidean distance between the head position of any sheep in any sheep flock eating image and the centroid of the stone trough rectangle from the initial head position of the sheep and the centroid of the stone trough rectangle is recorded as the eating action amplitude, and the eating action amplitude of each sheep in each sheep flock eating image is obtained; With the shooting time as the horizontal axis and the eating action value as the vertical axis, a line graph of the eating action of each sheep is drawn; the process from a maximum point with a vertical coordinate greater than 0 to a minimum point with a vertical coordinate less than 0 in the line graph is recorded as a head-lowering action of the sheep, and the process from a minimum point with a vertical coordinate less than 0 to a maximum point with a vertical coordinate greater than 0 is recorded as a head-raising action of the sheep, a pair of head-lowering actions and head-raising actions are recorded as an eating action, the shooting time of the first head-lowering maximum point is the time of starting to eat, the first time the sheep moves away from the stone trough after the start of eating is the time of ending eating, the time interval from the time of starting to eat to the time of ending eating is recorded as the eating time of each sheep, and the number of eating actions of each sheep from the time of starting to eat to the time of ending eating is recorded as the number of eating times; The health index of the nth sheep The calculation method is: Where: represents the eating desire of the nth sheep, It indicates the feeding time of the nth sheep. represents the mean eating time of all sheep, represents the number of times the nth sheep eats. represents the mean number of times each sheep eats. represents the Sigmoid function, It represents the absolute value function; It should be noted that It indicates the difference between the eating time of the nth sheep and the average eating time. The larger the value is, the shorter or longer the eating time of the nth sheep is relative to the average level. The nth sheep is more likely to have health problems and the health index of the nth sheep is lower. It indicates the difference between the number of times the n-th sheep eats and the average number of times it eats. The larger the value, the greater the difference between the number of times the n-th sheep eats and the average level, and the lower the health index of the n-th sheep. Similarly, the health index of each sheep is obtained.

[0030] Furthermore, a health alarm system is set up. If the health index of the sheep is lower than a preset health threshold, an alarm message is sent to the farmer, so that the farmer can quickly check and treat the sheep with health problems, avoid large losses in the flock due to diseases and other problems, and realize the identification of abnormal behavior of the flock. The preset health threshold in this embodiment is 0.8, and other embodiments can be set to other values, which are not specifically limited in this embodiment.

[0031] It should be noted that the The model only shows negative correlation and the output of the constraint model is in In the range, As the input of this model, it can be replaced by other models with the same purpose in specific implementation. The model is used as an example for description without any specific limitation.

[0032] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying abnormal behavior of a flock of sheep, characterized in that: The method comprises the following steps: Obtain several images of sheep eating; Corner point matching is performed on the corner points obtained after corner point detection of each two adjacent images of the flock of sheep eating, so as to obtain all corner points and matching corner points of each sheep in each image of the flock of sheep eating; and the position of the same sheep in different images of the flock of sheep eating is obtained according to the corner points and matching corner points of each sheep in each image of the flock of sheep eating; The movement desire of each sheep is obtained according to the number of sheep flock eating images obtained in the process of each sheep going to the eating position and the consistency of the moving direction in different sheep flock eating images; the eating desire of each sheep is obtained according to the movement desire of each sheep and the speed at which each sheep passes through all the sheep flock eating images to the eating position; The duration and frequency of each sheep's eating are analyzed by multiple images of the sheep's eating. The health index of each sheep is obtained based on the sheep's desire to eat, duration and frequency of eating. The abnormal behavior of the sheep can be identified based on the health index of all the sheep.

2. According to claim 1, a method for identifying abnormal behavior of a flock of sheep is characterized in that: The corner points obtained after performing corner point detection on each two adjacent images of the flock of sheep eating are matched to obtain all corner points and matching corner points of each sheep in each image of the flock of sheep eating, including: Corner point detection is performed on each image of the flock of sheep eating to obtain corner points in each image of the flock of sheep eating; corner point matching is performed on all the images of the flock of sheep eating except the first image of the flock of sheep eating with the corner points of the previous image of the flock of sheep eating through a corner point matching algorithm to obtain matching corner points of all corner points of each image of the flock of sheep eating.

3. A method for identifying abnormal behavior of a flock of sheep according to claim 2, characterized in that: The method of obtaining the position of the same sheep in different sheep flock eating images according to the corner points and matching corner points of each sheep in each sheep flock eating image comprises: The other corner point closest to each corner point in each image of the flock of sheep eating is recorded as the adjacent corner point of each corner point; any corner point in any image of the flock of sheep eating is recorded as the first corner point, if the distance between the first corner point and the adjacent corner point is the same as the distance between the matching corner point of the first corner point and the adjacent corner point of the matching corner point, and when the first corner point and the matching corner point are mapped to the same image, when the direction of the first corner point pointing to the matching corner point is the same as the direction of the adjacent corner point of the first corner point pointing to the adjacent corner point of the matching corner point of the first corner point, the first corner point and the adjacent corner point are recorded as the corner points of the same sheep, the matching corner point of the first corner point and the adjacent corner point of the matching corner point of the first corner point are recorded as the corresponding corner points of the same sheep, and the centroid of the area connected by all the corner points of each sheep in each image of the flock of sheep eating is recorded as the position of each sheep in each image of the flock of sheep eating.

4. The method for identifying abnormal behavior of a flock of sheep according to claim 1, characterized in that: The step of obtaining the movement desire of each sheep according to the number of sheep flock eating images obtained in the process of each sheep going to the eating position and the consistency of the movement direction in different sheep flock eating images includes: The nth sheep's desire to move The calculation method is: Where: It represents the time it takes for the nth sheep to go from the starting position to the eating position. It represents the moving angle of the n-th sheep in the t-th image of the flock eating; Represents an exponential function with a natural constant as its base.

5. A method for identifying abnormal behavior of a flock of sheep according to claim 4, characterized in that: The specific method for obtaining the consumption time from the starting position to the eating position is: The area formed by the stone trough in the sheep flock eating image is recorded as the stone trough rectangle. In a sheep flock eating image, when the minimum Euclidean distance between the position of each sheep and the connecting line of all points on each side of the stone trough rectangle is less than a preset distance threshold, the current sheep flock eating image is recorded as the eating starting image of each sheep; the position of each sheep in the first sheep flock eating image is recorded as the starting position of each sheep, and the position of the same sheep in the eating starting image is recorded as the eating position of each sheep; the product of the number of sheep flock eating images between the starting position and the eating position of each sheep and the collection interval is recorded as the time consumed by each sheep from the starting position to the eating position.

6. A method for identifying abnormal behavior of a flock of sheep according to claim 4, characterized in that: The specific method for obtaining the moving angle is: The position of each sheep in the current sheep flock eating image is pointed to the direction of the position of the same sheep in the next sheep flock eating image, which is recorded as the moving direction of each sheep in each sheep flock eating image; the position of each sheep in each sheep flock eating image is pointed to the direction of the center of mass of the stone trough rectangle, which is recorded as the target direction; the angle between the moving direction of each sheep in each sheep flock eating image and the target direction is recorded as the moving angle of each sheep in each sheep flock eating image.

7. A method for identifying abnormal behavior of a flock of sheep according to claim 5, characterized in that: The method of obtaining the eating desire of each sheep according to the movement desire of each sheep and the speed at which each sheep passes through all the sheep eating images to the eating position comprises: The nth sheep's desire to eat The calculation method is: Where: represents the movement desire of the nth sheep, represents the moving speed of the nth sheep, and the moving speed is obtained by taking the ratio of the Euclidean distance from the starting position to the feeding position of the nth sheep to the time consumed from the starting position to the feeding position as the moving speed of the nth sheep; represents the average movement speed of all sheep, represents the linear normalization function.

8. A method for identifying abnormal behavior of a flock of sheep according to claim 5, characterized in that: The eating time and eating frequency of each sheep are obtained by analyzing multiple sheep eating images, including: With the shooting time of each sheep flock eating image as the horizontal axis and the eating action amplitude of each sheep in each sheep flock eating image as the vertical axis, a line graph of each sheep's eating action is drawn; the process from a maximum point with a ordinate greater than 0 to a minimum point with a ordinate less than 0 in the line graph is recorded as a head-lowering action of the sheep, and the process from a minimum point with a ordinate less than 0 to a maximum point with a ordinate greater than 0 is recorded as a head-raising action of the sheep, a pair of head-lowering actions and head-raising actions are recorded as an eating action, the shooting time of the first head-lowering maximum point is the time to start eating, the time when each sheep is greater than the preset distance from the stone trough rectangle after the start of eating is recorded as the time to end eating, the time interval from the start of eating to the end of eating is recorded as the eating time of each sheep, and the number of eating actions of each sheep during the eating time is obtained and recorded as the number of eating times.

9. A method for identifying abnormal behavior of a flock of sheep according to claim 8, characterized in that: The specific method for obtaining the eating action amplitude is: The Euclidean distance between each corner point and the matching corner point in all the sheep flock eating images after the eating start image of each sheep is recorded as the offset difference of each corner point. In all the sheep flock eating images after the eating start image of each sheep, when the mean of the offset difference of the same corner point of the same sheep is greater than a preset offset threshold, the corner point is recorded as the head corner point of the sheep; all the head corner points of each sheep are obtained, and the centroid of the area connected by all the head corner points of each sheep in each sheep flock eating image is recorded as the head position of each sheep in each sheep flock eating image; the head position of each sheep in the eating start image is recorded as the initial head position of each sheep; The difference between the Euclidean distance between the head position of each sheep in each image of the flock eating and the centroid of the stone trough rectangle and the Euclidean distance between the initial head position of each sheep and the centroid of the stone trough rectangle is recorded as the eating action amplitude of each sheep in each image of the flock eating, and the eating action amplitude of each sheep in all images of the flock eating is obtained.

10. A method for identifying abnormal behavior of a flock of sheep according to claim 9, characterized in that: The health index of each sheep is obtained according to the eating desire, eating time and eating frequency of each sheep, including: The health index of the nth sheep The calculation method is: Where: represents the eating desire of the nth sheep, It indicates the feeding time of the nth sheep. represents the mean eating time of all sheep, represents the number of times the nth sheep eats. It represents the mean number of times each sheep eats.

Citation Information

Patent Citations

  • Sheep flock counting management method based on Internet of Things edge box

    CN114219767A

  • Live pig health monitoring method, device and equipment and storage medium

    CN115250952A

  • Livestock breeding environment data abnormity intelligent monitoring method

    CN116340801A

  • Livestock health detection and evaluation method for livestock farm based on double optical cameras

    CN117882655A

  • Feeding management device

    CN204032045U

Cited By

  • Video monitoring system for beef cattle forage feeding

    CN119540874A

  • Livestock breeding state monitoring method based on machine vision

    CN120164166A

  • A method for monitoring the state of livestock farming based on machine vision

    CN120164166B