A beef cattle smart body girth measuring system
By equipping drones with sensors to filter yaw periods and motion interference factors, and combining this with adaptive sharpening enhancement based on the movement of beef cattle, the problem of image quality degradation during drone flight was solved, and the accuracy of beef cattle body size measurement was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUIZHOU BREEDING LIVESTOCK & POULTRY GERMPLASM TESTING CENT
- Filing Date
- 2025-10-22
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the accuracy of beef cattle body size measurements is poor because the video image quality deteriorates due to environmental factors during drone flight.
By equipping drones with sensors to collect flight data in real time, frames with yaw periods and interference factors exceeding a threshold are selected. Combined with the movement of beef cattle, the degree of impact is determined and adaptive sharpening enhancement is performed to improve image clarity.
It improves the accuracy of measuring the body size of beef cattle and reduces measurement errors caused by image blurring and motion interference.
Smart Images

Figure CN120997276B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of size measurement technology, specifically to an intelligent body size measurement system for beef cattle. Background Technology
[0002] Body size parameters are important indicators reflecting the growth and development of beef cattle. Regularly measuring these parameters allows for a scientific assessment of growth, timely detection of abnormalities, and the implementation of appropriate feeding and management measures. Traditional measurement methods require restraining the cattle, which can easily cause stress and negatively impact their health and welfare. Intelligent body size measurement can be performed while the cattle are moving freely, avoiding restraint and interference, reducing stress, and promoting the cattle's health.
[0003] Currently, intelligent body size measurement of beef cattle typically involves using drones to capture video images of free-range cattle on grasslands and then identifying the cattle regions within the captured image data to determine their body size. However, environmental factors during drone flight (such as wind interference) cause drone vibration, affecting the quality of the captured video images. Furthermore, the running and gathering behaviors of cattle on the grasslands can easily lead to blurred video images. Blurred images result in blurred edges and loss of detail in the contour features of key parts of the cattle's body, making contour recognition difficult and ultimately reducing the accuracy of the body size measurement results. Summary of the Invention
[0004] To address the technical problem of poor accuracy in beef cattle body size measurement due to the influence of video image acquisition quality, the present invention aims to provide an intelligent beef cattle body size measurement system, the specific technical solution of which is as follows:
[0005] In a first aspect, the present invention provides an intelligent body size measurement system for beef cattle, the system comprising:
[0006] The data acquisition module is used to acquire video image data containing the body size measurement object;
[0007] The image filtering module is used to filter out target frame images that need to be enhanced from the video image data;
[0008] The influence degree acquisition module is used to determine the degree of influence of the motion of each of the body size measurement objects on the body size measurement in the target frame image based on the motion of different body size measurement objects in the target frame image;
[0009] An image enhancement module is used to determine the sharpening intensity based on the degree of influence, and to sharpen and enhance the object region of each of the body size measurement objects in the target frame image based on the sharpening intensity, so as to obtain an enhanced target frame image.
[0010] The body size measurement module is used to measure the body size of the object based on the enhanced target frame image and other images in the video image data other than the target frame image.
[0011] In conjunction with the first aspect above, in some possible implementations, the video image data is acquired based on a drone; the image filtering module includes:
[0012] The yaw time acquisition unit is used to determine the yaw time during the flight of the UAV based on the position coordinates of the UAV at various times during the flight.
[0013] The yaw parameter determination unit is used to determine the yaw severity during the yaw period and the flight stability of the UAV at each yaw moment during the yaw period.
[0014] An interference factor determination unit is used to determine the interference factor of the frame image at each yaw moment in the video image data for body size measurement based on the severity of the yaw and the flight stability of the UAV.
[0015] The target frame image determination unit is used to determine the frame images in the video image data whose interference factor is greater than a set interference factor threshold as target frame images that need to be enhanced.
[0016] In conjunction with the first aspect above, in some possible implementations, the yaw time acquisition unit is configured as follows:
[0017] A straight line is fitted to the position coordinates of the UAV at various moments during its flight to obtain the fitted straight line;
[0018] Based on the position coordinates of the UAV at various moments during its flight and the fitted straight line, the fitting error at each moment during the UAV's flight is determined.
[0019] The fitting error is normalized to obtain the yaw distance index;
[0020] The moment when the yaw distance index during the flight of the UAV is greater than the set yaw distance index threshold is defined as the yaw moment;
[0021] The time period consisting of consecutive adjacent yaw times is defined as the yaw time period.
[0022] In conjunction with the first aspect above, in some possible implementations, the yaw parameter determination unit is configured as follows:
[0023] The maximum yaw distance index is obtained by determining the maximum yaw distance index at all yaw times during the yaw period.
[0024] The severity of the yaw during the yaw period is determined based on the duration of the yaw period and the maximum yaw distance index.
[0025] In conjunction with the first aspect above, in some possible implementations, the yaw parameter determination unit is configured as follows:
[0026] Determine the minimum angle between the UAV's flight direction and the wind direction at each yaw moment during the yaw period;
[0027] Based on the minimum included angle and the wind speed at each yaw moment during the yaw period, the flight stability of the UAV at each yaw moment during the yaw period is determined.
[0028] In conjunction with the first aspect above, in some possible implementations, the influence degree acquisition module includes:
[0029] A motion disorder determination unit is used to determine the degree of motion disorder of the body size measurement object in the target frame image based on the motion speed and direction of motion of each corner point of the different body size measurement objects in the target frame image;
[0030] The total influence determination unit is used to determine the total influence of the motion of the body size measurement object on the body size measurement in the target frame image based on the degree of motion disorder, the distance between different body size measurement objects in the target frame image, and the interference factor of the target frame image on body size measurement.
[0031] A single influence degree determination unit is used to determine the degree of influence of the movement of each body size measurement object on body size measurement in the target frame image based on the total influence degree and the difference between the movement directions of each corner point of each body size measurement object and its surrounding body size measurement objects in the target frame image.
[0032] In conjunction with the first aspect above, in some possible implementations, the motion disorder determination unit is configured as follows:
[0033] Based on the motion speed and direction of each corner point of each body size measurement object in the target frame image, the motion posture complexity of each body size measurement object in the target frame image is determined;
[0034] Based on the differences in the motion directions of various corner points of different body size measurement objects in the target frame image, the degree of disorder in the motion directions of the body size measurement objects in the target frame image is determined.
[0035] Based on the complexity of the motion posture and the degree of confusion in the motion direction, the degree of motion confusion of the body size measurement object in the target frame image is determined.
[0036] In conjunction with the first aspect above, in some possible implementations, determining the motion posture complexity of each of the body size measurement objects in the target frame image includes:
[0037] Determine the minimum included angle between the motion directions of any two corner points of each of the body size measurement objects in the target frame image;
[0038] Based on the minimum angle between the movement directions of any two corner points, the corner points of all corner points of each of the scale measurement objects are subjected to angle force to obtain several clusters;
[0039] The maximum motion speed is obtained by determining the maximum motion speed among the motion velocities of each corner point of the body size measurement object in the target frame image;
[0040] Based on the maximum motion speed and the total number of clusters, the motion posture complexity of each body size measurement object in the target frame image is determined.
[0041] In conjunction with the first aspect above, in some possible implementations, determining the degree of disorder in the motion direction of the body size measuring object in the target frame image includes:
[0042] The cluster with the most corner points among the several clusters corresponding to each body size measurement object in the target frame image is taken as the target cluster;
[0043] Based on the motion direction of all corner points in the target cluster, the main motion direction of each body size measurement object in the target frame image is determined;
[0044] The degree of disorder in the motion direction of the body size measurement object in the target frame image is determined based on the variance of the minimum included angle between the principal motion directions of all two different body size measurement objects in the target frame image.
[0045] In conjunction with the first aspect above, in some possible implementations, the single influence degree determination unit is configured as follows:
[0046] The corresponding regions of adjacent different volume measurement objects in the target frame image are merged to obtain several clustered regions;
[0047] The direction of movement of the dry aggregation region is determined based on the main direction of movement of each corner point of all the body size measurement objects in the dry aggregation region.
[0048] Determine the minimum angle between the main motion direction of each of the body size measurement objects in the dry aggregation region and the movement direction of the dry aggregation region to obtain the motion direction difference value;
[0049] Based on the total influence level and the difference value of the motion direction, as well as the complexity of the motion posture of all the body size measurement objects in the cluster area to which the body size measurement object belongs, the influence level of the motion of each body size measurement object on body size measurement in the target frame image is determined.
[0050] Secondly, the present invention also provides a method for measuring the intelligent body size of beef cattle, the method comprising:
[0051] Acquire video image data containing the body size measurement object;
[0052] Select the target frame images that need to be enhanced from the video image data;
[0053] Based on the motion of different body size measurement objects in the target frame image, determine the degree of influence of the motion of each body size measurement object on the body size measurement in the target frame image;
[0054] The sharpening intensity is determined based on the degree of influence, and the object region of each body size measurement object in the target frame image is sharpened and enhanced based on the sharpening intensity to obtain the enhanced target frame image.
[0055] Based on the enhanced target frame image and other images in the video image data besides the target frame image, the body size of the object to be measured is measured.
[0056] Thirdly, the present invention also provides an intelligent body size measuring device for beef cattle, comprising a memory and a processor. The memory is used to store executable computer program code, and the processor is used to call and run the executable computer program code from the memory, causing the system to perform the steps implemented by the various modules in the first aspect or any possible implementation of the first aspect.
[0057] Fourthly, the present invention also provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the steps implemented by the modules in the first aspect or any possible implementation thereof.
[0058] Fifthly, the present invention also provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the steps implemented by the modules in the first aspect or any possible implementation thereof.
[0059] This invention offers the following advantages: It filters target frame images from video image data containing objects requiring body size measurement, then determines the degree of influence of each object's movement on body size measurement based on the object's motion within the target frame image. Based on this influence, it determines the sharpening intensity and adaptively sharpens the object region of each object in the target frame image, resulting in an enhanced target frame image. Finally, based on the enhanced target frame image and other images in the video image data besides the target frame image, body size measurement is performed. This invention improves the accuracy of recognizing cattle outlines in images by adaptively sharpening and enhancing target frame images with poor quality based on the object's motion, thereby effectively improving the accuracy of body size measurement. Attached Figure Description
[0060] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a schematic diagram of the structure of an intelligent body size measurement system for beef cattle according to an embodiment of the present invention;
[0062] Figure 2 This is a flowchart illustrating the steps of a method for measuring the intelligent body size of beef cattle according to an embodiment of the present invention. Detailed Implementation
[0063] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings.
[0064] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.
[0065] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0066] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0067] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0068] Although operations or steps are described in a specific order in the accompanying drawings in the embodiments of the present invention, this should not be construed as requiring these operations or steps to be performed in the specific order or serial order shown, or requiring all of the shown operations or steps to be performed to obtain the desired result. In the embodiments of the present invention, these operations or steps may be performed serially; they may be performed in parallel; or a portion of these operations or steps may be performed.
[0069] Furthermore, it is understood that the data involved in the technical solutions of this invention (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions. Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains, and all parameters or indicators in the formulas involved in this invention are normalized values that have eliminated the influence of dimensions.
[0070] To address the issue of poor accuracy in beef cattle body size measurement results due to the influence of video image acquisition quality, this invention provides an intelligent beef cattle body size measurement system. This system is essentially a software system, composed of modules that implement corresponding functions, as illustrated in the structural diagram below. Figure 1 As shown. The core of this system is to implement an intelligent body size measurement method for beef cattle. Each module in the system corresponds to a step in the method, and the flowchart of the method is shown below. Figure 2 As shown in the diagram. The following section provides a detailed description of each module of the system, following the specific steps of this method.
[0071] The data acquisition module 100 is used to acquire video image data containing the body size measurement object.
[0072] Specifically, the scenario targeted by this embodiment of the invention is to perform intelligent body size measurement on beef cattle on grasslands. Therefore, the object of the body size measurement is beef cattle on grasslands, and the acquired video image data is video image data containing beef cattle.
[0073] In a specific example, due to the wide distribution of beef cattle on the grasslands, it is necessary to use drones to collect video images of the beef. During the drone video image acquisition process, it is necessary to plan the drone's flight path and ensure that the drone flies along the predetermined route, covering all areas that need to be monitored, while ensuring flight safety and efficiency. During the drone's flight along the route, a high-precision depth camera onboard the drone is used to acquire video images of the beef cattle, obtaining several consecutive frames of video images. The camera resolution is 848×480 pixels, and the frame rate is 30 frames per second to ensure data continuity and accuracy. The acquired video images are preprocessed, including grayscale conversion and mean filtering for noise reduction, to finally obtain video image data containing beef cattle. Each frame in the video image data is a depth image.
[0074] The image filtering module 200 is used to filter out target frame images that need to be enhanced from the video image data.
[0075] Specifically, in the process of measuring the body size of beef cattle, it is necessary to ensure that the drone can fly stably and accurately photograph the target. The open grasslands offer unobstructed views, and wind and airflow are the core environmental factors affecting drone flight. During drone flight, wind directly affects the drone, altering its flight path and stability. Especially in high wind speeds, the drone may be affected by lateral or vertical airflow, causing it to tilt or sway, directly impacting the clarity of the captured images. This makes it difficult to clearly capture the body shape characteristics of the beef cattle, increasing measurement errors and reducing the accuracy of body size measurements.
[0076] Therefore, various sensors are installed on the drone, including GPS positioning, wind speed, wind direction, speed, and orientation sensors. During drone flight, these sensors collect real-time flight information such as the drone's position coordinates (altitude, longitude, latitude), wind speed and direction, speed, and flight direction. Each sensor collects data once per second. These sensors help the drone perceive surrounding wind conditions and its own flight status, allowing for better adjustments to its control strategy. Simultaneously, the information collected by these sensors can also assess yaw and flight stability during flight, initially identifying low-quality video images and performing targeted image enhancement on these images. This avoids unnecessary processing of all video data, saving computational resources and time. For example, in the event of drone yaw, the image from the moment of yaw with poor flight stability is selected as the target frame.
[0077] Furthermore, in one possible implementation, the image filtering module 200 described above includes:
[0078] The yaw time acquisition unit 201 is used to determine the yaw time during the flight of the UAV based on the position coordinates of the UAV at various times during the flight.
[0079] Based on the position coordinates of the UAV at various times during its flight, collected by the GPS positioning sensor on board the UAV, the yaw distance of the UAV at various times during its flight is analyzed to determine the yaw period of the UAV during its flight.
[0080] Furthermore, the aforementioned yaw time acquisition unit 201 is configured to: perform linear fitting on the position coordinates of the UAV at various times during flight to obtain a fitted straight line; determine the fitting error at various times during UAV flight based on the position coordinates of the UAV at various times during flight and the fitted straight line; normalize the fitting error to obtain a yaw distance index; determine the time when the yaw distance index is greater than a set yaw distance index threshold during UAV flight as the yaw time; and determine the time period consisting of consecutive adjacent yaw times as the yaw time period.
[0081] In a specific example, based on the position coordinates of the UAV at various moments during its flight, collected by the GPS positioning sensor on the UAV, a straight line is fitted using the least squares method to obtain a fitted straight line. The fitted position coordinates of the UAV at all moments are determined on the fitted straight line. The distance between the UAV's position coordinates at each moment and the fitted position coordinates is calculated as the fitting error. The fitting error at each moment is normalized using the max-min normalization method, and the normalized value is used as the yaw distance index at each moment.
[0082] A preset yaw distance threshold is set, for example, to 0.2. The yaw distance at various moments during the drone's flight is compared to this threshold. Moments where the yaw distance exceeds the threshold are recorded as yaw moments. The time interval consisting of consecutive adjacent yaw moments is recorded as a yaw time interval. This allows the determination of one or more yaw time intervals during the drone's flight.
[0083] Yaw parameter determination unit 202 is used to determine the yaw severity during the yaw period and the flight stability of the UAV at each yaw moment during the yaw period.
[0084] During drone flight, yaw distance and yaw duration reflect the severity of the yaw period. A larger yaw distance indicates a more significant deviation between the actual position and the planned flight path, resulting in more severe cumulative errors and making it more difficult for the navigation system to correct. A longer yaw period increases the duration of instability, causing the control system to make repeated adjustments. When the yaw severity is high, such as with an increased yaw distance, it leads to significant fluctuations in flight altitude. These fluctuations directly affect the camera's resolution and field of view. When the drone is far from the target, image details are lost; when it is close, distortion or overfocus may occur, resulting in unclear video images and affecting the accurate measurement of cattle body size.
[0085] Furthermore, the aforementioned yaw parameter determination unit 202 is configured to: determine the maximum value of the yaw distance index for all yaw moments in the yaw period, thereby obtaining the maximum yaw distance index; and determine the yaw severity of the yaw period based on the duration of the yaw period and the maximum yaw distance index.
[0086] In a specific example, for any yaw period, taking the s-th yaw period as an example, determine the maximum value of the yaw distance index for all yaw times within the s-th yaw period. The maximum value Also known as the maximum yaw distance index, it represents the duration of the s-th yaw period. The maximum value of the yaw distance index at all yaw times in the s-th yaw period. The product of these terms is denoted as the yaw severity during the s-th yaw period. At this point, there is a degree of yaw. .
[0087] The severity of the drone's yaw during each yaw period can be obtained using the above method. During the yaw period, the drone's flight stability directly affects the clarity of the captured images. When flight stability is poor, the outline of the cattle in the acquired video images may not be clearly displayed, making it difficult for measurement tools (such as image processing software) to accurately identify the edges, thus affecting the accuracy of body length and height. Therefore, it is also necessary to evaluate the drone's flight stability at each moment during the yaw period to better determine the target frames in the video image data that need to be enhanced.
[0088] Furthermore, the aforementioned yaw parameter determination unit 202 is also configured to: determine the minimum angle between the UAV flight direction and the wind direction at each yaw moment during the yaw period; and determine the UAV flight stability at each yaw moment during the yaw period based on the minimum angle and the wind speed at each yaw moment during the yaw period.
[0089] Because drones are lightweight, high wind speeds cause high-frequency vibrations or drift in their fuselage, resulting in poor flight stability. This leads to rapid changes in the relative position of the camera and the target (cattle), resulting in a less clear image and greater interference with cattle body measurements. Furthermore, when the minimum angle between the drone's flight direction and the wind direction is close to 90 degrees, it indicates that the wind direction is perpendicular to the drone's flight direction. This increases drag on the drone during flight, further reducing stability. Therefore, the drone's flight stability at each moment during the yaw period can be determined. Specifically, the higher the wind speed and the closer the minimum angle between the drone's flight direction and the wind direction is to 90 degrees, the worse the drone's flight stability.
[0090] In a specific example, for any yaw period, taking the s-th yaw period as an example, based on the wind speed, wind direction, and direction sensors on the UAV that collect data on the wind speed, wind direction, and UAV flight direction at various times during the UAV's flight, the flight stability of the UAV at the p-th yaw time of the s-th yaw period is calculated. ;in, This represents an exponential function with the natural constant e as the base. This represents the wind speed at the p-th yaw time within the s-th yaw period; This represents the minimum angle between the UAV's flight direction and the wind direction at the p-th yaw time within the s-th yaw period.
[0091] Interference factor determination unit 203 is used to determine the interference factor of body size measurement for frame images at each yaw time in the video image data during the yaw period, based on the severity of the yaw and the flight stability of the UAV.
[0092] For each yaw period, based on the severity of the yaw during that period and the UAV's flight stability at each yaw moment within that period, the interference factor of the frame images at each yaw moment in the video image data for body size measurement is determined. This interference factor reflects the degree of interference between the quality of the acquired images and the measurement of beef cattle's body size caused by the UAV's flight. Specifically, the higher the yaw severity of the yaw period and the worse the UAV's flight stability at that yaw moment, the worse the quality of the images acquired by the UAV at that yaw moment, and the greater the interference factor of those images for the measurement of beef cattle's body size.
[0093] In a specific example, for any yaw period, taking the s-th yaw period as an example, based on the severity of the yaw during that s-th yaw period... And the flight stability of the UAV at the p-th yaw time during the s-th yaw period. Calculate the interference factor of the frame image at the p-th yaw time in the s-th yaw period of the video image data on body size measurement. ;in, This represents the normalization function, used to normalize... The value of is normalized to the range [0,1].
[0094] The target frame image determination unit 204 is used to determine the frame images in the video image data whose interference factor is greater than a set interference factor threshold as target frame images that need to be enhanced.
[0095] For any yaw moment within the yaw period, the larger the interference factor of the frame image at that yaw moment for body size measurement, the worse the quality of the frame image, the greater the interference of the image on the body size measurement of beef cattle, and the more it should be enhanced. Therefore, based on the interference factor of the frame image at each yaw moment within the yaw period for body size measurement, the target frame images in the video image data that need to be enhanced are determined.
[0096] In a specific example, a pre-set interference factor threshold is established, such as setting the threshold value to 0.8. The interference factor measured by body size for each frame image at each yaw moment during the yaw period is compared with the pre-set threshold of 0.8. Yaw moments with interference factors greater than the pre-set threshold of 0.8 are recorded as target moments. Since the video images acquired at the target moments have poor quality and require image enhancement, the frame images at the target moments in the video image data are determined as the target frame images that need to be enhanced.
[0097] Thus, the image filtering module 200 determines the yaw period during the UAV's flight and the interference factor of the frame image at each yaw moment in the video image data on body size measurement. Based on this interference factor, it can filter out the target frame images that need to be enhanced from the video image data.
[0098] The influence degree acquisition module 300 is used to determine the influence degree of the motion of each of the body size measurement objects on the body size measurement in the target frame image based on the motion of different body size measurement objects in the target frame image.
[0099] Because the target frame images in the video image data may have poor image quality due to the instability of the drone's flight, resulting in unclear edges of the cattle in the images, which affects the accuracy of subsequent measurement of the cattle's body size, it is necessary to perform image enhancement on the video images acquired at the target time to improve the clarity and details of the images. During the image enhancement process for the target frame images, it is important to consider that the movements of the cattle, such as running and gathering, can easily cause blurring in the acquired images. Especially from a top-down perspective, the movement of the cattle's three-dimensional curved surface structure (such as back undulation and head swaying) will generate multi-directional velocity components, exacerbating the blurring.
[0100] Therefore, by analyzing the movement of different cattle in the target frame image, the influence of the movement of each cattle in the target frame image on the body size measurement is determined. This influence reflects the degree of impact of the cattle movement on the quality of the acquired image, thus facilitating adaptive enhancement of different cattle regions in the target frame image based on this influence, ultimately improving the image quality.
[0101] Furthermore, the aforementioned impact level acquisition module 300 includes:
[0102] The motion disorder determination unit 301 is used to determine the degree of motion disorder of the body size measurement object in the target frame image based on the motion speed and motion direction of each corner point of the different body size measurement objects in the target frame image.
[0103] The method involves identifying and tracking cattle in video image data to determine different cattle regions in each frame and the same cattle in different frames. This allows for the determination of motion information such as the speed and direction of movement of each corner point in different cattle regions within each target frame, thereby identifying the chaotic movement of cattle in each target frame.
[0104] Furthermore, the aforementioned motion disorder determination unit 301 is configured as follows:
[0105] First, based on the motion speed and direction of each corner point of each body size measurement object in the target frame image, the motion posture complexity of each body size measurement object in the target frame image is determined.
[0106] In a specific example, the trained YOLO object detection algorithm is used to process each frame of the video image data, resulting in several cattle regions in each frame. Then, a corner matching algorithm is used to match each cattle region in each frame (e.g., frame k) with feature corners in the adjacent frame (frame k+1) that have similar descriptors. This yields the corresponding corners of each cattle region in each frame (e.g., frame k) in the adjacent frame (frame k+1). Assuming the displacement of the same corner point in each frame (e.g., frame k) and the adjacent frame (frame k+1) is d, and the time difference between the two selected frames is t, then the velocity of the corner point in each frame (e.g., frame k) is... .speed The larger the value, the faster the cattle are running on the grassland. When cattle move quickly, they may produce blurring or trailing artifacts in the image, making it impossible to accurately capture their outline and thus affecting the accuracy of body size measurement. Simultaneously, by determining the position of the same corner point in each frame (e.g., frame k) and the adjacent frame (frame k+1), the direction of movement of that corner point in each frame (e.g., frame k) can be identified. In this way, the speed and direction of movement of each corner point of different cattle in the target frame image can be determined.
[0107] The motion speed and direction of different cattle at various corner points in the target frame image are analyzed to determine the degree of motion disorder of the cattle in the target frame image. The degree of motion disorder reflects the degree of disorder in the motion posture and direction of different cattle in the target frame image. The higher the degree of disorder, the higher the possibility that the quality of the corresponding target frame image is affected by the motion of the cattle.
[0108] Furthermore, the determination of the motion posture complexity of each body size measurement object in the target frame image includes: determining the minimum angle between the motion directions of any two corner points of each body size measurement object in the target frame image; based on the minimum angle between the motion directions of the two corner points, performing angle calculations on all corner points of each body size measurement object to obtain several clusters; determining the maximum value among the motion velocities of each corner point of each body size measurement object in the target frame image to obtain the maximum motion velocity; and determining the motion posture complexity of each body size measurement object in the target frame image based on the maximum motion velocity and the total number of clusters.
[0109] Because different body parts of a beef cattle may move at different speeds or in different directions when running. For example, the head may turn in one direction, while the limbs move in different directions. This difference in local movement leads to inconsistencies in the direction of movement between corner points, reflecting a complex movement posture of the beef cattle. In order to ensure the accuracy of the beef cattle's body size measurement, it is necessary to enhance the image to ensure that key features such as the outline are clearly distinguishable.
[0110] In a specific example, for any target frame image, taking the z-th frame in the video image data as an example, we obtain the movement velocity of each corner point of the c-th cow in the z-th frame image, and simultaneously obtain the movement direction of each corner point of the c-th cow in the z-th frame image. In the z-th frame image, we calculate the minimum angle between the movement directions of any two corner points of the c-th cow. The smallest included angle Using the clustering distance between any two corner points, the K-means clustering algorithm is used to cluster all corner points, resulting in multiple clusters. Each cluster represents a group of corner points with similar directions of movement.
[0111] Furthermore, the motion posture complexity of the c-th cattle (i.e., the c-th individual size measurement object) in the z-th frame image (i.e., any target frame image) is calculated. ;in, This represents the maximum value of the movement velocity of all corner points of the cattle in the c-th frame of the z-th image. The larger the value, the faster the speed of the cattle in the c-th segment moves, the more severe the image blur, and the greater the need for image enhancement. This represents the total number of clusters corresponding to the movement directions of all corner points of the c-th cattle in the z-th frame image. The larger the value, the more differences there are in the direction of movement between the corner points. The more inconsistent the direction of movement of the corner points, the more complex the movement posture of the beef cattle. This represents the normalization function, used to normalize... The value of is normalized to the range [0,1].
[0112] Secondly, based on the differences in the motion directions of various corner points of different body size measurement objects in the target frame image, the degree of disorder in the motion direction of the body size measurement objects in the target frame image is determined.
[0113] Because drones typically capture video at high altitudes, their field of view is wide, meaning that a single video frame often contains more than one cow. These cows may be in different states of motion, such as walking quickly, moving slowly, or stationary. When multiple cows run simultaneously, the fast-moving cows may create motion blur in the image. Furthermore, when their trajectories intersect, the torsos and limbs of different individuals can easily overlap (e.g., the foreleg of cow A overlaps with the hind leg of cow B in the image), leading to the misclassification of parts of different individuals as belonging to the same cow. This directly affects the accuracy of body size parameters (such as body length and chest circumference). Therefore, it is necessary to further analyze the movement trajectories of multiple cows to determine the degree of motion direction disorder in the target frame image. This analysis, combined with the complexity of their motion postures, ultimately determines the degree of motion disorder in the target frame image.
[0114] Furthermore, the determination of the degree of disorder in the motion direction of the body size measurement object in the target frame image includes: taking the cluster with the most corner points among the several clusters corresponding to each body size measurement object in the target frame image as the target cluster; determining the main motion direction of each body size measurement object in the target frame image based on the motion direction of all corner points in the target cluster; and determining the degree of disorder in the motion direction of the body size measurement object in the target frame image based on the variance of the minimum included angle between the main motion directions of any two different body size measurement objects in the target frame image.
[0115] In a specific example, for any target frame image, taking the z-th frame in the video image data as an example, in the z-th frame image, the cluster with the most corner points among the clustering results of the movement directions of all corner points of the c-th cow is denoted as the target cluster. The mean of the angles corresponding to the movement directions of all corner points in the target cluster (the angle between the movement direction and the horizontal rightward direction) is taken as the main movement direction of the c-th cow. Furthermore, the variance of the minimum angle between the main movement directions of any two cows in the z-th frame image is calculated, and this variance is denoted as the degree of disorder in the movement directions of the cows in the z-th frame image. .
[0116] Finally, based on the complexity of the motion posture and the degree of confusion in the motion direction, the degree of motion confusion of the body size measurement object in the target frame image is determined.
[0117] In a specific example, for any target frame image, taking the z-th frame image in the video image data as an example, the complexity of the motion postures of different beef cattle (i.e., the objects of body size measurement) in the z-th frame image is considered. And the degree of confusion in the movement direction of beef cattle (i.e., the objects of body size measurement). Determine the degree of motion disorder of the beef cattle (i.e., the object of body size measurement) in the z-th frame image (i.e., any target frame image). ;in, The mean value represents the complexity of the motion posture of all beef cattle (i.e., the objects of body size measurement) in the z-th frame image; The larger the value, the more rapidly the direction and speed of the cattle's movement may change, and the more unstable the distance between different individuals, resulting in a greater degree of chaos in the cattle's movement. This represents the normalization function, used to normalize... The value of is normalized to the range [0,1].
[0118] The total influence determination unit 302 is used to determine the total influence of the motion of the body size measurement object on the body size measurement in the target frame image based on the degree of motion disorder, the distance between different body size measurement objects in the target frame image, and the interference factor of the target frame image on body size measurement.
[0119] Different cattle may appear in the same target frame image. When the distance between different cattle is small, the possibility of mutual occlusion between individuals is greater, which can easily lead to blurred boundaries of some cattle, making it impossible to clearly distinguish the specific outline of each cattle, and thus having a greater impact on the accuracy of body size measurement results. At the same time, the yaw of the drone flight can also affect the quality of the acquired video images, thereby affecting the accuracy of cattle body size measurement. Therefore, by combining the degree of motion disorder of cattle in the target frame image, the distance between different cattle, and the interference factor of the target frame image on body size measurement, the overall influence of cattle motion in the target frame image on body size measurement can be determined.
[0120] In a specific example, for any target frame image, taking the z-th frame image in the video image data as an example, the degree of motion disorder of the beef cattle (i.e., the object of body size measurement) in the z-th frame image (i.e., any target frame image) is considered. The interference factor of the z-th frame image (i.e., any target frame image) on body size measurement Given the distance between any two cattle (i.e., the objects of body size measurement) in the z-th frame image, calculate the total influence of the cattle's (i.e., the objects of body size measurement) movement on body size measurement in the z-th frame image (i.e., any target frame image). ;in, This represents the average distance between any two cattle (i.e., the objects whose body size is being measured) in the z-th frame image; This represents the normalization function, used to normalize... The value of is normalized to the range [0,1].
[0121] The single influence degree determination unit 303 is used to determine the degree of influence of the movement of each body size measurement object on body size measurement in the target frame image based on the total influence degree and the difference between the movement directions of each corner point of each body size measurement object and its surrounding body size measurement objects in the target frame image.
[0122] Because of the social behaviors exhibited by beef cattle, such as the close bond between mother cows and calves and the guidance of lead cattle, they form a herd behavior. In this context, beef cattle tend to move towards relatively concentrated resources on the grassland, resulting in a directional tendency in their large-scale migrations. During herd migration, the movement of the cattle and the interactions among individual members cause motion blur in video images. Especially when herd activity is frequent, image details may become blurred, making it difficult to clearly distinguish the specific outlines of each beef cattle. Therefore, further analysis of the degree to which each beef cattle is affected by the herd is necessary.
[0123] Furthermore, the aforementioned single influence degree determination unit 303 is configured to: merge the corresponding regions of adjacent different body size measurement objects in the target frame image to obtain several clustered regions; determine the movement direction of the dry clustered region based on the main motion direction determined by the motion direction of each corner point of all body size measurement objects in the dry clustered region; determine the minimum angle between the main motion direction of each body size measurement object in the dry clustered region and the movement direction of the dry clustered region to obtain a motion direction difference value; and determine the degree of influence of the motion of each body size measurement object on body size measurement in the target frame image based on the total influence degree, the motion direction difference value, and the motion posture complexity of all body size measurement objects in the clustered region to which the body size measurement object belongs.
[0124] In a specific example, for any target frame image, all cattle in the target frame image are clustered, thereby grouping adjacent cattle regions into one category. The regions corresponding to all cattle in each category constitute a clustered region. The average value of the angles corresponding to the main movement direction of all cattle in each clustered region (the angle between the main movement direction and the horizontal rightward direction) is recorded as the movement direction of that clustered region.
[0125] Furthermore, for any target frame image, taking the z-th frame image in the video image data as an example, the degree of influence of the movement of the beef cattle (i.e., the object of body size measurement) on body size measurement in the z-th frame image (i.e., any target frame image) is analyzed. Calculate the minimum angle between the movement direction of the c-th cattle (i.e., the c-th body size measurement object) and the movement direction of the cluster area where the c-th cattle is located in the z-th frame of the video image, and the complexity of the movement postures of all cattle (i.e., body size measurement objects) in the cluster area where the c-th cattle is located. Calculate the influence of the movement of the c-th cattle (i.e., the body size measurement object) on body size measurement in the z-th frame image (i.e., any target frame image). ;in, This represents the maximum value of the motion posture complexity of all cattle in the gathering area where the c-th cattle is located in the z-th frame image. The larger the value, the more frequent the activities of other members in the group where the c-th cattle is located, and the different directions of movement, resulting in a greater complexity of movement posture in this area. The c-th cattle is more easily affected by the group's movement. Let represent the minimum angle between the main movement direction of the c-th cattle in the z-th frame and the movement direction of its surrounding area. The smaller the value, the more consistent the movement trend of the c-th cattle is with the overall movement direction of the group, the more likely the behavior pattern of the c-th cattle is to be consistent with that of the group, the greater the possibility of it being occluded in the image, and the stronger the influence factor of the group. This represents the minimum value greater than zero, used to prevent the denominator from being zero. =0.01; This represents the normalization function, used to normalize... The value of is normalized to the range [0,1].
[0126] Thus, the aforementioned influence degree acquisition module 300 determines the total influence degree of the motion of the body size measurement object in the target frame image on the body size measurement by the degree of motion disorder of the body size measurement object in the target frame image, and finally accurately determines the influence degree of the motion of each body size measurement object in the target frame image on the body size measurement based on the total influence degree.
[0127] The image enhancement module 400 is used to determine the sharpening intensity based on the degree of influence, and to sharpen and enhance the object region of each body size measurement object in the target frame image based on the sharpening intensity, so as to obtain the enhanced target frame image.
[0128] Since the degree of influence of the movement of each beef cattle on the body size measurement in the target frame image reflects the quality of the corresponding area of each beef cattle in the target frame image, the sharpening intensity of each beef cattle in the target frame image is determined based on the degree of influence of the movement of each beef cattle on the body size measurement. The sharpening intensity reflects the enhancement effect of the image area, and based on the sharpening intensity, the area corresponding to each beef cattle in the target frame image is enhanced to obtain the enhanced target frame image.
[0129] In a specific example, the sharpening intensity of each pixel in the region corresponding to a cow in all target frame images is set to the sharpening intensity corresponding to that cow. Based on this sharpening intensity, an adaptive Laplacian sharpening algorithm (a known technique) is used to perform deblurring and enhancement processing on the region corresponding to each cow in all target frame images, thus obtaining the enhanced target frame images. The adaptive Laplacian sharpening algorithm assigns a sharpening intensity to each pixel, with the value ranging from 0 to 1. The value of the sharpening intensity determines the degree of blending between the original image and the sharpened image. When the sharpening intensity is 0, there is no sharpening effect, and the output image is the same as the original image. When the sharpening intensity is 1, the output image is completely determined by the sharpened image, resulting in the strongest sharpening effect. Other values between 0 and 1 represent different degrees of sharpening effect.
[0130] The body size measurement module 500 is used to measure the body size of the object based on the enhanced target frame image and other images in the video image data other than the target frame image.
[0131] Based on all the final enhanced target frame images, as well as other frame images in the video image data besides the target frame images, intelligent body size measurement is performed on beef cattle. Since the process of intelligent body size measurement of beef cattle based on images is existing technology, it is not limited here.
[0132] In a specific example, the detailed implementation process of intelligent body size measurement for beef cattle is as follows:
[0133] First, perform the image-to-point-cloud conversion:
[0134] Using the camera's intrinsic and extrinsic parameters, each pixel in the image is converted into point cloud data in three-dimensional space. This process involves camera calibration to ensure that the depth value of each pixel in the image can be accurately mapped to the three-dimensional coordinate system.
[0135] Secondly, the body size measurement points are extracted:
[0136] (1) Filter, segment and fill null values in the point cloud data to preserve the integrity of the point cloud in the cow body region.
[0137] (2) Project two-dimensional pixels onto a three-dimensional point cloud, and use camera parameters to calculate the world coordinates of the projected points, thereby performing automated calculation of body size.
[0138] (3) The scapular point is found by dividing the interval, and the posterior edge measurement point of the ischial end is found by fitting the least squares method, so as to calculate the body oblique length.
[0139] (4) For the extraction of the pipe circumference, by drawing the curve of the width distance value change in the region, find the point that starts to increase after continuous decrease, and calculate the circumference of the circle under the diameter corresponding to the point as the pipe circumference.
[0140] Finally, body size parameters are calculated:
[0141] (1) The improved instance segmentation network Mask2former is used to extract the foreground contour and divide the interval, and the required body size measurement points are found by using the curvature calculation analysis method.
[0142] (2) The body size parameters of the top view point cloud were labeled using the point cloud processing software CloudCompare. Each body size parameter was manually labeled three times, and the average value was taken as the true value, so as to obtain the body size parameters of beef cattle such as body height, cross height, body slant length and tube circumference.
[0143] The intelligent body size measurement system for beef cattle provided in this embodiment of the invention improves the clarity and detail of the images by filtering and adaptively sharpening poor-quality images in video images collected by drones, making the outline of beef cattle clearer and thus improving the accuracy of intelligent body size measurement of beef cattle.
[0144] Based on the same inventive concept, this invention also provides a method for intelligent body size measurement of beef cattle, such as... Figure 2 As shown, the method includes:
[0145] Step S100: Acquire video image data containing the body size measurement object;
[0146] Step S200: Select the target frame images that need to be enhanced from the video image data;
[0147] Step S300: Based on the motion of different body size measurement objects in the target frame image, determine the degree of influence of the motion of each body size measurement object on body size measurement in the target frame image;
[0148] Step S400: Determine the sharpening intensity based on the degree of influence, and sharpen the object region of each body size measurement object in the target frame image based on the sharpening intensity to obtain the enhanced target frame image;
[0149] Step S500: Based on the enhanced target frame image and other images in the video image data other than the target frame image, measure the body size of the object to be measured.
[0150] Based on the same inventive concept, this invention also provides a smart body size measuring device for beef cattle. The device includes: a memory, a processor, and computer program code stored in the memory and running on the processor. When the processor executes the computer program code, the system can perform the steps implemented by each module in any of the aforementioned smart body size measuring systems for beef cattle.
[0151] This invention can divide the system into functional modules based on the examples of various modules in the above system. For example, each module can correspond to a specific function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0152] Based on the same inventive concept, embodiments of the present invention also provide a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute the steps implemented by each module in any of the aforementioned intelligent body size measurement systems for beef cattle.
[0153] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing computer program code, which, when run on a computer, causes the computer to execute the steps implemented by each module in any of the aforementioned intelligent body size measurement systems for beef cattle.
[0154] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A beef carcass smart gauge measurement system, characterized by, The system includes: The data acquisition module is used to acquire video image data containing the body size measurement object; The image filtering module is used to filter out target frame images that need to be enhanced from video image data; The influence degree acquisition module is used to determine the degree of influence of the motion of each body size measurement object on the body size measurement in the target frame image based on the motion of different body size measurement objects in the target frame image; The image enhancement module is used to determine the sharpening intensity based on the degree of influence, and to sharpen and enhance the object region of each body size measurement object in the target frame image based on the sharpening intensity, so as to obtain the enhanced target frame image. The body size measurement module is used to measure the body size of the object based on the enhanced target frame image and other images in the video image data other than the target frame image. The video image data is acquired based on UAVs. The image filtering module includes: a yaw time period acquisition unit, used to determine the yaw time period during the UAV's flight based on the UAV's position coordinates at various times during the flight; a yaw parameter determination unit, used to determine the yaw severity of the yaw time period and the UAV's flight stability at each yaw moment within the yaw time period; an interference factor determination unit, used to determine the interference factor of the frame image at each yaw moment within the yaw time period in the video image data for body size measurement based on the yaw severity and the UAV's flight stability; and a target frame image determination unit, used to determine the frame images in the video image data whose interference factor is greater than a set interference factor threshold as target frame images that need to be enhanced. The influence degree acquisition module includes: a motion disorder determination unit, used to determine the degree of motion disorder of the body size measurement objects in the target frame image based on the motion speed and direction of each corner point of different body size measurement objects in the target frame image; a total influence degree determination unit, used to determine the total influence degree of the motion of the body size measurement objects in the target frame image on body size measurement based on the degree of motion disorder, the distance between different body size measurement objects in the target frame image, and the interference factor of the target frame image on body size measurement; and a single influence degree determination unit, used to determine the influence degree of the motion of each body size measurement object in the target frame image on body size measurement based on the total influence degree and the difference between the motion directions of each corner point of each body size measurement object and its surrounding body size measurement objects in the target frame image. The motion disorder determination unit is configured to: determine the motion posture complexity of each body-scale measurement object in the target frame image based on the motion velocity and motion direction of each corner point of each body-scale measurement object in the target frame image; determine the motion direction disorder of the body-scale measurement object in the target frame image based on the differences between the motion directions of each corner point of different body-scale measurement objects in the target frame image; and determine the motion disorder of the body-scale measurement object in the target frame image based on the motion posture complexity and the motion direction disorder. The single influence degree determination unit is configured to: merge the corresponding regions of adjacent different body size measurement objects in the target frame image to obtain several clustered regions; determine the movement direction of the dry clustered region based on the main motion direction determined by the motion direction of each corner point of all body size measurement objects in the dry clustered region; determine the minimum angle between the main motion direction of each body size measurement object in the dry clustered region and the movement direction of the dry clustered region to obtain the motion direction difference value; and determine the influence degree of the motion of each body size measurement object on body size measurement in the target frame image based on the total influence degree and the motion direction difference value, as well as the motion posture complexity of all body size measurement objects in the clustered region to which the body size measurement object belongs.
2. A beef cattle body dimension measurement system according to claim 1, characterised in that, The yaw time acquisition unit is configured as follows: A straight line is fitted to the position coordinates of the UAV at various moments during its flight to obtain the fitted straight line; Based on the position coordinates and fitted straight line at each moment during the flight of the UAV, the fitting error at each moment during the flight of the UAV is determined. The fitting error was normalized to obtain the yaw distance index. The moment when the yaw distance index of the drone during flight exceeds the set yaw distance index threshold is defined as the yaw moment. The time period consisting of consecutive adjacent yaw times is defined as the yaw time period.
3. A beef cattle body dimensions determination system according to claim 2, characterised in that, The yaw parameter determination unit is configured as follows: Determine the maximum value of the yaw distance index for all yaw moments within the yaw period to obtain the maximum yaw distance index; The severity of yaw during the yaw period is determined based on the duration of the yaw period and the maximum yaw distance.
4. A beef cattle body dimension measurement system according to claim 1, characterised in that, The yaw parameter determination unit is configured as follows: Determine the minimum angle between the UAV's flight direction and the wind direction at each yaw moment during the yaw period; The flight stability of the UAV at each yaw moment during the yaw period is determined based on the minimum included angle and the wind speed at each yaw moment during the yaw period.
5. The beef cattle body dimension measurement system of claim 1, wherein, Determine the complexity of the motion posture of each body size measurement object in the target frame image, including: Determine the minimum angle between the motion directions of any two corner points of each body-scale measuring object in the target frame image; Based on the minimum angle between the motion directions of any two corner points, the corner points of all corner points of each body size measurement object are subjected to angle force to obtain several clusters; Determine the maximum value of the motion velocity at each corner point of the object being measured in the target frame image to obtain the maximum motion velocity; Based on the maximum motion speed and the total number of clusters, the motion posture complexity of each body size measurement object in the target frame image is determined.
6. A beef cattle body dimensions determination system according to claim 5, characterised in that, Determine the degree of motion orientation disorder of the object being measured in the target frame image, including: The cluster with the most corner points among several clusters corresponding to each body size measurement object in the target frame image is taken as the target cluster. Based on the motion direction of all corner points in the target cluster, determine the main motion direction of each body size measurement object in the target frame image; The degree of disorder in the motion direction of the body-size measurement objects in the target frame image is determined based on the variance of the minimum angle between the main motion directions of any two different body-size measurement objects in the target frame image.
Citation Information
Patent Citations
Method, system and program for sharpness processing
JP2004032374A