Livestock body surface point cloud data acquisition method, device, system, equipment and medium

By filtering and segmenting the original point cloud data, the accuracy and efficiency issues of three-dimensional point cloud data on the surface of livestock in complex environments are solved, more efficient data acquisition is achieved, and livestock breeding and production decision-making are supported.

CN120765488APending Publication Date: 2025-10-10INTELLIGENT EQUIPMENT RESEARCH CENTER BEIJING ACADEMY OF AGRICULTURE AND FORESTRY SCIENCES +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510606106.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

In the complex and changeable breeding pond environment, existing technologies find it difficult to accurately and efficiently segment the three-dimensional point cloud data of livestock surfaces from the original three-dimensional point cloud data. Noise data seriously interferes, affecting the accuracy and efficiency of the data.

Method used

Based on the distribution of point cloud points and the spatial location information of data collection points, combined with KD Tree, radius neighbor search, spatial direct filtering and Euclidean clustering methods, the original point cloud data is subjected to initial filtering, three-dimensional spatial filtering and two-dimensional plane filtering, dynamic identification and noise removal, and point cloud data of the target livestock surface are extracted.

Benefits of technology

It significantly improves the accuracy and efficiency of acquiring three-dimensional point cloud data of livestock surfaces in complex environments, provides a more accurate data basis for the subsequent acquisition of livestock phenotypic data, and supports livestock breeding and production decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765488A_ABST
    Figure CN120765488A_ABST
Patent Text Reader

Abstract

The invention provides a livestock body surface point cloud data acquisition method, device, system and equipment and a medium, and relates to the technical field of smart agriculture, and the method comprises the steps: carrying out the filtering of original point cloud data based on the distribution condition of point cloud points in the original point cloud data and the spatial position information of original data collection points, and obtaining first point cloud data; performing three-dimensional space filtering on the first point cloud data to obtain third point cloud data, and performing two-dimensional plane filtering on the third point cloud data to obtain second point cloud data; and extracting the point cloud data of the body surface of the target live pig from the second point cloud data. According to the livestock body surface point cloud data acquisition method, device, system, equipment and medium provided by the invention, the noise in the original point cloud data can be filtered more accurately and more efficiently, so that the accuracy and efficiency of acquiring the livestock body surface three-dimensional point cloud data in a complex breeding environment are remarkably improved; and a more accurate data basis can be provided for subsequent acquisition of livestock phenotype data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart agricultural technology, and in particular to a method, device, system, equipment and medium for acquiring livestock surface point cloud data. Background Art

[0002] Livestock phenotypic data, such as body size, shape, and weight, can provide multi-dimensional and in-depth key information and decision support in livestock breeding and production.

[0003] In related technologies, phenotypic data of livestock can be obtained based on three-dimensional point cloud data of the livestock's body surface, and the three-dimensional point cloud data of the livestock's body surface is usually collected by devices such as depth cameras or radar sensors.

[0004] However, because the environmental interference factors within livestock farms are typically highly complex, when using depth cameras or radar sensors to collect 3D point cloud data of livestock surfaces, the raw 3D point cloud data collected not only includes the 3D point cloud data of the livestock surface but also includes a large amount of noise data, such as 3D point cloud data of the ground, railings, or equipment. Conventional methods for acquiring livestock surface point cloud data in the related art struggle to accurately and efficiently segment the 3D point cloud data from the raw 3D point cloud data, making it difficult to accurately and efficiently acquire 3D point cloud data of the livestock surface in the complex and ever-changing breeding pond environment. Therefore, how to more accurately and efficiently acquire 3D point cloud data of the livestock surface in the complex and ever-changing breeding pond environment is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] The present invention provides a method, device, electronic device and storage medium for obtaining pig body point cloud data, which are used to solve the defect in the existing technology that it is difficult to accurately and efficiently obtain three-dimensional point cloud data of the livestock body surface in a complex and changeable breeding pond environment, and to achieve more accurate and efficient acquisition of three-dimensional point cloud data of the livestock body surface in a complex and changeable breeding pond environment.

[0006] The present invention provides a method for acquiring livestock body surface point cloud data, comprising the following steps.

[0007] Based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection point, the original point cloud data is filtered to obtain first point cloud data, the original point cloud data is point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock, the point cloud data collection device is located above the target livestock when collecting point cloud data of the target livestock, and the data collection direction is perpendicular to the ground where the target livestock is located, and the original data collection point is the position point where the point cloud data collection device is located when collecting point cloud data of the target livestock.

[0008] Perform three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, and perform two-dimensional plane filtering on the third point cloud data to obtain second point cloud data.

[0009] Point cloud data of the target pig's body surface is extracted from the second point cloud data.

[0010] The present invention also provides a device for acquiring livestock body surface point cloud data, comprising the following modules: The first filtering module is configured to obtain first point cloud data after filtering the original point cloud data based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection point, wherein the original point cloud data is point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock, wherein the point cloud data collection device is located above the target livestock when collecting point cloud data of the target livestock and the data collection direction is perpendicular to the ground where the target livestock is located, and the original data collection point is the position where the point cloud data collection device is located when collecting point cloud data of the target livestock.

[0011] The second filtering module is used to perform three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, and perform two-dimensional plane filtering on the third point cloud data to obtain second point cloud data.

[0012] The target segmentation module is used to extract the point cloud data of the target pig's body surface from the second point cloud data.

[0013] The present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for acquiring livestock surface point cloud data as described above is implemented.

[0014] The invention also provides a livestock body surface point cloud data acquisition system, comprising: the electronic device described above, a point cloud data acquisition device, a positioning device, a moving mechanism, and a supporting mechanism; the moving mechanism is connected to the supporting mechanism, and the moving mechanism is used to drive the supporting mechanism to move; The point cloud data acquisition device is mounted on the support mechanism, and the shooting direction of the point cloud data acquisition device is downward and perpendicular to the ground where the target livestock is located. The point cloud data acquisition device is used to collect point cloud data located at the target livestock and send the collected point cloud data of the target livestock to the electronic device; The positioning device is used to record the location point where the point cloud data acquisition device is located when collecting point cloud data of the target livestock as an original data acquisition point, and when the spatial location information of the original data acquisition point is obtained, the spatial location information of the original data acquisition point is sent to the electronic device.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for acquiring livestock body surface point cloud data as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for acquiring livestock body surface point cloud data.

[0017] The livestock surface point cloud data acquisition method, device, system, equipment and medium provided by the present invention can more accurately and efficiently filter out noise in the original point cloud data based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection points, by performing initial filtering, three-dimensional spatial filtering, two-dimensional plane filtering and target segmentation on the original point cloud data acquired in a complex field environment, thereby significantly improving the accuracy and efficiency of acquiring three-dimensional point cloud data of livestock surfaces in complex breeding environments, providing a more accurate data basis for the subsequent acquisition of livestock phenotypic data, and providing more favorable technical support for livestock breeding and production. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 This is one of the flow charts of the livestock body surface point cloud data acquisition method provided by the present invention.

[0020] Figure 2 This is a structural schematic diagram of the livestock surface point cloud data acquisition system provided by the present invention.

[0021] Figure 3 This is the second flow chart of the method for acquiring livestock body surface point cloud data provided by the present invention.

[0022] Figure 4 It is a flow chart of dynamic point count peak statistical filtering in the livestock body surface point cloud data acquisition method provided by the present invention.

[0023] Figure 5 This is a quantitative characteristic distribution diagram of point cloud points in the original filtered space slice in the livestock surface point cloud data acquisition method provided by the present invention.

[0024] Figure 6 The present invention is a flow chart of filtering the first point cloud data in the method for acquiring livestock body surface point cloud data.

[0025] Figure 7 It is a schematic diagram of different original point cloud data under different noise interference conditions.

[0026] Figure 8 It is a schematic diagram of the construction principle of the constraint space corresponding to the spatial points in the livestock body surface point cloud data acquisition method provided by the present invention.

[0027] Figure 9 This is a schematic diagram of the construction principle of the constraint area corresponding to the plane point in the livestock body surface point cloud data acquisition method provided by the present invention.

[0028] Figure 10 It is a schematic diagram of point cloud data of the target pig's body surface in the livestock body surface point cloud data acquisition method provided by the present invention.

[0029] Figure 11 This is a comparison chart of the number of point cloud points before and after filtering the original point cloud data in the livestock body surface point cloud data acquisition method provided by the present invention.

[0030] Figure 12 This is a schematic diagram of evaluating the segmentation accuracy in the livestock surface point cloud data acquisition method provided by the present invention.

[0031] Figure 13 This is a comparison chart of the segmentation results in the livestock surface point cloud data acquisition method provided by the present invention.

[0032] Figure 14 It is a schematic diagram of point cloud data of the target cattle body surface in the livestock body surface point cloud data acquisition method provided by the present invention.

