A handheld non-contact livestock body length measuring device and a livestock body length measuring method

By using a handheld, contactless livestock body size measurement device and employing multi-feature point cloud registration technology with an RGBD camera and edge computing, the hardware limitations and scene restrictions of traditional equipment have been overcome. This enables flexible and rapid livestock body size measurement, applicable to scenarios such as cattle sheds, pastures, and grazing areas, and establishes digital growth records.

CN121304767BActive Publication Date: 2026-03-17NAT ANIMAL HUSBANDRY TERMINAL +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional non-contact livestock body size measurement devices have limitations in hardware architecture, application scenarios, and strict requirements on livestock posture. They also have significant blind spots, especially when there is a large difference in size between adult cattle and calves. Furthermore, they are sensitive to outdoor environments and light, resulting in low data acquisition efficiency.

Method used

A handheld, contactless livestock body size measurement device was designed. It uses an RGBD camera and an edge computing terminal to identify ear tags through a lightweight deep learning model. It performs point cloud registration by combining a multi-feature constrained RANSAC algorithm and a multi-resolution piecewise error function, automatically calculates body size parameters, and adjusts the posture through a human-computer interaction terminal to achieve flexible measurement.

Benefits of technology

It improves data acquisition efficiency, reduces the professional skills required of operators, avoids measurement blind spots and environmental dependence, achieves second-level single measurement, establishes traceable digital growth archives, and is suitable for various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304767B_ABST
    Figure CN121304767B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of livestock body size measurement, and specifically provides a handheld non-contact livestock body size measurement device and a livestock body size measurement method. The device comprises an image acquisition end, an edge calculation end and a human-computer interaction end. The edge calculation end is used for identifying an encoding feature with a characteristic target livestock identity in an image sequence, multi-view point cloud registration, body size key point extraction and body size parameter calculation. In the process of target livestock body size measurement, the image acquisition end target livestock acquisition angle is selected through the human-computer interaction end, the image sequence and point cloud of the target livestock are obtained from different angles, and the body size parameters and the encoding feature obtained by the edge calculation end are shown. The present application realizes handheld non-contact livestock body size measurement. The handheld mode can flexibly adjust the distance and angle according to the size of the cattle, avoids the measurement blind area caused by the fixed angle, and especially solves the adaptation problem caused by the huge difference in body size between adult cattle and calves.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of livestock body size measurement technology, and particularly relates to a handheld non-contact livestock body size measurement device and a livestock body size measurement method. Background Technology

[0002] With the continuous advancement of modern technology, animal husbandry is also constantly evolving, and smart animal husbandry has become a hot topic in the industry. Regular monitoring of livestock body size has significant economic and technological value in modern livestock production, and its core advantages can be summarized as follows: First, it improves production efficiency. For example, precise feeding management based on changes in chest / abdominal circumference can reduce feed waste while ensuring livestock growth; by establishing individual growth curves, the optimal slaughter time can be selected, shortening the slaughter cycle as much as possible. Second, it optimizes genetic breeding. For example, selecting breeding stock with superior body size traits increases the probability of inheriting these traits. In the past, livestock body size measurements were performed manually, which was time-consuming and labor-intensive, easily causing stress in livestock and resulting in personal injury. Furthermore, the scale of cow farming was low, with a high proportion of farm-raised and grazing livestock, typically lacking the conditions for contact measurement. Currently, contactless livestock body size measurement devices are available on the market. The mainstream solutions primarily use RGBD or TOF cameras for data acquisition. Three cameras are mounted on a fixed frame, simultaneously acquiring local point clouds of the livestock from different perspectives (left, right, and top). These point clouds are then transmitted to a computer via data cables, where the computer performs subsequent processes such as point cloud registration, stitching, target extraction, feature point extraction, and body size calculation. While this type of solution enables contactless livestock measurement, it suffers from the following problems:

[0003] First, the fixed field of view (FOV) and measurement distance of the fixed-installation three-camera system cannot be adaptively adjusted. The size difference between adult cattle and calves can be 3-5 times, and the fixed viewing angle easily leads to measurement blind spots.

[0004] Secondly, for wild pastures, a stable 220V power supply must be provided, so an additional generator is required; a dedicated measurement channel needs to be built, and livestock must be manually driven through the measurement channel alone to avoid obstruction; in addition, outdoor light and bad weather have a significant impact on the depth error and noise level of the TOF camera.

