Animal body weight detection method, device, equipment and storage medium

By generating a three-dimensional point cloud and depth map of the animal body and calculating its volume and density, the problem of inaccurate weight detection of irregularly shaped animals is solved, and high-precision weight detection without handling is achieved.

CN113449540BActive Publication Date: 2024-09-27SF TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010211912.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-24
Publication Date
2024-09-27
Estimated Expiration
2040-03-24

AI Technical Summary

Technical Problem

It is difficult to accurately measure the volume of irregularly shaped animals with the existing technology, resulting in inaccurate weight detection, and the difference in density of different animals leads to large weight measurement errors, making it difficult to avoid the handling process of the animals.

Method used

Obtain the target depth map of the animal through the image, generate the target three-dimensional point cloud, determine the volume and density of the animal, and then calculate its weight, avoiding the error of relying solely on density in traditional methods.

Benefits of technology

It improves the accuracy of animal body weight detection, reduces weight detection errors, and eliminates the process of transporting animals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449540B
    Figure CN113449540B
Patent Text Reader

Abstract

The embodiments of the present application disclose an animal weight detection method, device, equipment and storage medium. The animal weight detection method comprises: obtaining a target three-dimensional point cloud of a target area according to a target depth map of the animal to be detected, wherein the target area refers to the area in the target depth map that carries the animal to be detected; determining a target volume of the animal to be detected according to the target three-dimensional point cloud; and determining the weight of the animal to be detected according to the target volume and the target depth map. In the embodiments of the present application, the weight of the animal can be measured through an image, eliminating the process of carrying the animal for weighing and improving the detection accuracy of the animal's weight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer vision technology, and specifically to a method, device, equipment and storage medium for detecting animal weight. Background Art

[0002] In real life, it is often necessary to measure the weight of an object. In order to avoid the problem of the complicated weight measurement process caused by the need to move the object to the measuring tool when measuring weight using traditional measuring tools, the volume of the object can be detected based on the principle of multiplying the volume by the density to determine the weight of the object.

[0003] However, some objects are irregular in shape, and it is not easy to accurately measure their volume, which can easily lead to inaccurate weight detection. In addition, the density of different objects varies from person to person. If a unified standard density is used to determine the weight of different objects, it is easy to cause large weight measurement errors.

[0004] For example, the body shape of animals is generally irregular, the volume of animals is difficult to measure accurately, and the density of different animals can lead to large individual differences due to factors such as their living environment and age.

[0005] It can be seen that in order to accurately detect the weight of the animal, it is difficult to avoid the process of transporting the animal. Summary of the invention

[0006] The embodiments of the present application provide an animal weight detection method, device, equipment and storage medium, which can measure the weight of the animal through images, eliminate the process of moving the animal for weighing, and improve the detection accuracy of the animal weight.

[0007] In one aspect, an embodiment of the present application provides a method for detecting an animal's body weight, the method comprising:

[0008] According to the target depth map of the animal body to be detected, a target three-dimensional point cloud of a target area is obtained, wherein the target area refers to an area in the target depth map that carries the animal body to be detected;

[0009] Determine the target volume of the animal body to be tested according to the target three-dimensional point cloud;

[0010] The weight of the animal to be tested is determined according to the target volume and the target depth map.

[0011] In some embodiments of the present application, determining the target volume of the animal body to be tested according to the target three-dimensional point cloud includes:

[0012] Acquire a target polyhedron according to the target three-dimensional point cloud;

[0013] The target volume of the animal body to be tested is determined according to the target polyhedron and the target three-dimensional point cloud.

[0014] In some embodiments of the present application, the step of acquiring a target polyhedron according to the target three-dimensional point cloud includes:

[0015] Acquire a plurality of first target points from the target three-dimensional point cloud;

[0016] Determining an initial polyhedron according to each of the first target points, wherein the first target points are vertices of the initial polyhedron;

[0017] Traverse each point of the remaining three-dimensional point cloud, and if it is detected that the second target point is outside the initial polyhedron, iteratively update the initial polyhedron according to the second target point to obtain a target polyhedron, wherein the remaining three-dimensional point cloud refers to a set of points in the target three-dimensional point cloud except the first target point, and the second target point refers to a point in the remaining three-dimensional point cloud.

[0018] In some embodiments of the present application, determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud includes:

[0019] Determine the three-dimensional point cloud of the target polyhedron according to the target three-dimensional point cloud;

[0020] Projecting the target polyhedron onto a reference plane to obtain a target point cloud, wherein the reference plane refers to an arbitrary plane that does not intersect any plane of the target polyhedron;

[0021] The volume of the target polyhedron is determined according to the three-dimensional point cloud of the target polyhedron and the target point cloud to serve as the target volume of the animal body to be tested.

[0022] In some embodiments of the present application, determining the target volume of the animal body to be tested according to the target three-dimensional point cloud includes:

[0023] Acquire a target plane, wherein the target plane refers to a plane formed by a planar point cloud projected on a reference plane by the target three-dimensional point cloud, and the reference plane refers to a support surface of the animal body to be measured in each plane of the target depth map;

[0024] Segmenting the target plane to obtain a plurality of sub-planes, and computing a volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud;

[0025] The volume of the animal body to be measured is obtained according to the volume to be measured corresponding to each of the sub-planes.

[0026] In some embodiments of the present application, computing the volume to be measured corresponding to each sub-plane according to the target three-dimensional point cloud includes:

[0027] Determine the area and corresponding height of each sub-plane according to the target three-dimensional point cloud;

[0028] The volume to be measured corresponding to each of the sub-planes is calculated according to the area of ​​each of the sub-planes and the corresponding height.

[0029] In some embodiments of the present application, determining the weight of the animal to be tested according to the target volume and the target depth map includes:

[0030] The target volume and the target depth map are input into an animal body weight detection model, so that the animal body weight detection model determines the weight of the animal body to be detected according to the target volume and the target depth map.

[0031] In some embodiments of the present application, the animal body weight detection model is obtained by the following steps:

[0032] Obtain and train the initial model based on the depth map, volume and actual weight of multiple animals;

[0033] The initial model that has completed the training is determined as the animal body weight detection model.

[0034] On the other hand, an embodiment of the present application provides an animal body weight detection device, the animal body weight detection device comprising:

[0035] An acquisition unit, configured to acquire a target three-dimensional point cloud of a target area according to a target depth map of the animal body to be detected, wherein the target area refers to an area in the target depth map that carries the animal body to be detected;

[0036] The processing unit is used to determine the target volume of the animal body to be tested according to the target three-dimensional point cloud acquired by the acquisition unit; and determine the weight of the animal body to be tested according to the target volume and the target depth map.

[0037] In some embodiments of the present application, the processing unit is specifically used to:

[0038] Acquire a target polyhedron according to the target three-dimensional point cloud;

[0039] The target volume of the animal body to be tested is determined according to the target polyhedron and the target three-dimensional point cloud.

[0040] In some embodiments of the present application, the processing unit is specifically used to:

[0041] Acquire a plurality of first target points from the target three-dimensional point cloud;

[0042] Determining an initial polyhedron according to each of the first target points, wherein the first target points are vertices of the initial polyhedron;

[0043] Traverse each point of the remaining three-dimensional point cloud, and if it is detected that the second target point is outside the initial polyhedron, iteratively update the initial polyhedron according to the second target point to obtain a target polyhedron, wherein the remaining three-dimensional point cloud refers to a set of points in the target three-dimensional point cloud except the first target point, and the second target point refers to a point in the remaining three-dimensional point cloud.

[0044] In some embodiments of the present application, the processing unit is specifically used to:

[0045] Determine the three-dimensional point cloud of the target polyhedron according to the target three-dimensional point cloud;

[0046] Projecting the target polyhedron onto a reference plane to obtain a target point cloud, wherein the reference plane refers to an arbitrary plane that does not intersect any plane of the target polyhedron;

[0047] The volume of the target polyhedron is determined according to the three-dimensional point cloud of the target polyhedron and the target point cloud to serve as the target volume of the animal body to be tested.

[0048] In some embodiments of the present application, the processing unit is specifically used to:

[0049] Acquire a target plane, wherein the target plane refers to a plane formed by a planar point cloud projected on a reference plane by the target three-dimensional point cloud, and the reference plane refers to a support surface of the animal body to be measured in each plane of the target depth map;

[0050] Segmenting the target plane to obtain a plurality of sub-planes, and computing a volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud;

[0051] The volume of the animal body to be measured is obtained according to the volume to be measured corresponding to each of the sub-planes.

[0052] In some embodiments of the present application, the processing unit is specifically used to:

[0053] Determine the area and corresponding height of each sub-plane according to the target three-dimensional point cloud;

[0054] The volume to be measured corresponding to each of the sub-planes is calculated according to the area of ​​each of the sub-planes and the corresponding height.

[0055] In some embodiments of the present application, the processing unit is specifically used to:

[0056] The target volume and the target depth map are input into an animal body weight detection model, so that the animal body weight detection model determines the weight of the animal body to be detected according to the target volume and the target depth map.

[0057] In some embodiments of the present application, the animal body weight detection device further includes a training unit, and the training unit is specifically used for:

[0058] Obtain and train the initial model based on the depth map, volume and actual weight of multiple animals;

[0059] The initial model that has completed the training is determined as the animal body weight detection model.

[0060] On the other hand, an embodiment of the present application also provides an animal weight detection device, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the processor executes the steps of any animal weight detection method provided in the embodiment of the present application.

[0061] On the other hand, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the steps in the animal weight detection method.

[0062] The embodiments of the present application obtain and determine the three-dimensional point cloud of the animal body to be tested based on the depth map of the animal body to be tested; determine the target volume of the animal body to be tested based on the three-dimensional point cloud of the animal body to be tested; and fit the weight of the animal body to be tested based on the target volume of the animal body to be tested and the depth map of the animal body to be tested. On the one hand, the weight of the animal body to be tested can be detected by only acquiring the image of the animal body to be tested, eliminating the process of moving the animal body for weighing. On the other hand, since the weight of the animal body to be tested is fitted based on both the target volume and the depth map of the animal body to be tested, rather than simply fitting the weight of the animal body to be tested based on the volume, the problem of overfitting is avoided and the error in weight detection is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0064] Figure 1 This is a schematic diagram of an embodiment of the method for detecting animal body weight provided in the embodiments of the present application;

[0065] Figure 2 is a schematic diagram of a scene of an initial polyhedron provided in an embodiment of the present application;

[0066] Figure 3 is a comparative schematic diagram before and after the initial polyhedron is updated in an embodiment of the present application;

[0067] Figure 4 is a schematic diagram of dividing a target plane into multiple sub-planes provided in an embodiment of the present application;

[0068] Figure 5 It is a schematic structural diagram of an embodiment of an animal body weight detection device provided in an embodiment of the present application;

[0069] Figure 6 It is a schematic diagram of the structure of an embodiment of an animal body weight detection device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0071] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0072] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.

[0073] First of all, before introducing the embodiments of the present application, the relevant content about the application background of the embodiments of the present application is introduced.

[0074] In real life, it is often necessary to measure the weight of animals, such as pigs, sheep, and cattle. The traditional weight measurement method requires the animal to be carried to the measuring tool. However, many animals are bulky and difficult to carry. In addition, animals are prone to carry various bacteria and viruses, and manual handling of animals can easily lead to infection of bacteria and viruses.

[0075] Since the mass of an object can be determined by determining its volume and density, in order to avoid the process of carrying the animal, the volume of the animal can be detected to obtain the weight of the animal.

[0076] However, animals are irregular objects and it is difficult to detect their volume. Even if the volume of an animal is detected, the density of the animal is difficult to determine. Since the density of animals of different species and animals of the same species is different, if the weight of the animal is calculated based on experience using a preset density, the error of the obtained weight of the animal will be large.