[0033] Figure 15 This is a comparison chart of filtering effects of different parameter values ​​in the livestock surface point cloud data acquisition method provided by the present invention.

[0034] Figure 16 It is a structural schematic diagram of the livestock body surface point cloud data acquisition device provided by the present invention.

[0035] Figure 17 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0036] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0037] In the description of the invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0038] In the description of this application, the terms "first", "second", etc. are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of the same type, and do not limit the number of objects. For example, the first object can be one or more. In addition, in the description of this application, "and / or" represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0039] It should be noted that livestock phenotypic data can provide a foundation for various aspects of livestock breeding and production, such as breeding, genetic selection, reproductive management, and scientific research. By accumulating livestock phenotypic data during livestock breeding, it can guide livestock breeding and adjust decision-making.

[0040] Related technologies can obtain livestock phenotypic data through manual measurement (for example, manually driving livestock onto an animal scale for weighing to obtain their weight). However, this method is time-consuming and labor-intensive, can easily lead to human injury, and can have certain adverse effects on animals, such as causing stress reactions and reducing productivity, fertility, and growth rate.

[0041] With the recent development of informatization in the livestock industry, numerous solutions have emerged for acquiring livestock phenotypic data through computer-aided artificial intelligence (AI) technologies. For example, computer vision can be used to estimate pig weight and measure body dimensions. AI-based technologies can effectively reduce direct contact between livestock operators and livestock, thereby preventing stress reactions and adverse effects on livestock. They also improve the efficiency of acquiring phenotypic data, benefiting large-scale livestock production.

[0042] Depth cameras can measure the distance to objects. Using depth cameras to collect three-dimensional point cloud data on the surface of livestock can provide a data basis for obtaining livestock's height, back outline and area, body length and width parameters.

[0043] However, since the environmental interference factors in livestock farms are usually highly complex, when using a depth camera to collect three-dimensional point cloud data of the livestock surface, the original three-dimensional point cloud data collected not only includes the three-dimensional point cloud data of the livestock surface, but also includes a large amount of noise data, such as three-dimensional point cloud data of the ground, railings or equipment.

[0044] There are two main types of segmentation ideas in related technologies: segmentation methods based on traditional point cloud segmentation (PCS) algorithms based on geometric or statistical laws, and segmentation methods using deep learning neural network models.

[0045] Among them, the above-mentioned traditional point cloud segmentation algorithms include Region Growing algorithm, Random Sample Consensus algorithm (RANSAC), Density-Based Spatial Clustering of Applications with Noise algorithm (DBSCAN), etc. The above-mentioned deep learning neural network models include For segmentation methods that use deep learning neural network models, this method requires a large amount of sample data for training, but available samples are difficult to obtain. The reasons include the scarcity of public livestock surface 3D point cloud datasets, the difficulty in obtaining livestock surface 3D point cloud data, and the time-consuming and labor-intensive production of datasets.

[0046] Traditional point cloud segmentation algorithms based on geometric or statistical laws are often used for limited or fixed scenarios, restricting livestock to passages of a defined size, forcing them to stay or pass through. Raw 3D point cloud data is collected at limited locations, such as feeding areas or specific weighing areas. This can still easily cause adverse reactions in livestock. Furthermore, traditional point cloud segmentation algorithms based on geometric or statistical laws are not ideal for separating 3D point cloud data on livestock surfaces, especially when livestock are close to fences or walls.

[0047] Therefore, how to more accurately and efficiently segment the three-dimensional point cloud data of the livestock surface from the original three-dimensional point cloud data collected by devices such as depth cameras or radar sensors is a technical problem that needs to be solved urgently in this field.

[0048] To this end, the present invention provides a method for acquiring livestock body surface point cloud data. The livestock body surface point cloud data acquisition method provided by the present invention addresses the technical problem of difficulty in accurately and efficiently acquiring three-dimensional point cloud data of livestock bodies in complex and changeable farm environments. By combining point cloud data processing methods such as KD Tree, radius neighbor search, spatial direct filtering, and Euclidean clustering, the method accurately extracts pig body point clouds in motion, in different postures, with variable camera heights, and in different environments through the geometric shape and quantity distribution of the point cloud. For point clouds with different noise interference, point clouds where the pig body and noise points are clustered together, single pigs, and multi-target pig point clouds, the method can effectively remove noise and accurately extract targets. This method can also be transferred to the extraction of point clouds from the backs of other animals, such as cattle.

[0049] The following combination Figures 1-15 The present invention describes a method for acquiring livestock body surface point cloud data.

[0050] Figure 1 This is one of the flow charts of the method for acquiring livestock body surface point cloud data provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101, based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection point, the original point cloud data is filtered to obtain first point cloud data, the original point cloud data is point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock, when the point cloud data collection device collects point cloud data of the target livestock, it is located above the target livestock and the data collection direction is perpendicular to the ground where the target livestock is located, and the original data collection point is the position point where the point cloud data collection device collects point cloud data of the target livestock.

[0051] It should be noted that the embodiment of the present invention is implemented by a device for acquiring point cloud data on the surface of livestock, which can be configured in electronic devices such as computers or servers.

[0052] Specifically, the target livestock is the acquisition object of the livestock surface point cloud data acquisition method provided by the present invention. Based on the livestock surface point cloud data acquisition method provided by the present invention, the point cloud data of the target livestock surface can be more accurately and efficiently segmented from the original point cloud data collected by the point cloud data acquisition device.

[0053] The raw point cloud data is point cloud data obtained by a point cloud data acquisition device that collects point cloud data of the target livestock. The point cloud data acquisition device is located above the target livestock and its acquisition direction is perpendicular to the ground where the target livestock is located. The point cloud data acquisition device in this embodiment of the present invention may be a depth camera or a radar sensor. The specific type of point cloud data acquisition device is not limited in this embodiment of the present invention.

[0054] It is understood that the target livestock in the embodiments of the present invention can be determined based on actual needs. The target livestock can be any type of pig, cattle, or sheep. The following description uses the target livestock as an example, where the target livestock is a pig predetermined based on actual needs.

[0055] In an embodiment of the present invention, a livestock body surface point cloud data acquisition system can be used to acquire original point cloud data. Figure 2 This is a schematic diagram of the structure of the livestock body surface point cloud data acquisition system provided by the present invention. Figure 2 As shown, the livestock body surface point cloud data acquisition system includes a point cloud data acquisition device 201, a moving mechanism 203, a supporting mechanism 204 and an electronic device 202 equipped with the livestock body surface point cloud data acquisition device.

[0056] The moving mechanism 203 and the supporting mechanism 204 can be constructed from aluminum profiles. The supporting mechanism 204 comprises a supporting base and a multi-axis robotic arm. One end of the multi-axis robotic arm is fixed to the supporting base, and the other end of the multi-axis robotic arm is connected to the point cloud data acquisition device 201. The multi-axis robotic arm includes multiple connecting rods, each of which is rotatably connected in sequence. The position of the point cloud data acquisition device 201 can be adjusted by controlling the angle between at least two adjacent connecting rods in the multi-axis robotic arm.

[0057] The support base has a telescopic function and can drive the multi-axis robotic arm to move in a direction perpendicular to the horizontal plane. By controlling the moving direction and / or moving distance of the moving mechanism 203, the position of the point cloud data acquisition device 201 can also be adjusted.

[0058] like Figure 2 As shown, the livestock body surface point cloud data acquisition system further includes a power supply 205 for supplying power to the point cloud data acquisition device 201 and the electronic device 202 .

[0059] It should be noted that the point cloud data acquisition device 201 in this embodiment of the present invention may be a depth camera. After determining the target pig, the point cloud data acquisition device 201 in the livestock surface point cloud data acquisition system can be moved above the target pig by controlling the angle between at least two adjacent connecting rods in the multi-axis robotic arm and / or controlling the movement direction and / or movement distance of the movement mechanism 203. The data acquisition direction of the point cloud data acquisition device 201 is ensured to be perpendicular to the ground where the target pig is located.

[0060] When it is determined that the point cloud data acquisition device 201 in the livestock body surface point cloud data acquisition system moves to the top of the target pig and the data acquisition direction of the point cloud data acquisition device 201 is perpendicular to the ground where the target pig is located, the point cloud data acquisition device 201 is controlled to collect point cloud data of the target pig to obtain the original point cloud data. The original data collection point is recorded at the location where the point cloud data collection device 201 collects point cloud data of the target pig, and the spatial location information of the original data collection point is recorded. Represents the first point in the original point cloud data Point cloud points, Indicates the total number of point cloud points in the original point cloud data. Point cloud points Initial coordinate information . .