[0005] Third, when livestock pass through the measurement channel, they are required to maintain a standard standing posture (limbs perpendicular to the ground, head looking straight ahead). When the head shifts up and down or left and right, it has a significant impact on body height and body length.

[0006] Therefore, traditional live cattle body size measurement schemes have serious limitations in hardware architecture and application scenarios, and there is an urgent need to design a flexible, non-contact, automatic measurement scheme. Summary of the Invention

[0007] In view of this, the present invention aims to provide a handheld non-contact livestock body size measurement device and a livestock body size measurement method. A handheld device is designed so that the operator can collect livestock data from three perspectives, which solves the problem of low data collection efficiency in traditional livestock measurement. Furthermore, an innovative design is made for the point cloud registration process, which greatly improves the accuracy and efficiency of point cloud registration.

[0008] To achieve the above objectives, the technical solution created by this invention is implemented as follows:

[0009] This invention provides a handheld, contactless livestock body size measuring device, comprising:

[0010] Image acquisition unit, used to acquire image sequences and point clouds of the target livestock;

[0011] The edge computing endpoint is configured to perform:

[0012] Identify encoded features in image sequences that characterize the identity of the target livestock;

[0013] Register the point clouds from multiple perspectives to generate a 3D point cloud model of the target livestock, and extract the body size key points based on the 3D point cloud model and the anatomical features of the target livestock.

[0014] The body size parameters of the target livestock are determined by the distance between key points on the body size scale.

[0015] Associate the body size parameters, coding features, and collection date of the same target livestock;

[0016] During the measurement of the target livestock's body size, the human-computer interaction terminal allows users to select the target livestock's acquisition perspective from the image acquisition terminal. This process acquires image sequences and point clouds of the target livestock from different perspectives, and displays the body size parameters and encoded features obtained from the edge computing terminal.

[0017] Preferably, the image acquisition end is an RGBD camera.

[0018] Preferably, after selecting the target livestock's acquisition viewpoint through the human-computer interaction terminal, the human-computer interaction terminal displays the preset pose contour of the target livestock at the current acquisition viewpoint, and adjusts the pose of the image acquisition terminal according to the preset pose contour.

[0019] Preferably, the image acquisition end acquires a front view image sequence, a side view point cloud, and a rear view point cloud.

[0020] Preferably, the identified image sequence contains coded features characterizing the identity of the target livestock, including:

[0021] A lightweight deep learning model is used to detect the ear tag region of the target livestock frame by frame in the front view image sequence;

[0022] If a preset number of frames are detected in the current image sequence containing a valid ear tag region, then detection stops.

[0023] The ear tag numbers in images of a preset number of frames are identified using an OCR algorithm.

[0024] A time-series voting strategy is adopted to determine the final ear tag number by majority vote on the recognition results of a preset number of frames. The final ear tag number is then used as a coding feature that can represent the identity of the target livestock.

[0025] The preferred lightweight deep learning model is the yolov5-tiny model.

[0026] Preferably, registration of multi-view point clouds includes:

[0027] Extract FPFH features, local curvature of each point, and normal vector of each point from the side view point cloud and the back view point cloud;

[0028] Perform FPFH feature registration on the side view point cloud and the back view point cloud to generate an initial set of registered point pairs;

[0029] In the iterative framework of the RANSAC algorithm, a dual geometric constraint is applied to the randomly sampled initial registration point pairs. The dual geometric constraint includes: the local curvature difference of the initial registration point pair is less than a first threshold, and the angle between the normal vectors of the initial registration point pair is less than a second threshold.

[0030] After iterative convergence, the coarse registration transformation matrix of the side-view point cloud and the back-view point cloud is determined based on the inlier rate.

[0031] Using the coarse registration transformation matrix as the initial value, the side-view point cloud and the back-view point cloud are registered in at least two resolution spaces. The error loss function set for each resolution space is used for piecewise iterative optimization. In the low-resolution space, the iterative nearest point algorithm is used for fast convergence, and in the other resolution spaces, the generalized iterative nearest point algorithm is used for local geometric alignment optimization to achieve alignment of the side-view point cloud and the back-view point cloud.

[0032] Preferably, registration of the side-view point cloud and the back-view point cloud is performed in at least two resolution spaces, and piecewise iterative optimization is performed using an error loss function set for each resolution space, including:

[0033] The side-view point cloud and the rear-view point cloud are first downsampled to a low-resolution space. The coarse registration transformation matrix is ​​used as the initial value. The first downsampled side-view point cloud and the rear-view point cloud are registered by ICP to obtain the first fine matching transformation matrix.