[0077] Based on the above-mentioned defects in the existing related technologies, the embodiments of the present application provide a method for detecting animal body weight, which at least overcomes the defects in the existing related technologies to a certain extent.

[0078] The executor of the animal weight detection method of the embodiment of the present application may be the animal weight detection device provided in the embodiment of the present application, or different types of animal weight detection devices such as a server device, a physical host or a user equipment (UE) that integrates the animal weight detection device, wherein the animal weight detection device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).

[0079] The animal weight detection device can adopt a single-operation working mode or a device cluster working mode. By applying the animal weight detection method provided in the embodiment of the present application, the weight of the animal can be measured, the process of moving the animal can be avoided, and the detection accuracy of the animal weight can be improved.

[0080] Next, we will begin to introduce the animal weight detection method provided in an embodiment of the present application. The animal weight detection method includes: obtaining a target three-dimensional point cloud of a target area based on a target depth map of the animal to be detected; determining a target volume of the animal to be detected based on the target three-dimensional point cloud; and determining the weight of the animal to be detected based on the target volume and the target depth map.

[0081] Reference Figure 1 , Figure 1A flow chart of an animal body weight detection method provided in an embodiment of the present application. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here. The animal body weight detection method includes steps 10 to 30, wherein:

[0082] 10. According to the target depth map of the animal to be tested, obtain the target three-dimensional point cloud of the target area.

[0083] The target depth map refers to the depth map of the animal to be tested, and the target depth map includes information such as the three-dimensional coordinates of each point in the image. The target area refers to the area in the target depth map that carries the animal to be tested.

[0084] First, obtain the target depth map of the object to be measured. In practical applications, the animal body weight detection device provided by the embodiment of the present application can directly include one or more cameras in hardware, and store the target depth map obtained by the one or more cameras locally, which can be directly read inside the device; or, the animal body weight detection device can also establish a network connection with other devices, and obtain the target depth map taken or stored by other devices based on the network connection. The specific acquisition method is not limited here.

[0085] Then, the area in the target depth map that carries the animal body to be tested is identified, that is, the target area is determined. The identification of the target area can be achieved through a deep neural network.

[0086] Finally, the 3D point cloud of the area in the target depth map carrying the animal body to be detected is extracted from the 3D point cloud of the target depth map, that is, the target 3D point cloud of the target area is determined, wherein the target 3D point cloud refers to the 3D point cloud of the area in the target depth map carrying the animal body to be detected.

[0087] 20. Determine the target volume of the animal body to be tested according to the target three-dimensional point cloud.

[0088] As an implementation method, determining the target volume of the animal body to be tested according to the target three-dimensional point cloud specifically includes: first, determining the body shape of the animal body to be tested according to the target three-dimensional point cloud of the target area. Then, determining the target volume of the animal body to be tested based on the body shape of the animal body to be tested.

[0089] As another embodiment, the target volume of the animal body to be tested is determined according to the target three-dimensional point cloud, specifically comprising: first, according to the target depth map of the animal body to be tested, the support surface of the animal body to be tested is obtained by a region growing algorithm. Then, according to the support surface of the animal body to be tested and the target three-dimensional point cloud of the target area, the target volume of the animal body to be tested is determined.

[0090] The two implementation modes mentioned here will be described in detail in subsequent implementations and will not be repeated here for the sake of simplicity.

[0091] 30. Determine the weight of the animal to be tested according to the target volume and the target depth map.

[0092] As an implementation mode, the weight of the animal to be tested is determined according to the target volume and the target depth map. Specifically, the density corresponding to the animal to be tested is determined according to the target volume and the target depth map of the animal to be tested. Then, the product of the target volume of the animal to be tested and the density corresponding to the animal to be tested is used as the weight of the animal to be tested.

[0093] As another embodiment, the weight of the animal to be tested is determined according to the target volume and the target depth map. Specifically, the method may be as follows: first, a pre-trained weight detection model is obtained, and the target volume and the target depth map of the animal to be tested are input into the weight detection model, so that the weight detection model fits the weight of the animal to be tested according to the target volume and the target depth map of the animal to be tested. Then, the weight of the animal to be tested output by the weight detection model is extracted.

[0094] In an embodiment of the present application, a target three-dimensional point cloud of the animal body to be tested is determined by acquiring and based on a target depth map of the animal body to be tested; a target volume of the animal body to be tested is determined based on the target three-dimensional point cloud of the animal body to be tested; and the weight of the animal body to be tested can be fitted based on the target volume of the animal body to be tested and the target depth map of the animal body to be tested. On the one hand, the weight of the animal body to be tested can be detected by only acquiring the depth map of the animal body to be tested, eliminating the process of moving the animal body for weighing. On the other hand, since the weight of the animal body to be tested is fitted based on both the target volume and the target depth map of the animal body to be tested, rather than simply fitting the weight of the animal body to be tested based on the volume, the problem of overfitting is avoided, and the detection error of the weight of the animal body to be tested is reduced.

[0095] The following introduces two methods for determining the target volume of the animal body to be tested. The two implementation methods for determining the target volume of the object to be tested each have advantages and disadvantages. In practical applications, which method to use can be determined according to the specific application scenario.

[0096] The first method is to determine the target volume of the animal body to be tested based on the body shape of the animal body to be tested.

[0097] Since the problem of inaccurate fitting planes may occur when fitting a plane based on a target depth map, in order to avoid the problem that the support surface of the animal body to be detected needs to be fitted to detect the target volume of the animal body to be detected, thereby improving the accuracy of the determined target volume of the animal body to be detected, in some embodiments of the present application, the above figure corresponds to step 20 of the embodiment, which can be implemented according to the following steps (a1) to (a2), and is specifically implemented as follows:

[0098] (a1) Acquire a target polyhedron according to the target three-dimensional point cloud.

[0099] The target polyhedron is used to indicate the body shape of the pig to be tested.

[0100] First, multiple non-coplanar points are selected from the target 3D point cloud to form an initial polyhedron, and then each point in the target 3D point cloud is traversed. If the point is detected to be outside the initial polyhedron, the initial polyhedron is iteratively updated according to the point to obtain the target polyhedron. Then, the target polyhedron is approximately determined as the body shape of the animal to be tested.