[0061] It should be noted that the point cloud data acquisition device 201 uses a resolution of 512×512 and a wide field of view of 120°×120° when collecting point cloud data of the target pig. The frequency of the point cloud data acquisition device 201 is 30fps, and the acquisition code frequency is once every 1s. This allows the target pig to move freely in the pen, and at the same time, the target pig is kept within the field of view of the point cloud data acquisition device 201 by controlling the multi-axis robotic arm and / or mobile mechanism 203.

[0062] Table 1 shows the equipment parameters of the livestock body surface point cloud data acquisition system in the embodiment of the present invention.

[0063] Table 1 Equipment parameters of livestock surface point cloud data acquisition system

[0064] It should be noted that the vertical distance of the point cloud data acquisition device 201 in the embodiment of the present application from the ground surface where the target pig is located when the point cloud data of the target pig is acquired can be determined based on prior knowledge and / or circumstances. The vertical distance of the point cloud data acquisition device 201 in the embodiment of the present application from the ground surface where the target pig is located when the point cloud data of the target pig is acquired is not limited.

[0065] Obtaining original point cloud data Then, based on the distribution of the point cloud points in the original point cloud data and the spatial position information of the original data acquisition points, the point cloud data of the target pig body surface in the target point cloud data can be segmented for the first time by numerical calculation, mathematical statistics or deep learning technology, etc. to obtain the original point cloud data of the target pig body surface.

[0066] Figure 3 is a second flowchart of the method for obtaining the point cloud data of the livestock body surface provided by the present application. As shown in Figure 3 As an optional embodiment, after filtering the original point cloud data based on the distribution of the point cloud points in the original point cloud data and the spatial position information of the original data acquisition points, the first point cloud data is obtained, including: based on the spatial position information of the original data acquisition points, taking the original data acquisition point as the origin, and taking the downward direction perpendicular to the ground surface where the target livestock is located as the Z-axis direction to construct a target space rectangular coordinate system. The original point cloud data in the target space rectangular coordinate system is determined as the target point cloud data.

[0067] Specifically, in the embodiment of the present application, the above-mentioned original data acquisition point can be taken as the origin, and the downward direction perpendicular to the ground surface where the target pig is located can be taken as the Z-axis to construct a target space rectangular coordinate system. The coordinate information of the above-mentioned original data acquisition point in the target space rectangular coordinate system .

[0068] The Z-axis direction of the target space rectangular coordinate system in the embodiment of the present application is perpendicular to the downward direction of the ground surface where the target pig is located, and the plane where the X-axis and the Y-axis of the target space rectangular coordinate system are located is parallel to the ground surface where the target pig is located. Since the Z-axis direction of the target space rectangular coordinate system is perpendicular to the downward direction of the ground surface where the target pig is located, the numerical value of the Z-axis direction of the target space rectangular coordinate system increases from top to bottom, which is consistent with the data acquisition direction of the point cloud data acquisition device 201 and the spatial distance relationship of the ground surface where the target pig is located.

[0069] Since the angle between the point cloud data acquisition device 201 and the ground surface where the target pig is located is fixed (90°), the rotation matrix That is, the original point cloud data is converted in the coordinate system, and the original point cloud data in the target space rectangular coordinate system is determined as the target point cloud data. In the above-mentioned rotation matrix When the original point cloud data is converted in the coordinate system, the specific direction of the X coordinate axis and the Y coordinate axis is not specified, and only the original point cloud data is rotated around the X coordinate axis or the Y coordinate axis.

[0070] It should be noted that the above-mentioned rotation matrix Can be expressed as:

[0071] The target point cloud data in the target space rectangular coordinate system Can be calculated by the following formula:

[0072] Wherein, The i-th point cloud point in the target point cloud data is represented as Ptarget i, and the i-th point cloud point in the target point cloud data is represented as Ptarget i. The coordinate information of the i-th point cloud point in the target space rectangular coordinate system is represented as Ptarget i. .

[0073] Based on the target plane, a first filtering space is determined, the target plane is perpendicular to the Z axis of the target space rectangular coordinate system, and the point cloud point with the maximum Z axis coordinate value in the target point cloud data is located in the target plane.

[0074] It should be noted that the point cloud data acquisition device 201 can measure the distance between objects, that is, the point cloud data of the target pig is acquired by the point cloud data acquisition device 201 located at different heights, and the coordinate values of the point cloud points in the original point cloud data corresponding to different heights in the target space rectangular coordinate system are completely different. Therefore, only a single pass-through filter (Pass Through Filter) or random sample consistency (Random Sample Consensus, RANSAC) fitting method can filter out the point cloud data corresponding to the ground in the original point cloud data.

[0075] However, if the collection height of the point cloud data acquisition device 201 changes, the filtering upper and lower limit parameters of the above-mentioned pass-through filter method or random sample consistency fitting method will be invalid, and the coordinate values of the point cloud data corresponding to the ground in the target space rectangular coordinate system need to be obtained again and the filtering range is adjusted.

[0076] ​​For the random sample consistency fitting method, since the original point cloud data contains too many non-rigid shape clusters of actual breeding environment, the random sample consistency fitting method will misidentify when filtering the ground corresponding point cloud data in the original point cloud data, and it is not easy to set the iteration number and distance threshold, and the running speed is also very slow.

[0077] Therefore, in the case that the collection height of the point cloud data collection device 201 is not a constant value, the ground corresponding point cloud data in the target point cloud data is dynamically identified, so as to quickly focus on the noise point neighborhood for filtering the ground point cloud data.

[0078] Specifically, since the Z-axis direction of the target space rectangular coordinate system is perpendicular to the ground where the target pig is located downward, the point cloud point with the maximum Z-axis coordinate value in the target point cloud data in the target space rectangular coordinate system is actually the lowest point of the ground where the target pig is located. In the embodiment of the present application, the maximum Z-axis coordinate value in the target point cloud data can be represented as .

[0079] In the embodiment of the present application, the plane perpendicular to the Z-axis of the target space rectangular coordinate system and including the point cloud point with the maximum Z-axis coordinate value in the target point cloud data can be determined as the target plane.

[0080] In the embodiment of the present application, the target plane can be increased by a preset step size along the Z-axis to obtain a plane, which is determined as one bottom surface of the first filtering space, and the plane perpendicular to the Z-axis of the target space rectangular coordinate system and having a Z-axis coordinate value of the target space rectangular coordinate system in the target point cloud data is determined as another bottom surface of the first filtering space, and the space between the two bottom surfaces of the first filtering space is determined as the first filtering space. The first filtering space corresponds to the Z-axis coordinate interval .

[0081] It should be noted that the height threshold in the embodiment of the present application can be determined based on prior knowledge and / or actual situation. For example, in the case of , the distance in the target space rectangular coordinate system is 1 meter.

[0082] It should be noted that the preset step size in the embodiment of the present application can be determined based on prior knowledge and / or actual situation. In the embodiment of the present application, the preset step size is not specifically limited.

[0083] Optionally, the preset step size in the embodiment of the present application can be 100, corresponding to 10 cm in the target space rectangular coordinate system.

[0084] Point cloud points in the first filter space , the first filter space Point cloud points Coordinate information in the target space rectangular coordinate system = ,satisfy , Indicates the total number of point cloud points in the first filter space.

[0085] After identifying and filtering out noise points corresponding to the ground in the first filtering space, the remaining point cloud points in the target point cloud data are determined as first point cloud data.

[0086] Specifically, in the embodiment of the present invention, the point cloud points in the first filtering space are identified and filtered out by numerical calculation, mathematical statistics or deep learning technology. The noise points corresponding to the ground in the first filtering space can be filtered out. All remaining point cloud points after the noise points corresponding to the ground are determined as the first point cloud data in the rectangular coordinate system of the target space.

[0087] Figure 4 This is a flow chart of the dynamic point count peak statistical filtering in the livestock body surface point cloud data acquisition method provided by the present invention. Figure 4 As shown, as an optional embodiment, after identifying and filtering out the noise points corresponding to the ground in the first filtering space, the remaining point cloud points in the target point cloud data are determined as the first point cloud data, including: continuously slicing the first filtering space according to a preset step size along the Z-axis direction of the rectangular coordinate system of the target space to obtain multiple original filtering space slices.

[0088] Based on preset step size By continuously slicing the first filter space, multiple thicknesses can be obtained. The original filtered space slice of .

[0089] In the embodiment of the present invention, the direction parallel to the Z axis from bottom to top is The Z-axis coordinate interval corresponding to the original filter space slice is .

[0090] Figure 5 The quantitative characteristic distribution diagram of the point cloud points in the original filtered space slice in the livestock body surface point cloud data acquisition method provided by the present invention. Each original filtered space slice and the distribution of the point cloud points in each original filtered space slice are as follows: Figure 5 (a) shown.

[0091] The number of point cloud points in each original filtering space slice is counted, and based on the statistical results, the original filtering space slice with the largest number of internal point cloud points is determined as the target filtering space slice.