[0034] The side-view point cloud and the back-view point cloud are downsampled to the medium resolution space. The first fine matching transformation matrix is ​​used as the initial value. The second downsampled side-view point cloud and the back-view point cloud are registered by GICP to obtain the second fine matching transformation matrix.

[0035] The side-view and rear-view point clouds are downsampled to a high-resolution space. Using the second fine-matching transformation matrix as the initial value, the side-view and rear-view point clouds after the third downsampling are registered using GICP to obtain the third fine-matching transformation matrix.

[0036] Preferably, the key points of body size include at least one of the following:

[0037] Shoulder point, nail point, chest measurement point, and ischial tuberosity point.

[0038] Another aspect of this invention provides a method for measuring the body size of livestock, comprising:

[0039] Select the acquisition viewpoint through the human-computer interaction terminal, and move the handheld non-contact livestock body size measuring device to the currently selected acquisition viewpoint. Adjust the handheld non-contact livestock body size measuring device according to the preset pose contour of the target livestock shown in the current acquisition viewpoint on the human-computer interaction terminal.

[0040] Acquire a sequence of front-view images of the target livestock from a front-view perspective;

[0041] Point clouds of the target livestock were collected from side and rear views;

[0042] The human-computer interaction terminal automatically saves and displays the body size parameters and coded characteristics of the target livestock.

[0043] Compared with the prior art, the present invention can achieve the following beneficial effects:

[0044] This invention adopts a modular design concept and designs a handheld, non-contact livestock body size measurement device. The handheld method completely solves the problems of the traditional three-camera fixed measurement channel. The handheld method allows for flexible adjustment of distance and angle according to the size of the cattle, avoiding measurement blind spots caused by fixed viewing angles. In particular, it solves the adaptation problem caused by the huge size difference between adult cattle and calves. It can be used directly in any scenario such as cattle sheds, pastures, and grazing areas, greatly improving the flexibility of livestock body size measurement.

[0045] This invention provides a standard contour map through a human-computer interaction interface, guiding operators to quickly complete posture alignment, reducing the professional skill requirements for operators. After data collection, the system automatically completes the entire process from ear tag recognition and key point extraction to body size calculation at the edge computing end. A single measurement can be completed in seconds, which is far more efficient than manual measurement and traditional automated solutions. It also avoids the problem of traditional solutions requiring livestock to be driven through the measurement channel.

[0046] The device of this invention can automatically calculate and associate the coded characteristics and body size parameters of livestock at the computing end, and associate the coded characteristics, body size parameters and dates, avoiding errors that may occur in manual recording. The automated data processing and warehousing process establishes a traceable digital growth record for each animal, which is convenient for assisting in precise feeding, genetic breeding, health monitoring and determination of the best time to market.

[0047] In the coarse registration process of point clouds, this invention uses the RANSAC algorithm to replace the PPFH matching method and innovatively designs multi-feature constraints. During the registration process, not only are the FPFH feature histograms of key points calculated, but also multi-dimensional geometric features such as curvature and normal vector angle are integrated. The optimal matching point pairs are selected through RANSAC iteration, which significantly improves the robustness of feature matching in low-overlap areas. In the fine registration stage, an optimization strategy based on a multi-resolution piecewise error function is designed. Through multi-resolution step-by-step registration, ICP is used to quickly converge at low resolution, and then the probabilistic model of GICP is combined with high resolution to optimize local geometric alignment, effectively balancing registration speed and accuracy, and effectively reducing the final error of bovine body point cloud registration. Attached Figure Description

[0048] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0049] Figure 1 This is a schematic diagram of a handheld non-contact livestock body size measuring device provided in an embodiment of the present invention;

[0050] Figure 2 This is a flowchart of the control system for a handheld non-contact livestock body size measuring device provided in an embodiment of the present invention;

[0051] Figure 3 This is a system architecture diagram of a handheld non-contact livestock body size measuring device provided according to an embodiment of the present invention;

[0052] Figure 4 This is a flowchart of the point cloud registration algorithm provided according to an embodiment of the present invention.

[0053] The reference numerals in the figures include:

[0054] Image acquisition terminal 1, edge computing terminal 2, human-computer interaction terminal 3, battery 4. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and do not constitute a limitation thereof. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, some operations related to the invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; the relevant operations can be fully understood based on the description in the specification and general technical knowledge in the art.

