Image recognition measuring method and system for goat body size

Through multi-view dynamic capture technology and three-dimensional modeling, combined with topological relationship analysis, the problems of inefficiency and insufficient accuracy of traditional goat body ruler measurement methods are solved, and efficient and accurate body ruler measurement and management are achieved.

CN119418323APending Publication Date: 2025-02-11ANHUI AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411437084.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

Traditional goat body ruler measurement methods are inefficient and susceptible to human factors, resulting in inaccurate measurement results and may cause stress and pain to the animals. The prior art relies on image capture and two-dimensional feature extraction from a single perspective, and has limitations.

Method used

Using multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis, goat body surface data is collected through multi-view dynamic capture technology, three-dimensional body surface model is generated, body scale feature point set and topological relationship, and body scale data is calculated and optimized. .

Benefits of technology

Efficient, accurate and real-time measurement and management of goat body rulers is achieved, reducing the influence of human factors, improving the accuracy and consistency of measurements, and avoiding discomfort with animals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418323A_ABST
    Figure CN119418323A_ABST
Patent Text Reader

Abstract

The invention discloses an image recognition measuring method and system for the body size of a goat, and the method comprises the steps: collecting and processing the body surface data of the goat through a multi-view dynamic capturing technology, and obtaining a three-dimensional body surface model of the goat; based on the three-dimensional body surface model, identifying a position associated with the goat body size, and obtaining a body size feature point set and a topological relation thereof; calculating the body size data of the goat according to the body size feature point set and the topological relation thereof; and performing global correction and optimization processing on the body size data to obtain final corrected body size data. According to the embodiment of the invention, efficient, accurate and real-time body size measurement and management can be realized by fusing a multi-view dynamic capture technology, three-dimensional modeling and topological relation analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image recognition, and in particular to an image recognition and measurement method and system for goat body size. Background Art

[0002] In modern agriculture and animal husbandry, goats are an important economic animal and are widely used in the production of meat, dairy products, fur and other products. Accurate body measurement of goats is of great significance for livestock health management, genetic improvement and breeding selection. Traditional methods of measuring goat body size are mostly based on manual means, such as using tape measures, calipers and other tools for measurement. This method is not only inefficient, but also easily affected by human factors, resulting in inaccurate measurement results and may even cause certain stress and pain to the animals.

[0003] In recent years, with the rapid development of computer vision and image processing technology, a variety of non-contact measurement technologies have been gradually introduced into animal body size measurement. Existing technologies mainly rely on single-view image capture and two-dimensional feature extraction, which improves the measurement accuracy to a certain extent, but still has some limitations. Summary of the invention

[0004] The purpose of the present invention is to provide an image recognition method and system for measuring goat body size, so as to solve the deficiencies in the prior art and realize efficient, accurate and real-time body size measurement and management by integrating multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis.

[0005] An embodiment of the present application provides an image recognition and measurement method for goat body size, the method comprising:

[0006] The goat's body surface data is collected and processed using multi-view dynamic capture technology to obtain a three-dimensional body surface model of the goat;

[0007] Based on the three-dimensional body surface model, positions associated with the goat's body size are identified to obtain a body size feature point set and its topological relationship;

[0008] Calculating the body size data of the goat according to the body size feature point set and its topological relationship;

[0009] The body size data is globally corrected and optimized to obtain final corrected body size data.

[0010] Optionally, the method of collecting and processing the body surface data of the goat using the multi-view dynamic capture technology to obtain the three-dimensional body surface model of the goat includes:

[0011] A multi-lens array containing several cameras is arranged in the goat activity area, and all cameras capture images at the same time node by encoding clock signals;

[0012] Design and integrate a time-coded flash system based on an LED matrix, which provides a series of flash pulses with different intensities and spectra, and provides additional optical information for image acquisition at different time points through time sequence encoding synchronized with the camera;

[0013] In the case of time synchronization, the multi-lens array and the flash system are started to continuously capture images to obtain a multi-view image sequence of the goat's body surface, wherein each camera records a series of multi-spectral images from its perspective and marks a time stamp to ensure time consistency;

[0014] Select a group of images from the multi-view image sequence as references, use a sparse stereo reconstruction algorithm to perform preliminary matching on feature points of each view, filter out erroneous matches through local geometric consistency constraints, perform sub-pixel level correction on the matching results, and obtain a three-dimensional sparse model;

[0015] Combined with the timing information provided by the time-coded flash system, the timing compensation mechanism is applied to dynamically compensate the multi-view images in the time domain so that the illumination and images between each view can be adjusted synchronously;

[0016] For the time-compensated image, the exposure fusion value of each pixel in all images is calculated to generate a set of high dynamic range HDR images with multi-view and time information. Based on the set of high dynamic range HDR images, the high dynamic information is mapped to a three-dimensional sparse model to obtain an HDR three-dimensional model as the three-dimensional surface model of the goat.

[0017] Optionally, the identifying the position associated with the body size of the goat based on the three-dimensional body surface model to obtain a body size feature point set and its topological relationship includes:

[0018] Using a pre-trained convolutional Transformer network, forward propagation is performed on the three-dimensional coordinate points in the three-dimensional body surface model to extract the deep feature embedding of each point, wherein the deep feature embedding is represented by a high-dimensional vector to describe the geometric and semantic information of different areas on the model surface;