[0092] Specifically, after obtaining each original filter space slice, the Z-axis coordinate value can be counted by mathematical statistics. The number of points in the inner point cloud is used as the The number of point cloud points in the original filtered space slice.

[0093] When the number of original filter space slices is 10, the number of point cloud points in each original filter space slice is as follows: Figure 5 (b)

[0094] like Figure 5 As shown in (b), the number of point cloud points in the original filtered space slice reaches its peak when the Z-axis coordinate interval corresponding to the original filtered space slice is the largest (i.e., closer to the ground).

[0095] It should be noted that, in order to verify that the number of point cloud points in the largest original filtered space slice of the corresponding Z-axis coordinate interval is the largest, another ten sets of sample point cloud data are obtained in the same way as the original point cloud data. After obtaining the original filtered space slice corresponding to each of the above sample point cloud data in the same way, Figure 5 As shown in (c), the number of point cloud points in the original filtered space slice corresponding to the sample point cloud data reaches a peak when the Z-axis coordinate interval is the largest (that is, the closer to the ground).

[0096] Therefore, in the embodiment of the present invention, the original filtering space slice with the largest number of internal point cloud points is determined as the target filtering space slice, and it is considered that there are a large number of noise points corresponding to the ground in the above target filtering space slice.

[0097] In the embodiment of the present invention, the Z-axis coordinate value corresponding to the upper and lower surfaces of the target filtering space slice can be set to , the Z-axis coordinate interval corresponding to the target filter space slice is .

[0098] A second filtering space is determined based on the target filtering space slice, and after through filtering is performed on the point cloud points in the second filtering space, the remaining point cloud points in the target point cloud data are determined as the first point cloud data.

[0099] It should be noted that when using a wide field of view for point cloud data acquisition, the viewing angle is similar to a "cone." Therefore, the ground away from the point cloud data acquisition device 201 has a larger number of points when depth imaging generates point cloud data, and these points are concentrated in a small area along the Z axis. Therefore, in embodiments of the present invention, dynamic ground noise corresponding to the ground can be identified and removed through direct filtering by using the distribution statistics of the number of point cloud points in continuous point cloud slices.

[0100] Specifically, after obtaining the target filtering space slice, the target filtering space slice may be directly determined as the second filtering space.

[0101] However, because there are usually many noise points corresponding to the ground near the ground in the point cloud data, and the preset step size In the case of a small size, the target filter space slice cannot include all noise points corresponding to the ground. Therefore, in order to further improve the point cloud points in the first filter space, the embodiment of the present invention To improve the filtering effect of the noise points corresponding to the ground, the target filtering space slice can be expanded along the positive direction and the negative direction of the Z axis of the rectangular coordinate system of the target space to obtain the second filtering space.

[0102] Optionally, in the embodiment of the present invention, the upper bottom surface of the target filtering space slice can be translated in the opposite direction along the Z axis. , translate the bottom surface of the target filter space slice along the positive direction of the Z axis The space formed later is determined as the second filtering space. The corresponding Z-axis coordinate range is .

[0103] After the second filtering space is determined, a through-filter may be used to perform through-filtering on the point cloud points in the second filtering space.

[0104] After the point cloud points in the second filtering space are filtered directly, the remaining point cloud points in the target point cloud data can be determined as the first point cloud data. .

[0105] Step 102: Perform three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, and perform two-dimensional plane filtering on the third point cloud data to obtain second point cloud data.

[0106] It should be noted that after the first filtering, most noise points have been reduced in redundancy. However, in practical applications, it is inevitable that the target pig may be close to the pen fence or wall, interfering with the target's movement. The noise points corresponding to these interfering targets are close to the point cloud points corresponding to the target pig's body surface, or they are completely adhered to and fused into a cluster with the point cloud points corresponding to the target pig's body surface. In fact, the number of noise points corresponding to these interfering targets is much larger than the number of point cloud points corresponding to the target pig's body surface. Therefore, it is impossible to directly separate them effectively using methods such as Gaussian filtering, bilateral filtering, straight-through filtering, statistical radius filtering, and region growing segmentation, especially at the edge positions where they touch.

[0107] Therefore, the present invention proposes a "perception method" that allows the livestock surface point cloud data acquisition method provided herein to automatically identify the noise points corresponding to the aforementioned interfering targets. This embodiment of the present invention does not involve neural network training or classification through labeling. Instead, it defines and designs a perception space and applies geometric constraints, enabling tasks similar to recognition to be accomplished based on the distinct characteristics of points within the space.

[0108] The Dynamic Multidimensional Perceptual Spatial Filtering (DPFFS) algorithm is an adaptive signal processing framework. Its core principle is to dynamically adjust spatial filtering strategies by integrating multidimensional perceptual features (such as spatial, temporal, and semantic dimensions) to optimize the performance of specific tasks (such as object detection, noise suppression, or feature enhancement). The DPFS algorithm constructs a search space and geometrically constrained inlier point cloud statistics in three and two dimensions, calculates parameters for all inliers, and sets filtering thresholds to filter out noise.

[0109] Specifically, after obtaining the first point cloud data, the first point cloud data can be subjected to three-dimensional spatial filtering based on a dynamic multi-dimensional perception spatial filtering algorithm to obtain third point cloud data, and the third point cloud data can be subjected to two-dimensional plane filtering to obtain second point cloud data.

[0110] As an optional embodiment, performing three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data includes: defining the space between the upper bottom surface of the second filtering space and the lower bottom surface of the first filtering space as the third filtering space.

[0111] Figure 6 FIG. 1 is a flow chart of filtering the first point cloud data in the method for acquiring point cloud data of the livestock body surface. Figure 3 、 Figure 4 and Figure 6As shown, in order to further reduce the redundancy and complexity of noise points, the embodiment of the present invention performs a segmentation of the space of interest in the three-dimensional space after removing the noise points corresponding to the ground in the point cloud points through filtering to obtain the third filtering space The third filter space The corresponding Z-axis coordinate range is .

[0112] The space of interest is determined in the third filtering space. The space of interest is a cuboid with the Z axis of the target space rectangular coordinate system as the central axis. The upper base and lower base of the cuboid coincide with the upper base and lower base of the third filtering space respectively. The four sides of the bottom of the cuboid are parallel to the X axis and Y axis of the target space rectangular coordinate system respectively. The bottom length and bottom width of the cuboid are predefined.

[0113] It should be noted that in order to intuitively describe the space of interest According to the selection principle, in the embodiment of the present invention, several groups of typical point clouds with severe interference, in which the noise points corresponding to the interference target are closely connected with the point cloud points corresponding to the livestock body surface, and the point cloud points corresponding to the livestock body surface are basically undisturbed are selected for feature analysis.

[0114] Figure 7 It is a schematic diagram of different original point cloud data under different noise interference conditions. Figure 7 The black points in the middle represent the point cloud points corresponding to the pig's body surface. Figure 7 The green dots in the middle represent the noise points corresponding to interference targets such as walls, inner and outer walls of the trough, and collection equipment. Figure 7 The medium blue dots represent noise points corresponding to interference targets such as railings, window sills, and the bottom of the trough. Figure 7 The yellow points are outlier noise points with unclear features.

[0115] like Figure 7 As shown in the figure, the point cloud corresponding to the black pig's body surface has a uniform, dense, and smooth "single-layer" structure. The noise points corresponding to the green interference target have a large "span" in the Z-axis direction and are densely populated in the Z-axis direction. The noise points corresponding to the blue interference target have a small "span" in the Z-axis direction, but have a large point density in a small area in the direction of the noise point corresponding to the interference target.

[0116] Therefore, for Figure 7 For the noise points corresponding to the green and blue interference targets, it is necessary to calculate the span and number of the point cloud points in the Z-axis direction in the space of interest and select an appropriate judgment threshold to avoid misidentification and misfiltering of point cloud points that are not interfered by noise points. For example, Figure 7 (f) For Figure 7 The outlier noise in medium yellow can be filtered out during the final clustering.

[0117] In the embodiment of the present invention, the bottom length of the cuboid can be predefined based on prior knowledge and / or actual conditions. and bottom length For example, the length of the bottom of the cuboid can be defined based on the movement of the largest sample livestock. and bottom length The sample livestock are of the same species as the target pigs.

[0118] Accordingly, the space of interest The corresponding X-axis coordinate range is , Interested Space The corresponding Y-axis coordinate range is , Interested Space The corresponding Z-axis coordinate range is .

[0119] It should be noted that the space of interest The size of the structure is selected according to the operating speed and effect of the electronic device 202. If the structure is too large, the corresponding neighborhood search radius will also increase, which will lead to slower operation speed and incorrect filtering of undisturbed point cloud points, but the space of interest If the value is too small, the filtering effect will be poor, and the noise points that are adhered to the point cloud points corresponding to the surface of the target pig will be difficult to remove.

[0120] Each point cloud point in the space of interest is determined as each spatial point, and the quantity parameter and span parameter corresponding to each spatial point are obtained.

