Non-contact three-dimensional reconstruction method and device for small livestock and poultry

The non-contact 3D reconstruction technology using a mobile platform and multi-view depth cameras solves the problem of traditional equipment layout in small livestock and poultry cages, and realizes efficient and accurate automated acquisition of body size and weight parameters, providing comprehensive data support.

CN121120932APending Publication Date: 2025-12-12CHINA AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511218589.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Traditional 3D reconstruction technology is difficult to apply effectively in small livestock and poultry cage environments, and manual contact measurement is inefficient and can easily cause stress to animals. Traditional registration algorithms cannot achieve accurate 3D reconstruction.

Method used

The system adopts a mobile platform design, combined with a retractable camera mount and a multi-view depth camera. It acquires point cloud data of livestock and poultry from the back, left, and right sides through a multi-camera synchronization device. It combines coarse registration, fine registration and coordinate system in one process, and introduces heading angle constraints to optimize rigid transformation, so as to achieve non-contact 3D reconstruction.

Benefits of technology

It enables automated, non-contact measurement of body size parameters of small livestock and poultry, improving measurement efficiency, avoiding animal stress, and extracting multi-dimensional parameters to support breeding and production performance evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120932A_ABST
    Figure CN121120932A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of three-dimensional reconstruction, in particular to a non-contact three-dimensional reconstruction method and device for small livestock and poultry, and the device comprises a movable platform, a camera extension unit, an image collection unit and a weight collection unit. An aluminum plate is placed at the bottom of the movable platform to serve as a bottom surface; the camera stretching unit comprises a high-precision lead screw, a motor, a limiting guide rail, a telescopic camera frame, a limiting piece, a pulse generator and a camera triangular stabilizing support. The image acquisition unit comprises three depth cameras and a multi-machine synchronization device, the lowermost edge of a visual field coincides with the enlarged scale pan, the weight acquisition unit comprises a communicable electronic scale, the enlarged scale pan and an attitude sensor, and the communicable electronic scale is fixed in the middle of an aluminum plate on the bottom surface of the movable platform through bolts. The technical problems that for small livestock and poultry which are small in size, easy to move and limited in spatial scale, a traditional multi-camera system is difficult to arrange in a narrow cage, and the three-dimensional reconstruction technology is difficult to directly apply are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of three-dimensional reconstruction technology, and more specifically to a non-contact three-dimensional reconstruction method and apparatus for small livestock and poultry. Background Technology

[0002] With the intensive and intelligent development of animal husbandry, biological parameters such as animal body size and weight have become important indicators for breeding, health monitoring, and production performance evaluation. Especially in the meat industry, for small livestock such as rabbits, chickens, and ducks, their body structure directly determines slaughter rate, lean meat percentage, and growth efficiency, making them key factors affecting economic benefits. Traditional methods of measuring body size and weight rely on manual contact, such as using tape measures or rulers to measure body length and chest circumference, or obtaining weight using a scale. These methods are inefficient, prone to causing animal stress, have poor data consistency, and limited measurement dimensions. In recent years, three-dimensional reconstruction technology has been gradually introduced into the field of animal husbandry measurement. By collecting point clouds of animal body surfaces using depth cameras or lidar, their three-dimensional geometric structure can be reconstructed, and multi-dimensional parameters such as body length, height, and volume can be further extracted, achieving non-contact, high-precision measurement. For medium and large animals (such as cattle and pigs), existing research has deployed multi-view camera systems or channel scanning equipment to achieve automatic identification and modeling.

[0003] For small, easily movable livestock and poultry, the spatial scale is limited, traditional multi-camera systems are difficult to deploy in small cages, and there is a lack of stable control platforms. Existing 3D reconstruction technologies are difficult to apply directly. When faced with small-sized livestock and poultry in small spaces, the point cloud density is low and the structural features are few, so traditional registration algorithms cannot complete 3D reconstruction. Summary of the Invention

[0004] In view of this, the present invention provides a method and apparatus for non-contact three-dimensional reconstruction of small livestock and poultry.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] The system includes: a movable platform, a camera extension unit, an image acquisition unit, and a weight acquisition unit. The movable platform has an aluminum plate at its bottom, with casters mounted below it. The camera extension unit includes a high-precision lead screw, a motor, a limit rail, a telescopic camera frame, a limit component, a pulse generator, and a camera tripod stabilizer. The high-precision lead screw and motor are bolted to the aluminum plate at the bottom of the movable platform. The high-precision lead screw is a ball screw, and the motor is a stepper motor. The limit rail is bolted to the upper part of the main aluminum frame of the movable platform. The telescopic camera frame is bolted to the slider of the high-precision lead screw and the linear slider of the limit rail. The components are fixed to the movable platform frame; the pulse generator is electrically connected to the motor and cooperates with the limit switch; the camera tripod is fixed to the telescopic camera frame, and the angle between the camera and the vertical plane is 15°; the image acquisition unit includes three depth cameras and a multi-camera synchronization device. The three depth cameras are mounted on the camera tripod, and the lowest edge of their field of view coincides with the enlarged weighing pan; the weight acquisition unit includes a communicable electronic scale, an enlarged weighing pan, and an attitude sensor. The communicable electronic scale is fixed to the middle of the aluminum plate on the bottom of the movable platform with bolts; the enlarged weighing pan is placed on the communicable electronic scale; the attitude sensor is fixed to the bottom of the movable platform with bolts and is adjacent to the communicable electronic scale.