[0019] The deep feature embedding is reduced to three-dimensional space through nonlinear dimensionality reduction technology. In the reduced dimensionality feature space, the points are clustered so that each clustered point group corresponds to a specific body size feature position, and each point group is regarded as a body size feature point set.

[0020] According to the clustered point group, each body size feature position is calibrated in the three-dimensional body surface model, and a topological structure of feature points in a body size feature point set is constructed using a minimum spanning tree algorithm.

[0021] Optionally, calculating the body size data of the goat according to the body size feature point set and its topological relationship includes:

[0022] The Bellman-Ford algorithm is used to find the optimal measurement path on the topological structure of feature points to ensure distance measurement on the surface of the body;

[0023] At each body feature position, the spline curve fitting technology is used to fit the local geometric structure, and the body geometric parameters are calculated by analyzing the normal and curvature of the surface;

[0024] Wavelet transform is used to perform multi-resolution analysis on the feature point set to decompose the geometric details at different levels. According to the analysis results, the calculated body size geometric parameters are corrected at multiple levels to obtain the corrected body size geometric parameters.

[0025] Another embodiment of the present application provides an image recognition and measurement system for goat body size, the system comprising:

[0026] A processing module, used for collecting and processing the body surface data of the goat by using a multi-view dynamic capture technology to obtain a three-dimensional body surface model of the goat;

[0027] An identification module, used for identifying positions associated with the body size of the goat based on the three-dimensional body surface model, and obtaining a body size feature point set and its topological relationship;

[0028] A calculation module, used for calculating the body size data of the goat according to the body size feature point set and its topological relationship;

[0029] The optimization module is used to perform global correction and optimization processing on the body size data to obtain the final corrected body size data.

[0030] 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.

[0031] 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.

[0032] Compared with the prior art, the present invention provides an image recognition and measurement method for goat body size. The method uses a multi-view dynamic capture technology to collect and process body surface data of the goat to obtain a three-dimensional body surface model of the goat; based on the three-dimensional body surface model, positions associated with the body size of the goat are identified to obtain a body size feature point set and a topological relationship thereof; the body size data of the goat is calculated according to the body size feature point set and the topological relationship thereof; the body size data is globally corrected and optimized to obtain the final corrected body size data, thereby realizing efficient, accurate and real-time body size measurement and management by integrating the multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A hardware structure block diagram of a computer terminal for an image recognition and measurement method of goat body size provided by an embodiment of the present invention;

[0034] Figure 2 A schematic diagram of a process for measuring goat body size by image recognition provided by an embodiment of the present invention;

[0035] Figure 3 A schematic diagram of the structure of an image recognition and measurement system for goat body size provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] 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.

[0037] The embodiment of the present invention firstly provides an image recognition method for measuring goat body size. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, etc.

[0038] 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 image recognition and measurement of goat body size provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only 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.

[0039] The memory 104 can be used to store software programs and modules of application software, such as program instructions / modules corresponding to the method for image recognition and measurement of goat body size 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.

[0040] 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.

[0041] See also Figure 2 The embodiment of the present invention provides an image recognition method for measuring goat body size, which may include the following steps:

[0042] S201, using a multi-view dynamic capture technology to collect and process body surface data of the goat to obtain a three-dimensional body surface model of the goat;

[0043] Using multi-view dynamic capture technology, through the reasonable configuration of cameras and light sources, the goat's body surface data is systematically collected, and then processed to generate a three-dimensional body surface model. This method can obtain the goat's full body details at multiple angles and conditions to ensure that the captured data is rich in information and accurate.

[0044] Through multi-perspective capture, the front, side and back of the goat can be fully covered, reducing data loss and incomplete information caused by a single perspective, and obtaining a more accurate three-dimensional surface structure; compared with traditional manual measurement methods, the generation of three-dimensional models can provide higher measurement accuracy, especially in the processing of complex surface shapes, which can significantly improve the reliability and reproducibility of body size.

[0045] Specifically, a multi-lens array including several cameras can be arranged in the goat activity area, and all cameras can capture images at the same time node by encoding clock signals;

[0046] By setting up multiple cameras in the goat activity area, it is ensured that images are captured from different angles at the same time. Using an encoded clock signal can synchronize all cameras to avoid image inconsistencies caused by time differences. Accurate image synchronization is beneficial to subsequent image processing and 3D reconstruction, ensuring data consistency and accuracy, and laying a good foundation for model construction. A dynamic time synchronization algorithm based on timestamps can be used, and each camera has an independent timestamp to ensure accurate alignment at the beginning of capture.

[0047] In the goat's activity area, multiple cameras (for example, 6 to 12) are reasonably arranged according to the goat's range of motion and structural characteristics to form a multi-angle camera array. Each camera is equipped with a high-quality image sensor and lens to ensure that clear images are captured. By using a synchronous encoder, all cameras are connected to the same time reference signal. When image capture is started, the encoder sends a signal to ensure that all cameras start shooting at the same time to avoid image inconsistency caused by time delays. At the same time, the system records the timestamp of each camera shot for time correction and data alignment during subsequent processing.

[0048] Design and integrate a time-coded flash system based on an LED matrix, which provides a series of flash pulses with different intensities and spectra, and provides additional optical information for image acquisition at different time points through time sequence encoding synchronized with the camera;