[0121] As an optional embodiment, the quantity parameters and span parameters corresponding to each spatial point are obtained, including: a cylinder with each spatial point as the center, the Z-axis direction parallel to the target space rectangular coordinate system as the height direction, the bottom radius as the preset bottom radius and the height as the preset height is determined as the constraint space corresponding to each spatial point.

[0122] Get the space of interest Afterwards, a three-dimensional "cylindrical" perception space is designed in an embodiment of the present invention, which is used for noise points corresponding to interference targets with a large span in the Z-axis direction and a dense distribution of numbers.

[0123] Constraint radius corresponding to the spatial point The mathematical expression is:

[0124] in, Indicates the preset bottom radius; Preset height.

[0125] Constraint space corresponding to spatial points The mathematical expression is:

[0126] in, Represents the coordinate information of a spatial point in the rectangular coordinate system of the target space.

[0127] The point cloud points in the constraint space corresponding to each spatial point are determined as the inner points of the constraint space corresponding to each spatial point. The number of inner points in the constraint space corresponding to each spatial point is obtained as the corresponding quantity parameter of each spatial point. The difference between the maximum Z-axis coordinate value and the minimum Z-axis coordinate value of the inner point in the constraint space corresponding to each spatial point is obtained as the span parameter corresponding to each spatial point.

[0128] Specifically, the quantity parameters corresponding to the spatial points It can be expressed as:

[0129] Span parameter corresponding to the spatial point It can be expressed as:

[0130] in, Represents the constraint space corresponding to the spatial point The maximum Z-axis coordinate value of the inner point; Represents the constraint space corresponding to the spatial point The minimum Z-axis coordinate value of the inner point.

[0131] When the corresponding quantity parameter of any spatial point is not less than the first quantity threshold and the corresponding span parameter of any spatial point is not less than the first span threshold, after filtering out any spatial point from the first point cloud data, the remaining point cloud points in the first point cloud data are determined as the third point cloud data.

[0132] Figure 8 This is a schematic diagram of the construction principle of the constraint space corresponding to the spatial point in the livestock body surface point cloud data acquisition method provided by the present invention. Figure 8 As shown in the figure, the inner points in the constraint space corresponding to the spatial points show different characteristics on the point cloud points corresponding to the target pig surface and the noise points corresponding to the interference target.

[0133] For the constraint space corresponding to the spatial point constructed at the noise point (blue cylinder), the constraint space corresponding to the spatial point The inner points in the image are densely populated and have a large span in the Z-axis coordinate values. The span of the largest Z-axis coordinate value is the same as the preset height. Almost equal, that is Figure 8 in .

[0134] For the constraint space corresponding to the spatial point constructed at the point cloud point corresponding to the target pig surface (green column), the inner points of the constraint space corresponding to the spatial point are uniform in number and sparsely distributed, and the span of the Z-axis coordinate value is small, that is, Figure 8 in , Significantly greater than .

[0135] Therefore, the quantity parameters and span parameters corresponding to the spatial points at the noise points are greater than the quantity parameters and span parameters of the spatial points at the point cloud points corresponding to the surface of the target pig.

[0136] In the embodiment of the present invention, the number parameter and span parameter corresponding to the space point are selected as the filtering conditions. And the span parameter corresponding to the above space points When the distance is ≥5cm, the above-mentioned spatial points are filtered out from the first point cloud data, and the remaining compensation point cloud points are determined as the third point cloud data.

[0137] As an optional embodiment, two-dimensional plane filtering is performed on the third point cloud data to obtain second point cloud data, including: determining the projection point of each point cloud point in the third point cloud data on the first target plane as each first plane point, and obtaining the quantity parameters and span parameters corresponding to each first plane point, where the first target plane is the plane where the Y axis and Z axis of the target plane rectangular coordinate system are located.

[0138] It should be noted that since three-dimensional spatial filtering cannot filter the point cloud points in the Z axis and the plane where the Z axis is located in the rectangular coordinates of the target space, in an embodiment of the present invention, the point cloud points in the third point cloud data are projected and reduced in dimension to achieve two-dimensional plane filtering of the point cloud points in the plane where the Y axis and the Z axis are located in the rectangular coordinates of the target space.

[0139] As an optional embodiment, obtaining the quantity parameter and span parameter corresponding to each first plane point includes: determining a circle with each first plane point as the center and a preset radius as the constraint area corresponding to each first plane point.

[0140] Specifically, in an embodiment of the present invention, a two-dimensional "circular" perception area is designed for identifying and filtering noise points corresponding to interfering targets such as railings, window sills, and the bottom of a trough, which have a small Z-axis span but densely distributed noise points.

[0141] Constraint space corresponding to spatial points constructed in three-dimensional space The difference is that the constraint area corresponding to the first plane point in the two-dimensional plane The size should be as large as possible to better differentiate the spans of the regions. This is because some point cloud data contains little noise from railings, and the target pig may be in a "head-up, back-spreading" posture, resulting in a smaller Z-axis coordinate span at the target pig's back when projected from the side. Therefore, the preset radius of 5 cm in this embodiment of the present invention can cover a larger lateral area of ​​the target pig's body surface, thereby amplifying the difference in Z-axis coordinate spans compared to noise points corresponding to interfering targets such as railings, window sills, and the bottom of the trough.

[0142] The constraint area corresponding to the first plane point The mathematical expression is:

[0143] in, Indicates the preset radius. Indicates the coordinate information of the first plane point in the rectangular coordinate system of the target space.

[0144] The point cloud points within the constraint area corresponding to each first plane point are determined as the inner points of the constraint area corresponding to each first plane point, the number of inner points of the constraint area corresponding to each first plane point is obtained as the corresponding quantity parameter of each first plane point, and the difference between the maximum Z-axis coordinate value and the minimum Z-axis coordinate value of the inner points of the constraint area corresponding to each first plane point is obtained as the span parameter corresponding to each first plane point.

[0145] Specifically, the quantity parameter corresponding to the first plane point is It can be expressed as:

[0146] The span parameter corresponding to the first plane point It can be expressed as:

[0147] in, Indicates the constraint area corresponding to the first plane point The maximum Z-axis coordinate value of the inner point; Indicates the constraint area corresponding to the first plane point The minimum Z-axis coordinate value of the inner point.

[0148] When the corresponding quantity parameter of any first plane point is not less than the second quantity threshold and the corresponding span parameter of any first plane point is not greater than the second span threshold, after filtering out the point cloud points corresponding to any first plane point from the third point cloud data, the remaining point cloud points in the third point cloud data are determined as the fourth point cloud data.

[0149] Figure 9This is a schematic diagram of the construction principle of the constraint area corresponding to the plane point in the livestock body surface point cloud data acquisition method provided by the present invention. Figure 9 As shown, the inner points in the constraint area corresponding to the first plane point and the point cloud points corresponding to the target pig surface and the noise points corresponding to the interference target show different characteristics.

[0150] For the constraint area corresponding to the plane point constructed at the noise point (blue area), the constraint area corresponding to the first plane point The number of interior points in is relatively dense, and the span of the Z-axis coordinate value is small, that is, Figure 9 (a) .

[0151] For the constraint area corresponding to the first plane point constructed at the point cloud point corresponding to the target pig surface (Green area), since the side of the target pig's back has a certain curvature, the constraint area corresponding to the plane point It will cover more point cloud points, and the span of Z-axis coordinate values ​​will be larger, that is, Figure 9 middle Greater than .

[0152] Therefore, in the embodiment of the present invention, the number parameter corresponding to the constraint area corresponding to any first plane point is determined as follows: And the span parameter corresponding to the constraint area corresponding to the first plane point is In this case, after filtering out the point cloud points corresponding to the first plane points from the third point cloud data, the fourth point cloud data is obtained.

[0153] The projection point of each point cloud point in the fourth point cloud data on the second target plane is determined as each second plane point, and the quantity parameter and span parameter corresponding to each second plane point are obtained. The second target plane is the plane where the X-axis and Z-axis of the target plane rectangular coordinate system are located.

[0154] It should be noted that after obtaining the fourth point cloud data, the point cloud points in the fourth point cloud data are projected and dimensionally reduced to achieve two-dimensional plane filtering of the point cloud points in the plane where the X axis and the Z axis are located in the rectangular coordinates of the target space.

[0155] As an optional embodiment, obtaining the quantity parameter and span parameter corresponding to each second plane point includes: determining a circle with each second plane point as the center and a preset radius as the constraint area corresponding to each second plane point.

[0156] The constraint area corresponding to the second plane point The mathematical expression is:

[0157] in, Indicates the preset radius. Indicates the coordinate information of the second plane point in the rectangular coordinate system of the target space.

