Animal posture group weight estimation method, device, equipment and storage medium
By acquiring animal monitoring images, extracting posture images, and calculating image area, and combining distortion rate and weight compensation values, the problem of difficulty in weight estimation in existing technologies is solved, and efficient and accurate animal group weight estimation is achieved.
Patent Information
- Application Number
- CN202310463164.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-04-26
AI Technical Summary
Existing technologies are insufficient for efficiently estimating the weight of animal populations, resulting in high consumption of human and material resources and low accuracy.
By acquiring surveillance images of the animal, extracting its posture image and calculating the image area, and combining the distortion rate and weight compensation value, the weight of the animal is estimated.
It enables efficient and accurate estimation of animal population weight, reduces human intervention, and improves the efficiency of weight estimation.
Smart Images

Figure CN116580078B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of animal weight estimation, and in particular to an animal posture group weight estimation method, device, equipment and storage medium. BACKGROUND
[0002] In the animal breeding link, it is very valuable to estimate the weight of large domestic animals in captivity, which can evaluate the growth of captive livestock through the daily weight gain of livestock, and can calculate the feed-meat ratio, optimize the production mode, and reduce the breeding cost and improve the benefit.
[0003] However, it is difficult to estimate the weight of animals, and usually artificial experience estimation or separate weighing of the animals being raised is used to estimate the growth of the animal group, which consumes a lot of manpower and material resources, or the accuracy of the estimation result depends on personal experience.
[0004] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide an animal posture group weight estimation method, device, equipment and storage medium, which aims to solve the technical problem that the prior art is difficult to estimate the weight of animals.
[0006] To achieve the above purpose, the present application provides an animal posture group weight estimation method, which comprises the following steps:
[0007] Obtain the animal monitoring image, and extract the posture image of the animal according to the animal monitoring image;
[0008] When the posture image meets the preset posture, obtain the image area of the posture image in the monitoring image;
[0009] According to the image area, estimate the estimated weight of the animal.
[0010] Optionally, the animal posture image is extracted from the animal monitoring image, comprising:
[0011] According to the monitoring image, determine the position of the animal, and extract the animal image;
[0012] According to the animal image and the preset animal feature, determine the contour image;
[0013] According to the contour image, obtain the posture image of the animal.
[0014] Optionally, when the posture image meets the preset posture, the image area of the posture image in the monitoring image is obtained, comprising:
[0015] According to the posture image and the monitoring image, a pixel number of the posture image is obtained;
[0016] According to the pixel number, an image area of the posture image is determined.
[0017] Optionally, the estimating the estimated weight of the animal according to the image area and the weight compensation value comprises:
[0018] According to the posture image, a distortion rate and a weight compensation value are obtained;
[0019] According to the posture image and the distortion rate, a relationship between the image area and an actual area of the animal is obtained;
[0020] According to the image area, the relationship between the image area and the actual area, the weight compensation value and a preset area weight conversion parameter, the estimated weight of the animal is estimated.
[0021] Optionally, the estimating the weight of the animal according to the image area and the weight compensation value, and a preset area weight conversion parameter comprises:
[0022] The monitoring image is partitioned to obtain at least one image partition;
[0023] The monitoring image is compared with the posture image to determine pixel values of the posture image in each image partition;
[0024] It is determined that the posture image is in an image partition of the monitoring image, a distortion rate corresponding to the image partition is determined according to a relationship between each image partition and the distortion rate, and a preset area weight conversion parameter and the weight compensation value are determined;
[0025] According to the pixel values of the image partition and the distortion rate corresponding to the image partition, a local area of the animal in the current image partition is obtained;
[0026] According to the local area, the preset area weight conversion parameter and the weight compensation value, a local weight is obtained;
[0027] The local weights in each image partition are summarized to obtain the estimated weight of the animal.
[0028] Optionally, after the posture image of the animal is extracted from the animal monitoring image, the method further comprises:
[0029] The posture image is detected, and when the posture image meets a preset posture, an animal identification mark corresponding to the current posture image is obtained;
[0030] When the identification mark is not estimated weight, the weight of the animal is estimated according to the posture image, and the estimated weight of the animal is obtained.
[0031] Optionally, after the estimated weight of the animal is estimated according to the image area, the method further comprises:
[0032] The estimated weight of the animal is recorded, and the weight estimation state is updated.
[0033] When the weight estimation state meets a preset weight estimation condition, the steps of acquiring the monitoring image of the animal and extracting the posture image of the animal from the animal monitoring image are repeatedly performed.
[0034] The estimated weights of the animals are summarized to obtain the average weight, the maximum weight and the minimum weight of the animals.
[0035] In addition, to achieve the above-mentioned purpose, the application further provides an animal posture group weight estimation device, which comprises:
[0036] The posture extraction module is configured to acquire the monitoring image of the animal, and extract the posture image of the animal from the animal monitoring image.
[0037] The area determination module is configured to acquire the image area of the posture image in the monitoring image when the posture image meets a preset posture.
[0038] The weight estimation module is configured to estimate the estimated weight of the animal according to the image area.
[0039] In addition, to achieve the above-mentioned purpose, the application further provides an animal posture group weight estimation device, which comprises a memory, a processor and an animal posture group weight estimation program stored in the memory and executable on the processor, and the animal posture group weight estimation program is configured to implement the steps of the animal posture group weight estimation method as described above.
[0040] In addition, to achieve the above-mentioned purpose, the application further provides a storage medium, and the storage medium stores an animal posture group weight estimation program, and the animal posture group weight estimation program is executed by a processor to implement the steps of the animal posture group weight estimation method as described above.
[0041] This invention acquires monitoring images of animals and extracts their posture images from these images. When the posture image meets a preset posture, the area of the posture image within the monitoring image is obtained. The estimated weight of the animal is then estimated based on the image area. This achieves the goal of finding complete posture images of animals from monitoring images based on their two-dimensional posture images, and estimating the animal's weight by comparing the area of the image with the actual area. Compared to existing technologies, this invention can capture animal postures and estimate animal weight at any time, avoiding the need for extensive manual labor and improving the efficiency of weight estimation. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the structure of an animal posture group weight estimation device in the hardware operating environment involved in the embodiments of the present invention;
[0043] Figure 2 This is a flowchart illustrating the first embodiment of the animal posture group weight estimation method of the present invention;
[0044] Figure 3 This is a flowchart illustrating the second embodiment of the animal posture group weight estimation method of the present invention;
[0045] Figure 4 This is a schematic diagram of monitoring image partitioning in an embodiment of the animal posture group weight estimation method of the present invention;
[0046] Figure 5 This is a structural block diagram of the first embodiment of the animal posture group weight estimation device of the present invention.
[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of an animal posture group weight estimation device in the hardware operating environment of an embodiment of the present invention.
[0050] like Figure 1As shown in the figure, the animal posture group weight estimation device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection communication between the components. The user interface 1003 can include a display screen, an input unit such as a keyboard, and can also include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) memory or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the animal posture group weight estimation device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.
[0052] As Figure 1 As shown, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and an animal posture group weight estimation program.
[0053] In Figure 1 As shown in the animal posture group weight estimation device, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the animal posture group weight estimation device of the application can be arranged in the animal posture group weight estimation device, and the animal posture group weight estimation device calls the animal posture group weight estimation program stored in the memory 1005 through the processor 1001, and executes the animal posture group weight estimation method provided by the embodiment of the application.
[0054] The embodiment of the application provides an animal posture group weight estimation method, which refers to Figure 2 , Figure 2 The flowchart of the first embodiment of the animal posture group weight estimation method of the application is shown.
[0055] In this embodiment, the animal posture group weight estimation method includes the following steps:
[0056] Step S10: Obtain a monitoring image of the animal, and extract a posture image of the animal according to the monitoring image of the animal.
[0057] It should be noted that the execution subject of the embodiment is an animal posture group weight estimation device, which has functions of data processing, data communication, program running, etc. The animal posture group weight estimation device can be an integrated controller, a control computer, or other devices with similar functions. The embodiment does not limit the animal posture group weight estimation device.
[0058] It can be understood that the monitoring image refers to a global monitoring image of the shed captured by the camera installed directly above the shed where the animals are raised, and the posture image refers to various postures of the animals when they are freely active in the shed, such as normal standing, lying down, curling, stacking, etc.
[0059] In a specific implementation, the animals are large domestic animals, such as pigs, cows, sheep, etc. The embodiment will be described taking pigs as an example. A camera can be installed above the pig shed where the pigs are raised to monitor the various states of the pigs in the entire pig shed. The monitoring range needs to cover the entire pig shed plane to obtain a top-down monitoring image of the entire pig shed. In the daily feeding of pigs, the pigs will make various movements, such as normal four-legged standing, two-legged standing, curling, supine, and stacking of multiple pigs. The camera can capture the behavior and posture of each pig in the monitoring image and extract the posture image to obtain the posture image of each pig.
[0060] Step S20: When the posture image meets a preset posture, obtain an image area of the posture image in the monitoring image.
[0061] It should be noted that the preset posture refers to the ideal behavior posture of the animal, which can specifically be the head, body, and tail of the animal that can be recognized, or the head, body, and tail not appearing to be stacked and overlapped, or the stacking degree being within an expected threshold. The expected threshold refers to the ratio of the stacked and overlapped part to the whole in the animal posture image. The image area refers to the proportion of the posture image occupying the monitoring image.
[0062] In a specific implementation, the animal posture group weight estimation device can detect the posture image, first identify the pig head, pig body and pig tail from the monitoring image, roughly determine the contour of each pig, and determine whether there is a stacking condition. If there is no stacking condition and the head, body and tail of the pig can be identified, the posture image of the pig can be extracted. When there is a stacking condition, it is detected whether the stacked part is within the expected threshold. If it is within the expected threshold, the posture image of the pig can also be extracted. After obtaining the posture image of the pig, the image area of the posture image can be determined according to the proportion of the posture image in the monitoring image, which also means the projection area of the pig in the plane.
[0063] Step S30: estimating the estimated weight of the animal according to the image area.
[0064] In a specific implementation, since the height of the camera and the horizontal plane of the pigsty is fixed, there is a certain correspondence between the monitoring image and the actual area of the pigsty. Therefore, the proportional relationship between the actual area and the image area can be determined according to the area of the pigsty and the size of the monitoring image. Therefore, after obtaining the image area, the projection area of the pig in the vertical direction can be obtained according to the proportional relationship. After obtaining the projection area of the pig, the weight of the current pig can be estimated according to the relationship between the area and the pig density. By repeating the above operation, the weight of other pigs can also be estimated, thereby realizing the weight estimation of the entire pigsty group, and further determining the average weight, the maximum weight and the minimum weight of the group. According to the feed amount, the daily gain value of the animal growth, the feed-meat ratio and the like can be further obtained.
[0065] The embodiment obtains a monitoring image of an animal, extracts a posture image of the animal from the animal monitoring image, obtains an image area of the posture image in the monitoring image when the posture image meets a preset posture, and estimates an estimated weight of the animal according to the image area. The posture image of the animal with complete posture can be found from the monitoring image of the animal according to the two-dimensional posture image of the animal. The weight of the animal can be estimated according to the relationship between the area of the image in the monitoring image and the actual area. Compared with the prior art, the animal posture can be captured at any time, and the weight of the animal can be estimated, which avoids the use of a large amount of manpower to estimate the weight of the animal and improves the weight estimation efficiency.
[0066] Reference Figure 3 , Figure 3 The flowchart of the second embodiment of the animal posture group weight estimation method of the application is shown.
[0067] Based on the first embodiment, the animal posture group weight estimation method of the embodiment further includes the following steps in the step S10.
[0068] Step S101: determining the position of the animal according to the monitoring image, and extracting the animal image.
[0069] Step S102: determining the contour image according to the animal image and the preset animal feature.
[0070] Step S103: obtaining the posture image of the animal according to the contour image.
[0071] It should be noted that the animal image refers to an image containing the complete shape of the animal in the monitoring image, and the animal image is used to roughly determine the position of the animal, and the contour image refers to an image in which irrelevant pixels in the animal image are removed and only animal pixels are retained. The irrelevant pixels are cropped along the contour of the animal shape.
[0072] In a specific implementation, the animal posture group weight estimation device reads the monitoring image captured by the camera, and roughly determines the range and area of the pig in the monitoring image according to the features of the pig. After determining the position of the pig, the animal image of the pig can be recognized by contour, and the pixel blocks of the background and the pig are separated. The separation method can be to extract the contour by the difference between the hair color of the pig and the background, for example, to obtain the contour image by using the binaryzation of the image. Of course, the contour extraction method can also include other methods, and the present embodiment does not limit this. After the animal image is extracted by contour, the contour image of the pig is obtained, and further, the head, body and tail of the pig are determined according to the contour image, so that the posture of the pig is more accurately determined.
[0073] Further, in order to accurately obtain the area of the posture image in the monitoring image, the following steps are further included:
[0074] obtaining the number of pixels of the posture image according to the posture image and the monitoring image;
[0075] determining the image area of the posture image according to the number of pixels.
[0076] In the specific implementation, since the posture image is originally a part of the monitoring image, the posture image and the monitoring image have the same correspondence with the actual area, so the corresponding image area of the posture image can be obtained by obtaining the relationship between the posture image and the monitoring image. Since the pigs are free to move, the shapes of the obtained posture images of the pigs are not regular shapes, so the calculation amount of the posture image area calculated by using the simple patching method is very large, so the image area can be obtained by extracting the pixel value of the posture image. In the case where the specifications of the camera are unchanged, the pixel value of the monitoring image captured by the camera is fixed, so the image area of the posture image can be obtained by directly comparing the pixel value of the posture image with the pixel value of the monitoring image. In addition, a plurality of cameras can be installed above the pigsty, and the posture images of the plurality of cameras are used for weight estimation, and the final average value is taken as the final weight estimation of the pig.
[0077] Further, in order to estimate the weight of the animal according to the image area, the following steps are further included:
[0078] obtaining a distortion rate and a weight compensation value according to the posture image;
[0079] obtaining a relationship between the image area and the actual area of the animal according to the posture image and the distortion rate;
[0080] estimating the estimated weight of the animal according to the image area, the relationship between the image area and the actual area, the weight compensation value, and a preset area-weight conversion parameter.
[0081] It should be noted that distortion refers to the fact that when the camera captures the monitoring image, the actual position in the picture content is different from the distance of the camera, so when the object captured is far away from the center of shooting, the imaging will appear some distortion, i.e. distortion, so the distortion rate is a correction value for correcting the distortion caused by the distance of the object from the center of imaging, and the weight compensation value is a correction value according to the error between the actual estimation and the true value, so that the estimation result can be more accurate. The preset area-weight conversion parameter refers to an important parameter for connecting the two-dimensional concept of area and the three-dimensional concept of weight, and the preset area-weight conversion parameter is determined according to the estimated animal species and breed.
[0082] In a specific implementation, for the convenience of illustration, the distortion rate is set as A, the preset area weight conversion parameter is set as K, and the weight compensation value is B. The animal posture group weight estimation device can compare the posture image with the monitoring image in position, determine the distortion rate and the weight compensation value according to the position of the posture image relative to the center of the monitoring image, and after obtaining the distortion rate, can obtain the actual area of the current corresponding pig according to the image area of the posture image and the distortion rate. The area is the projection area of the pig on the ground, that is, the actual area = distortion rate A * image area, and the calculation formula for estimating the weight of the current pig is: weight = distortion rate A * preset area weight conversion parameter K * image area + weight compensation value B.
[0083] Further, in order to more accurately determine the weight of the animal, the following steps are further included:
[0084] The monitoring image is partitioned to obtain at least one image partition;
[0085] The monitoring image is compared with the posture image to determine the pixel value of the posture image in each of the image partitions;
[0086] It is determined that the posture image is in the image partition of the monitoring image, the distortion rate corresponding to the image partition is determined according to the relationship between each image partition and the distortion rate, and the preset area weight conversion parameter and the weight compensation value are determined;
[0087] The local area of the animal in the current image partition is obtained according to the pixel value of the image partition and the distortion rate corresponding to the image partition;
[0088] The local weight is obtained according to the local area, the preset area weight conversion parameter and the weight compensation value;
[0089] The local weights in each image partition are summarized to obtain the estimated weight of the animal.
[0090] It should be noted that in the monitoring image, the monitoring image can be partitioned according to actual needs, so that the monitoring image includes at least one image partition. The specific number of partitions is determined according to actual conditions, and the present embodiment does not limit this.
[0091] In a specific implementation, reference is made to Figure 4 , Figure 4As a schematic diagram of the monitoring image partition of the embodiment, A1-A9, K1-K9, B1-B9 involved in the figure correspond to the distortion rate, the preset area weight conversion parameter and the weight compensation value of the partition respectively. The embodiment will be described by taking the partition into nine partitions as an example. Since the posture of the pig is uncontrollable, the posture image of the pig may appear in one of the partitions or cross the partitions. When the posture image appears in one of the partitions, it can be determined that the current posture image is in which image partition. Taking pig 1 in the figure as an example, the position of pig 1 is in the image partition at the upper left corner of the image partition, and does not cross the partitions. Therefore, the actual area of the pig can be estimated according to the distortion rate corresponding to the image partition 1 at the upper left corner. When the posture image crosses the partitions, for example, pig 2 in the figure, the posture image of pig 2 crosses two partitions, which are image partition 5 and image partition 6. Therefore, the posture image of pig 2 needs to be pixel segmented to obtain the partition area in image partition 5 and image partition 6 respectively, and the local area in each image partition is calculated. After obtaining the local area in each image partition, the actual weight of the animal in the current partition can be calculated by using the preset area weight conversion parameter and the weight compensation parameter corresponding to the current partition. Taking pig 2 as an example, the actual weight of pig 2 can be divided into two parts, which are local weight 1 and local weight 2. Local weight 1 corresponds to the local weight in image partition 5, and local weight 2 corresponds to the local weight in image partition 6. When estimating the actual weight of pig 2, local weight 1 and local weight 2 are estimated first, and then the two local weights are added to obtain the complete weight of pig 2. When estimating local weight 1, the distortion rate A5, the preset area weight conversion parameter K5 and the weight compensation value B5 are obtained according to the correspondence between the image partition and the preset area weight conversion parameter and the weight compensation value. The local weight of the animal in image partition 5 is obtained according to the weight calculation formula: local weight 1 = partition area * A5 * K5 + B5. In the same way, the local weight of the animal in image partition 6 is obtained, and the two local weights are added to obtain the weight of the animal. Similarly, if the image of an animal crosses N image partitions, the local weights of the animals in the N image partitions are obtained respectively, and the N local weights are added to obtain the weight of the animal.
[0092] Further, in order to realize the weight estimation of the animal group, the following steps are further included:
[0093] Detecting the posture image, and when the posture image meets the preset posture, obtaining an animal identification mark corresponding to the current posture image;
[0094] When the identification mark is not estimated, estimating the weight of the animal according to the posture image to obtain the estimated weight of the animal.
[0095] It should be noted that the identification mark refers to marking the animal to be weighed, which means that the animal has been weighed.
[0096] In a specific implementation, in the process of detecting the pig group in a day, the total number of pigs in the pigsty can be determined first, and pigs meeting the preset posture can be selected from each detection for identity recognition. Whether the number of pigs that have been weighed reaches the total number of the pig group, if not, it is determined whether the pig has been weighed, when the detection result of the pig is not weighed, the pig can be weighed by the weighing method as described above, and after the weighing is completed, the identification mark of the pig is switched from not weighed to weighed, and the number of pigs that have been weighed is updated. When the detection result is weighed, the weighing of the current pig is abandoned, and the next target is found, until the time is up or the weighing of all pigs is stopped. After the detection is completed, the weighing of all pigs is analyzed to determine the average weight, the maximum weight and the minimum weight of the current pig group.
[0097] Further, in order to realize the weighing of the animal group, after estimating the estimated weight of the animal according to the image area, the following steps are further included:
[0098] The estimated weight of the animal is recorded, and the weighing state is updated;
[0099] When the weighing state meets the preset weighing condition, the steps of acquiring the monitoring image of the animal and extracting the posture image of the animal from the animal monitoring image are repeatedly performed;
[0100] The estimated weights of the animals are summarized to obtain the average weight, the maximum weight and the minimum weight of the animals.
[0101] In a specific implementation, in the strategy of time for precision for the pig group, the pigs meeting the posture in the pig group are weighed through multiple detections in a day, and the weighing of the pig is recorded. Due to multiple weighing of the pig, interference of some special pigs can be avoided, and special pigs in the pig group, such as the heaviest pig or the lightest pig, are not detected. After one detection is completed, the weighing state needs to be updated, when the current weighing state is switched to stop weighing, the weighing of the pig group is stopped, and all obtained weighing information is summarized to calculate the average weight, the maximum weight and the minimum weight of the pig group.
[0102] The embodiment obtains the actual area of the estimated animal by the pixel proportion relationship between the posture image and the monitoring image and the distortion rate of the posture image due to the camera shooting, determines the formula parameters of the animal weight estimation according to the image partition where the posture image of the animal is located, and further calibrates the animal weight estimation, while using the strategy of time for precision and pig identity recognition to ensure the universality and comprehensiveness of the data and further ensure the accuracy of the animal weight estimation.
[0103] In addition, the embodiment of the present application further provides a storage medium, wherein the storage medium stores an animal posture group weight estimation program, and the animal posture group weight estimation program is executed by a processor to realize the steps of the animal posture group weight estimation method as described above.
[0104] Reference Figure 5 , Figure 5 The figure is a structural block diagram of the first embodiment of the animal posture group weight estimation device of the present application.
[0105] As Figure 5 shown, the animal posture group weight estimation device provided by the embodiment of the present application comprises:
[0106] The posture extraction module 10 is configured to acquire a monitoring image of an animal, and extract a posture image of the animal according to the monitoring image of the animal;
[0107] The area determination module 20 is configured to acquire an image area of the posture image in the monitoring image when the posture image meets a preset posture.
[0108] The weight estimation module 30 is configured to estimate an estimated weight of the animal according to the image area.
[0109] The embodiment acquires a monitoring image of an animal, extracts a posture image of the animal according to the monitoring image of the animal, acquires an image area of the posture image in the monitoring image when the posture image meets a preset posture, and estimates an estimated weight of the animal according to the image area, so as to find the posture image of the animal with complete posture from the monitoring image of the animal according to the two-dimensional posture image of the animal, and estimate the weight of the animal according to the relationship between the area in the image and the actual area, which is more efficient than the prior art.
[0110] In an embodiment, the posture extraction module 10 is further configured to determine the position where the animal is located according to the monitoring image, extract an animal image, determine a contour image according to the animal image and a preset animal feature, and obtain the posture image of the animal according to the contour image.
[0111] In an embodiment, the area determining module 20 is further configured to determine the number of pixels of the posture image according to the posture image and the monitoring image; and determine the image area of the posture image according to the number of pixels.
[0112] In an embodiment, the weight estimating module 30 is further configured to obtain a distortion rate and a weight compensation value according to the posture image; obtain the relationship between the image area and the actual area of the animal according to the posture image and the distortion rate; and estimate the estimated weight of the animal according to the image area, the relationship between the image area and the actual area, the weight compensation value, and a preset area-weight conversion parameter.
[0113] In an embodiment, the weight estimating module 30 is further configured to divide the monitoring image to obtain at least one image partition; compare the monitoring image with the posture image to determine the pixel value of the posture image in each image partition; determine the image partition in which the posture image is located in the monitoring image, determine the distortion rate corresponding to the image partition according to the relationship between each image partition and the distortion rate, and determine the preset area-weight conversion parameter and the weight compensation value; obtain the local area of the animal in the current image partition according to the pixel value of the image partition and the distortion rate corresponding to the image partition; obtain the local weight according to the local area, the preset area-weight conversion parameter, and the weight compensation value; and aggregate the local weight in each image partition to obtain the estimated weight of the animal.
[0114] In an embodiment, the posture extracting module 10 is further configured to detect the posture image, and when the posture image meets a preset posture, obtain the animal identification mark corresponding to the current posture image; and when the identification mark is not estimated, estimate the weight of the animal according to the posture image to obtain the estimated weight of the animal.
[0115] In an embodiment, the weight estimating module 30 is further configured to record the estimated weight of the animal and update the weight estimation state; when the weight estimation state meets a preset weight estimation condition, repeat the steps of obtaining the monitoring image of the animal, extracting the posture image of the animal according to the posture image of the animal, aggregating the estimated weight of the animal to obtain the average weight, the maximum weight, and the minimum weight of the animal.
[0116] It should be understood that the above is only for illustration, and does not constitute any limitation on the technical solutions of the present application. In specific applications, those skilled in the art can set up as needed, and the present application does not limit this.
[0117] It should be noted that the above-described workflow is merely illustrative and does not limit the protection scope of the present application, and in actual application, a person skilled in the art can select part or all of the above-described workflow to achieve the purpose of the embodiment according to actual needs, which is not limited herein.
[0118] In addition, it should be noted that in this paper, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or system. Without more limitations, the element defined by the sentence "comprises a" does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0119] The above-mentioned embodiment numbers of the present application are only for description, not representing the advantages and disadvantages of the embodiments.
[0120] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk), and includes a number of instructions for making a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.
[0121] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation made by using the content of the present application specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for estimating the weight of animals in groups based on their posture, characterized in that, The animal posture group weight estimation method comprises: acquiring a monitoring image of an animal, and extracting a posture image of the animal according to the animal monitoring image; when the posture image meets a preset posture, acquiring an image area of the posture image in the monitoring image; estimating an estimated weight of the animal according to the image area; the estimation of the estimated weight of the animal according to the image area comprises: obtaining a distortion rate and a weight compensation value according to the posture image; obtaining a relationship between the image area and an actual area of the animal according to the posture image and the distortion rate; estimating the estimated weight of the animal according to the image area, the relationship between the image area and the actual area, the weight compensation value and a preset area weight conversion parameter; the estimation of the estimated weight of the animal according to the image area and the weight compensation value, and a preset area weight conversion parameter comprises: dividing the monitoring image into at least one image partition; comparing the monitoring image with the posture image to determine pixel values of the posture image in each image partition; determining that the posture image is in the image partition of the monitoring image, determining a distortion rate corresponding to the image partition according to a relationship between each image partition and the distortion rate, and presetting an area weight conversion parameter and the weight compensation value; obtaining a local area of the animal in a current image partition according to the pixel values of the image partition and the distortion rate corresponding to the image partition; obtaining a local weight according to the local area, the preset area weight conversion parameter and the weight compensation value; summing up the local weights in each image partition to obtain the estimated weight of the animal.
2. The animal pen population weighing method of claim 1 wherein, the extraction of the posture image of the animal according to the animal monitoring image comprises: determining a position of the animal according to the monitoring image, and extracting an image of the animal; determining a contour image according to the image of the animal and a preset animal feature; obtaining the posture image of the animal according to the contour image.
3. The animal pen population weighing method of claim 1 wherein, the acquisition of the image area of the posture image in the monitoring image when the posture image meets the preset posture comprises: obtaining a pixel number of the posture image according to the posture image and the monitoring image; determining an image area of the posture image according to the pixel number.
4. The method of estimating the weight of a group of animals in a pen of claim 1, wherein, after the acquisition of the monitoring image of the animal and the extraction of the posture image of the animal according to the animal monitoring image, the method further comprises: detecting the posture image, and acquiring an animal identification mark corresponding to a current posture image when the posture image meets a preset posture; when the identification mark is not estimated, estimating the weight of the animal according to the posture image to obtain the estimated weight of the animal.
5. The animal pose group weight estimation method of any one of claims 1 to 4, wherein, after the estimation of the estimated weight of the animal according to the image area, the method further comprises: recording the estimated weight of the animal, and updating an estimated weight state; when the estimated weight state meets a preset estimated weight condition, repeatedly executing the steps of acquiring the monitoring image of the animal and extracting the posture image of the animal according to the animal monitoring image; summing up the estimated weights of the animals to obtain an average weight, a maximum weight and a minimum weight of the animals.
6. An animal posture group weight estimation device, characterized by, the animal posture group weight estimation device comprises: The posture extraction module is configured to acquire a monitoring image of an animal, and extract a posture image of the animal from the monitoring image of the animal. The area determination module is configured to acquire an image area of the posture image in the monitoring image when the posture image meets a preset posture. The weight estimation module is configured to estimate an estimated weight of the animal according to the image area. The estimation of the estimated weight of the animal according to the image area comprises: obtaining a distortion rate and a weight compensation value according to the posture image; obtaining a relationship between the image area and an actual area of the animal according to the posture image and the distortion rate; estimating the estimated weight of the animal according to the image area, the relationship between the image area and the actual area, the weight compensation value, and a preset area-weight conversion parameter; The estimation of the estimated weight of the animal according to the image area, the weight compensation value, and the preset area-weight conversion parameter comprises: partitioning the monitoring image to obtain at least one image partition; comparing the monitoring image with the posture image to determine pixel values of the posture image in each image partition; determining that the posture image is in an image partition of the monitoring image, determining a distortion rate corresponding to the image partition according to a relationship between each image partition and the distortion rate, and determining a preset area-weight conversion parameter and the weight compensation value; obtaining a local area of the animal in a current image partition according to the pixel values of the image partition and the distortion rate corresponding to the image partition; obtaining a local weight according to the local area, the preset area-weight conversion parameter, and the weight compensation value; summing up the local weights in each image partition to obtain the estimated weight of the animal.
7. An animal pose group weight estimation device, characterized by, The device comprises a memory, a processor, and an animal posture group weight estimation program stored on the memory and executable on the processor, and the animal posture group weight estimation program is configured to implement the steps of the animal posture group weight estimation method according to any one of claims 1 to 5.
8. A storage medium, characterized by The storage medium stores an animal posture group weight estimation program, and the animal posture group weight estimation program implements the steps of the animal posture group weight estimation method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Logistics box volume and weight measurement system and implementation method thereof
CN107816943A
Ratio estimation method, apparatus and device, and storage medium
CN115100683A