[0049] In this step, the flash system is designed to enhance the quality of image acquisition, especially in low-light conditions. The time-coded flash pulses not only provide better illumination of the subject, but also can emphasize specific surface features through light sources of different intensities and spectra. By providing additional optical information, the system can better capture the details of the goat's body surface, enhance the contrast and clarity of the image, and facilitate subsequent processing and feature extraction. A pulse sequence optimization algorithm can be introduced, which can adjust the flash brightness and frequency in real time according to the lighting conditions of the capture environment to ensure the best exposure effect at each capture time point, maximize the brightness and details of the image, and improve the effectiveness of subsequent processing.

[0050] Build an LED matrix flash system consisting of multiple LED bulbs that can emit light of different colors and brightness. Each LED light is equipped with an independent control circuit that can adjust the luminous intensity and spectrum as needed. Before image capture, the system can intelligently adjust the output of the LED lights to supplement the insufficient light by detecting the ambient light conditions through sensors. Using a time-coded method, all LED lights emit flash pulses of different intensities and colors in multiple exposures under the guidance of the synchronous capture signal. Each flash is captured by each camera simultaneously, providing multi-level lighting information for subsequent processing, ensuring that the captured image can retain rich details and layering in both strong and low light environments.

[0051] In the case of time synchronization, the multi-lens array and the flash system are started to continuously capture images to obtain a multi-view image sequence of the goat's body surface, wherein each camera records a series of multi-spectral images from its perspective and marks a time stamp to ensure time consistency;

[0052] This step continuously captures images by activating the multi-lens array and flash system to form a set of high-quality multi-view image sequences. Each camera records at a specific timestamp to ensure that all captured data is consistent in time. The generated multispectral image sequence provides a rich data basis for subsequent three-dimensional modeling and feature matching, which helps to reconstruct the goat's body surface more accurately. The image sequence consistency correction algorithm can be applied to dynamically adjust the exposure time and contrast of the image by comparing images from different perspectives in real time to ensure that the images captured in the same time period are visually completely consistent, reducing errors in post-processing.

[0053] After confirming that all cameras and flash systems have been successfully synchronized, a trigger signal is used to start the image capture process. Each camera performs continuous image acquisition at a preset time interval to capture a sequence of images of the goat's body surface observed from different angles. During this process, the system continuously records the timestamp of each camera and stores the relevant information in a database. This information includes not only the captured image data, but also auxiliary information such as the light source status, ambient temperature, humidity, etc. for subsequent analysis and processing. In addition, during the image capture process, the system monitors the status of each camera in real time to ensure that there is no incomplete capture due to failure or occlusion.

[0054] Select a group of images from the multi-view image sequence as references, use a sparse stereo reconstruction algorithm to perform preliminary matching on feature points of each view, filter out erroneous matches through local geometric consistency constraints, perform sub-pixel level correction on the matching results, and obtain a three-dimensional sparse model;

[0055] This step selects reference images and uses sparse stereo reconstruction algorithms to perform feature matching on the captured multi-view images. Geometric consistency constraints are used to filter matching errors to ensure that the generated 3D sparse model has higher accuracy. This step effectively constructs a preliminary 3D sparse model, providing basic data for subsequent 3D body surface reconstruction and identifying the basic structure and features of the goat's body surface.

[0056] A set of representative, high-definition reference images is selected, and the feature points in each view image are extracted using a sparse stereo reconstruction algorithm. When matching features, a preliminary match is performed in combination with feature descriptors (such as SIFT or ORB). In this process, obvious wrong matches are filtered out through local geometric consistency constraints, such as by calculating the geometric position relationship (such as distance, angle) of each feature point. Then, sub-pixel level correction technology is used to accurately adjust the position of each matching feature point to eliminate deviations caused by image jitter or camera errors. After these processes, the resulting three-dimensional sparse model can accurately express the body contour of the goat, providing a solid foundation for subsequent modeling.

[0057] Combined with the timing information provided by the time-coded flash system, the timing compensation mechanism is applied to dynamically compensate the multi-view images in the time domain so that the illumination and images between each view can be adjusted synchronously;

[0058] This step uses the light source information provided by the time-coded flash system to adjust the image illumination and imaging in the time domain through a timing compensation mechanism, so that the images captured by each camera remain consistent under lighting conditions, ensuring that the images captured at different viewing angles are highly consistent in illumination and imaging, reducing image quality loss caused by lighting changes, and improving the accuracy and availability of 3D reconstruction.

[0059] The time series information recorded by the time-coded flash system is used to dynamically compensate the images taken by each camera. First, the compensation parameters are determined by comparing the images of each view at the same time point, analyzing the light intensity and color differences. Then, the image processing algorithm is used to dynamically adjust the brightness, contrast and saturation of each image to eliminate the image differences caused by different illumination during shooting. Finally, the compensated images are fused to ensure that the images of all view angles are consistent in terms of illumination and image quality, thereby improving the reliability and accuracy of subsequent 3D reconstruction.

[0060] For the time-compensated image, the exposure fusion value of each pixel in all images is calculated to generate a set of high dynamic range HDR images with multi-view and time information. Based on the set of high dynamic range HDR images, the high dynamic information is mapped to a three-dimensional sparse model to obtain an HDR three-dimensional model as the three-dimensional surface model of the goat.