[0101] In some embodiments of the present application, the step of acquiring a target polyhedron according to the target three-dimensional point cloud specifically includes the following steps (a11)-(a13):

[0102] (a11) Acquire multiple first target points from the target three-dimensional point cloud.

[0103] Specifically, at least four points are randomly acquired from the target three-dimensional point cloud, and each of the acquired points is made to be a non-coplanar point, and each of the acquired points is used as a first target point, so that an initial polyhedron is subsequently determined according to the multiple first target points.

[0104] (a12) Determine an initial polyhedron based on the first target points.

[0105] The first target point is a vertex of the initial polyhedron.

[0106] Specifically, the initial polyhedron is generated by taking the number of first target points as the number of vertices of the initial polyhedron and taking each first target point as a vertex of the initial polyhedron.

[0107] In order to facilitate understanding of how to determine the initial polyhedron, a specific embodiment is used for description. Figure 2 , Figure 2 A schematic diagram of a scene of an initial polyhedron provided in an embodiment of the present application. For example, 4 points (i.e., the first target points) are selected from the target 3D point cloud, and a tetrahedron (initial polyhedron) is determined based on the 4 points. For another example, 6 points (i.e., the first target points) are selected from the target 3D point cloud, and a hexahedron (initial polyhedron) is determined based on the 6 points.

[0108] (a13) traversing each point of the remaining three-dimensional point cloud, if it is detected that the second target point is outside the initial polyhedron, iteratively updating the initial polyhedron according to the second target point to obtain a target polyhedron.

[0109] The remaining three-dimensional point cloud refers to a set of points in the target three-dimensional point cloud except the first target point, and the second target point refers to a point in the remaining three-dimensional point cloud.

[0110] Specifically, firstly, each plane of the initial polyhedron is determined according to the three-dimensional coordinates of the first target point.

[0111] Then, it is detected whether the second target point is outside the initial polyhedron. Specifically, the points of the remaining three-dimensional point cloud are randomly arranged to form a target point sequence. According to the order of the points in the remaining three-dimensional point cloud in the target point sequence, a sequence point is obtained from the target point sequence as the second target point, and a binary search algorithm or other detection algorithm is used to detect whether the second target point is inside the initial polyhedron, and whether the second target point is inside any plane of the initial polyhedron.

[0112] If the second target point is not within the initial polyhedron and is not within any plane of the initial polyhedron, it is determined that the second target point is outside the initial polyhedron. If the second target point is detected to be within the initial polyhedron or within any plane of the initial polyhedron, it is determined that the second target point is not outside the initial polyhedron.

[0113] When it is detected that the second target point is not outside the initial polyhedron, the next sequence point is obtained from the target sequence points as a new second target point, and the above detection steps are repeated to determine whether the new second target point is outside the initial polyhedron.

[0114] Finally, the initial polyhedron is updated. When it is detected that the second target point is outside the initial polyhedron, the initial polyhedron is updated according to the second target point to obtain an updated initial polyhedron. And from the target sequence points, the next sequence point of the second target point obtained last time is continued to be obtained as the new second target point, and it is detected whether the new second target point is outside the updated initial polyhedron. If the new second target point is outside the updated initial polyhedron, the last updated initial polyhedron is continued to be updated. Repeat the above steps, iteratively update the initial polyhedron, until all points in the target sequence points are traversed, and the updated initial polyhedron is determined as the target polyhedron.

[0115] Among them, the method of updating the initial polyhedron according to the second target point is specifically: adding one to the number of vertices of the initial polyhedron to be updated, as the number of vertices of the updated initial polyhedron; using each vertex of the initial polyhedron to be updated and the second target point as each vertex of the updated initial polyhedron; and then obtaining the updated initial polyhedron.

[0116] In order to facilitate understanding of how to update the initial polyhedron according to the second target point, a specific embodiment is used for description. Figure 3 , Figure 3The following is a comparison diagram of the initial polyhedron before and after updating in the embodiment of the present application. For example, if the initial polyhedron before updating is a tetrahedron composed of four first target points, and the second target point is outside the initial polyhedron before updating, a new polyhedron is generated with 4+1=5 vertices, and the vertices are the four first target points and the second target point, and the newly generated polyhedron is used as the updated initial polyhedron.

[0117] In an embodiment of the present application, by traversing each point in the remaining three-dimensional point cloud, dynamic maintenance of the initial polyhedron is achieved, so that the final target polyhedron is closer to the body shape of the animal to be tested, providing accurate data basis for the subsequent accurate determination of the volume of the animal to be tested, thereby improving the detection accuracy of the weight of the animal to be tested.

[0118] (a2) determining a target volume of the animal body to be tested based on the target polyhedron and the target three-dimensional point cloud.

[0119] Since each vertex of the target polyhedron is a point in the target three-dimensional point cloud, the three-dimensional coordinates of each vertex of the target polyhedron are known. Specifically, first, the three-dimensional point cloud of the target polyhedron is determined according to the three-dimensional coordinates of each vertex of the target polyhedron. Then, the target volume of the animal body to be measured is determined according to the three-dimensional point cloud of the target polyhedron.

[0120] In an embodiment of the present application, a target polyhedron is determined based on the target three-dimensional point cloud, and the target polyhedron is approximated to the body shape of the animal to be tested, thereby detecting the target of the animal to be tested, providing a data basis for the subsequent determination of the weight of the animal to be tested, so that the weight of the animal to be tested can be detected without moving the animal to be tested.

[0121] In order to accurately determine the target volume of the animal body to be tested, in some embodiments of the present application, the step of determining the target volume of the animal body to be tested based on the target polyhedron and the target three-dimensional point cloud specifically includes the following steps (a21)-(a23):

[0122] (a21) Determine the three-dimensional point cloud of the target polyhedron based on the target three-dimensional point cloud.