[0158] The point cloud points within the constraint area corresponding to each second plane point are determined as the inner points of the constraint area corresponding to each second plane point, the number of inner points of the constraint area corresponding to each second plane point is obtained as the corresponding quantity parameter of each second plane point, and the difference between the maximum Z-axis coordinate value and the minimum Z-axis coordinate value of the inner points of the constraint area corresponding to each second plane point is obtained as the span parameter corresponding to each second plane point.

[0159] Specifically, the quantity parameter corresponding to the second plane point is It can be expressed as:

[0160] The span parameter corresponding to the first plane point It can be expressed as:

[0161] in, Indicates the constraint area corresponding to the second plane point The maximum Z-axis coordinate value of the inner point; Indicates the constraint area corresponding to the second plane point The minimum Z-axis coordinate value of the inner point.

[0162] When the quantity parameter corresponding to any second plane point is greater than the second quantity threshold and the span parameter corresponding to any second plane point is greater than the second span threshold, the second point cloud data is obtained after filtering out the point cloud points corresponding to any second plane point from the fourth point cloud data.

[0163] like Figure 9 As shown, the inner points in the constraint area corresponding to the second plane point show different characteristics on the point cloud points corresponding to the target pig surface and the noise points corresponding to the interference target.

[0164] Therefore, in the embodiment of the present invention, the number parameter corresponding to the constraint area corresponding to any second plane point is determined as follows: And the span parameter corresponding to the constraint area corresponding to the second plane point is In this case, after filtering out the point cloud points corresponding to the second plane points from the fourth point cloud data, the second point cloud data is obtained.

[0165] Step 103: extracting point cloud data of the target pig's body surface from the second point cloud data.

[0166] Specifically, after obtaining the second point cloud data, point cloud data of the target pig's body surface can be extracted from the second point cloud data through numerical calculation, mathematical statistics or deep learning technology.

[0167] As an optional embodiment, extracting point cloud data of the target pig's body surface from the second point cloud data includes: extracting point cloud data of the target pig's body surface from the second point cloud data using a Euclidean clustering algorithm.

[0168] Specifically, after two filtering steps, the early points with obvious geometric shapes are “broken up”, and finally some scattered outlier noise points or clusters of noise points with unclear geometric features remain.

[0169] Therefore, in the embodiment of the present invention, the point cloud data of the target pig's body surface is extracted from the second point cloud data by using the Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm.

[0170] The Euclidean clustering algorithm includes two key parameters: neighborhood radius and the number of points in the cluster, where the neighborhood radius is the Euclidean distance , is the selected cluster center point, for The points in the neighborhood include core points, noise points and boundary points. The number of points in the cluster is calculated by The number of core points in the point cloud is obtained. The remaining uniform and dense pig point cloud clusters and the scattered noise point cloud clusters in the point cloud, so the Euclidean distance Set it to a smaller value, such as 5cm, so that the noise clusters far away from the target pig's body surface can be effectively filtered out.

[0171] For all point cloud points in the second point cloud data And the point cloud points in the neighborhood , point cloud data of the target pig surface :

[0172]

[0173] in, Indicates that all the points in the second point cloud data that meet Clusters of conditions, Indicates the number of point cloud points, Indicates the first point in the second point cloud data point cloud points and The Euclidean distance between the point cloud points is considered as the core point if it meets the conditions. , representing the maximum fit clusters of conditions.

[0174] Figure 10 is a schematic diagram of point cloud data of a target live pig body surface in the livestock body surface point cloud data acquisition method provided by the present application. The point cloud data of the target live pig body surface obtained by the livestock body surface point cloud data method provided by the present application is shown in Figure 10 .

[0175] It should be noted that Figure 10 (a) to Figure 10 (f) are respectively related to Figure 7 (a) to Figure 7 (f), Figure 10 exhibits point cloud data of the target livestock body surface obtained from different original point cloud data.

[0176] The embodiment of the present application can more accurately and efficiently filter out the noise in the original point cloud data by filtering the original point cloud data obtained under a complex appearance field environment through initial filtering, three-dimensional space filtering, two-dimensional plane filtering and target segmentation based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data acquisition points, thereby significantly improving the accuracy and efficiency of the acquisition of three-dimensional point cloud data of the livestock body surface under complex breeding environment, providing a more accurate data basis for subsequent acquisition of livestock phenotype data, and providing more favorable technical support for livestock breeding and production.

[0177] In order to further illustrate the technical effects of the livestock body surface point cloud data acquisition method provided by the present application, the livestock body surface point cloud data acquisition method provided by the present application is described below through an example.

[0178] It should be noted that the present example is carried out in a certain pig farm, and during this period, a total of 40 different Yorkshire pigs are selected for data collection, with an age of 3 to 5 months. In the present example, a total of 987 groups of point cloud data of different individuals, different ages (body weight) and different motion postures are randomly selected from all the data, of which 70% are sows and 30% are boars, with a minimum weight of 60.0 kg and a maximum weight of 102.3 kg.

[0179] The algorithm was designed in Visual Studio 2019, using the C++ development language. The PCL point cloud library version 1.11.1 and the Orbbec SDK version 1.9.5 Release were used. A KD Tree structure was used for point cloud loading and neighbor search. The parameters of the electronic device used to execute the livestock phenotypic point cloud data acquisition method provided in this invention were: Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz, 8.00GB RAM, GTX 1650 graphics card, and Windows 11 operating system. To obtain a high-density raw (original density captured by the depth camera) pig point cloud or to quickly segment a point cloud with preserved features, three sets of point cloud voxel downsampling parameters were selected during segmentation for algorithm speed evaluation.

[0180] In order to evaluate the distribution of point cloud points in the original point cloud data and the spatial location information of the original data collection points, and the effect of filtering the original point cloud data, three groups of original point cloud data collected at heights of 1.68m, 1.78m and 1.88m were selected for experiments.

[0181] Figure 11 This is a comparison chart of the number of point cloud points before and after filtering the original point cloud data in the livestock body surface point cloud data acquisition method provided by the present invention. Figure 11 As shown in (a), before filtering, the peak of the number of point cloud points is concentrated near the ground. Figure 11 As shown in (b), after filtering, all slices containing peaks, i.e., ground noise, have been removed. The non-critical area above the pig has also been filtered out. The conclusion is that filtering the raw point cloud data based on the distribution of points in the raw point cloud data and the spatial location of the raw data acquisition points can dynamically and efficiently filter out ground noise at different heights.

[0182] The noise interference of point clouds varies, and the weight of pigs is different, which is reflected in the different cluster sizes and numbers in the point clouds. Therefore, in one algorithm run with the same parameters, it is necessary to ensure that the denoising effect of the severely interfered point clouds is good, and the undisturbed point clouds do not have serious false filtering. Therefore, in order to objectively and quantitatively evaluate the denoising results, the denoising rate is selected. (Denoising Rate) is used as the evaluation index, and Figure 7 The algorithm filters the 6 groups of original point cloud data with different interference conditions. The number of noise points in the 6th group (f) is 0 and is not counted. Use Cloud Compare software to segment the noise points and get the total number of noise points before filtering. , the total number of noise points after algorithm filtering , is the number of points correctly filtered out. Calculate the point cloud denoising rate Calculated based on the following formula:

[0183] Table 2 Point cloud denoising rates of different original point cloud data under different interferences