[0061] This step generates a set of high dynamic range (HDR) images by calculating the exposure fusion value of each pixel. Based on these HDR images, they are mapped to the generated three-dimensional sparse model to construct a complete HDR three-dimensional body surface model. The HDR image set can fully retain the details and texture information of the goat's body surface, and the generated HDR three-dimensional model has greatly improved accuracy and authenticity, laying a solid foundation for subsequent body size measurement.

[0062] After the timing compensation is completed, the brightness of each pixel in each image is analyzed to calculate the optimal exposure fusion value in all images. Based on these values, a set of high dynamic range (HDR) images is generated by weighted averaging. In this process, the system fuses the image information of different exposure values ​​to ensure that the final HDR image can cover the full brightness range from dark to bright. Subsequently, the high dynamic information in these HDR images is mapped to the previously generated three-dimensional sparse model, and a high-quality HDR three-dimensional surface model is obtained by combining texture mapping and illumination modeling. This model can not only truly reflect the body shape of the goat, but also show delicate lighting and color effects, providing a high-quality data basis for subsequent body size measurements.

[0063] S202, identifying positions associated with the body size of the goat based on the three-dimensional body surface model, and obtaining a body size feature point set and its topological relationship;

[0064] In this stage, the positions related to the body size characteristics of goats are identified through the analysis of the three-dimensional body surface model, including key dimensions such as ear width, shoulder height, and body length. In this process, with the help of advanced deep learning models (such as convolutional neural networks or Transformer networks), the geometric features and semantic information of each point in the body surface model are extracted to establish a set of body size feature points. The set of feature points extracted by deep learning methods can significantly improve the accuracy of body size measurement and reduce human measurement errors; realize the automated measurement of goat body size, reduce human intervention, and provide an efficient and fast way to collect body size data; combined with the geometric information and semantic understanding of the three-dimensional model, it can identify a variety of body size characteristics and provide comprehensive data support for subsequent breeding and health assessment.

[0065] Specifically, a pre-trained convolutional Transformer network can be used to perform forward propagation on the three-dimensional coordinate points in the three-dimensional body surface model to extract the deep feature embedding of each point, wherein the deep feature embedding is represented by a high-dimensional vector to express the geometric and semantic information of different areas on the model surface;

[0066] This step uses a fully trained convolutional Transformer network to forward propagate each 3D coordinate point in the 3D body surface model to extract its deep feature embedding. These embeddings are represented by high-dimensional vectors and are designed to capture the geometric structure and semantic information of different areas on the model surface. By extracting deep feature embeddings, more comprehensive body surface feature information can be obtained to help optimize subsequent feature point recognition. Using a deep learning model to automatically extract features greatly improves processing efficiency and greatly reduces the need for manual intervention.

[0067] First, you need to prepare a set of annotated 3D body surface model data, in which the location of the feature points of each model is known. Use this data to train the convolutional Transformer network. The network will include multiple convolutional layers, Transformer structures, and activation functions. During the training process, the network will learn how to capture the geometric features and local semantic information of each point. After the training is completed, the 3D coordinate points to be analyzed are input into the network for forward propagation to extract the deep feature embedding of each coordinate point. In the output layer, the embedding of each point will be obtained in the form of high-dimensional vectors, which will contain the geometric shape, texture information, and semantic features of each area of ​​the body surface.

[0068] The deep feature embedding is reduced to three-dimensional space through nonlinear dimensionality reduction technology. In the reduced dimensionality feature space, the points are clustered so that each clustered point group corresponds to a specific body size feature position, and each point group is regarded as a body size feature point set.

[0069] In this step, nonlinear dimensionality reduction techniques such as t-SNE or UMAP are used to embed and map deep features into three-dimensional space for feature clustering. By analyzing the similarity between features, similar points in the feature space are divided into the same cluster to form a specific set of body size feature points. Through clustering, related feature points are classified into a group, which is convenient for subsequent feature selection and application, greatly improving the organization of the data; dimensionality reduction can not only reduce the amount of calculation, but also prevent the "curse of dimensionality" and improve the stability and accuracy of subsequent calculations.

[0070] In this stage, nonlinear dimensionality reduction techniques (such as t-SNE or UMAP) are used to reduce the dimensionality of the high-dimensional deep feature embedding obtained from the convolutional Transformer network. Specifically, the similarity matrix between each point is first calculated, and this similarity matrix will be used to reflect the distance relationship between points in the high-dimensional space. Then, by selecting appropriate parameters, it is input into the dimensionality reduction algorithm to obtain the corresponding three-dimensional space representation. The feature points after dimensionality reduction will be clustered for analysis, and K-means or hierarchical clustering algorithms can be applied. During the clustering process, the number of clusters or similarity thresholds are set to ensure that each cluster corresponds to a specific body size feature location. Each clustering result will form a point group, which constitutes a complete set of body size feature points.

[0071] According to the clustered point group, each body size feature position is calibrated in the three-dimensional body surface model, and a topological structure of feature points in a body size feature point set is constructed using a minimum spanning tree algorithm.