[0007] Furthermore, the telescopic camera frame is rigidly connected to the slider of the high-precision lead screw and the linear slider of the limit guide rail, and the camera tripod stabilizer is fixedly connected to the telescopic camera frame with bolts; the pulse generator works in conjunction with the limit switch to control the telescopic camera frame to reciprocate between the farthest extended position and the shortest retracted distance.

[0008] Furthermore, the multi-machine synchronization device is connected to three depth cameras via a synchronization line; the multi-machine synchronization device, the three depth cameras, the communicable electronic scale, and the attitude sensor are all connected to a control computer.

[0009] Furthermore, this includes the following steps:

[0010] S1: Push the movable platform described in claim 1 to the side of the livestock cage to be tested, and use electronic devices to control the motor to drive the high-precision screw, which in turn drives the telescopic camera frame to unfold along the limiting guide rail, so that the three depth cameras reach the required shooting field of view.

[0011] S2: Place the livestock or poultry to be tested on the enlarged weighing pan. The electronic device reads the weight data from the communicable electronic scale and simultaneously receives the roll and pitch angles of the movable platform from the attitude sensor. The tilt compensation equation is then used to... Correct the weight data to obtain the corrected weight, where G is the corrected weight, W is the weight that can be read by the communicating electronic scale, θ is the roll angle, and α is the pitch angle;

[0012] S3: Once the weight signal stabilizes, the electronic device controls the multi-machine synchronization device to drive three depth cameras to simultaneously acquire raw point cloud data from the back, left side, and right side of the livestock under test.

[0013] S4: Process and register the raw point cloud data from three perspectives to generate the overall point cloud data of the livestock and poultry to be tested, and complete the three-dimensional reconstruction.

[0014] Furthermore, before processing and registering the raw point cloud data from the three perspectives in step S4, a coarse point cloud registration step is also included: manually selecting and calibrating points on the raw point cloud data collected by the three depth cameras using software to obtain the rigid transformation matrix of the camera relative to the main camera, and using this matrix to map the point cloud of the camera to the coordinate system of the main camera to achieve preliminary alignment of the point cloud.

[0015] Furthermore, step S4, after coarse registration of the point cloud and before generating the overall point cloud data, also includes a point cloud preprocessing step:

[0016] S41: Perform pass-through filtering on the coarsely registered point cloud, retain the region of interest point cloud containing the livestock and poultry to be tested and the enlarged weighing pan (9), and delete redundant interference points;

[0017] S42: Perform voxel downsampling on the point cloud after pass-through filtering, divide the space into voxels with a side length of 0.004m, take the average coordinate of the points in each voxel as the representative point, and reduce the point cloud density;

[0018] S43: Perform radius filtering on the point cloud after voxel downsampling, construct a KD tree, count the number of neighboring points within a radius of 0.025m, and remove points with fewer than 100 neighboring points as outliers.

[0019] Furthermore, step S4, after point cloud preprocessing and before generating the overall point cloud data, also includes a coordinate system step:

[0020] S44: For each preprocessed point cloud, a random sampling consensus algorithm is used to fit a plane, and the plane with the most interior points is extracted as the reference plane to obtain its normal vector.

[0021] S45: Translate the point cloud along the Z-axis to make the average Z-coordinate of the points in the reference plane zero. If the Z-median of the point cloud is negative after translation, then flip it 180° along the Y-axis.

[0022] S46: Construct a rotation matrix using the Rodrigues rotation formula, rotate the reference plane normal vector to coincide with the Z-axis, and apply this rotation matrix to the point cloud to place the point clouds from the three views in the same coordinate system.

[0023] Furthermore, the process of generating the overall point cloud data of the livestock and poultry to be tested in step S4 includes:

[0024] S47: Using a unified coordinate system as a reference, obtain the maximum value h of the Z-axis of the point cloud, extract the points in the 0.5hh interval of the Z-coordinate of each viewpoint, and form the overlapping area point cloud;

[0025] S48: Using the point cloud of the main camera (4b) as the target point cloud and the point clouds of the cameras (4a, 4c) as the source point clouds, perform pairwise iterative close-point fine registration on the point clouds in the overlapping region to solve for the optimal rigid transformation matrix;

[0026] S49: Extract the heading angle from the rigid transformation matrix, construct a rotation matrix containing only the heading angle, re-estimate the translation vector, construct the constrained rigid transformation matrix, apply it to the global point cloud, and obtain the final registered point cloud data.

[0027] Furthermore, after generating the overall point cloud data of the livestock and poultry to be tested in step S4, a point cloud post-processing step is also included:

[0028] S410: Perform planar segmentation on the final registered point cloud, separating and deleting the bottom background point cloud;

[0029] S411: Perform DBSCAN clustering analysis on the remaining point cloud, calculate the distance from each point to the k-th nearest neighbor, plot the k-distance curve, and determine the clustering parameters based on the inflection point;

[0030] S412: Density clustering is performed based on clustering parameters, and the non-noise cluster with the most points is selected as the livestock and poultry point cloud cluster to be tested, thus completing the 3D reconstruction.

[0031] Furthermore, in step S3, when the three depth cameras (4a, 4b, 4c) acquire raw point cloud data, the intrinsic parameters of the depth image and the color image are aligned using the built-in model to make the point cloud contain color information. After completing the three-dimensional reconstruction in step S4, the body length and body width parameters of the livestock to be measured are extracted and compared with the actual values ​​read manually. The accuracy of body length and hip width measurements is not less than 89.7%, and the absolute error is controlled within 20mm.