[0056] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined to form various implementations. Furthermore, the order of the steps or actions in the method description can be changed or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various orders in the specification and drawings are merely for the clear description of a particular embodiment and do not imply a mandatory order, unless otherwise stated that a particular order must be followed.

[0057] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0058] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0059] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0060] Please see Figure 1 and Figure 2 In one embodiment of the present invention, a handheld non-contact livestock body size measurement device is provided, mainly to address the limitations of existing solutions in terms of hardware architecture, application scenarios, strict requirements on livestock pose, and high cost. The device achieves handheld non-contact body size measurement based on an RGBD camera and edge computing. Specifically, the device includes:

[0061] Image acquisition terminal 1 is used to acquire image sequences and point clouds of the target livestock;

[0062] Edge computing endpoint 2 is configured to perform:

[0063] Identify encoded features in image sequences that characterize the identity of the target livestock;

[0064] Register the point clouds from multiple perspectives to generate a 3D point cloud model of the target livestock, and extract the body size key points based on the 3D point cloud model and the anatomical features of the target livestock.

[0065] The body size parameters of the target livestock are determined by the distance between key points on the body size scale.

[0066] Associate the body size parameters, coding features, and collection date of the same target livestock;

[0067] During the measurement of the target livestock's body size, the human-computer interaction terminal 3 selects the acquisition perspective of the target livestock at the image acquisition terminal 1, acquires image sequences and point clouds of the target livestock from different perspectives, and displays the body size parameters and encoded features obtained by the edge computing terminal.

[0068] Specifically, the handheld contactless livestock body measurement device adopts a modular design concept, including: image acquisition end 1, edge computing end 2, human-computer interaction end 3, battery 4, and so on. Figure 3The specific hardware selection is shown. Image acquisition unit 1 uses an RGBD camera to acquire 3D data of livestock and record the acquisition time and corresponding device posture information. The 3D data includes the front view image sequence, side view point cloud, and rear view point cloud of the target livestock. Based on functional, power consumption, and cost requirements, the image acquisition unit 1 in this embodiment uses the Orbbec Gemini 336L camera. This RGBD camera integrates a binocular IR module, a speckle emission module, an RGB module, a laser ranging module, and an IMU module, and integrates a depth engine ASIC. Combining active and passive stereo vision technologies, it can operate seamlessly in indoor and outdoor conditions. Depth image calculation and spatial alignment transformation from depth image to color image can be completed within the RGBD camera, achieving minimal data latency and greatly reducing dependence on the host computer. The camera has multiple preset working modes to efficiently adapt to different application scenarios. The Orbbec Gemini 336L camera provides a rich SDK package for easy secondary development. Its specific parameters are shown in Table 1.

[0069] Table 1. Parameters of Orbbec Gemini 336L

[0070]

[0071] During livestock body size measurement, the operator uses the handheld non-contact livestock body size measurement device proposed in this embodiment of the invention to control the image acquisition end 1 to acquire image sequences and point clouds of the target livestock from three perspectives. Specifically, for measuring the body size of a live cow, the live cow can be photographed from the front perspective to obtain a front view image sequence, i.e., multiple frames of color images. From the front perspective, using the acquired color images as input, a deep learning algorithm can identify the cow's ear tag number. Then, the handheld device is moved sequentially to the side and rear perspectives of the live cow to photograph the live cow and obtain side and rear point clouds.

[0072] Edge computing unit 2 is the core processing unit of the entire device, responsible for data reading, processing, and storage. To meet the requirements of computing power and portability, the high-performance and cost-effective Jetson OrinNano AI embedded computer was selected. This AI embedded computer offers superior performance and power consumption to meet the needs of running modern AI workloads, running multiple neural networks in parallel, and processing data from multiple high-resolution sensors simultaneously. Its specific parameters are shown in Table 2.

[0073] Table 2 Jetson Orin Nano Parameters

[0074]

[0075] Edge computing terminal 2 is used to receive image sequences and point clouds of the target livestock acquired by image acquisition terminal 1. It further identifies the encoded features that characterize the target livestock in each frame of the front view image sequence. For live cattle, the encoded feature is the ear tag. Point cloud registration is performed by side view point cloud and rear view point cloud to generate a three-dimensional point cloud model of the target livestock. The body size key points are extracted by combining anatomical features, and then the body size parameters are calculated. The body size parameters, encoded features, and the acquisition date of the above two parameters are associated and saved to establish a growth record for each livestock.