[0072] Based on the clustering results, each body size feature position is calibrated in the three-dimensional body surface model to ensure the correctness of these calibration points in space. Subsequently, the minimum spanning tree algorithm is used to optimize the connection relationship between feature points and construct a topological structure to facilitate subsequent distance measurement and geometric calculation. Through precise calibration and optimization of the connection structure, the relative position of the feature points is ensured to be accurate, and the accuracy of subsequent measurements is improved; through the construction of the topological structure, data support and structured information are provided for subsequent algorithm processing.

[0073] By analyzing the clustered point groups, the geometric center of each point group is extracted as the calibration point of the feature position. Next, these feature positions are mapped back to the three-dimensional body surface model to ensure that each calibration point accurately corresponds to the actual position of the body surface. At this time, the topological structure in the feature point set can be constructed with the help of the minimum spanning tree algorithm (such as Prim or Kruskal algorithm). First, the distance between each pair of feature points is calculated to form a complete distance matrix. Then, a tree is generated from this distance matrix using the minimum spanning tree algorithm, which will ensure that all feature points are interconnected and the total side length is the shortest. The final topological structure not only reflects the relationship between the feature points, but also provides support for the subsequent body size data calculation.

[0074] S203, calculating the body size data of the goat according to the body size feature point set and its topological relationship;

[0075] At this stage, based on the identified body feature point set and its topological relationship, the system calculates the body size data of the goat through mathematical and geometric algorithms. These body feature points include the key dimensions of the goat, such as shoulder height, ear width, back length and circumference. Through reasonable configuration and use of topological structures, the system can accurately calculate these dimensions to ensure the accuracy and consistency of measurement.

[0076] By utilizing feature point sets and topological structures, the errors caused by traditional manual measurements can be effectively reduced and the accuracy of body size data can be improved. The automated calculation process ensures the consistency of each measurement, making the data comparable and facilitating subsequent analysis and application. The body size data obtained can be used for goat health assessment, breeding selection and other agricultural management decisions, providing farmers with scientific data support and promoting the optimization of the entire breeding industry.

[0077] Specifically, the Bellman-Ford algorithm can be used to find the optimal measurement path on the topological structure of the feature points to ensure the distance measurement on the body surface;

[0078] This step aims to identify the optimal path from one body feature point to another, using the characteristics of the Bellman-Ford algorithm, which can handle edges with negative weights and is suitable for accurate distance measurement in irregular body surface models. The topological structure is established in three-dimensional space, including all feature points and their connections with each other, and the distance between feature points is represented by the weight of the edge. This makes it possible to adapt to the complex shape of the body surface during the path finding process, ensuring accurate measurement and path optimization. By calculating the shortest path, the time and resources required for measurement are reduced, and the entire measurement process is optimized; the optimal path can reduce errors on the body surface and ensure that the final calculated body size data is more accurate and reliable.

[0079] First, a directed graph is constructed using the distance information between feature points. The nodes of the graph are the body feature points, and the edge weights are the actual measured distances between the feature points. The Bellman-Ford algorithm is applied, starting from a specific feature point, traversing all the edges in the graph, and gradually updating the shortest distance to each feature point. Throughout the algorithm, a priority queue is continuously maintained to quickly obtain the point with the smallest current distance, ensuring that the optimal path can be found at each step. Finally, the output result is the shortest path from the starting feature point to the target feature point, as well as each feature point on the path.

[0080] At each body feature position, the spline curve fitting technology is used to fit the local geometric structure, and the body geometric parameters are calculated by analyzing the normal and curvature of the surface;

[0081] In this step, spline curve fitting technology is used to model the local geometric structure around the body feature points. Spline curves can effectively smooth the data of irregular geometric bodies by constructing piecewise polynomials, thereby accurately reproducing the true shape of the body surface. Furthermore, using this spline curve, geometric parameters such as normals and curvatures of each feature position can be analyzed, providing a basis for the accurate calculation of subsequent body size data. The smooth characteristics of spline curves can capture subtle surface changes and ensure that the model is closer to the actual situation; the calculation of normals and curvatures provides important data for understanding the deformation and characteristics of the body surface in different parts, which is helpful for subsequent comprehensive analysis.

[0082] At each body feature location, the surrounding 3D point cloud data is extracted, and these points are fitted using a high-order spline curve (such as a B-spline or a Catmull-Rom spline). Specifically, the node positions of the fit are first determined, and then the polynomial coefficients in each interval are calculated to form a continuous and smooth curve. After the curve fitting is completed, the derivative of the curve is calculated using differential operations to obtain the normal vector and curvature of each point. These geometric parameters will be organized and used to describe the specific position and shape of the body feature in space.

[0083] Wavelet transform is used to perform multi-resolution analysis on the feature point set to decompose the geometric details at different levels. According to the analysis results, the calculated body size geometric parameters are corrected at multiple levels to obtain the corrected body size geometric parameters.

[0084] Wavelet transform technology is used to perform multi-level analysis on the geometric parameters extracted in the previous steps, aiming to reveal deeper geometric details of body size features. Wavelet transform can decompose the signal into different frequency components, thereby effectively capturing the details and changes of the model and making the feature data richer. In this way, body size parameters can be carefully analyzed and corrected to improve their accuracy and reliability. Wavelet transform can extract hidden details in complex shapes, ensuring that key geometric features are not missed during the analysis process; by analyzing geometric information at all levels, body size geometric parameters are more representative and accurate, enhancing the performance of the entire measurement system.