[0032] Compared with existing technologies, this invention discloses a non-contact 3D reconstruction method and device for small livestock and poultry. Addressing the challenge of deploying traditional multi-camera systems in confined spaces for small livestock and poultry (such as rabbits, chickens, and ducks), this invention employs a mobile platform design with a retractable camera mount. This allows for flexible adjustment of camera positions to adapt to confined cage environments, solving the problem of deploying traditional equipment in small spaces. Traditional manual contact measurement is inefficient and prone to causing animal stress. This invention utilizes non-contact 3D reconstruction technology, combined with a communicable electronic scale to synchronously acquire weight data, achieving automated acquisition of body size and weight parameters. This avoids animal stress caused by manual contact and significantly improves measurement efficiency. Small livestock and poultry are small in size and have few structural features, making accurate 3D reconstruction difficult with traditional registration algorithms. This invention uses multi-view synchronous acquisition (three depth cameras acquire back, left, and right views respectively), combined with coarse registration, fine registration, and a coordinate system workflow. In particular, it introduces heading angle constraints to optimize rigid transformation, effectively solving the problem of low registration accuracy for small target point clouds. Traditional methods can only obtain limited body size parameters. This invention can extract multi-dimensional parameters such as body length, body width, and body height through three-dimensional reconstruction technology, providing more comprehensive data support for seed selection, breeding, and production performance evaluation. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of the structure of a point cloud data and weight data acquisition device provided by the present invention;

[0035] Figure 2 This is a schematic diagram of weight compensation under tilt angle provided by the present invention;

[0036] Figure 3 This is a flowchart illustrating a non-contact three-dimensional reconstruction method for small livestock provided by the present invention;

[0037] Figure 4 This invention provides a multi-view point cloud initial position map and a coarse registration result map;

[0038] Figure 5 This is a comparison image of the point cloud preprocessing results before and after the point cloud preprocessing provided by the present invention.

[0039] Figure 6 This is a result image of the overlapping part extracted after redefining the coordinate system of the point cloud provided by the present invention;

[0040] Figure 7 This is a schematic diagram of the pairwise point cloud fine registration results provided by the present invention;

[0041] Figure 8 This is a schematic diagram of the registration result including the plane provided by the present invention;

[0042] Figure 9 This is a schematic diagram of the curves for automatically extracting parameters from cluster analysis provided by the present invention;

[0043] Figure 10 This is a schematic diagram of the three-dimensional reconstruction results provided by the present invention;

[0044] Figure 11 This is a flowchart of the overall execution process of the device provided by the present invention;

[0045] Figure 12 This is a schematic diagram of the structure of the electronic device provided by the present invention.

[0046] Figure Labels

[0047] 1. Movable platform; 2. Telescopic camera mount; 3. Triangular stabilizer; 4. Depth camera; 5. Multi-camera synchronization device; 6. Pulse generator; 7. Limiting guide rail; 8. Limiting component; 9. Enlarged weighing pan; 10. Communicable electronic scale; 11. Attitude sensor; 12. Motor; 13. High-precision lead screw; 1201. Processor; 1202. Storage module; 1203. Data acquisition interface; 1204. Communication module; 1205. Communication bus. Detailed Implementation

[0048] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] Example

[0050] See appendix Figure 1-12 The following description, in conjunction with figures, describes the non-contact three-dimensional reconstruction method and apparatus for small livestock and poultry of the present invention. The present invention can be applied to point cloud data acquisition and three-dimensional reconstruction of small livestock and poultry, such as rabbits, chickens, and ducks. Figure 1This is a structural schematic diagram of the small-scale non-contact 3D reconstruction device for livestock and poultry provided by the present invention. The device includes: a movable platform 1, a camera extension unit, an image acquisition unit, and a weight acquisition unit. An aluminum plate is placed at the bottom of the movable platform 1 as its base, and casters are installed below the base. The camera extension unit includes a high-precision lead screw 13, a motor 12, a limiting guide rail 7, a retractable camera frame 2, a limiting component 8, a pulse generator 6, and a camera tripod stabilizing bracket 3. The high-precision lead screw 13 and the motor 12 are bolted to the bottom aluminum plate of the movable platform 1. The motor 12 is connected to the high-precision lead screw 13, which is a ball screw, and the motor 12 is a stepper motor 12. The limiting guide rail 7 is bolted to the upper end of the main aluminum profile frame of the movable platform 1. The retractable camera frame 2 is bolted to the slider of the high-precision lead screw 13. The limit guide rail 7 is on the linear slider; the limit component 8 is fixed on the frame of the movable platform 1; the pulse generator 6 is electrically connected to the motor 12, and the pulse generator 6 cooperates with the limit switch; the camera tripod stabilizer 3 is fixed on the telescopic camera frame 2, and the angle with the vertical plane is 15°; the image acquisition unit includes three depth cameras 4 and a multi-camera synchronization device 5. The three depth cameras 4 are mounted on the camera tripod stabilizer 3, and the three depth cameras 4 are camera 4a / camera 4b / camera 4c. The lowest edge of their field of view coincides with the enlarged weighing pan 9. The weight acquisition unit includes a communicable electronic scale 10, an enlarged weighing pan 9, and an attitude sensor 11. The communicable electronic scale 10 is fixed to the middle position of the aluminum plate on the bottom surface of the movable platform 1 by bolts; the enlarged weighing pan 9 is placed on the communicable electronic scale 10; the attitude sensor 11 is fixed to the bottom surface of the movable platform 1 by bolts and is adjacent to the communicable electronic scale 10.