[0123] Since each vertex of the target polyhedron is a point in the target three-dimensional point cloud, the three-dimensional coordinates of each vertex of the target polyhedron are known. According to the three-dimensional coordinates of each vertex of each plane of the target polyhedron, the three-dimensional point cloud constituting the plane can be determined, that is, the three-dimensional point cloud of each plane of the target polyhedron can be determined. The collection of the three-dimensional point clouds of each plane of the target polyhedron constitutes the three-dimensional point cloud of the target polyhedron.

[0124] (a22) Projecting the target polyhedron onto a reference plane to obtain a target point cloud.

[0125] The reference plane refers to any plane that does not intersect with any plane of the target polyhedron.

[0126] First, an arbitrary plane is determined, and the plane is not intersected with any plane of the target polyhedron, as a reference plane.

[0127] Then, the target polyhedron is projected onto the reference plane to obtain a target point cloud of the target polyhedron, wherein the target point cloud refers to a collection of points constituting a plane projection after the target polyhedron is projected onto the reference plane.

[0128] (a23) Determining the volume of the target polyhedron according to the three-dimensional point cloud of the target polyhedron and the target point cloud to serve as the target volume of the animal body to be tested.

[0129] First, determine the X-axis, Y-axis or Z-axis direction of the three-dimensional coordinate system corresponding to the three-dimensional point cloud of the target polyhedron. And rotate the three-dimensional coordinate system corresponding to the three-dimensional point cloud of the target polyhedron so that the Z-axis (or Y-axis, or X-axis, which can be set according to specific needs) of the three-dimensional coordinate system is perpendicular to the reference plane; at the same time, according to the rotation change of the three-dimensional coordinate system, update the three-dimensional coordinates of the point cloud of the target polyhedron, so as to facilitate the subsequent determination of the three-dimensional coordinates corresponding to the target point cloud projected onto the reference plane by the target polyhedron.

[0130] Then, the three-dimensional coordinate point of each point in the target point cloud mapped in the target polyhedron is determined as the three-dimensional coordinate corresponding to the point in the target point cloud, that is, the three-dimensional coordinate corresponding to the target point cloud projected from the target polyhedron to the reference plane is determined.

[0131] Finally, since the Z axis of the rotated three-dimensional coordinate system is perpendicular to the reference plane, the volume of the target polyhedron can be determined according to the three-dimensional coordinates corresponding to the target point cloud, and the volume of the target polyhedron can be approximately regarded as the target volume of the animal body to be tested.

[0132] In an embodiment of the present application, a reference plane is determined, and the volume of the target polyhedron is determined based on the target point cloud obtained by projecting the target polyhedron onto the reference plane and the three-dimensional point cloud of the target polyhedron, as the target volume of the animal to be measured; this avoids the need to fit the support surface of the animal to be measured based on the target depth map, thereby avoiding the problem of inaccurate fitting of the support surface due to the complex shooting background of the depth image, thereby improving the accuracy of the target volume of the animal to be measured.

[0133] The second method is to fit the support surface of the animal to be tested based on the target depth map, and determine the target volume of the animal to be tested according to the support surface and the target three-dimensional point cloud.

[0134] In the case where the shooting background of the target depth map is relatively simple, the fitting effect on the support surface is relatively small. In order to simplify the process of determining the target volume of the animal body to be measured, in some embodiments of the present application, the above figure corresponds to step 20 of the embodiment, which can also be implemented according to the following steps (b1) to (b3), which are specifically implemented as follows:

[0135] (b1) Obtain the target plane.

[0136] The target plane refers to the plane formed by the planar point cloud of the target three-dimensional point cloud projected on the reference plane, and the reference plane refers to the supporting surface of the animal body to be measured in each plane of the target depth map.

[0137] Firstly, based on the region growing algorithm, the support surface of the animal to be tested is solved according to the target depth map and the target three-dimensional point cloud of the animal to be tested.

[0138] Then, the target three-dimensional point cloud of the animal body to be tested is projected onto the support surface, and the plane formed by each point in the projection area is used as the target plane, so that the volume of the animal body to be tested can be determined based on the target plane and the target three-dimensional point cloud of the animal body to be tested.

[0139] (b2) Segmenting the target plane to obtain a plurality of sub-planes, and computing a volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud.

[0140] For example, first, a rectangle is used as the outer contour of the target plane for meshing. The target plane will be divided into multiple regions, and each region is used as a sub-plane. Then, the area and height corresponding to each region are calculated, and the volume to be measured corresponding to each sub-plane is obtained according to the area and height corresponding to each region, such as Figure 4 As shown. Further, in order to reduce the error of the volume of the animal to be measured, after the target plane is divided into multiple areas, if the area of ​​the projection area corresponding to the target plane is less than half of the area of ​​the outer contour rectangle, the volume corresponding to the projection area is discarded when calculating the volume of the animal to be measured; if the area of ​​the projection area corresponding to the target plane is greater than half of the area of ​​the outer contour rectangle and less than the area of ​​the outer contour rectangle, the volume corresponding to the projection area is discarded when calculating the volume of the animal to be measured.

[0141] Next, we will introduce in detail the determination of the volume to be measured corresponding to the sub-plane. For ease of understanding, please continue to refer to Figure 4 In some embodiments of the present application, the step of computing the volume to be measured corresponding to each sub-plane according to the target three-dimensional point cloud comprises the following steps (b21)-(b22):

[0142] (b21) determining the area and corresponding height of each of the sub-planes according to the target three-dimensional point cloud;

[0143] The corresponding height refers to the average value of the Z-axis coordinate values ​​of each point of the sub-plane.

[0144] Specifically, the three-dimensional coordinates corresponding to each point of each sub-plane are determined according to the target three-dimensional point cloud. On the one hand, the coordinate values ​​of each point of each sub-plane on the Z axis are obtained according to the three-dimensional coordinates corresponding to each point of each sub-plane. And the average value of the coordinate values ​​of each point of each sub-plane on the Z axis is calculated as the corresponding height of the sub-plane.

[0145] For example, the coordinate values ​​of each point of the sub-plane on the Z-axis are: 10, 12, 13, 14, 15, 17, 20, 16, 18, 19. Then the average value of the coordinate values ​​of each point of the sub-plane on the Z-axis is: (10+12+13+14+15+17+20+16+18+19) / 10=15.