[0085] The calculated body geometry parameters are subjected to multi-resolution analysis using wavelet transform (e.g., discrete wavelet transform). First, a suitable wavelet basis function is selected to perform wavelet decomposition of the geometry parameter signal to obtain low-frequency and high-frequency components. By analyzing the decomposed high-frequency components, subtle changes in the body surface and the influence of noise can be identified. On this basis, the wavelet coefficients are processed according to a specific threshold to retain important geometric features and remove noise. Finally, the processed coefficients are merged using an inverse wavelet transform to obtain a refined set of geometry parameters, and on this basis, the original body geometry parameters are corrected to ensure that the final geometry parameters are more accurate and reliable.

[0086] S204: Perform global correction and optimization processing on the body size data to obtain final corrected body size data.

[0087] At this stage, the body size data is globally corrected and optimized to ensure its accuracy and credibility. The correction process aims to eliminate the impact of factors such as measurement errors, changes in the external environment, or insufficient equipment accuracy. The final corrected data provides a reliable basis for subsequent analysis and application, including goat growth assessment, health monitoring, and breeding decisions. Through comprehensive correction processing, systematic errors are eliminated, making the final body size data more reliable and improving the scientificity and accuracy of the application; global optimization processing ensures the consistency of data under different measurement conditions, making subsequent analysis results comparable; accurate body size data will directly affect breeding management and decision-making, forming a virtuous circle and promoting scientific and technological progress in the agricultural field.

[0088] Specifically, the present application uses an algorithm combining polynomial regression and Kalman filtering for global correction and optimization. The method combines data fitting with real-time state estimation to provide stable and reliable measurement results in all situations. The following steps may be included:

[0089] Step 1: Data preprocessing Collect all body measurement data, including measurement values ​​and their corresponding feature point locations. Perform preliminary filtering on the data to remove obvious outliers (such as measurement values ​​outside a reasonable range) to ensure the basic quality of the data.

[0090] Step 2: Establish an initial model. Use the polynomial regression method to perform a preliminary fit on the characteristic parameters of each body size. Select an appropriate polynomial order (such as quadratic or cubic) and use the least squares method to fit the expected value of each body size characteristic in order to establish an initial model. At the same time, the characteristic parameters are combined with environmental variables (such as light, temperature, etc.) to ensure the comprehensiveness of the model.

[0091] Step 3: Introduce Kalman filtering After obtaining the preliminary model, introduce Kalman filtering technology. First, define the state transfer equation and observation equation. The state includes the current body size eigenvalue and its estimated noise, and the observation value is the measured body size data. Through Kalman filtering, the body size data is dynamically updated in real time to reduce the impact of random noise during the measurement process.

[0092] 1. Prediction step: Predict the current state based on the previous state, and update the state estimate and error covariance matrix.

[0093] 2. Update step: Combine the current measurement value, calculate the Kalman gain, optimize the state estimation, and obtain more accurate body size data.

[0094] Step 4: Optimization and correction: Integrate the body size data processed by Kalman filtering with the initial polynomial regression model, and use the weighted average method to adjust the final body size characteristic parameters. This process can also consider the average value of multiple measurements at the same feature point to further improve the stability of the data.

[0095] Among them, the body size parameters after Kalman filtering are recorded as X_{kf}, which are real-time estimates of the original measurement data and reflect the influence of noise in the measurement process; the expected body size characteristic parameters obtained by the polynomial regression model are recorded as X_{poly}, which are the fitting results based on the initial measurement data and environmental influencing factors.

[0096] Calculate the standard deviation sigma_{kf} of the Kalman filtered data X_{kf}, and calculate the standard deviation sigma_{poly} of the polynomial regression model output X_{poly}; set the corresponding weights w_{kf} and w_{poly} according to the inverse ratio of the standard deviation:

[0097]

[0098] Calculate the total weight: w_{total}=w_{kf}+w_{poly}.

[0099] According to the determined weights, the final body size feature parameter X_{final} is calculated using the weighted average method:

[0100]

[0101] This formula ensures that the portion of the data source with high reliability (the portion with small standard deviation) accounts for a larger proportion of the final result.

[0102] Analyze the final body size feature parameter X_{final}, compare the deviation with the original measurement data, and check whether the corrected data meets expectations. If it is found that the final result of some feature points has a large deviation, you can consider adjusting the calculation logic of the weight, such as introducing other factors (such as measurement conditions, equipment status, etc.) to enhance the rationality of the weight. If necessary, you can repeat the above process to optimize the results.

[0103] Step 5: Evaluation and feedback The accuracy of the corrected data is evaluated through cross-validation and other means, and the measurement results before and after correction are compared to determine the correction effect. The feedback results are used to adjust the model parameters and optimize the algorithm as necessary. This step ensures that the entire correction process is dynamically adaptive and continuously optimizes the algorithm output.

[0104] Step 6: Generate final body size data The body size data processed by the above algorithm will eventually form relatively accurate goat body size characteristic parameters. These data will serve as the basis for subsequent analysis, modeling and decision support to ensure its scientificity and effectiveness.

[0105] This comprehensive global correction and optimization processing method can significantly improve the accuracy of goat body size data while ensuring processing efficiency, ensuring its maximum value in practical applications.