[0076] The human-computer interaction terminal 3 is primarily responsible for interacting with the user, displaying data collected by the image acquisition terminal 1 in real time, and automatically calculating body size parameters. The human-computer interaction terminal 3 is the display screen, and its selection needs to meet the following requirements: high resolution, appropriate size, outdoor visibility, durability, and compatibility with edge computing devices. After comprehensive consideration, a Waveshare capacitive touchscreen was selected, with specific parameters shown in Table 3.

[0077] Table 3 Waveshare Capacitive Touchscreen Parameters

[0078]

[0079] During the measurement of the target livestock's body size, the operator can access the livestock's growth record on the display screen and select the current shooting angle, specifically the front, side, or rear view. After selecting the shooting angle, the display screen will generate and display the target livestock's preset pose contour (front / side / rear contour) for the current acquisition angle. This preset pose contour is the shooting standard for the current view. According to the preset pose contour, the handheld non-contact livestock body size measuring device can be adjusted so that the target's position in the picture approximately coincides with the contour on the display screen, and then the data acquisition operation can be performed.

[0080] Battery 4 can be a portable power source, either a non-removable built-in battery or a removable battery, which facilitates power replacement and allows for the carrying of a spare battery to achieve "unlimited" battery life. The device of this invention is powered by battery 4, freeing it from the limitation of 220V power supply and eliminating the need for an additional 220V power supply or generator.

[0081] In a preferred embodiment, the first function of the edge computing terminal 3 is configured for coded feature recognition, where the coded feature of a live cow is its ear tag. The specific recognition process is as follows:

[0082] Using a front-view image sequence as input, which comprises multiple frames of color images captured from the front viewpoint, a lightweight deep learning model, specifically the YOLOv5-tiny model, is deployed on the edge computing terminal. The YOLOv5-tiny model is used to detect earmarks frame by frame in the front-view image sequence. During detection, the YOLOv5-tiny model employs the TensorRT high-performance deep learning inference optimizer for inference acceleration. Earmark detection is performed frame by frame, and detection stops when a preset number of frames containing valid earmark regions are detected in each front-view image sequence. For example, once 10 frames containing clear earmarks are successfully detected in a continuous image sequence, detection automatically stops. Then, an OCR (Optical Character Recognition) algorithm is run to extract the encoded characters of the earmarks from these 10 color images. Since single-frame recognition may fail due to momentary blurring, occlusion, or lighting issues, a temporal voting strategy is further introduced. The recognition results of these 10 images are aggregated for a "majority vote." That is, the frequency of each identified number is counted, and the number that appears most frequently is determined as the unique and correct ear tag number of the target livestock, which is used to represent the identity of the target livestock, namely the cattle number. The test results showed that the success rate of ear tag identification for the left and right ears of cattle reached 0.98 and 0.96, respectively.

[0083] The second function of edge computing terminal 3 is configured for multi-view point cloud registration and volumetric key point extraction. For example... Figure 4 As shown, the multi-view point cloud registration process is as follows:

[0084] First, since the acquired point cloud contains a large number of non-target points and noise points, filtering is required to remove noise and non-target points. After filtering, ground points are segmented to remove ground regions from the point cloud. After removing ground points, clustering is performed on the non-ground point cloud. Because the point cloud of the target livestock is the most continuous and has the largest number of points in the scene, clustering can be used to obtain the target point cloud, thus achieving preprocessing of the side-view and back-view point clouds.

[0085] An improvement to the traditional coarse registration stage is made using the RANSAC algorithm based on multi-feature constraints, which enhances traditional FPFH matching by not only calculating the FPFH feature histograms of key points but also integrating multi-dimensional geometric features such as local curvature and the angle between normal vectors. The FPFH features, local curvature, and normal vector of each point are extracted from the preprocessed side-view and back-view point clouds.

[0086] After multi-feature extraction, FPFH feature registration is performed on the side-view and back-view point clouds using KD-tree nearest neighbor search. Specifically, for each point in the side-view (or back-view) point cloud, the point with the most similar FPFH features is found in the back-view (or side-view) point cloud to achieve FPFH feature registration, generating an initial set of registered point pairs. Further coarse matching is then performed within the iterative framework of the RANSAC algorithm.

[0087] S1. Randomly sample 4 sets of initial registration point pairs that satisfy dual geometric constraints. The dual geometric constraints include: the local curvature difference of the initial registration point pairs is less than a first threshold, and the angle between the normal vectors of the initial registration point pairs is less than a second threshold.