[0146] On the other hand, the area of ​​each sub-plane is calculated according to the three-dimensional coordinates corresponding to each point of each sub-plane. In the embodiment of the present application, the area of ​​each sub-plane is the same.

[0147] (b22) Calculating the volume to be measured corresponding to each of the sub-planes according to the area of ​​each of the sub-planes and the corresponding height.

[0148] Specifically, the volume to be measured corresponding to each sub-plane is equal to the product of the corresponding height of the sub-plane and the area of ​​the sub-plane. According to the calculation method, the volume to be measured corresponding to each sub-plane is calculated in sequence.

[0149] In the embodiment of the present application, the target plane is divided into multiple sub-planes, and then based on the area and corresponding height of each sub-plane, since the sub-planes after division are smaller, the error of the volume to be measured corresponding to each sub-plane is also relatively small, thereby improving the accuracy of the volume of the animal body to be measured.

[0150] (b3) Obtaining the volume of the animal body to be measured according to the volumes to be measured corresponding to each of the sub-planes.

[0151] Specifically, the volume corresponding to each plane is accumulated to obtain the volume of the target polyhedron, and the value after the volume corresponding to each plane is accumulated is approximately the volume of the animal to be tested. At this point, the volume detection of the animal to be tested is completed. For example, if it is determined that the volumes to be tested corresponding to each sub-plane are: 2dm 3 、4dm 3 、3dm 3 , then the volume of the animal to be tested is: 2+4+3=9dm 3 .

[0152] In an embodiment of the present application, a target plane is obtained, the target plane is divided into multiple sub-planes, and the volume to be measured corresponding to each sub-plane is calculated based on the target three-dimensional point cloud; the volume to be measured corresponding to each sub-plane is accumulated and added to obtain the volume of the animal body to be measured, which provides a data basis for the subsequent determination of the weight of the animal body to be measured, so that the weight of the animal body to be measured can be detected without moving the animal body to be measured.

[0153] In order to accurately fit the weight of the animal to be tested, in some embodiments of the present application, the above figure corresponds to step 30 of the embodiment, which can be implemented by a model, that is, the weight of the animal to be tested can be detected by the model.

[0154] In order to obtain an animal weight detection model that can be used to detect the weight of an animal, it is necessary to collect training set data for model training. In some embodiments of the present application, the animal weight detection model is obtained by the following steps (1) and (2):

[0155] (1) obtaining and training the initial model based on the depth map, volume and actual weight of multiple animals;

[0156] First, the network structure of the initial model is designed. In the embodiment of the present application, a three-layer network is designed, each layer includes a fully connected layer and an activation layer, and the number of fully connected layers, activation functions and regularization terms of each layer are set. The loss function of the initial model training is set to: L = (G1-G2) / G2, where L represents the loss value, G1 represents the weight of the animal predicted by the model, and G2 represents the actual weight of the animal.

[0157] Then, the depth maps of multiple animal bodies, the actual weight of each animal body, and the volume of each animal body determined according to the depth map of each animal body with reference to the above steps 10 to 20 are collected.

[0158] Finally, the volume, actual weight, and depth map of each animal are input into the initial model in the form of a one-dimensional vector for forward propagation. Then, with the goal of outputting the weight of the animal, back propagation is performed according to the loss function configured for the initial model to update the model parameters of the initial model and continuously train the initial model.

[0159] (2) The initial model that has completed training is determined as the animal body weight detection model.

[0160] When the weight of the animal output by the trained initial model can satisfy the loss function or other target conditions, the iteration is completed, that is, the training of the model is completed. At this time, the trained initial model is used as the animal weight detection model to detect the weight of the animal.

[0161] In an embodiment of the present application, since the training data of the model includes, in addition to the weight and volume of different animals, depth maps of different animals, during the training process of the model, the model can be guided to pay attention to the correlation between the depth maps of different animals and the weight of the animals, so that the model can simultaneously fit the weight of the animal based on the volume and depth map of the animal, thereby avoiding the problem of overfitting caused by the model only fitting the weight of the animal based on the volume of the animal, thereby improving the detection accuracy of the model and further improving the detection accuracy of the weight of the animal to be tested.

[0162] After obtaining the animal body weight detection model, the above step 30 can be implemented through the animal body weight detection model, which is specifically implemented as follows:

[0163] The target volume and the target depth map are input into an animal body weight detection model, so that the animal body weight detection model determines the weight of the animal body to be detected according to the target volume and the target depth map.

[0164] For ease of understanding, take the measurement of a pig's weight as an example. First, obtain a depth map of the pig's body, identify and segment the pig's body area from the depth map of the pig's body; and determine the three-dimensional point cloud of the pig's body area based on the three-dimensional point cloud of the pig's body depth map and the pig's body area. Then, based on the regional growing algorithm, fit the pig's support surface (such as the ground) according to the pig's depth map, project the three-dimensional point cloud of the pig's body area onto the pig's support surface, and obtain the regional point cloud of the pig's body area on the support surface, so as to calculate the volume of the pig based on the regional point cloud. Finally, input the pig's body volume and the pig's body depth map into the animal body weight detection model, and the animal body weight detection model will output the pig's weight.

[0165] In an embodiment of the present application, the weight of the animal to be tested is fitted by an animal weight detection model. Since the animal weight detection model fits the weight of the animal to be tested based on both the target volume and the target depth map, it avoids the problem of overfitting that is easily caused by fitting the weight of the animal to be tested only based on the volume of the animal to be tested, thereby improving the detection accuracy of the weight of the animal to be tested.

[0166] In order to better implement the animal body weight detection method in the embodiment of the present application, based on the animal body weight detection method, the embodiment of the present application also provides an animal body weight detection device, such as Figure 5 FIG. 5 is a schematic diagram of the structure of an embodiment of an animal body weight detection device in an embodiment of the present application. The animal body weight detection device 500 includes:

[0167] An acquisition unit 501 is used to acquire a target three-dimensional point cloud of a target area according to a target depth map of the animal to be detected, wherein the target area refers to an area in the target depth map that carries the animal to be detected;

[0168] The processing unit 502 is used to determine the target volume of the animal body to be tested according to the target three-dimensional point cloud obtained by the obtaining unit 501; and determine the weight of the animal body to be tested according to the target volume and the target depth map.

[0169] In some embodiments of the present application, the processing unit 502 is specifically configured to:

[0170] Acquire a target polyhedron according to the target three-dimensional point cloud;

[0171] The target volume of the animal body to be tested is determined according to the target polyhedron and the target three-dimensional point cloud.

[0172] In some embodiments of the present application, the processing unit 502 is specifically configured to:

[0173] Acquire a plurality of first target points from the target three-dimensional point cloud;

[0174] Determining an initial polyhedron according to each of the first target points, wherein the first target points are vertices of the initial polyhedron;

[0175] Traverse each point of the remaining three-dimensional point cloud, and if it is detected that the second target point is outside the initial polyhedron, iteratively update the initial polyhedron according to the second target point to obtain a target polyhedron, wherein the remaining three-dimensional point cloud refers to a set of points in the target three-dimensional point cloud except the first target point, and the second target point refers to a point in the remaining three-dimensional point cloud.

[0176] In some embodiments of the present application, the processing unit 502 is specifically configured to:

[0177] Determine the three-dimensional point cloud of the target polyhedron according to the target three-dimensional point cloud;

[0178] Projecting the target polyhedron onto a reference plane to obtain a target point cloud, wherein the reference plane refers to an arbitrary plane that does not intersect any plane of the target polyhedron;

[0179] The volume of the target polyhedron is determined according to the three-dimensional point cloud of the target polyhedron and the target point cloud to serve as the target volume of the animal body to be tested.

[0180] In some embodiments of the present application, the processing unit 502 is specifically configured to:

[0181] Acquire a target plane, wherein the target plane refers to a plane formed by a planar point cloud projected on a reference plane by the target three-dimensional point cloud, and the reference plane refers to a support surface of the animal body to be measured in each plane of the target depth map;

[0182] Segmenting the target plane to obtain a plurality of sub-planes, and computing a volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud;

[0183] The volume of the animal body to be measured is obtained according to the volume to be measured corresponding to each of the sub-planes.

[0184] In some embodiments of the present application, the processing unit 502 is specifically configured to:

[0185] Determine the area and corresponding height of each sub-plane according to the target three-dimensional point cloud;

[0186] The volume to be measured corresponding to each of the sub-planes is calculated according to the area of ​​each of the sub-planes and the corresponding height.

[0187] In some embodiments of the present application, the processing unit 502 is specifically configured to:

[0188] The target volume and the target depth map are input into an animal body weight detection model, so that the animal body weight detection model determines the weight of the animal body to be detected according to the target volume and the target depth map.

[0189] In some embodiments of the present application, the animal body weight detection device further includes a training unit (not shown in the figure), and the training unit is specifically used for:

[0190] Obtain and train the initial model based on the depth map, volume and actual weight of multiple animals;

[0191] The initial model that has completed the training is determined as the animal body weight detection model.

[0192] In addition, in order to better implement the animal body weight detection method in the embodiment of the present application, based on the animal body weight detection method, the embodiment of the present application also provides an animal body weight detection device, see Figure 6 , Figure 6 A schematic diagram of the structure of an animal body weight detection device according to an embodiment of the present application is shown. Specifically, the animal body weight detection device provided by the embodiment of the present application includes a processor 601, and the processor 601 is used to execute the computer program stored in the memory 602 to implement the following Figures 1 to 4 Corresponding to each step of the animal body weight detection method in any embodiment; or, the processor 601 is used to execute the computer program stored in the memory 602 to implement the following Figure 5 The functions of each unit in the corresponding embodiment.

[0193] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 602, and executed by the processor 601 to complete the embodiment of the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0194] The animal body weight detection device may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that the illustration is merely an example of an animal body weight detection device and does not constitute a limitation on the animal body weight detection device. The device may include more or fewer components than shown in the illustration, or may combine certain components, or different components. For example, the animal body weight detection device may also include an input / output device, a network access device, a bus, etc. The processor 601, the memory 602, the input / output device, and the network access device are connected via a bus.

[0195] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the animal body weight detection device, and uses various interfaces and lines to connect various parts of the entire animal body weight detection device.

[0196] The memory 602 can be used to store computer programs and / or modules. The processor 601 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 602 and calling the data stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the animal body weight detection device (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0197] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described animal body weight detection device, equipment and its corresponding units can refer to the following. Figures 1 to 4 The description of the animal body weight detection method in any embodiment will not be repeated here.

[0198] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0199] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figures 1 to 4 Corresponding to the steps in the animal body weight detection method in any embodiment, the specific operations can refer to the following Figures 1 to 4 The description of the animal body weight detection method in any embodiment will not be repeated here.

[0200] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0201] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figures 1 to 4 Corresponding to the steps in the animal body weight detection method in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 4The beneficial effects that can be achieved by the animal body weight detection method in any embodiment are detailed in the previous description and will not be repeated here.