[0106] It can be seen that the body surface data of the goat is collected and processed by using the multi-view dynamic capture technology to obtain the three-dimensional body surface model of the goat; based on the three-dimensional body surface model, the position associated with the body size of the goat is identified to obtain the body size feature point set and its topological relationship; according to the body size feature point set and its topological relationship, the body size data of the goat is calculated; the body size data is globally corrected and optimized to obtain the final corrected body size data, so that efficient, accurate and real-time body size measurement and management can be achieved by integrating the multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis.

[0107] Another embodiment of the present invention provides an image recognition and measurement system for goat body size, see Figure 3 , the system may include:

[0108] The processing module 301 is used to collect and process the body surface data of the goat using a multi-view dynamic capture technology to obtain a three-dimensional body surface model of the goat;

[0109] An identification module 302 is used to identify positions associated with the body size of the goat based on the three-dimensional body surface model, and obtain a body size feature point set and its topological relationship;

[0110] A calculation module 303 is used to calculate the body size data of the goat according to the body size feature point set and its topological relationship;

[0111] The optimization module 304 is used to perform global correction and optimization processing on the body size data to obtain final corrected body size data.

[0112] It can be seen that the body surface data of the goat is collected and processed by using the multi-view dynamic capture technology to obtain the three-dimensional body surface model of the goat; based on the three-dimensional body surface model, the position associated with the body size of the goat is identified to obtain the body size feature point set and its topological relationship; according to the body size feature point set and its topological relationship, the body size data of the goat is calculated; the body size data is globally corrected and optimized to obtain the final corrected body size data, so that efficient, accurate and real-time body size measurement and management can be achieved by integrating the multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis.

[0113] 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.

[0114] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0115] S201, using a multi-view dynamic capture technology to collect and process body surface data of the goat to obtain a three-dimensional body surface model of the goat;

[0116] S202, identifying positions associated with the body size of the goat based on the three-dimensional body surface model, and obtaining a body size feature point set and its topological relationship;

[0117] S203, calculating the body size data of the goat according to the body size feature point set and its topological relationship;

[0118] S204: Perform global correction and optimization processing on the body size data to obtain final corrected body size data.

[0119] It can be seen that the body surface data of the goat is collected and processed by using the multi-view dynamic capture technology to obtain the three-dimensional body surface model of the goat; based on the three-dimensional body surface model, the position associated with the body size of the goat is identified to obtain the body size feature point set and its topological relationship; according to the body size feature point set and its topological relationship, the body size data of the goat is calculated; the body size data is globally corrected and optimized to obtain the final corrected body size data, so that efficient, accurate and real-time body size measurement and management can be achieved by integrating the multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis.

[0120] 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.

[0121] 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.

[0122] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0123] S201, using a multi-view dynamic capture technology to collect and process body surface data of the goat to obtain a three-dimensional body surface model of the goat;

[0124] S202, identifying positions associated with the body size of the goat based on the three-dimensional body surface model, and obtaining a body size feature point set and its topological relationship;

[0125] S203, calculating the body size data of the goat according to the body size feature point set and its topological relationship;

[0126] S204: Perform global correction and optimization processing on the body size data to obtain final corrected body size data.

[0127] It can be seen that the body surface data of the goat is collected and processed by using the multi-view dynamic capture technology to obtain the three-dimensional body surface model of the goat; based on the three-dimensional body surface model, the position associated with the body size of the goat is identified to obtain the body size feature point set and its topological relationship; according to the body size feature point set and its topological relationship, the body size data of the goat is calculated; the body size data is globally corrected and optimized to obtain the final corrected body size data, so that efficient, accurate and real-time body size measurement and management can be achieved by integrating the multi-view dynamic capture technology, three-dimensional modeling and topological relationship analysis.

[0128] 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 method for measuring goat body size by image recognition, characterized in that: The method comprises: The body surface data of the goat is collected and processed by using multi-view dynamic capture technology to obtain a three-dimensional body surface model of the goat; Based on the three-dimensional body surface model, positions associated with the goat's body size are identified to obtain a body size feature point set and its topological relationship; Calculating the body size data of the goat according to the body size feature point set and its topological relationship; The body size data is globally corrected and optimized to obtain final corrected body size data.

2. The method according to claim 1, characterized in that The method uses the multi-view dynamic capture technology to collect and process the body surface data of the goat to obtain a three-dimensional body surface model of the goat, including: A multi-lens array containing several cameras is arranged in the goat activity area, and all cameras capture images at the same time node by encoding clock signals; Design and integrate a time-coded flash system based on an LED matrix, which provides a series of flash pulses with different intensities and spectra, and provides additional optical information for image acquisition at different time points through time sequence encoding synchronized with the camera; In the case of time synchronization, the multi-lens array and the flash system are started to continuously capture images to obtain a multi-view image sequence of the goat's body surface, wherein each camera records a series of multi-spectral images from its perspective and marks a time stamp to ensure time consistency; Select a group of images from the multi-view image sequence as references, use a sparse stereo reconstruction algorithm to perform preliminary matching on feature points of each view, filter out erroneous matches through local geometric consistency constraints, perform sub-pixel level correction on the matching results, and obtain a three-dimensional sparse model; Combined with the timing information provided by the time-coded flash system, the timing compensation mechanism is applied to dynamically compensate the multi-view images in the time domain so that the illumination and images between each view can be adjusted synchronously; For the time-compensated image, the exposure fusion value of each pixel in all images is calculated to generate a set of high dynamic range HDR images with multi-view and time information. Based on the set of high dynamic range HDR images, the high dynamic information is mapped to a three-dimensional sparse model to obtain an HDR three-dimensional model as the three-dimensional surface model of the goat.