[0051] The retractable camera frame 2 is rigidly connected to the slider of the high-precision lead screw 13 and the linear slider of the limit guide rail 7. The camera triangle stabilizing bracket 3 is bolted to the retractable camera frame 2. The pulse generator 6 works with the limit switch to control the retractable camera frame 2 to reciprocate between the farthest extended position and the shortest retracted distance.

[0052] The multi-machine synchronization device 5 is connected to three depth cameras 4 via a synchronization line; the multi-machine synchronization device 5, the three depth cameras 4, the communicable electronic scale 10, and the attitude sensor 11 are externally connected to electronic devices.

[0053] The system includes a small mobile platform, a camera extension unit, an image acquisition unit, and a weight acquisition unit. Specifically, the mobile platform 11 has an overall aluminum profile frame using 3030 standard profiles, measuring 660mm in length, 530mm in width, and 770mm in height, ensuring stability and durability. An aluminum plate serves as the base, and 3-inch casters support flexible movement. The motor 12 is connected to a high-precision lead screw 13 and bolted to the bottom aluminum plate. Limiting guide rails 7 are bolted to the top of the aluminum profile frame.

[0054] The camera extension unit is mainly constructed from 2020 standard profiles and is bolted to the linear slider of the lead screw and limit guide rail 7. The limit component 88 is fixed to the frame to ensure the stability of the linear movement of the support 2. The lead screw module is a 300mm stroke SGX ball screw, and the motor 12 is a 5756 stepper motor 12. The pulse generator 6 and the limit switch limit the reciprocating movement of the support between the farthest extension position and the shortest retraction distance. At the shortest retraction distance, the distance between the two supports is approximately 577mm, and at the extended position, it is approximately 1150mm. The depth cameras 4 (4a, 4b, 4c) are fixed to the telescopic support via camera triangular stabilizing brackets 3. To avoid laser comparison between the two depth cameras 4, the angle between the triangular stabilizing bracket 3 and the vertical plane is designed to be 15°, and the fixed height is such that the lowest edge of the field of view of the depth camera 4 coincides with the enlarged weighing pan 9, with a height of approximately 550mm from the ground.

[0055] The communicable electronic scale 10 is fixed in the center of the bottom surface, with an enlarged weighing pan 9 on top, measuring 590×470×5mm and made of acrylic. An attitude sensor 11 is also fixed on the aluminum plate on the bottom surface. All devices are connected to electronic equipment via USB 3.0 and 485 data transmission cables.

[0056] The movable platform 1 is pushed to the vicinity of the livestock cage to be tested. A high-precision lead screw 13 drives the depth camera 4 to unfold, obtaining the required field of view distance for the depth camera. The livestock to be tested is placed on the enlarged weighing pan 9, and its weight signal is acquired. During this process, the roll angle and pitch angle of the platform are acquired in real time through the attitude sensor 11. The tilt compensation equation is used to compensate for the platform's attitude in real time, calibrating the error caused by uneven ground. Figure 2 .

[0057] In one embodiment, when the mobile platform is at an angle to the horizontal plane, the tilt angle compensation equation is used to correct the weight error, as in formula (1).

[0058]

[0059] Where G is the calibrated weight, W is the weight read from the scale, θ is the roll angle, and α is the pitch angle.

[0060] When the weight signal of the livestock under test is stable, the multi-machine synchronization device 5 can be used to drive the depth camera 4 to simultaneously acquire the initial point cloud data of the livestock under test from three perspectives.

[0061] The following is combined Figures 3-12 This invention describes a non-contact three-dimensional reconstruction method for small livestock and poultry. Figure 3 This is a flowchart illustrating a non-contact three-dimensional reconstruction method for small livestock provided by the present invention, including:

[0062] 1. Using depth cameras 4 mounted on the top and side camera telescopic mounts of the device, raw point cloud data from three perspectives—the back, left, and right—of the livestock under test are simultaneously acquired. Depth cameras 4 can be Orbbec Gemini2 binocular structured light cameras, which provide a depth measurement range as close as 0.15m, are suitable for small spatial fields of view, and are equipped with a Depthto Color (D2C) model. Hardware can be used to align the intrinsic parameters of the depth image with those of the color image to obtain a color point cloud.

[0063] Three Gemini2 cameras began acquiring depth images, which were then converted into initial point cloud data based on camera intrinsic parameters. Figure 4 This invention provides an initial position map and a coarse registration result map of multi-view point clouds. In one embodiment, after obtaining point cloud data from three views, point selection and calibration are performed manually using CloudCompare software to obtain rigid transformation matrices from cameras 1 and 2 relative to the main camera. The point clouds collected by different cameras are initially aligned using the matrix to achieve coarse registration. The aforementioned camera extension unit ensures that the relative positions of the cameras remain essentially unchanged each time the telescopic frame is extended.

[0064] 2. Process and register the multiple point cloud data to generate the overall point cloud data of the livestock and poultry to be tested, and complete the three-dimensional reconstruction.

[0065] For example, registration can be performed using algorithms such as GICP to generate overall point cloud data of the livestock to be tested from multiple point cloud datasets. Accordingly, preprocessing steps may also be included before registration.