[0184] For the original point cloud data (a)-(c) in Table 2, they are seriously disturbed by noise points, and the noise points have regular geometric shapes, so the removal rate is very high. For the original point cloud data (e), the noise points are less dense, and the geometric features are not as obvious as those of the original point cloud data (a)-(c) (e.g. Figure 10 (as shown), resulting in a low removal rate. The original point cloud data (d) has extremely complex noise points, mostly irregular curved structures, and a larger number than the pig itself. While this has the lowest removal rate, it still reduces the number of noise points, though the number is far smaller than the pig itself. The conclusion is that Module 2, through 3D spatial filtering and 2D planar filtering, can achieve segmentation capabilities at varying noise levels.

[0185] For point cloud segmentation tasks, generally through To evaluate the performance of the model, in this example, we do not use the data test set or classification labels of the model, but still use the binary classification task, including "environment" and "pig body" classes. We use CloudCompare software to manually segment all point clouds, and finally use it as the true value of the segmentation result of the DPFFS algorithm for comparison. Evaluate segmentation accuracy. The calculation formula is as follows:

[0186] In the example Take the intersection of the algorithm and manually segmented pig point clouds, Take the pig body points that are incorrectly segmented into a set of environmental points by the algorithm, The set of environmental points that were incorrectly segmented as pig body points by the algorithm was taken. 987 groups of experimental point clouds were segmented manually and by the algorithm, and the , and finally take the average value.

[0187] Figure 12 This is a schematic diagram of evaluating the segmentation accuracy in the livestock surface point cloud data acquisition method provided by the present invention. Figure 13 This is a comparison chart of the segmentation results in the livestock surface point cloud data acquisition method provided by the present invention. The value distribution diagram of Figure 12 As shown, the comparison of segmentation results is Figure 13 As shown, the final The mean is 0.984.

[0188] It should be noted that the amount of point cloud data collected by the depth camera is very large, which consumes a lot of resources and takes a long time to process. While ensuring the integrity of the target point cloud features, voxel downsampling can effectively reduce the amount of data. In this example, three groups of voxel downsampling parameters are selected to obtain point clouds of different densities and analyze the running time of the DPFFS algorithm. At the same time, in order to ensure that the point cloud features in the illustrations below are easy to observe and distinguish, the point cloud data in other figures are not downsampled. Divide the point cloud data into cubes of the same size as voxels , calculate each Center of mass within Get the point cloud after sampling , where For each Points within this chapter are selected 1cm, 2cm, 3cm, used in algorithm time evaluation.

[0189] In order to evaluate the operating efficiency of the livestock body surface point cloud data acquisition method provided by the present invention, the maximum, minimum and average values ​​of the running time of step 101, step 102 and the total program (including point cloud coordinate system correction, clustering and point cloud hard disk storage) were recorded in 987 segmentation experiments. According to the description in Section 2.6.1, the maximum, minimum and average values ​​of the running time without voxel downsampling and the voxel downsampling were calculated. There are 4 groups of running time for 1cm, 2cm and 3cm, and the following Table 3 is obtained: Table 3 Operation efficiency of the livestock surface point cloud data acquisition method provided by the present invention

[0190] The point cloud without downsampling has a large number of points, so when traversing the filter, the number of points within the search radius is large, resulting in a large number of loop operations and high complexity. The conclusion is to use voxels =1cm, which can ensure that the pig body segmentation result with basically unchanged point cloud features can be obtained in about 1 second.

[0191] The livestock body surface point cloud data acquisition method provided by the present invention can be used for the overall point cloud segmentation of multi-target pig bodies, is suitable for pig body segmentation in fixed scenes, and can also be transferred to cattle body segmentation. When multiple targets are segmented as a whole, it is necessary to adjust the region of interest size parameters and the clustering lower limit parameters, and the filter parameters do not need to be adjusted. The segmentation characteristics under fixed scenes are basically consistent with the segmentation characteristics under changing environments, and no parameters need to be adjusted. Cattle body segmentation requires adjustment of the rotation matrix parameters and the clustering lower limit parameters. In order to verify the applicability of the method, 25 groups of pig group point clouds, 34 groups of fixed scene point clouds and 20 groups of cattle body point clouds were selected for experiments. Figure 14It is a schematic diagram of point cloud data of the target cattle body surface in the livestock body surface point cloud data acquisition method provided by the present invention.

[0192] Figure 15 This is a comparison chart of the filtering effects of different parameter values ​​in the livestock body surface point cloud data acquisition method provided by the present invention. Figure 15 As shown, 4 different slice spans are selected for step 101. When When the distance is too small, such as 40 (4cm), a lot of ground noise will remain, as shown in the green mark in Figure 14-(a). When it is 70 (7cm), the corner noise will remain where the railing meets the ground. If it is too large, such as 130 (13cm), although the ground is cleaned more clearly, the misidentification situation will be very serious, especially when the pig lowers its head close to the ground or the corner of the wall, which may cause the pig to be filtered out. , that is 10cm, this value is relatively reasonable, and the height error is controlled within .

[0193] For the quantity parameter of step 102 and span parameters The threshold value needs to be set. If the value is too small, such as about 10, the undisturbed point cloud will be mistakenly filtered out, while if it is too large, the filtering effect will be poor. Figure 15 (b) Green marker. Span parameter When filtering in 3D perception space, try to use a large value, otherwise the vertical noise points cannot be filtered out completely. On the contrary, when filtering in 2D, you need to use a small value to avoid filtering out the edge point cloud of the pig's back contour. Take two groups of different interference point clouds for value selection experiments. Finally, determine the 3D filtering parameters and 50 and 5cm respectively, 2D filtering parameters and 20 and 4 cm respectively. Different voxels , no adjustment required and parameter.

[0194] In summary, the livestock surface point cloud data acquisition method provided by the present invention addresses the difficulty in extracting pig body point clouds in a changing and complex environment. A dynamic point cloud feature focusing and segmentation (DPFFS) method is designed using point clouds collected by a mobile top depth camera data device. Dynamic point count peak statistical filtering can remove ground point cloud noise at different heights, and dynamic multi-dimensional perceptual spatial filtering has excellent denoising and segmentation effects, especially when dealing with the situation where the pig body and noise points are integrated into a cluster.

[0195] The experimental results show that the livestock body surface point cloud data acquisition method provided by the present invention can achieve the pig body segmentation task under variable height, and the segmentation accuracy is The average value is 0.984, which is basically consistent with the manual segmentation results without downsampling and voxel When taking 1cm, 2cm, and 3cm, the running speed is 6.2s, 0.9s, 0.2s, and 0.1s respectively. In actual use, the voxel The point cloud segmentation is 1 cm, which ensures that the point cloud features remain unchanged and the segmentation can be completed within 1 second. At the same time, the livestock surface point cloud data acquisition method provided by the present invention is also suitable for point cloud segmentation of multiple targets, fixed scenes and transfer to other animals.

[0196] Figure 16 This is a schematic diagram of the structure of the livestock body surface point cloud data acquisition device provided by the present invention. Figure 16 The livestock body surface point cloud data acquisition device provided by the present invention is described. The livestock body surface point cloud data acquisition device described below and the livestock body surface point cloud data acquisition method provided by the present invention described above can be referred to each other. Figure 16 As shown, the device includes: a first filtering module 1601, a second filtering module 1602 and a target segmentation module 1603.

[0197] The first filtering module 1601 is configured to filter the raw point cloud data based on the distribution of point cloud points in the raw point cloud data and the spatial location information of the raw data collection points to obtain first point cloud data. The raw point cloud data is point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock. When the point cloud data collection device collects point cloud data of the target livestock, the point cloud data collection device is located above the target livestock and the data collection direction is perpendicular to the ground where the target livestock is located. The raw data collection points are the locations where the point cloud data collection device collects point cloud data of the target livestock.

[0198] The second filtering module 1602 is configured to perform three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, and perform two-dimensional plane filtering on the third point cloud data to obtain second point cloud data.

[0199] The target segmentation module 1603 is used to extract point cloud data of the target pig's body surface from the second point cloud data.

[0200] Specifically, the first filtering module 1601 , the second filtering module 1602 and the object segmentation module 1603 are electrically connected.

[0201] The livestock surface point cloud data acquisition device in the embodiment of the present invention can more accurately and efficiently filter out noise in the original point cloud data by performing initial filtering, three-dimensional spatial filtering, two-dimensional plane filtering and target segmentation on the original point cloud data acquired in a complex field environment based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data acquisition points. This significantly improves the accuracy and efficiency of acquiring three-dimensional point cloud data of livestock surfaces in complex breeding environments, provides a more accurate data basis for the subsequent acquisition of livestock phenotypic data, and provides more favorable technical support for livestock breeding and production.

[0202] Figure 17 An example of a physical structure diagram of an electronic device 202 is shown as follows: Figure 17 As shown, the electronic device 202 may include: a processor 1710 , a communications interface 1720 , a memory 1730 and a communication bus 1740 , wherein the processor 1710 , the communications interface 1720 and the memory 1730 communicate with each other via the communication bus 1740 . The processor 1710 can call the logic instructions in the memory 1730 to execute the livestock surface point cloud data acquisition method, which includes: based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection point, filtering the original point cloud data to obtain first point cloud data, where the original point cloud data is point cloud data obtained after the point cloud data collection device collects point cloud data of the target livestock, the point cloud data collection device is located above the target livestock when collecting point cloud data of the target livestock and the data collection direction is perpendicular to the ground where the target livestock is located, and the original data collection point is the position point where the point cloud data collection device collects point cloud data of the target livestock; performing three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, performing two-dimensional plane filtering on the third point cloud data to obtain second point cloud data; and extracting point cloud data of the target pig's body surface from the second point cloud data.

[0203] Furthermore, the logic instructions in the aforementioned memory 1730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0204] Based on the contents of the above embodiments, a livestock surface point cloud data acquisition system includes: the electronic device described above, a point cloud data acquisition device, a positioning device, a moving mechanism, and a supporting mechanism; the moving mechanism is connected to the supporting mechanism, and the moving mechanism is used to drive the supporting mechanism to move; The point cloud data acquisition device is mounted on the support mechanism, and the shooting direction of the point cloud data acquisition device is downward and perpendicular to the ground where the target livestock is located. The point cloud data acquisition device is used to collect point cloud data located at the target livestock and send the collected point cloud data of the target livestock to the electronic device; The positioning device is used to record the location point where the point cloud data acquisition device is located when collecting point cloud data of the target livestock as an original data acquisition point, and when the spatial location information of the original data acquisition point is obtained, the spatial location information of the original data acquisition point is sent to the electronic device.