[0088] S2. Solve for the least squares transformation matrix of the registration point pair using SVD (Singular Value Decomposition).

[0089] S3. Calculate the interior point rate when applying the current least squares transformation.

[0090] The above S1, S2, and S3 are iterated, and the least squares transformation matrix with the highest interior-point rate is recorded throughout the iteration process. When the iteration converges, the transformation matrix with the highest interior-point rate is selected as the final coarse registration transformation matrix.

[0091] Furthermore, point pair searching is accelerated using a KD-Tree, and matching is optimized using a multi-resolution piecewise error function. Specifically, the fine registration process is iteratively registered in at least two resolution spaces. In this embodiment of the invention, three registration stages are constructed, corresponding to low-resolution space, medium-resolution space, and high-resolution space, respectively.

[0092] In the first registration stage, the side-view and back-view point clouds are downsampled to a low-resolution space, specifically downsampled to a size of 50mm. Using the coarse registration transformation matrix as the initial value, ICP is used to register the downsampled side-view and back-view point clouds to obtain the first fine-matching transformation matrix. This process significantly reduces the amount of point cloud data and can quickly obtain a relatively coarse transformation matrix. While this process may contain significant errors, it can roughly align the side-view and back-view point clouds.

[0093] In the second registration stage, the side-view and back-view point clouds are downsampled to a medium-resolution space, specifically downsampled to a size of 20mm. Using the first fine-matching transformation matrix as the initial value, GICP is used to register the second downsampled side-view and back-view point clouds to obtain the second fine-matching transformation matrix. This process preserves more geometric structure information and uses the first fine-matching transformation matrix obtained in the first registration stage as the initial transformation value, while GICP is used to optimize local geometric matching, effectively improving registration accuracy.

[0094] In the third registration stage, the side-view and rear-view point clouds are downsampled to a high-resolution space, specifically downsampled to 5mm in size. Using the second fine-matching transformation matrix as the initial value, GICP is used to register the third-downsampled side-view and rear-view point clouds, obtaining the third fine-matching transformation matrix. This process fine-tunes the point cloud transformation, preserving more detailed information, resulting in the final high-precision point cloud registration result, i.e., the third fine-matching transformation matrix. The third fine-matching transformation matrix is ​​then used to register the side-view and rear-view point clouds, generating a 3D point cloud model of the target livestock.