[0066] Before registering the multiple initial point cloud data to generate the overall point cloud data of the livestock to be tested, the process includes: using pass-through filtering to retain the weighing pan area containing the livestock to be tested, and deleting other points to reduce redundancy and interference; using voxel downsampling to reduce point cloud density, dividing the space into voxels with a side length of 0.004m, and averaging the points within each voxel into one point, using this uniform sampling method to preserve the overall geometric structure and significantly reduce the number of points, accelerating subsequent calculations; using radius filtering to remove outliers, constructing a KD tree, establishing point cloud topology, and counting the number of neighboring points within a radius r = 0.025m; if less than 100, they are considered outliers and removed. The preprocessing process is as follows: Figure 5As shown.

[0067] Before registering the multiple initial point cloud data to generate the overall point cloud data of the livestock and poultry to be tested, the method further includes: for each preprocessed point cloud data, performing planar point cloud fitting based on the RANSAC algorithm to readjust the planar attitude so that the point clouds from different perspectives are placed on the same horizontal reference and the coordinate system of different perspectives is unified.

[0068] First, the RANSAC algorithm is used to extract the plane with the most interior points in the point cloud. Let the normal vector of the segmented plane be M. The entire point cloud is translated along the Z-axis, making the average Z-value of all points in the plane zero. The direction of the plane normal vector is then determined. If the median Z-axis of the point cloud is negative after translation, it indicates that the plane is oriented opposite to the expected coordinate axis direction, and it needs to be flipped 180° along the Y-axis to correct the coordinate system. Subsequently, the normal vector M is aligned with the Z-axis, so that the overall transformation matrix is ​​applied to the global point cloud, making the plane horizontal and the Z-axis pointing upward in space. Through this step, point clouds from different perspectives are placed under the same horizontal reference, creating a unified pose basis for subsequent extraction of overlapping regions.

[0069] To standardize the pose of the master plane fitted from the point cloud data, the system needs to construct a rotation matrix R to rotate the plane's normal vector to the Z-axis direction of the world coordinate system. To achieve this, the Rodrigues rotation formula is used to construct a rigid transformation matrix with the minimum rotation angle. Specifically:

[0070] First, calculate the rotation axis vector k, which is the cross product of M and Z, as shown in equation (2):

[0071]

[0072] Normalize the rotation axis vector to obtain the unit vector:

[0073]

[0074] Next, calculate the rotation angle θ, which is the angle between M and Z:

[0075]

[0076] Construct the antisymmetric matrix K of the rotation axis:

[0077]

[0078] Finally, construct the Rodrigues rotation matrix R:

[0079] R = I + sinθ·K + (1 - cosθ)·K 2 (6)

[0080] By applying the rotation matrix R to the original point cloud coordinate system, its principal normal can be aligned to the Z-axis direction of the world coordinate system, thereby achieving attitude unification and facilitating spatial registration of point clouds from multiple perspectives.

[0081] In one embodiment, the point cloud data acquired by the three depth cameras 4 from the back, left, and right sides have a small overlap, which cannot be directly achieved using traditional registration algorithms such as Iterative Closest Point (GICP). Therefore, in this embodiment, based on the unified pose, with the centroid of the plane as the origin and the normal vector M aligned with the Z-axis, and the maximum Z-axis coordinate value h representing the top of the overlapping portion of all views, points with a height within the range of 0.5hh for each view are retained, which are the overlapping areas. Figure 6 Subsequently, pairwise GICP registration was performed on the three extracted overlapping regions, such as... Figure 7 To ensure algorithm convergence and control computational load, the maximum point-to-point distance and the maximum number of iterations are set. The algorithm iteratively searches for the nearest point in the target point cloud for each source point as its counterpart. The optimal rigid transformation is solved using the least squares method and finally applied to the global point cloud.

[0082] To avoid introducing non-physical attitude drift (such as pitch and roll) during small-view reconstruction using Iterative Closest Point (GICP) registration, this invention further designs an optimization strategy based on prior attitude constraints. After obtaining the GICP results, the yaw angle is extracted from the transformation matrix, a new matrix containing only yaw rotation is reconstructed, and the translation vector is corrected accordingly to maintain horizontal consistency in point cloud fusion. This attitude constraint mechanism significantly improves the consistency and stability of multi-view point cloud alignment while ensuring registration accuracy. It is particularly suitable for reconstruction tasks with limited spatial scale and weak features in small animals, and is an engineering robust strategy. The final registered point cloud is as follows: Figure 8 .

[0083] To suppress attitude drift during point cloud fine registration, a registration strategy based on yaw constraint is proposed, which retains only the rotation component around the Z-axis to avoid interference from non-physical pitch and roll on reconstruction accuracy. The following is the derivation of the formula for this strategy.

[0084] The original rotation matrix R can be decomposed into Euler angle form:

[0085] R = R z (ψ)·R y (θ)·R x (φ) (7)

[0086] Where ψ is the heading angle, θ is the pitch angle, and φ is the roll angle.

[0087] The heading angle ψ can be obtained from the elements of the rotation matrix R:

[0088] ψ=arctan2(R 21 ,R 11 (8)

[0089] Construct a rotation matrix Rz(ψ) containing only Yaw:

[0090]

[0091] To ensure consistency in the transformed coordinate system, the translation vector t' needs to be re-estimated. Let the centroid of the source point cloud be... The centroid of the target point cloud is have:

[0092]

[0093] The final constrained rigid transformation matrix T' is constructed as follows:

[0094]

[0095] Where 0T = [0,0,0].

[0096] In this example, after precise registration of the point clouds, the three point clouds are merged. Subsequently, the portion of the livestock to be tested needs to be automatically separated and extracted from the merged point cloud, and the background plane and other noise are removed.

[0097] First, RANSAC plane segmentation is performed on the merged point cloud, using a stricter threshold to separate the bottom plane. Then, DBSCAN clustering analysis is performed. Since clustering parameters are difficult to set directly, a suitable ε parameter is automatically estimated based on the inflection point rule of the k-distance curve. For each point in the point set p, the distance to its k-th nearest neighbor is calculated, and the points are sorted in ascending order. A curve representing the two-dimensional point sequence (i.e., the k-distance curve) is plotted, and the inflection point of this curve is found. The corresponding ordinate is the suitable ε value. Figure 9 After obtaining the ε value, density clustering is performed, and the results are returned as a label array, where -1 marks noise points. The number of points in all non-noise clusters is counted, and the cluster with the largest number of points is selected as the measured livestock point cloud cluster, such as... Figure 10 .

[0098] This invention proposes a multi-view non-contact 3D reconstruction algorithm for small livestock and poultry. The overall process revolves around synchronous acquisition, attitude correction, and registration fusion: Multiple depth cameras with a fixed architecture acquire raw point cloud data from three perspectives of the livestock under multi-camera synchronous control. After coarse registration based on camera extrinsic parameters, the attitude coordinate system of each point cloud is unified by combining plane fitting and normal alignment methods. Subsequently, overlapping areas of the point clouds are extracted, and fine registration is performed using the Iterative Closest Point (GICP) algorithm, while introducing a rigid transformation constraint that retains only the heading angle to avoid attitude drift. Finally, adaptive clustering is performed on the fused point clouds to extract the complete geometric structure of the livestock, achieving high-precision and high-stability 3D reconstruction. This algorithm is optimized for application scenarios with small spaces, small animals, and low feature density, and has advantages such as strong robustness, computational efficiency, and suitability for deployment on mobile platforms.

[0099] Point cloud registration evaluation test:

[0100] Multiple point cloud acquisition and reconstruction experiments were conducted in the rabbitry to test the registration error and the registration time required.

[0101] Table 1

[0102]

[0103]

[0104] Where, T1: Preprocessing time / s; T2: Registration time / s; T3: Total time / s; Fitness1: Registration overlap between point clouds of camera 1 and main camera; Fitness2: Registration overlap between point clouds of camera 2 and main camera; RMSE1: Root mean square error of registration between point clouds of camera 1 and main camera; RMSE2: Root mean square error of registration between point clouds of camera 2 and main camera.

[0105] The time described in Table 1 is the time required for point cloud data from preprocessing to registration. Since small livestock and poultry are small in size, the point cloud data is greatly reduced after preprocessing, which greatly shortens the time and improves efficiency.

[0106] Point cloud accuracy test:

[0107] The body length and width of the registered livestock point clouds were measured and compared with the actual values ​​measured manually. The enlarged weighing pan 9 has graduations on its edge to facilitate reading the body length and hip width of the livestock in their current state when the point cloud image was acquired. The experimental subject was a meat rabbit, and the unit of measurement for length was millimeters (mm).

[0108] Table 2

[0109]

[0110] Where L_true is the true body length of the rabbit; W_true is the true hip width of the rabbit; L_pc is the body width measured from the point cloud; W_pc is the hip width measured from the point cloud; L_error is the body length measurement error; W_error is the hip width measurement error; L_P is the body length measurement accuracy (%); W_P is the hip width measurement accuracy (%).

[0111] As shown in Table 2, the accuracy of the current point cloud data measurement is about 96%, and the absolute error is within 20mm, which can meet the requirements of practical applications.

[0112] It should be noted that the Depth Camera 4 is affected by light intensity, so strong sunlight should be avoided when using it.

[0113] The device embodiments provided in this invention are for implementing the above-described method embodiments. For specific processes and details, please refer to the above-described method embodiments, which will not be repeated here.

[0114] Figure 11 The overall execution flow diagram of the small-scale non-contact 3D reconstruction device for livestock and poultry provided by this invention is shown in the figure. This invention uses an industrial integrated computing terminal to uniformly schedule and process data from various components. The overall operation flow of the device includes steps such as weight acquisition, attitude compensation, synchronous point cloud acquisition, point cloud preprocessing, attitude unification, fine registration, and point cloud clustering and segmentation. Through the program execution logic inside the controller, after the livestock and poultry are placed on the enlarged weighing pan 9, the real-time weight data output by the electronic scale is obtained through the serial port interface, and the pitch and roll angles of the attitude sensor 11 are read simultaneously. The corrected weight value is calculated based on the built-in tilt compensation equation to eliminate the influence of the platform's non-horizontal nature on the weighing accuracy.

[0115] After the weight values ​​stabilize, the processor 1201 controls the multi-camera synchronization device 5 to send synchronization trigger signals to the three depth cameras 4, acquiring depth image data of the back, left side, and right side of the livestock under test. The acquired images are converted into 3D point clouds through the camera's internal parameters and transmitted to the data acquisition module via a high-speed USB 3.0 interface. The point clouds are cached in memory according to the camera number for subsequent processing. The system then performs point cloud preprocessing steps, including pass-through filtering to extract the weighing pan area, voxel downsampling to unify density, and radius filtering based on KD trees to remove outliers, ensuring the accuracy and efficiency of subsequent registration and modeling.

[0116] The processor 1201 then calls the point cloud attitude calibration module to extract the maximum plane from each point cloud using the RANSAC algorithm and align the coordinate system based on its normal vector. After unifying the point clouds from the three views to the same attitude reference, the processor 1201 extracts their overlapping areas and performs GICP fine registration one by one. At the same time, it introduces a rigid transformation constraint that retains only the heading angle to suppress the attitude drift problem common in small animal reconstruction and ensure the consistency and stability of point cloud fusion.

[0117] The fused point cloud data enters the clustering analysis module. Processor 1201 first performs a planar removal operation to eliminate the background, and then uses the DBSCAN algorithm to cluster the remaining point cloud. The system automatically estimates the clustering parameter ε value according to the inflection point rule of the k-distance curve to adapt to different individual differences, and finally extracts the cluster with the largest number of points as the target livestock and poultry point cloud data to complete the 3D reconstruction.

[0118] Figure 12 This is a schematic diagram of the electronic device provided by the present invention. The electronic device further includes: a processor 1201, a storage module 1202, a data acquisition interface 1203, a communication module 1204, and a communication bus 1205. The processor 1201, storage module 1202, data acquisition interface 1203, and communication module 1204 communicate with each other via the communication bus 1205. The processor 1201 can call the logic instructions in the storage module 1202 to implement functions such as weight compensation, point cloud acquisition control, attitude registration, and reconstruction according to a predetermined process. The data acquisition interface 1203 includes a USB 3.0 interface and a serial communication interface, used to connect three depth cameras 4, an electronic scale, and an attitude sensor 11 respectively to achieve data interaction. The communication module 1204 supports Ethernet or wireless communication protocols and is used to upload the final reconstructed data and weight information to a remote server or display terminal. The storage module 1202 can be an embedded solid-state memory to store the original point cloud, intermediate results, and historical records.

[0119] The electronic device described in this invention can run an embedded operating system (such as Linux or Windows IoT) and automatically execute the above processes through a background daemon. Furthermore, the device can be loaded with a graphical interface or remote management module, supporting real-time display of device status and data feedback, providing technical support for non-contact, automated, and high-precision 3D modeling in livestock and poultry farming environments. The software program can also be packaged into an independent computer-readable storage medium for use by industrial hosts.

[0120] The present invention relates to a small-scale non-contact three-dimensional reconstruction method and apparatus for livestock and poultry, which can be used to measure the body size of rabbits and other animals in farms. The system can measure rabbit weight, acquire point clouds from multiple perspectives in real time, and cause no stress or interference to the rabbits.

[0121] The embodiments described in this specification are presented in a progressive manner. The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A small-scale non-contact three-dimensional reconstruction device for livestock and poultry, characterized in that, include: Mobile platform (1), camera extension unit, image acquisition unit, weight acquisition unit; The bottom of the movable platform (1) is covered with an aluminum plate as the base, and casters are installed below the base. The camera extension unit includes a high-precision lead screw (13), a motor (12), a limiting guide rail (7), a telescopic camera frame (2), a limiting component (8), a pulse generator (6), and a camera tripod stabilizer (3). The high-precision lead screw (13) and the motor (12) are fixed to the bottom aluminum plate of the movable platform (1) by bolts. The motor (12) is connected to the high-precision lead screw (13). The high-precision lead screw (13) is a ball screw, and the motor (12) is a stepper motor (12). The limiting guide rail (7) is fixed to the upper end of the main aluminum profile frame of the movable platform (1) by bolts. The telescopic camera frame (2) is fixed to the slider of the high-precision lead screw (13) and the linear slider of the limiting guide rail (7) by bolts. The limiting component (8) is fixed to the frame of the movable platform (1). The pulse generator (6) The pulse generator (6) is electrically connected to the motor (12), and the pulse generator (6) is coordinated with the limit switch; the camera tripod stabilizer (3) is fixed on the telescopic camera frame (2), and the angle between it and the vertical plane is 15°; the image acquisition unit includes three depth cameras (4) and a multi-machine synchronization device (5). The three depth cameras (4) are mounted on the camera tripod stabilizer (3). The three depth cameras are camera 4a / camera 4b / camera 4c. The lowest edge of their field of view coincides with the enlarged weighing pan (9). The weight acquisition unit includes a communicable electronic scale (10), an enlarged weighing pan (9), and an attitude sensor (11). The communicable electronic scale (10) is fixed to the middle position of the aluminum plate on the bottom surface of the movable platform (1) by bolts. The enlarged weighing pan (9) is placed on the communicable electronic scale (10). The attitude sensor (11) is fixed to the bottom surface of the movable platform (1) by bolts and is adjacent to the communicable electronic scale (10).

2. The small-scale non-contact three-dimensional reconstruction device for livestock and poultry according to claim 1, characterized in that, The telescopic camera frame (2) is rigidly connected to the slider of the high-precision lead screw (13) and the linear slider of the limit guide rail (7). The camera triangle stabilizer (3) is bolted to the telescopic camera frame (2). The pulse generator (6) works with the limit switch to control the telescopic camera frame (2) to reciprocate between the farthest extended position and the shortest retracted distance.

3. The small-scale non-contact three-dimensional reconstruction device for livestock and poultry according to claim 1, characterized in that, The multi-machine synchronization device (5) is connected to three depth cameras (4) via a synchronization line; the multi-machine synchronization device (5), the three depth cameras (4), the communicable electronic scale (10), and the attitude sensor (11) are externally connected to electronic devices.

4. A method for non-contact three-dimensional reconstruction of small livestock and poultry, based on any one of the non-contact three-dimensional reconstruction devices for small livestock and poultry as described in claims 1-3, characterized in that, Includes the following steps: S1: Push the movable platform (1) as described in claim 1 to the side of the livestock and poultry cage to be tested, and drive the high-precision lead screw (13) through the electronic control motor (12) to drive the telescopic camera frame (2) to unfold along the limiting guide rail (7) so that the three depth cameras (4) reach the required shooting field distance. S2: Place the livestock to be tested on the enlarged weighing pan (9). The electronic device reads the weight data from the communicable electronic scale (10) and simultaneously receives the roll angle and pitch angle of the movable platform (1) obtained by the attitude sensor (11). The tilt angle compensation equation is then used to calculate the weight data. Correct the weight data to obtain the corrected weight, where G is the corrected weight, W is the weight read by the communicable electronic scale (10), θ is the roll angle, and α is the pitch angle; S3: When the weight signal is stable, the electronic device controls the multi-machine synchronization device (5) to drive the three depth cameras (4) to simultaneously collect the raw point cloud data from the back, left and right sides of the livestock to be tested. S4: Process and register the raw point cloud data from three perspectives to generate the overall point cloud data of the livestock and poultry to be tested, and complete the three-dimensional reconstruction.

5. The non-contact three-dimensional reconstruction method for small livestock and poultry according to claim 4, characterized in that, Before processing and registering the original point cloud data from the three perspectives in step S4, a coarse registration step for the point cloud is also included: manually selecting and calibrating the original point cloud data collected by the three depth cameras (4) using software to obtain the rigid transformation matrix of the camera relative to the main camera, and using this matrix to map the point cloud of the camera to the coordinate system of the main camera to achieve preliminary alignment of the point cloud.

6. The non-contact three-dimensional reconstruction method for small livestock and poultry according to claim 4, characterized in that, Step S4, after coarse registration of the point cloud and before generating the overall point cloud data, also includes a point cloud preprocessing step: S41: Perform pass-through filtering on the coarsely registered point cloud, retain the region of interest point cloud containing the livestock and poultry to be tested and the enlarged weighing pan (9)(9), and delete redundant interference points; S42: Perform voxel downsampling on the point cloud after pass-through filtering, divide the space into voxels with a side length of 0.004m, take the average coordinate of the points in each voxel as the representative point, and reduce the point cloud density; S43: Perform radius filtering on the point cloud after voxel downsampling, construct a KD tree, count the number of neighboring points within a radius of 0.025m, and remove points with fewer than 100 neighboring points as outliers.

7. The non-contact three-dimensional reconstruction method for small livestock and poultry according to claim 6, characterized in that, Step S4, after point cloud preprocessing and before generating the overall point cloud data, also includes a coordinate system step: S44: For each preprocessed point cloud, a random sampling consensus algorithm is used to fit a plane, and the plane with the most interior points is extracted as the reference plane to obtain its normal vector. S45: Translate the point cloud along the Z-axis to make the average Z-coordinate of the points in the reference plane zero. If the Z-median of the point cloud is negative after translation, then flip it 180° along the Y-axis. S46: Construct a rotation matrix using the Rodrigues rotation formula, rotate the reference plane normal vector to coincide with the Z-axis, and apply this rotation matrix to the point cloud to place the point clouds from the three views in the same coordinate system.

8. The non-contact three-dimensional reconstruction method for small livestock and poultry according to claim 7, characterized in that, The process of generating the overall point cloud data of the livestock and poultry to be tested in step S4 includes: S47: Using a unified coordinate system as a reference, obtain the maximum value h of the Z-axis of the point cloud, extract the points in the 0.5hh interval of the Z-coordinate of each viewpoint, and form the overlapping area point cloud; S48: Using the point cloud of the main camera 4b as the target point cloud and the point clouds of cameras 4a and 4c as the source point clouds, perform pairwise iterative close point registration on the point clouds of the overlapping region to solve for the optimal rigid transformation matrix. S49: Extract the heading angle from the rigid transformation matrix, construct a rotation matrix containing only the heading angle, re-estimate the translation vector, construct the constrained rigid transformation matrix, apply it to the global point cloud, and obtain the final registered point cloud data.

9. The non-contact three-dimensional reconstruction method for small livestock and poultry according to claim 8, characterized in that, After generating the overall point cloud data of the livestock and poultry to be tested in step S4, the step also includes a point cloud post-processing step: S410: Perform planar segmentation on the final registered point cloud, separating and deleting the bottom background point cloud; S411: Perform DBSCAN clustering analysis on the remaining point cloud, calculate the distance from each point to the k-th nearest neighbor, plot the k-distance curve, and determine the clustering parameters based on the inflection point; S412: Density clustering is performed based on clustering parameters, and the non-noise cluster with the most points is selected as the livestock and poultry point cloud cluster to be tested, thus completing the three-dimensional reconstruction.

10. A non-contact three-dimensional reconstruction method for small livestock and poultry according to claim 4, characterized in that, In step S3, when the three depth cameras (4) collect the original point cloud data, the depth image and the color image intrinsic parameters are aligned by the built-in model so that the point cloud contains color information. After the three-dimensional reconstruction is completed in step S4, the body length and body width parameters of the livestock to be measured are extracted and compared with the real values ​​read manually. The accuracy of body length and hip width measurement is not less than 89.7%, and the absolute error is controlled within 20mm.