[0205] It should be noted that the specific structure of the livestock body surface point cloud data acquisition system and the interaction between the modules in the embodiment of the present invention can be found in Figure 2 The contents of the above embodiments will not be repeated in the embodiments of the present invention.

[0206] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the livestock surface point cloud data acquisition method provided by the above methods, the method including: based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection point, filtering the original point cloud data to obtain first point cloud data, the original point cloud data is the point cloud data obtained after the point cloud data acquisition device collects point cloud data of the target livestock, the point cloud data acquisition device is located above the target livestock when collecting point cloud data of the target livestock and the data collection direction is perpendicular to the ground where the target livestock is located, and the original data collection point is the position point where the point cloud data acquisition device is located when collecting point cloud data of the target livestock; performing three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, performing two-dimensional plane filtering on the third point cloud data to obtain second point cloud data; and extracting point cloud data of the target pig's body surface from the second point cloud data.

[0207] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the livestock surface point cloud data acquisition method provided by the above-mentioned methods, the method comprising: filtering the original point cloud data based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection point to obtain first point cloud data, the original point cloud data being point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock, the point cloud data collection device being located above the target livestock when collecting point cloud data of the target livestock and the data collection direction being perpendicular to the ground where the target livestock is located, the original data collection point being the position point at which the point cloud data collection device collects point cloud data of the target livestock; performing three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, performing two-dimensional plane filtering on the third point cloud data to obtain second point cloud data; and extracting point cloud data of the target pig's body surface from the second point cloud data.

[0208] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0209] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for acquiring livestock surface point cloud data, characterized in that: include: obtaining first point cloud data after filtering the original point cloud data based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection points, wherein the original point cloud data is point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock, the point cloud data collection device is located above the target livestock when collecting point cloud data of the target livestock, and the data collection direction is perpendicular to the ground where the target livestock is located, and the original data collection points are the locations where the point cloud data collection device collects point cloud data of the target livestock; Performing three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, and performing two-dimensional plane filtering on the third point cloud data to obtain second point cloud data; Point cloud data of the target pig's body surface is extracted from the second point cloud data.

2. The method for acquiring livestock surface point cloud data according to claim 1, characterized in that: The first point cloud data is obtained after filtering the original point cloud data based on the distribution of point cloud points in the original point cloud data and the spatial position information of the original data collection points, including: Based on the spatial position information of the original data collection point, a target space rectangular coordinate system is constructed with the original data collection point as the origin and the Z-axis direction perpendicular to the ground where the target livestock is located downward, and the original point cloud data is subjected to coordinate system conversion, and the original point cloud data in the target space rectangular coordinate system is determined as the target point cloud data; Determine a first filtering space based on a target plane, wherein the target plane is perpendicular to the Z axis of the rectangular coordinate system of the target space, and the point cloud point with the largest Z axis coordinate value in the target point cloud data is located in the target plane; After identifying and filtering out noise points corresponding to the ground in the first filtering space, each remaining point cloud point in the target point cloud data is determined as the first point cloud data.

3. The method for acquiring livestock surface point cloud data according to claim 2, characterized in that: After identifying and filtering out noise points corresponding to the ground in the first filtering space, determining the remaining point cloud points in the target point cloud data as the first point cloud data includes: Continuously slicing the first filter space along the Z-axis direction of the target space rectangular coordinate system according to a preset step size to obtain a plurality of original filter space slices; Counting the number of point cloud points in each of the original filtering space slices, and then determining the original filtering space slice with the largest number of internal point cloud points as the target filtering space slice based on the statistical result; A second filtering space is determined based on the target filtering space slice, and after through-filtering the point cloud points in the second filtering space, the remaining point cloud points in the target point cloud data are determined as the first point cloud data.

4. The method for acquiring livestock surface point cloud data according to claim 3, characterized in that: The performing three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data includes: The space between the upper bottom surface of the second filtering space and the lower bottom surface of the first filtering space is defined as a third filtering space; Determining a space of interest within the third filtering space, the space of interest being a cuboid with the Z axis of the target space rectangular coordinate system as the central axis, the upper and lower bases of the cuboid respectively coinciding with the upper and lower bases of the third filtering space, the four sides of the bottom of the cuboid respectively being parallel to the X axis and the Y axis of the target space rectangular coordinate system, and the bottom length and bottom width of the cuboid being predefined; Determine each point cloud point in the space of interest as each spatial point, and obtain a quantity parameter and a span parameter corresponding to each spatial point; When the corresponding quantity parameter of any spatial point is not less than the first quantity threshold and the corresponding span parameter of any spatial point is not less than the first span threshold, after filtering out any spatial point from the first point cloud data, the remaining point cloud points in the first point cloud data are determined as the third point cloud data.

5. The method for acquiring livestock surface point cloud data according to claim 3, characterized in that: The performing two-dimensional plane filtering on the third point cloud data to obtain the second point cloud data includes: Determine the projection point of each point cloud point in the third point cloud data on a first target plane as each first plane point, and obtain a quantity parameter and a span parameter corresponding to each first plane point, where the first target plane is a plane where the Y axis and the Z axis of the target plane rectangular coordinate system are located; When a quantity parameter corresponding to any first plane point is not less than a second quantity threshold and a span parameter corresponding to any first plane point is not greater than a second span threshold, after filtering out the point cloud points corresponding to any first plane point from the third point cloud data, determining the remaining point cloud points in the third point cloud data as fourth point cloud data; Determine the projection point of each point cloud point in the fourth point cloud data on a second target plane as each second plane point, and obtain a quantity parameter and a span parameter corresponding to each second plane point, where the second target plane is a plane where an X-axis and a Z-axis of a rectangular coordinate system of the target plane are located; When the corresponding quantity parameter of any second plane point is greater than the second quantity threshold and the corresponding span parameter of any second plane point is greater than the second span threshold, after filtering out the point cloud points corresponding to any second plane point from the fourth point cloud data, the remaining point cloud points in the fourth point cloud data are determined as the second point cloud data.

6. The method for acquiring livestock surface point cloud data according to claim 4, characterized in that: The obtaining of the quantity parameter and span parameter corresponding to each spatial point includes: A cylinder having each of the spatial points as its center, a Z-axis direction parallel to the target spatial rectangular coordinate system as its height direction, a bottom radius of a preset bottom radius, and a height of a preset height is determined as the constraint space corresponding to each of the spatial points; Determine the point cloud point in the constraint space corresponding to each spatial point as the inner point of the constraint space corresponding to each spatial point, obtain the number of inner points in the constraint space corresponding to each spatial point, as the corresponding quantity parameter of each spatial point, and obtain the difference between the maximum Z-axis coordinate value and the minimum Z-axis coordinate value of the inner point in the constraint space corresponding to each spatial point, as the span parameter corresponding to each spatial point.

7. A device for acquiring livestock surface point cloud data, characterized in that: include: a first filtering module configured to obtain first point cloud data after filtering the raw point cloud data based on the distribution of point cloud points in the raw point cloud data and spatial position information of raw data collection points, wherein the raw point cloud data is point cloud data obtained after a point cloud data collection device collects point cloud data of a target livestock, wherein the point cloud data collection device is located above the target livestock when collecting point cloud data of the target livestock, and the data collection direction is perpendicular to the ground where the target livestock is located, and the raw data collection points are the locations where the point cloud data collection device collects point cloud data of the target livestock; a second filtering module, configured to perform three-dimensional spatial filtering on the first point cloud data to obtain third point cloud data, and perform two-dimensional plane filtering on the third point cloud data to obtain second point cloud data; The target segmentation module is used to extract the point cloud data of the target pig's body surface from the second point cloud data.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for acquiring livestock surface point cloud data as described in any one of claims 1 to 6 is implemented.

9. A livestock surface point cloud data acquisition system, characterized in that: include: The electronic device, point cloud data acquisition device, positioning device, moving mechanism and supporting mechanism according to claim 8; the moving mechanism is connected to the supporting mechanism, and the moving mechanism is used to drive the supporting mechanism to move; The point cloud data acquisition device is mounted on the support mechanism, and the shooting direction of the point cloud data acquisition device is downward and perpendicular to the ground where the target livestock is located. The point cloud data acquisition device is used to collect point cloud data located at the target livestock and send the collected point cloud data of the target livestock to the electronic device; The positioning device is used to record the location point where the point cloud data acquisition device is located when collecting point cloud data of the target livestock as an original data acquisition point, and when the spatial location information of the original data acquisition point is obtained, the spatial location information of the original data acquisition point is sent to the electronic device.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for acquiring livestock body surface point cloud data as described in any one of claims 1 to 6 is implemented.