[0202] The above is a detailed introduction to an animal body weight detection method, device, equipment and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for detecting animal body weight, characterized in that: The method comprises: According to the target depth map of the animal body to be detected, a target three-dimensional point cloud of a target area is obtained, wherein the target area refers to an area in the target depth map that carries the animal body to be detected; Determine the target volume of the animal body to be tested according to the target three-dimensional point cloud; Determining the weight of the animal to be tested according to the target volume and the target depth map; Determining the target volume of the animal body to be tested according to the target three-dimensional point cloud comprises: Acquire a target polyhedron according to the target three-dimensional point cloud; Determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud; Determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud comprises: Determine the three-dimensional point cloud of the target polyhedron according to the target three-dimensional point cloud; Projecting the target polyhedron onto a reference plane to obtain a target point cloud, wherein the reference plane refers to an arbitrary plane that does not intersect any plane of the target polyhedron; Determining the volume of the target polyhedron according to the three-dimensional point cloud of the target polyhedron and the target point cloud to serve as the target volume of the animal body to be tested; or Determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud comprises: Acquire a target plane, wherein the target plane refers to a plane formed by a planar point cloud projected on a reference plane by the target three-dimensional point cloud, and the reference plane refers to a support surface of the animal body to be measured in each plane of the target depth map; Segmenting the target plane to obtain a plurality of sub-planes, and computing a volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud; Obtaining the volume of the animal body to be measured according to the volumes to be measured corresponding to each of the sub-planes; The step of determining the volume of the target polyhedron according to the three-dimensional point cloud of the target polyhedron and the target point cloud comprises: Determine the X-axis, Y-axis or Z-axis direction of the three-dimensional coordinate system corresponding to the three-dimensional point cloud of the target polyhedron; The three-dimensional coordinate system corresponding to the three-dimensional point cloud of the target polyhedron is rotated so that the X-axis, Y-axis or Z-axis direction of the three-dimensional coordinate system is perpendicular to the reference plane; According to the rotation change of the three-dimensional coordinate system, the three-dimensional coordinates of the point cloud of the target polyhedron are updated; Determine the three-dimensional coordinate point of each point in the target point cloud mapped in the target polyhedron as the three-dimensional coordinate corresponding to the point in the target point cloud; According to the three-dimensional coordinates corresponding to the target point cloud, the volume of the target polyhedron is determined.

2. The method for detecting animal body weight according to claim 1, characterized in that: The step of acquiring a target polyhedron according to the target three-dimensional point cloud comprises: Acquire a plurality of first target points from the target three-dimensional point cloud; Determining an initial polyhedron according to each of the first target points, wherein the first target points are vertices of the initial polyhedron; Traverse each point of the remaining three-dimensional point cloud, and if it is detected that the second target point is outside the initial polyhedron, iteratively update the initial polyhedron according to the second target point to obtain a target polyhedron, wherein the remaining three-dimensional point cloud refers to a set of points in the target three-dimensional point cloud except the first target point, and the second target point refers to a point in the remaining three-dimensional point cloud.

3. The method for detecting animal body weight according to claim 2, characterized in that: The computing the volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud comprises: Determine the area and corresponding height of each sub-plane according to the target three-dimensional point cloud; The volume to be measured corresponding to each of the sub-planes is calculated according to the area of ​​each of the sub-planes and the corresponding height.

4. The method for detecting animal body weight according to any one of claims 1 to 3, characterized in that: Determining the weight of the animal to be tested according to the target volume and the target depth map includes: The target volume and the target depth map are input into an animal body weight detection model, so that the animal body weight detection model determines the weight of the animal body to be detected according to the target volume and the target depth map.

5. The method for detecting animal body weight according to claim 4, characterized in that: The animal body weight detection model is obtained by the following steps: Obtain and train the initial model based on the depth map, volume and actual weight of multiple animals; The initial model that has completed the training is determined as the animal body weight detection model.

6. An animal weight detection device, characterized in that: The animal body weight detection device comprises: An acquisition unit, configured to acquire a target three-dimensional point cloud of a target area according to a target depth map of the animal body to be detected, wherein the target area refers to an area in the target depth map that carries the animal body to be detected; A processing unit, configured to determine a target volume of the animal body to be tested according to the target three-dimensional point cloud acquired by the acquisition unit; and determine a weight of the animal body to be tested according to the target volume and the target depth map; Determining the target volume of the animal body to be tested according to the target three-dimensional point cloud comprises: Acquire a target polyhedron according to the target three-dimensional point cloud; Determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud; Determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud comprises: Determine the three-dimensional point cloud of the target polyhedron according to the target three-dimensional point cloud; Projecting the target polyhedron onto a reference plane to obtain a target point cloud, wherein the reference plane refers to an arbitrary plane that does not intersect any plane of the target polyhedron; Determining the volume of the target polyhedron according to the three-dimensional point cloud of the target polyhedron and the target point cloud to serve as the target volume of the animal body to be tested; or Determining the target volume of the animal body to be tested according to the target polyhedron and the target three-dimensional point cloud comprises: Acquire a target plane, wherein the target plane refers to a plane formed by a planar point cloud projected on a reference plane by the target three-dimensional point cloud, and the reference plane refers to a support surface of the animal body to be measured in each plane of the target depth map; Segmenting the target plane to obtain a plurality of sub-planes, and computing a volume to be measured corresponding to each of the sub-planes according to the target three-dimensional point cloud; Obtaining the volume of the animal body to be measured according to the volumes to be measured corresponding to each of the sub-planes; The step of determining the volume of the target polyhedron according to the three-dimensional point cloud of the target polyhedron and the target point cloud comprises: Determine the X-axis, Y-axis or Z-axis direction of the three-dimensional coordinate system corresponding to the three-dimensional point cloud of the target polyhedron; The three-dimensional coordinate system corresponding to the three-dimensional point cloud of the target polyhedron is rotated so that the X-axis, Y-axis or Z-axis direction of the three-dimensional coordinate system is perpendicular to the reference plane; According to the rotation change of the three-dimensional coordinate system, the three-dimensional coordinates of the point cloud of the target polyhedron are updated; Determine the three-dimensional coordinate point of each point in the target point cloud mapped in the target polyhedron as the three-dimensional coordinate corresponding to the point in the target point cloud; According to the three-dimensional coordinates corresponding to the target point cloud, the volume of the target polyhedron is determined.

7. An animal weight detection device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method for detecting the weight of an animal as claimed in any one of claims 1 to 5 is executed.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the animal body weight detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Live pig big data system based on internet of things technology

    CN107667904A

  • Package external volume measurement method, system, storage medium and mobile terminal

    CN109272547A

  • Cargo volume measurement method based on deep learning and three-dimensional reconstruction

    CN109655019A

  • Livestock weight measuring method and device and readable storage medium

    CN110288580A