Livestock body size three-dimensional measurement method and system based on machine vision technology
Using machine vision technology to capture livestock images from different angles, extract and match feature points, reconstruct a three-dimensional point cloud and convert it into a grid model, it solves the problems of efficiency, accuracy and stress response of traditional measurement methods, and achieves efficient and accurate measurement. Livestock body measurement has improved the level of animal husbandry management and breeding.
Patent Information
- Application Number
- CN202411216133.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional livestock body measurement methods are time-consuming and labor-intensive, have low accuracy, easily induce stress reactions, and are not suitable for real-time monitoring. It is difficult to improve the efficiency of animal husbandry production management and the level of scientific breeding.
Using methods based on machine vision technology, by capturing images of livestock from different angles, generating multi-view image sets, extracting and matching feature points, reconstructing 3D point clouds, and converting them into 3D mesh models for multi-parameter volume modeling ruler measurement.
It achieves efficient, accurate and robust three-dimensional measurement of livestock body dimensions, improves the efficiency of animal husbandry production management and scientific breeding levels, reduces human errors and stress reactions, and supports real-time dynamic monitoring.
Smart Images

Figure CN118729947A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of machine vision, and in particular to a three-dimensional measurement method and system for livestock body dimensions based on machine vision technology. Background Art
[0002] In animal husbandry, measuring livestock body size is one of the important means to evaluate livestock health, growth, production performance, etc. Traditional measurement methods mainly rely on manual operations, such as using a measuring ruler, a soft ruler or a special measuring tool. This method has the following limitations: 1. Time-consuming and labor-intensive: Manual measurement requires a lot of manpower and time. Especially in large-scale farms, measuring livestock one by one is very inefficient.
[0003] 2. Low accuracy: Manual measurement is limited by the operator’s experience and technical level. The measurement results are easily affected by human errors, making it difficult to ensure measurement accuracy and consistency.
[0004] 3. Stress response: Livestock may experience stress response during the measurement process, which may affect their normal growth and health, and even affect production.
[0005] 4. Not suitable for real-time measurement: Traditional measurement methods make it difficult to monitor the real-time dynamics of livestock and cannot provide continuous data support. Summary of the invention
[0006] The purpose of the present invention is to provide a method and system for three-dimensional measurement of livestock body size based on machine vision technology to address the deficiencies in the prior art and to provide an efficient, accurate and robust three-dimensional measurement solution for livestock body size to improve the production management efficiency and scientific breeding level of animal husbandry.
[0007] An embodiment of the present application provides a method for three-dimensional measurement of livestock body size based on machine vision technology, the method comprising: Capturing images of livestock from different angles to generate a multi-view image set; Extract and match feature points between multi-view images; Reconstruct the 3D point cloud based on the matched feature point pairs; The three-dimensional point cloud is converted into a three-dimensional mesh model, and multi-parameter body measurement is performed on the three-dimensional mesh model.
[0008] Optionally, the extracting and matching feature points between multi-view images includes: For each multi-view image, the accelerated robust feature SURF algorithm is used to detect specific key feature points in the image; For each detected feature point, a SURF descriptor of the feature point is calculated, wherein the SURF descriptor generates a vector by analyzing a local area around the feature point to represent local image information of the feature point; The SURF descriptor is normalized, and the similarity of the normalized SURF descriptors of the feature points between the multi-view images is calculated, wherein for each feature point, a corresponding feature point with a minimum Euclidean distance in other view images is searched for preliminary matching; The initial matching results are bidirectionally verified, and the feature point matching pairs that pass the bidirectional verification are retained as the feature point pairs that have completed the matching.
[0009] Optionally, reconstructing a three-dimensional point cloud based on the matched feature point pairs includes: Use binocular stereo vision technology and triangulation technology to construct the initial 3D point cloud; Apply a deep learning-based stereo matching algorithm to estimate the depth map of multi-view images and convert the depth map into an intermediate 3D point cloud; Merging the intermediate three-dimensional point cloud with the initial three-dimensional point cloud to increase the point cloud density; For the fused 3D point cloud, the neighborhood density of each point is calculated using statistical filtering technology, and points with a neighborhood density lower than a preset threshold are eliminated; Use bilateral filtering to smooth the removed point cloud to retain edge details; The color information of the multi-view images is added to the smoothed 3D point cloud so that the point cloud has color attributes and a complete 3D point cloud is obtained.
[0010] Optionally, converting the three-dimensional point cloud into a three-dimensional mesh model includes: Performing voxel grid filtering on the complete three-dimensional point cloud, and estimating a normal vector of each point on the filtered three-dimensional point cloud; The Poisson surface reconstruction algorithm is used to convert the point cloud data with normal vector information into a 3D mesh model.
[0011] Another embodiment of the present application provides a livestock body size three-dimensional measurement system based on machine vision technology, the system comprising: A capture module, used for capturing images of livestock from different angles to generate a multi-view image set; A matching module, used for extracting and matching feature points between multi-view images; The reconstruction module is used to reconstruct the three-dimensional point cloud based on the matched feature point pairs; The measurement module is used to convert the three-dimensional point cloud into a three-dimensional grid model and perform multi-parameter body measurement on the three-dimensional grid model.
[0012] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.
[0013] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.
[0014] Compared with the prior art, the present invention provides a three-dimensional measurement method for livestock body size based on machine vision technology, which captures images of livestock from different angles to generate a multi-view image set; extracts and matches feature points between the multi-view images; reconstructs a three-dimensional point cloud based on the matched feature point pairs; converts the three-dimensional point cloud into a three-dimensional grid model, and performs multi-parameter body size measurement on the three-dimensional grid model, thereby providing an efficient, accurate and robust three-dimensional measurement solution for livestock body size, so as to improve the production management efficiency and scientific breeding level of animal husbandry. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A hardware structure block diagram of a computer terminal for a method for three-dimensional measurement of livestock body dimensions based on machine vision technology provided by an embodiment of the present invention; Figure 2 A schematic diagram of a flow chart of a method for three-dimensional measurement of livestock body dimensions based on machine vision technology provided by an embodiment of the present invention; Figure 3 A schematic structural diagram of a livestock body size three-dimensional measurement system based on machine vision technology provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0017] The embodiment of the present invention first provides a method for measuring the three-dimensional body size of livestock based on machine vision technology. The method can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.
[0018] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a method for measuring the three-dimensional body size of livestock based on machine vision technology provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0019] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the livestock body size three-dimensional measurement method based on machine vision technology in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0020] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0021] See also Figure 2 The embodiment of the present invention provides a method for measuring the three-dimensional body size of livestock based on machine vision technology, which may include the following steps: S201, capturing images of livestock from different angles to generate a multi-view image set; Specifically, in order to achieve the purpose of capturing images of livestock from different angles and generate high-quality multi-view image sets, the following detailed and coherent steps can be used. This process involves hardware configuration, camera calibration, image capture and preprocessing, etc., to ensure that the obtained image set has high resolution and good feature information.
[0022] 1. Determine the camera layout Step 1: Design the shooting scene and determine the camera layout - Design appropriate shooting scenes based on the size and range of livestock, ensuring that livestock can move freely and are covered by multiple cameras at the same time.
[0023] - Select the appropriate camera type (such as a high-resolution RGB camera or a depth camera) and determine the number and arrangement of cameras. Typically, multiple cameras can be placed around the livestock to form a closed loop, ensuring that images of the livestock are captured from different angles.
[0024] 2. Camera Calibration Step 2: Perform camera calibration - To ensure geometric consistency between multi-view images, all cameras need to be calibrated. This can be done by taking multiple images of a calibration plate (such as a checkerboard pattern).
[0025] - Use a calibration algorithm (such as the camera calibration function in the OpenCV library) to calculate the intrinsic parameter matrix (including focal length, optical center, distortion coefficient) and extrinsic parameter matrix (including rotation matrix and translation vector) of each camera.
[0026] 3. Synchronous capture Step 3: Achieve Synchronous Shooting - Ensure that all cameras can shoot synchronously, which is an important condition to ensure the temporal consistency of the captured image set. Synchronous shooting can be achieved through hardware triggering or software synchronization.
[0027] - If you use hardware triggering, such as trigger lines and triggers, you can connect all cameras to the same trigger, and when the trigger sends a capture signal, all cameras will capture at the same time.
[0028] - If you use software synchronization, you can design a master control program to send synchronized shooting commands to each camera through a network or wired connection.
[0029] 4. Image Capture Step 4: Perform multi-view image capture - Based on the synchronized shooting, the camera system is controlled to start capturing images. The frame rate and resolution of the shooting can be set as needed to ensure that high-quality images can be captured at every viewing angle.
[0030] - In order to obtain comprehensive information about the livestock's body surface, the livestock can be arranged to move freely in the shooting area, or guided to rotate or move to capture images from different angles.
[0031] 5. Image Preprocessing Step 5: Image Preprocessing - The captured multi-view image set may contain some noise and bad images, which need to be pre-processed, such as image denoising, brightness and contrast adjustment.
[0032] - If the camera is distorted, image dedistortion is required. Use the distortion coefficients obtained from the previous calibration to correct the image and turn it into a standard orthographic projection image.
[0033] 6. Check image quality Step 6: Check the image quality - Perform quality checks on the pre-processed image sets to ensure that each image is clear, blur-free, and contains complete livestock information.
[0034] - If unqualified images are found, they can be recaptured or the shooting parameters can be adjusted to retake them until a set of images that meet the measurement requirements is obtained.
[0035] Through the above detailed steps, livestock images can be captured from different angles and high-quality multi-view image sets can be generated. This lays a solid foundation for subsequent steps such as feature point extraction, feature point matching, and 3D point cloud reconstruction, ultimately achieving accurate 3D measurement of livestock body size.
[0036] S202, extracting and matching feature points between multi-view images; Specifically, the step of extracting and matching feature points between multi-view images is a crucial part of the entire machine vision technology. This step affects the accuracy and robustness of subsequent 3D point cloud reconstruction. One implementation method may include: For each multi-view image, the accelerated robust feature SURF algorithm can be used to detect specific key feature points in the image; Among them, specific key feature points are points with significance and stability in the image, which are commonly found in corners, edges, etc. in the image. The Speeded Up Robust Features (SURF) algorithm is a commonly used feature point detection algorithm that can quickly and efficiently detect these key feature points in the image. The SURF algorithm uses integral images and Hessian matrices to efficiently detect key feature points. Its calculation speed is faster than the traditional SIFT algorithm, and it has better robustness.
[0037] Using the SURF algorithm to detect specific key feature points in an image can ensure that stable and recognizable feature points are extracted from images of different viewing angles. This provides a reliable basis for subsequent feature point matching and reduces noise and redundant interference.
[0038] Furthermore, in order to improve the accuracy of detection, the edge information of the image can be combined and the edge-preserving filtering (EPF) technology can be used to preprocess the image before feature point detection, so that the feature points are more concentrated on the outline and important parts of the livestock.
[0039] For each detected feature point, a SURF descriptor of the feature point is calculated, wherein the SURF descriptor generates a vector by analyzing a local area around the feature point to represent local image information of the feature point; Among them, the SURF descriptor extracts a set of vectors that can describe the local information of feature points by analyzing the local area around the feature points. These vectors usually include information such as the direction and gradient of the feature points. Usually, the SURF descriptor is a 64-dimensional or 128-dimensional vector, which can comprehensively and carefully describe the image information around the feature points.
[0040] Calculating the SURF descriptor can digitize and quantify the local image information of each feature point, providing a solid foundation for matching feature points between images from different perspectives. Through the descriptor, the same feature points can be more accurately identified and matched in different images.
[0041] The SURF descriptor is normalized, and the similarity of the normalized SURF descriptors of the feature points between the multi-view images is calculated, wherein for each feature point, a corresponding feature point with a minimum Euclidean distance in other view images is searched for preliminary matching; Among them, the SURF descriptor is standardized to eliminate the scale and rotation effects between different images and ensure that the descriptors are comparable under different perspectives. By calculating the similarity between the standardized SURF descriptors, a common method is to calculate the Euclidean distance between the descriptors. The smaller the distance, the higher the similarity. For each feature point, find the corresponding feature point with the minimum Euclidean distance in the other perspective images and preliminarily match them into a pair, that is, match the feature point in image A to the feature point in image B, and reversely check whether the feature point in image B matches back to the original feature point in image A. Only matching pairs that pass the two-way verification are retained, and incorrect matching pairs are eliminated.
[0042] Standardization and similarity calculation can improve the accuracy of feature point matching and ensure that the corresponding feature points found in images with different viewing angles are the same points of the real object. Preliminary matching can filter out unmatched point pairs and reduce false matches.
[0043] The initial matching results are bidirectionally verified, and the feature point matching pairs that pass the bidirectional verification are retained as the feature point pairs that have completed the matching.
[0044] Among them, on the basis of preliminary matching, two-way verification is performed, that is, for each pair of matched feature points, their matching results in each other's images are checked to see if they are consistent. Only those feature point pairs that pass the two-way verification are considered reliable matching pairs and are ultimately retained as matching completed feature point pairs.
[0045] Bidirectional verification can significantly improve the accuracy and robustness of feature point matching. Through this verification mechanism, incorrectly matched point pairs can be effectively eliminated, further ensuring the reliability and consistency of the matching results, and providing high-quality input data for subsequent 3D point cloud reconstruction.
[0046] It can be seen that the extraction and matching of feature points is a delicate and rigorous process, and each step has an important impact on the final 3D reconstruction result. The reasonable use of the SURF algorithm, descriptor calculation and two-way verification mechanism can ensure that high-quality feature point matching pairs are extracted from multi-view images, laying a solid foundation for high-precision 3D point cloud reconstruction.
[0047] S203, reconstructing a three-dimensional point cloud according to the matched feature point pairs; Specifically, binocular stereo vision technology and triangulation technology can be used to construct an initial three-dimensional point cloud; Among them, binocular stereo vision technology uses two cameras to shoot the same scene from different angles, and calculates the parallax of these points (i.e. the position difference between the two points in their respective images) by comparing the corresponding points in the two images. By knowing the baseline distance between the cameras (the physical distance between the cameras) and the parallax, the distance from the spatial point to the camera is calculated using the principle of triangulation, thereby obtaining the three-dimensional coordinates of the spatial point. The three-dimensional coordinates of all matching points are collected to form a preliminary three-dimensional point cloud.
[0048] Binocular stereo vision and triangulation technology can quickly construct the initial 3D point cloud and provide a basic 3D structure framework. Although the result of this step may be sparse, it provides a basis for the subsequent construction of dense point clouds.
[0049] Apply a deep learning-based stereo matching algorithm to estimate the depth map of multi-view images and convert the depth map into an intermediate 3D point cloud; Among them, the application of deep learning technology in image processing has proved its powerful performance. Using deep neural networks (such as GC-Net), multi-view images can be stereo matched to estimate the depth value of each pixel, that is, the depth map. Each depth value in the depth map is combined with the corresponding image pixel position to calculate the three-dimensional coordinates of each pixel point, thereby generating an intermediate three-dimensional point cloud.
[0050] Through deep learning algorithms, more dense and accurate depth information can be obtained, and the generated intermediate 3D point cloud is more detailed than the initial point cloud. Deep learning algorithms can handle complex scenes, reduce noise, and increase point cloud density.
[0051] Merging the intermediate three-dimensional point cloud with the initial three-dimensional point cloud to increase the point cloud density; The initial 3D point cloud and the intermediate 3D point cloud are fused to generate a higher density point cloud by superimposing the point cloud data of the two. During the fusion process, weighted averaging or other fusion strategies can be used to ensure the compatibility of different data sources.
[0052] Point cloud fusion can comprehensively utilize point cloud data generated by different methods, improve the overall density and completeness of the point cloud, make up for the shortcomings of a single method, and make the final point cloud more detailed and rich.
[0053] For the fused 3D point cloud, the neighborhood density of each point is calculated using statistical filtering technology, and points with a neighborhood density lower than a preset threshold are eliminated; Among them, the statistical outlier removal technology determines the reliability of each point by calculating the density of each point in its neighborhood. Points with a density lower than a preset threshold are usually considered to be noise points or mismatched points. By removing these low-density points, the quality of the point cloud can be significantly improved and the interference of noise on subsequent processing can be reduced.
[0054] Statistical filtering technology can effectively remove noise points in point clouds, improve the purity and reliability of point cloud data, and provide a high-quality data foundation for subsequent smoothing processing and grid reconstruction.
[0055] Use bilateral filtering to smooth the removed point cloud to retain edge details; Among them, bilateral filtering is a filtering method that can simultaneously consider spatial neighborhood and intensity similarity, and can retain edge details while smoothing. By performing bilateral filtering on the point cloud, small noise and subtle errors in the point cloud can be eliminated while retaining the edge and detailed structure of the object surface.
[0056] Using bilateral filtering to smooth the point cloud can significantly improve the surface smoothness of the point cloud, making it closer to the surface morphology of the real object, while keeping the edge details from being blurred, ensuring the fineness of the final 3D model.
[0057] The color information of the multi-view images is added to the smoothed 3D point cloud so that the point cloud has color attributes and a complete 3D point cloud is obtained.
[0058] Among them, by mapping the color information in the multi-view image to the corresponding three-dimensional point, each point has not only spatial coordinates but also color attributes (such as RGB values), thereby obtaining a colored three-dimensional point cloud. The image color information can be accurately mapped to the point cloud using methods such as nearest neighbor mapping and interpolation.
[0059] Adding color information to 3D point clouds can enhance the visual effect of point clouds and make them closer to real scenes. At the same time, through color attributes, subsequent model processing and feature recognition can also be more intuitive and effective.
[0060] It can be seen that each of the above steps is designed to construct a high-quality and detailed three-dimensional point cloud, ultimately achieving accurate three-dimensional measurement of livestock body size and providing reliable data support.
[0061] S204: Convert the three-dimensional point cloud into a three-dimensional mesh model, and perform multi-parameter body measurement on the three-dimensional mesh model.
[0062] Specifically, the complete three-dimensional point cloud may be subjected to voxel grid filtering, and a normal vector of each point may be estimated on the filtered three-dimensional point cloud; Among them, voxel grid filtering is a technology that divides the point cloud into small cubes (voxels) of fixed size, retaining only one representative point in each voxel, thereby reducing the amount of redundant data in the point cloud and homogenizing the distribution of the point cloud. After filtering through the voxel grid, the normal vector is calculated in the neighborhood of each point. The normal vector is a vector that describes the local geometric characteristics of the point cloud surface, which is usually determined by the principal component analysis (PCA) method or the geometry-based neighborhood analysis method.
[0063] Voxel grid filtering can effectively reduce the amount of point cloud data and improve processing efficiency while maintaining the global structure and details of the point cloud. Normal vector estimation adds surface direction information to each point, which is key data for subsequent mesh reconstruction and can ensure that the generated mesh surface is smooth and accurate.
[0064] The Poisson surface reconstruction algorithm is used to convert the point cloud data with normal vector information into a 3D mesh model.
[0065] Among them, Poisson surface reconstruction is a surface reconstruction algorithm based on the integral method. It uses the position information and normal vector information of each point in the point cloud to construct a closed three-dimensional surface by solving the Poisson equation. The Poisson reconstruction algorithm first constructs a field containing normal vectors, and then obtains a smooth and closed three-dimensional surface mesh through integral calculation. This method can process noisy point cloud data, and the generated mesh has good detail retention and global consistency.
[0066] The Poisson surface reconstruction algorithm uses the normal vector information of the point cloud to generate a high-quality 3D mesh model, especially capable of processing incomplete and noisy point cloud data, which makes the reconstruction result smoother and more accurate. The algorithm can generate a complete and closed mesh model, avoiding holes and defects that may be generated by other reconstruction methods, ensuring the integrity and availability of the 3D mesh model.
[0067] It can be seen that the voxel grid filtering and Poisson surface reconstruction algorithm are used to generate a high-quality 3D mesh model while maintaining the original accuracy and details of the 3D point cloud. Each step is aimed at optimizing and improving the quality of the final 3D mesh model and providing reliable model data for further analysis and application.
[0068] Specifically, in the three-dimensional measurement of livestock body size, the three-dimensional mesh model constructed using machine vision technology can not only provide rich geometric information, but also perform multi-parameter body size measurement on the model. One implementation method may include: 1. Initial key point calibration and feature area identification: -Description: Through user interaction or automated algorithms, important body key points and feature areas of livestock are marked on the 3D mesh model.
[0069] -Specific technical algorithm: 1). Automatic key point detection: Pre-trained deep learning models (such as CNN or PointNet) can be used to automatically identify and mark key points such as shoulder height, chest circumference, body length, etc. on a 3D mesh.
[0070] 2). Manual correction: Allow users to manually correct automatically marked key points through a visual interface to ensure accuracy.
[0071] 2. Body parameter measurement based on key points: -Description: Using the calibrated key points, multiple body size parameters of livestock are extracted through geometric calculation.
[0072] -Specific technical algorithm: 1). Straight-line distance calculation: Use the Euclidean distance formula to calculate the straight-line distance between key points. For example, the shoulder height parameter is obtained by calculating the vertical distance from the shoulder height point to the ground.
[0073] 2). Contour extraction: Contours are extracted along the grid surface on a specific plane (horizontally or vertically), and parameters such as the chest circumference and waist circumference of livestock are calculated through these contours.
[0074] 3). Surface fitting and length measurement: In areas with obvious curves (such as the arc from the back to the tail), use spline curve or polynomial fitting technology to calculate the length of the curve to obtain more accurate body size data.
[0075] 3. Volume estimation and surface area calculation: -Description: Through the complete 3D mesh model, more complex volume and surface area parameters can be calculated.
[0076] -Specific technical algorithm: 1). Volume calculation: Using the triangular facets of the mesh model and applying the polyhedron volume formula (such as the volume difference method), calculate the three-dimensional volume of the entire livestock.
[0077] 2). Surface area calculation: Calculate the area of each mesh triangle one by one and add them up to get the total surface area of the livestock.
[0078] 4. Multi-parameter data integration and output: -Description: Integrate all measured body size parameters and generate a complete measurement report.
[0079] -Specific technical algorithm: 1). Data integration platform: A measurement data integration platform can be developed to integrate all measurement parameters to form a structured data form.
[0080] 2). Report generation: Generate detailed measurement reports based on demand, display all body size parameters, and provide data visualization (such as tables, graphs, etc.) to facilitate analysis and decision-making.
[0081] The design significance lies in: -Automation and accuracy: Through deep learning to automatically calibrate key points, combined with technologies such as geometric calculation and surface fitting, high-precision and automated livestock body measurement can be achieved.
[0082] -Multi-parameter comprehensive analysis: It can not only measure simple length parameters, but also perform complex calculations of volume and surface area, providing more comprehensive data support for livestock health and production performance evaluation.
[0083] -User-friendliness: The design of the manual calibration and data integration platform improves the user interaction experience and practicality of the system, allowing users to easily perform calibration and view measurement results.
[0084] It can be seen that livestock images are captured from different angles to generate a multi-view image set; feature points are extracted and matched between the multi-view images; three-dimensional point cloud is reconstructed based on the matched feature point pairs; the three-dimensional point cloud is converted into a three-dimensional grid model, and multi-parameter body size measurement is performed on the three-dimensional grid model, thereby providing an efficient, accurate and robust three-dimensional measurement solution for livestock body size, so as to improve the production management efficiency and scientific breeding level of animal husbandry.
[0085] Another embodiment of the present invention provides a three-dimensional measurement system for livestock body size based on machine vision technology, see Figure 3 , the system may include: A capture module 301 is used to capture images of livestock from different angles to generate a multi-view image set; A matching module 302, used for extracting and matching feature points between multi-view images; A reconstruction module 303 is used to reconstruct a three-dimensional point cloud based on the matched feature point pairs; The measurement module 304 is used to convert the 3D point cloud into a 3D mesh model, and perform multi-parameter body measurement on the 3D mesh model.
[0086] It can be seen that livestock images are captured from different angles to generate a multi-view image set; feature points are extracted and matched between the multi-view images; three-dimensional point cloud is reconstructed based on the matched feature point pairs; the three-dimensional point cloud is converted into a three-dimensional grid model, and multi-parameter body size measurement is performed on the three-dimensional grid model, thereby providing an efficient, accurate and robust three-dimensional measurement solution for livestock body size, so as to improve the production management efficiency and scientific breeding level of animal husbandry.
[0087] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0088] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps: S201, capturing images of livestock from different angles to generate a multi-view image set; S202, extracting and matching feature points between multi-view images; S203, reconstructing a three-dimensional point cloud according to the matched feature point pairs; S204: Convert the three-dimensional point cloud into a three-dimensional mesh model, and perform multi-parameter body measurement on the three-dimensional mesh model.
[0089] It can be seen that livestock images are captured from different angles to generate a multi-view image set; feature points are extracted and matched between the multi-view images; three-dimensional point cloud is reconstructed based on the matched feature point pairs; the three-dimensional point cloud is converted into a three-dimensional grid model, and multi-parameter body size measurement is performed on the three-dimensional grid model, thereby providing an efficient, accurate and robust three-dimensional measurement solution for livestock body size, so as to improve the production management efficiency and scientific breeding level of animal husbandry.
[0090] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0091] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0092] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program: S201, capturing images of livestock from different angles to generate a multi-view image set; S202, extracting and matching feature points between multi-view images; S203, reconstructing a three-dimensional point cloud according to the matched feature point pairs; S204: Convert the three-dimensional point cloud into a three-dimensional mesh model, and perform multi-parameter body measurement on the three-dimensional mesh model.
[0093] It can be seen that livestock images are captured from different angles to generate a multi-view image set; feature points are extracted and matched between the multi-view images; three-dimensional point cloud is reconstructed based on the matched feature point pairs; the three-dimensional point cloud is converted into a three-dimensional grid model, and multi-parameter body size measurement is performed on the three-dimensional grid model, thereby providing an efficient, accurate and robust three-dimensional measurement solution for livestock body size, so as to improve the production management efficiency and scientific breeding level of animal husbandry.
[0094] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.
Claims
1. A three-dimensional measurement method for livestock body size based on machine vision technology. It is characterized in that The method comprises: Capturing images of livestock from different angles to generate a multi-view image set; Extract and match feature points between multi-view images; Reconstruct the 3D point cloud based on the matched feature point pairs; The three-dimensional point cloud is converted into a three-dimensional mesh model, and multi-parameter body measurement is performed on the three-dimensional mesh model.
2. The method according to claim 1, It is characterized in that The feature point extraction and matching between multi-view images includes: For each multi-view image, the accelerated robust feature SURF algorithm is used to detect specific key feature points in the image; For each detected feature point, a SURF descriptor of the feature point is calculated, wherein the SURF descriptor generates a vector by analyzing a local area around the feature point to represent local image information of the feature point; The SURF descriptor is normalized, and the similarity of the normalized SURF descriptors of the feature points between the multi-view images is calculated, wherein for each feature point, a corresponding feature point with a minimum Euclidean distance in other view images is searched for preliminary matching; The initial matching results are bidirectionally verified, and the feature point matching pairs that pass the bidirectional verification are retained as the feature point pairs that have completed the matching.
3. The method according to claim 2, It is characterized in that The three-dimensional point cloud reconstruction is performed according to the matched feature point pairs, including: Use binocular stereo vision technology and triangulation technology to construct the initial 3D point cloud; Apply a deep learning-based stereo matching algorithm to estimate the depth map of multi-view images and convert the depth map into an intermediate 3D point cloud; Merging the intermediate three-dimensional point cloud with the initial three-dimensional point cloud to increase the point cloud density; For the fused 3D point cloud, the neighborhood density of each point is calculated using statistical filtering technology, and points with a neighborhood density lower than a preset threshold are eliminated; Use bilateral filtering to smooth the removed point cloud to retain edge details; The color information of the multi-view images is added to the smoothed 3D point cloud so that the point cloud has color attributes and a complete 3D point cloud is obtained.
4. The method according to claim 3, It is characterized in that The converting the three-dimensional point cloud into a three-dimensional mesh model comprises: Performing voxel grid filtering on the complete three-dimensional point cloud, and estimating a normal vector of each point on the filtered three-dimensional point cloud; The Poisson surface reconstruction algorithm is used to convert the point cloud data with normal vector information into a 3D mesh model.
5. A three-dimensional measurement system for livestock body size based on machine vision technology. It is characterized in that The system comprises: A capture module, used for capturing images of livestock from different angles to generate a multi-view image set; A matching module, used for extracting and matching feature points between multi-view images; A reconstruction module is used to reconstruct a three-dimensional point cloud based on matched feature point pairs; The measurement module is used to convert the three-dimensional point cloud into a three-dimensional grid model and perform multi-parameter body measurement on the three-dimensional grid model.
6. The system according to claim 5, It is characterized in that The matching module is specifically used for: For each multi-view image, the accelerated robust feature SURF algorithm is used to detect specific key feature points in the image; For each detected feature point, a SURF descriptor of the feature point is calculated, wherein the SURF descriptor generates a vector by analyzing a local area around the feature point to represent local image information of the feature point; The SURF descriptor is normalized, and the similarity of the normalized SURF descriptors of the feature points between the multi-view images is calculated, wherein for each feature point, a corresponding feature point with a minimum Euclidean distance in other view images is searched for preliminary matching; The initial matching results are bidirectionally verified, and the feature point matching pairs that pass the bidirectional verification are retained as the feature point pairs that have completed the matching.
7. The system according to claim 6, It is characterized in that The reconstruction module is specifically used for: Use binocular stereo vision technology and triangulation technology to construct the initial 3D point cloud; Apply a deep learning-based stereo matching algorithm to estimate the depth map of multi-view images and convert the depth map into an intermediate 3D point cloud; Merging the intermediate three-dimensional point cloud with the initial three-dimensional point cloud to increase the point cloud density; For the fused 3D point cloud, the neighborhood density of each point is calculated using statistical filtering technology, and points with a neighborhood density lower than a preset threshold are eliminated; Use bilateral filtering to smooth the removed point cloud to retain edge details; The color information of the multi-view images is added to the smoothed 3D point cloud so that the point cloud has color attributes and a complete 3D point cloud is obtained.
8. The system according to claim 7, It is characterized in that The measurement modules are used today for: Performing voxel grid filtering on the complete three-dimensional point cloud, and estimating a normal vector of each point on the filtered three-dimensional point cloud; The Poisson surface reconstruction algorithm is used to convert the point cloud data with normal vector information into a 3D mesh model.
9. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 4 when executed.
10. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Livestock weighing system and livestock weighing method using same
CN111386075A
Rapid three-dimensional reconstruction method for mine inspection scene of unmanned aerial vehicle
CN112288875A
Non-contact three-dimensional human body size measuring method
CN113177977A
Target detection method and device in three-dimensional scene
CN113486887A
High-precision curved surface reconstruction method and device based on mutual fusion of normal vector and point cloud data
CN115761137A
Cited By
Portable animal and plant phenotype determination method, system and device
CN119618082A
Meat rabbit body weight and body size automatic measuring system based on machine vision
CN119679396A
An automated measurement system for rabbit weight and body size based on machine vision
CN119679396B
Binocular vision naked eye 3D image generation method
CN120151493A
Robot visual guidance method and system
CN120852519A