3. The method according to claim 2, characterized in that The step of identifying the position associated with the body size of the goat based on the three-dimensional body surface model to obtain a body size feature point set and its topological relationship includes: Using a pre-trained convolutional Transformer network, forward propagation is performed on the three-dimensional coordinate points in the three-dimensional body surface model to extract the deep feature embedding of each point, wherein the deep feature embedding is represented by a high-dimensional vector to describe the geometric and semantic information of different areas on the model surface; The deep feature embedding is reduced to three-dimensional space through nonlinear dimensionality reduction technology. In the reduced dimensionality feature space, the points are clustered so that each clustered point group corresponds to a specific body size feature position, and each point group is regarded as a body size feature point set. According to the clustered point group, each body size feature position is calibrated in the three-dimensional body surface model, and a topological structure of feature points in a body size feature point set is constructed using a minimum spanning tree algorithm.

4. The method according to claim 3, characterized in that The step of calculating the body size data of the goat according to the body size feature point set and its topological relationship comprises: The Bellman-Ford algorithm is used to find the optimal measurement path on the topological structure of feature points to ensure distance measurement on the surface of the body; At each body feature position, the spline curve fitting technology is used to fit the local geometric structure, and the body geometric parameters are calculated by analyzing the normal and curvature of the surface; Wavelet transform is used to perform multi-resolution analysis on the feature point set to decompose the geometric details at different levels. According to the analysis results, the calculated body size geometric parameters are corrected at multiple levels to obtain the corrected body size geometric parameters.

5. An image recognition and measurement system for goat body size, characterized in that: The system comprises: A processing module, used for collecting and processing the body surface data of the goat by using a multi-view dynamic capture technology to obtain a three-dimensional body surface model of the goat; An identification module, used for identifying positions associated with the body size of the goat based on the three-dimensional body surface model, and obtaining a body size feature point set and its topological relationship; A calculation module, used for calculating the body size data of the goat according to the body size feature point set and its topological relationship; The optimization module is used to perform global correction and optimization processing on the body size data to obtain the final corrected body size data.

6. The system according to claim 5, characterized in that The processing module is specifically used for: A multi-lens array containing several cameras is arranged in the goat activity area, and all cameras capture images at the same time node by encoding clock signals; Design and integrate a time-coded flash system based on an LED matrix, which provides a series of flash pulses with different intensities and spectra, and provides additional optical information for image acquisition at different time points through time sequence encoding synchronized with the camera; In the case of time synchronization, the multi-lens array and the flash system are started to continuously capture images to obtain a multi-view image sequence of the goat's body surface, wherein each camera records a series of multi-spectral images from its perspective and marks a time stamp to ensure time consistency; Select a group of images from the multi-view image sequence as references, use a sparse stereo reconstruction algorithm to perform preliminary matching on feature points of each view, filter out erroneous matches through local geometric consistency constraints, perform sub-pixel level correction on the matching results, and obtain a three-dimensional sparse model; Combined with the timing information provided by the time-coded flash system, the timing compensation mechanism is applied to dynamically compensate the multi-view images in the time domain so that the illumination and images between each view can be adjusted synchronously; For the time-compensated image, the exposure fusion value of each pixel in all images is calculated to generate a set of high dynamic range HDR images with multi-view and time information. Based on the set of high dynamic range HDR images, the high dynamic information is mapped to a three-dimensional sparse model to obtain an HDR three-dimensional model as the three-dimensional surface model of the goat.

7. The system according to claim 6, characterized in that The identification module is specifically used for: Using a pre-trained convolutional Transformer network, forward propagation is performed on the three-dimensional coordinate points in the three-dimensional body surface model to extract the deep feature embedding of each point, wherein the deep feature embedding is represented by a high-dimensional vector to describe the geometric and semantic information of different areas on the model surface; The deep feature embedding is reduced to three-dimensional space through nonlinear dimensionality reduction technology. In the reduced dimensionality feature space, the points are clustered so that each clustered point group corresponds to a specific body size feature position, and each point group is regarded as a body size feature point set. According to the clustered point group, each body size feature position is calibrated in the three-dimensional body surface model, and a topological structure of feature points in a body size feature point set is constructed using a minimum spanning tree algorithm.

8. The system according to claim 7, characterized in that The computing module is used for: The Bellman-Ford algorithm is used to find the optimal measurement path on the topological structure of feature points to ensure distance measurement on the surface of the body; At each body feature position, the spline curve fitting technology is used to fit the local geometric structure, and the body geometric parameters are calculated by analyzing the normal and curvature of the surface; Wavelet transform is used to perform multi-resolution analysis on the feature point set to decompose the geometric details at different levels. According to the analysis results, the calculated body size geometric parameters are corrected at multiple levels to obtain the corrected body size geometric parameters.

9. A storage medium, 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, 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.