[0095] Based on a 3D point cloud model and the anatomical features of the target livestock, key body size points are extracted. Specifically, after obtaining the 3D point cloud model, key body size points can be extracted by combining anatomical features. Traditional methods for measuring cattle body size primarily focus on body height (the vertical distance from the highest point of the cow's forearm to the ground), body length (the straight-line distance from the anterior edge of the scapula to the posterior edge of the ischial tuberosity), chest circumference (the vertical circumference of the body at the posterior edge of the scapula), cruciate height (the vertical height from the midpoint of the line connecting the two loin angles to the ground), and ischial end width (the straight-line distance from the outer edge of the ischial end). To more accurately determine cattle body size, this invention establishes the following key point method:

[0096] For the shoulder endpoint: it is represented by the extreme point of the cow's shoulder. Specifically, the top view of the cow's 3D point cloud model can be obtained by projecting it onto the XOZ plane (with the cow's height direction as the Z direction and the cow's body plane as the XOY plane). The projection point cloud is then used to extract the contour using edge detection methods. Combining the characteristics of the cow's body, the shoulder endpoint is located near the head and neck of the cow. The search is performed along the negative X-axis from the head and neck side of the cow's contour, and the point with the minimum z value in the head and neck side region is identified as the cow's shoulder endpoint.

[0097] For the shin point: it is represented by the highest point near the shoulder of the cow. The three-dimensional point cloud model of the cow is projected onto the XOY plane, and then the contour is extracted. The point with the maximum y value is obtained by the extreme value method, which is the highest point of the shin of the cow.

[0098] For chest circumference measurement points: Starting from the highest point of the forearm (X-coordinate), a search is performed along the negative X-axis to identify the point with the minimum y-value, which is the chest circumference measurement point of the cow. Chest circumference is the vertical circumference of the body at the posterior angle of the scapula. Based on the chest circumference measurement point, the cow's point cloud is sliced ​​along the vertical X-axis to obtain a chest circumference slice. The sliced ​​point cloud is then subjected to curve fitting, and the length of the fitted curve is used as the size of the cow's chest circumference.

[0099] For the ischial tuberosity nodes: The posterior 15% of the point cloud of the bovine body is extracted, the curvature of each point is calculated, a curvature histogram is constructed, and the top 5% of points by curvature value are selected. These points are then subjected to spatial and normal vector constraints to obtain a candidate point group. Finally, the candidate point group is clustered, the largest cluster is retained, and a quadratic surface is fitted to the largest cluster. The extreme points of the surface are taken as the final ischial tuberosity nodes.

[0100] The third function of edge computing terminal 3 is configured for body size measurement. The body size measurement process is as follows:

[0101] Body size parameters are converted into Euclidean distances between two body size keypoints, and the extracted body size keypoints are then used to calculate the corresponding body size parameters. After obtaining the body size parameters and coded features, a dictionary structure is created to store the correspondence between body size parameters, collection dates, and coded features. Coded features are used as keys, and body size parameters and collection dates are used as values. MySQL is selected as the database management system, and Python code is connected to the MySQL database to execute SQL statements to create tables. The associated data structure is traversed, and the coded features, body size parameters, and collection dates for each animal are inserted into the database tables. After the data insertion operation is completed, the cursor and database connection are closed to release resources.

[0102] This invention further proposes a method for measuring the body size of livestock using the aforementioned handheld non-contact livestock body size measuring device, comprising the following steps:

[0103] The operator holds the aforementioned handheld non-contact livestock body measurement device and selects the acquisition viewpoint through the human-machine interface 3. For example, according to the measurement procedure, the operator clicks to select the front viewpoint and moves the handheld non-contact livestock body measurement device to the currently selected acquisition viewpoint. After the operator selects the acquisition viewpoint, the interface of the human-machine interface 3 will generate a preset pose contour of the target livestock at the current acquisition viewpoint. The operator adjusts the position of the handheld non-contact livestock body measurement device according to the preset pose contour, adjusting the distance and angle between the device and the livestock so that the actual livestock silhouette in the image and the preset pose contour superimposed on the screen approximately coincide in position, size, and posture. Following the above steps, the operator sequentially acquires the front view image sequence, the side view point cloud, and the rear view point cloud. The operator acquires the front view image sequence of the target livestock from the front viewpoint and the point cloud of the target livestock from the side viewpoint and the rear viewpoint.

[0104] After data collection from all perspectives is complete, no additional operation is required from the operator. The device will automatically execute the following core processing flow at the edge computing terminal 2:

[0105] Identify encoded features in image sequences that characterize the identity of the target livestock;

[0106] The point clouds from multiple perspectives are registered to generate a three-dimensional point cloud model of the target livestock. Based on the three-dimensional point cloud model and the anatomical features of the target livestock, the body size key points are extracted.

[0107] The body size parameters of the target livestock are determined by the distance between the key body size points;

[0108] Associate the body size parameters, coding features, and collection date of the same target livestock.

[0109] The human-computer interaction terminal automatically displays the body size parameters and coding characteristics of the target livestock, and saves the body size parameters, coding characteristics and collection date to the local machine or uploads them to the cloud database, thus completing the filing and archiving of individual data.

[0110] In summary, the above description is merely a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0111] The systems, apparatuses, modules, or units described in one or more of the above embodiments may be implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer. Specifically, a computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0112] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0113] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A hand-held, non-contact, livestock body dimension measuring device, characterized by, The method comprises the following steps: an image acquisition end is configured to acquire an image sequence and a point cloud of a target livestock; the image acquisition end acquires a front-view image sequence, a side-view point cloud, and a rear-view point cloud; an edge computing end is configured to perform the following steps: identify an encoding feature in the image sequence that represents the identity of the target livestock; register the multi-view point clouds to generate a three-dimensional point cloud model of the target livestock, and extract body size key points from the three-dimensional point cloud model and the anatomical features of the target livestock; the registration of the multi-view point clouds comprises the following steps: extract the FPFH features, the local curvature of each point, and the normal vector of each point of the side-view point cloud and the rear-view point cloud; perform FPFH feature registration on the side-view point cloud and the rear-view point cloud to generate an initial set of registered point pairs; in the iterative framework of the RANSAC algorithm, impose a double geometric constraint on the randomly sampled initial registered point pairs, the double geometric constraint comprising: the local curvature difference of the initial registered point pairs being less than a first threshold value, and the included angle of the normal vectors of the initial registered point pairs being less than a second threshold value; after iterative convergence, determine a coarse registration transformation matrix of the side-view point cloud and the rear-view point cloud according to the inlier rate; use the coarse registration transformation matrix as an initial value to perform registration of the side-view point cloud and the rear-view point cloud in at least two resolution spaces, and perform segmented iterative optimization using an error loss function set in each resolution space, wherein fast convergence is achieved in a low-resolution space by an iterative closest point algorithm, and local geometric alignment optimization is achieved in the remaining resolution spaces by a generalized iterative closest point algorithm, thereby achieving alignment of the side-view point cloud and the rear-view point cloud; determine the body size parameters of the target livestock by the distances between the body size key points; associate the body size parameters, the encoding feature, and the acquisition date of the same target livestock; a human-computer interaction end, during the body size measurement of the target livestock, the human-computer interaction end is used to select the acquisition angle of the target livestock by the image acquisition end, acquire the image sequence and the point cloud of the target livestock from different angles, and display the body size parameters and the encoding feature obtained by the edge computing end.

2. The hand-held, non-contact, livestock body dimension measuring apparatus of claim 1, wherein, The image acquisition end is an RGBD camera.

3. The hand-held, non-contact, livestock body dimension measuring apparatus of claim 1, wherein, After the acquisition angle of the target livestock by the image acquisition end is selected by the human-computer interaction end, the human-computer interaction end displays a preset pose contour of the target livestock at the current acquisition angle, and adjusts the pose of the image acquisition end according to the preset pose contour.

4. The hand-held, non-contact, livestock body dimension measuring apparatus of claim 1, wherein, The method of identifying the encoding feature in the image sequence that represents the identity of the target livestock comprises the following steps: a lightweight deep learning model is used to detect the ear tag region of the target livestock frame by frame in the front-view image sequence; if a preset number of frames containing valid ear tag regions are detected in the front-view image sequence, the detection is stopped; an OCR algorithm is used to recognize the ear tag numbers in the images of the preset number of frames, respectively; a time sequence voting strategy is used to perform majority voting on the recognition results of the preset number of frames to determine the final ear tag number, and the final ear tag number is used as the encoding feature representing the identity of the target livestock.

5. The hand-held, contactless, livestock body dimension measuring apparatus of claim 4 wherein, The lightweight deep learning model is a yolov5-tiny model.

6. The hand-held, contactless, livestock body dimension measuring apparatus of claim 1, wherein, The method of performing registration of the side-view point cloud and the rear-view point cloud in at least two resolution spaces and performing segmented iterative optimization using an error loss function set in each resolution space comprises the following steps: The side-view point cloud and the rear-view point cloud are first down-sampled to a low-resolution space, the coarse registration transformation matrix is taken as an initial value, and the first down-sampled side-view point cloud and the first down-sampled rear-view point cloud are registered through ICP to obtain a first precise matching transformation matrix; The side-view point cloud and the rear-view point cloud are second down-sampled to a medium-resolution space, the first precise matching transformation matrix is taken as an initial value, and the second down-sampled side-view point cloud and the second down-sampled rear-view point cloud are registered through GICP to obtain a second precise matching transformation matrix; The side-view point cloud and the rear-view point cloud are third down-sampled to a high-resolution space, the second precise matching transformation matrix is taken as an initial value, and the third down-sampled side-view point cloud and the third down-sampled rear-view point cloud are registered through GICP to obtain a third precise matching transformation matrix.

7. The hand-held, contactless, livestock body dimension measuring apparatus of claim 6 wherein, The body size key points include at least one of: a shoulder end point, a scapular point, a bust measurement point, and an ischial tuberosity point.

8. Livestock body dimension measuring method, characterized in that, The method comprises: selecting a collection view angle through a human-computer interaction terminal, and moving a handheld non-contact livestock body size measurement device to the currently selected collection view angle, and adjusting the handheld non-contact livestock body size measurement device according to a target livestock preset pose contour of the current collection view angle shown by the human-computer interaction terminal; collecting a front view image sequence of the target livestock at a front view angle; collecting point clouds of the target livestock at a side view angle and a rear view angle; the human-computer interaction terminal automatically saves and shows body size parameters and coding features of the target livestock.

Citation Information

Patent Citations

  • Non-contact livestock body size measuring method and electronic equipment

    CN118196175A

  • Sheep body size measuring method and device based on three-dimensional reconstruction and point cloud segmentation, medium and program product

    CN120558098A