Multi-posture sheep body advancing state recognition method based on machine vision
The recognition of sheep poses through machine vision and convolutional neural networks solves the stress and error problems during the measurement process of sheep poses, and achieves efficient and accurate pose and body ruler parameter recognition.
Patent Information
- Application Number
- CN202510484976.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-29
AI Technical Summary
The prior art is difficult to accurately identify the posture of the sheep in the moving state, resulting in frequent measurements causing stress on the sheep, and the measurement efficiency is low and the artificial error is large.
The multi-pose sheep body travel state recognition method based on machine vision is used, and the maskrcnn convolutional neural network is used for object detection and feature information screening, and the sheep posture is judged based on the smallest rectangle and the highest point of the sheep body, and the body ruler feature points are identified through shape features.
It reduces the stress response during the measurement process of sheep, improves the measurement efficiency and accuracy, and accurately identifies the body ruler parameters of sheep in different postures.
Smart Images

Figure CN120564221A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of animal husbandry information technology, and specifically relates to a method for recognizing the multi-posture movement states of sheep based on machine vision. Background Art
[0002] Animal husbandry has been a vital component of my country's rural economy since ancient times, significantly impacting the quality of rural economic development in some regions. In the context of the rural revitalization strategy, the current decentralized and inefficient animal husbandry production model is no longer suitable for the actual needs of the rural economy and new rural construction. Adjusting, optimizing, and improving the animal husbandry production model requires scientific and rational means and strategies.
[0003] Livestock body measurements are important indicators for assessing individual growth and development, production performance, and genetic characteristics. While significant progress has been made in my country's mutton sheep industry in recent years, several key challenges remain, demanding urgent solutions to meet the demands of the industry's development in the new era. Currently, manual measurement remains the primary method for calculating livestock body size. This method requires significant labor, and frequent measurements can cause stress and slow growth. Furthermore, traditional measurement methods require specialized instruments and are subject to significant human error.
[0004] Chinese Publication No. CN119325918A discloses a mobile device and method for measuring the body dimensions and traits of breeding sheep. The device includes an image acquisition system, a scale, a control system, and other components. A thermal infrared camera and a digital X-ray camera are arranged around the breeding sheep restraint system. The carriage is rotatable and has a support unit. The breeding sheep information reader is an RFID identification device. Based on this device, the method involves acquiring breeding sheep information and image data and inputting them into a prediction model to obtain body dimension assessment results. The method also calculates stage-by-stage body dimension growth to determine the sheep's performance grade. In this sheep body dimension trait measurement method, through comprehensive data processing of thermal infrared and X-ray image data, target data such as height, length, chest circumference, tube circumference, chest circumference, tube circumference, chest width, chest depth, hip width, and cross-section height of the measured breeding sheep can be obtained simultaneously. However, this method acquires thermal infrared and X-ray image data, which are not sufficiently accurate. The target data obtained from these data are static and cannot accurately identify the posture of the sheep while it is moving.
[0005] Chinese publication number CN115396576A discloses a device and method for automatically measuring sheep body size from side and top view dual-perspective images. The device primarily comprises a PLC-controlled access control system, an image acquisition module equipped with side and top view cameras, and an image acquisition chamber. The side and top view images are corrected using the equal length characteristics of the minimum bounding rectangle of the foreground in the side and top view images. Key body size features of the sheep in the side and top view images are then comprehensively utilized to automatically locate key body size points. Body height, chest depth, chest width, body oblique length, and tube diameter are calculated using Euclidean distance. Chest circumference is obtained by fitting an ellipse using chest depth and chest width as major and minor axis parameters, and tube circumference is obtained by fitting the tube diameter. This method automatically provides objective sheep body size parameters while minimizing human-animal contact and labor costs. While this measurement method can obtain body size parameters, it only meets the requirements for body size measurement and represents static data, unable to accurately identify the posture of sheep in motion.
[0006] Compared to large livestock, sheep exhibit a greater variety of postures due to their unique characteristics, such as more joints, increased flexibility, and complex behaviors. Sheep are timid creatures, and measuring their body measurements while they are still is a time-consuming and laborious task. Furthermore, frequent measurements can cause stress, which in turn affects their growth and development. Therefore, accurately capturing and analyzing the various postures of sheep (including standing, walking, and jumping), as well as accurately identifying these postures in different states, are urgent technical challenges to mitigate stress during the breeding phase. Summary of the Invention
[0007] The purpose of the present invention is to provide a multi-posture sheep movement state recognition method based on machine vision to solve the sheep stress problem caused by measuring sheep body size, effectively improve the measurement efficiency while reducing human error, and identify the sheep posture in the movement state.
[0008] To achieve the above objectives, the technical solutions used in the present invention are: The multi-posture sheep movement state recognition method based on machine vision includes: Acquire images of sheep to obtain images and collect body size data; The maskrcnn convolutional neural network is used to detect sheep images and determine the sheep category. The feature information of the sheep image is filtered through convolution, upsampling and element-wise addition operations. The sampling points are interpolated to form a bounding box image. The sheep's outline is obtained from the bounding box image, and the sheep category, bounding box image and outline are output. The posture of the sheep in motion is determined based on the angle formed by the minimum rectangle and the minimum area rectangle, as well as the relative position of the highest point of the sheep's body and the sheep's head.
[0009] Furthermore, the shape features of the contour points of the outer contour are used to identify the characteristic parts of the sheep in the moving state, and the body size feature points are obtained according to the characteristic parts and marked.
[0010] Furthermore, the steps of using maskrcnn to identify sheep images include: The input part receives pre-processed sheep images and label data for model training; The backbone network uses ResNet101 as a deep convolutional neural network, which performs convolution, upsampling, and element-wise addition on the sheep images to obtain the fused feature images. The region proposal network uses boxes and rules to filter the feature information in the feature image and filter the feature image; Roi Align samples the feature image, performs pixel interpolation on the sampling points, and then aggregates the sampling points in each unit to obtain an aggregated image; The output unit processes the aggregated image through a loss function to obtain the segmentation result of the sheep outline, outputs the category and bounding box image, and obtains the outer contour of the sheep from the bounding box image.
[0011] Furthermore, the minimum area rectangle refers to the rectangle with the smallest area that encloses the sheep, and the minimum rectangle is the minimum bounding rectangle of the bounding box image; by calculating the diagonal angle formed by the minimum area rectangle and the minimum rectangle, the degree of bending of the sheep's body and the extension of its legs are reflected, and the posture is judged; a neural network is used to detect the sheep's mask and evaluate the highest point and head position of the sheep for posture analysis.
[0012] Furthermore, a state recognition model is established using the contour points of the outer contour. The state recognition model is used to characterize the shape features, and the posture of the sheep is recognized through the state recognition model.
[0013] Furthermore, the state recognition model includes: a head-up state recognition model, a head-down state recognition model, and a back and curved surface recognition model.
[0014] Furthermore, the body size feature points of the head-up state include: body oblique length and chest depth, cross height, and body height; the convex hull point of the sheep contour points is obtained by calculating the convex hull function, and its rightmost overlapping point in the sheep contour is verified as the feature point of the cross; the straight line connecting the sheep head vertex and the hip point is defined as a straight line, and all contour points are obtained from the straight line. By calculating the distance between the contour point and the straight line, the point with the longest distance is selected as the body height feature point; the maximum inscribed rectangle in the spatial domain is extracted based on a recursive algorithm to calculate the body oblique length and chest depth, and the maximum circumscribed rectangle is determined to define the spatial area, and the recursive algorithm is used to identify multiple inscribed rectangles in the area; the area of the inscribed rectangle is calculated and expressed in a list format, and the stack property is used to determine the area of the maximum inscribed rectangle. The diagonal position of the maximum inscribed rectangle represents the feature point of the body oblique length, and the distance of the chest depth is the distance between the shoulder height feature point and the right feature point of the body oblique length.
[0015] Furthermore, the body dimension feature points of the head-down state include: body oblique length, chest depth, body height, and cross-body height. The head-down state recognition model uses a recursive algorithm to extract the largest inscribed rectangle in the spatial domain to establish the head-down state recognition model; the largest circumscribed rectangle is determined to define the spatial area, and then a recursive algorithm is used to identify multiple inscribed rectangles within the area; the areas of these inscribed rectangles are calculated and expressed in a list format, and the stack property is used to determine the largest rectangle area. The diagonal position of the largest inscribed rectangle represents the feature point of the body oblique length, and the distance of the chest depth is the distance between the shoulder height feature point and the feature point on the right side of the body oblique length.
[0016] Furthermore, the body size feature points of the back and curved surface recognition model include: body width, hip width, chest circumference, and tube circumference.
[0017] Furthermore, the maximum curvature point is calculated using the U-chord length curvature, which is the location of the body height and the cross height in the head-down state. The U-chord length curvature calculation formula is: in , . , and They are , and The coordinates of , U is the setting constant; Chest circumference is calculated using the formula:
[0018] Among them, l is the chest circumference, α is 1 / 2 of the chest width, and β is 1 / 2 of the chest depth; The cross section of the pipe circumference is close to a circle. The contour point range is 1 / 3 of the distance from the lower point of the breast depth to the sheepshoe point. The diameter d of the pipe circumference is obtained and substituted into the circle formula. , calculate C, which is the circumference of the sheep.
[0019] The technical effects of the present invention include: 1. The present invention uses a machine to capture images of sheep in motion, uses machine vision to identify sheep, analyzes their postures in motion, and calculates their body size feature points, thus solving the sheep stress problem caused by manual body size measurement.
[0020] 2. The present invention can reduce the human error generated in the measurement process, effectively improve the measurement efficiency, and solve the problem of accuracy in obtaining the body size parameter points of sheep under machine photography.
[0021] 3. The present invention can accurately capture and analyze the various posture states of sheep with high recognition accuracy, solving the recognition problem of capturing and analyzing the various movement posture states of sheep in the movement channel (including jumping, raising the head, and lowering the head). BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of target extraction of sheep in the present invention; Figure 2 It is the maskrcnn recognition framework diagram in the present invention; Figure 3 It is a schematic diagram of the jumping posture of the sheep in the present invention; Figure 4 This is a schematic diagram of calculating the oblique length and chest depth of sheep in the present invention; Figure 5 is a side view of the sheep of the present invention; Figure 6 It is the back image of the sheep in the present invention. DETAILED DESCRIPTION
[0023] The following description sufficiently illustrates specific embodiments of the invention to enable those skilled in the art to practice and reproduce the invention.
[0024] The multi-posture sheep movement state recognition method based on machine vision uses machine vision to analyze the posture of sheep in the movement state and calculate the body size feature points to identify the sheep posture.
[0025] like Figure 1 Shown is a schematic diagram of target extraction of sheep in the present invention.
[0026] Step 1: Use an RGB camera to capture color images of sheep, collect images of the sheep, collect body size data, and obtain sheep images; When the sheep were 3 weeks old, an RFID (Radio Frequency Identification) high-frequency electronic ear tag was installed on its right ear for subsequent identification and recording.
[0027] After collecting body measurement data, the sheep are driven through an image data acquisition tunnel. This tunnel consists of a plastic background and a rectangular metal frame. An 8-megapixel autofocus HD camera is mounted above and to the right of the tunnel. An industrial computer is also installed behind the background to store and identify ear tags.
[0028] An automatic shooting program was used to capture images of the sheep's back and side at a rate of 30 images per second, and individual image folders were created using the ear tag number as the folder name.
[0029] Step 2: Use the maskrcnn convolutional neural network to detect the sheep image and determine the sheep category. The feature information of the sheep image is filtered through convolution, upsampling and element-wise addition operations. The sampling points are interpolated to form a bounding box image. The outline of the sheep is obtained from the bounding box image. The sheep category, bounding box image and outline are output. Target detection includes determining whether an object belonging to a specific class appears in the image and locating the position where the target appears. The target detection result is usually represented by the bounding box of the object.
[0030] We used maskrcnn to identify sheep images captured by the back and side cameras. All images in the training, validation, and test sets were manually labeled using MIT's open-source labeling software Labelme before the experiment.
[0031] The Maskrcnn model includes: input part, backbone network, region proposal network, Roi Align part, and output part.
[0032] like Figure 2 As shown in FIG, it is the maskrcnn recognition framework diagram in the present invention.
[0033] Step 2.1: The input unit receives pre-processed sheep images and label data for model training; Step 2.2: The backbone network uses ResNet101 as a deep convolutional neural network. It performs convolution, upsampling, and element-wise addition on the sheep image to obtain a fused feature image. The backbone network uses a ResNet101 deep convolutional neural network to receive and extract image features. The dataset uses 640×480 images as input, with anchor boxes of sizes 512×512, 256×256, 128×128, and 64×64. This configuration enables the convolutional neural network to detect low-level details such as wool color, outline, and texture, while also capturing high-level features such as the sheep's position in the image.
[0034] The deep convolutional neural network adopts the Feature Pyramid Networks (FPN) structure, which can fully utilize the spatial information of the underlying feature maps and the semantic information of the high-level feature maps.
[0035] Step 2.3: The region proposal network (RPN) uses boxes and rules to filter the feature information in the feature image and filter the feature image; The Region Proposal Network (RPN) is primarily used to filter feature images, using a series of boxes and rules to select feature information. Three boxes of different sizes are generated for each pixel, with the sizes of these boxes determined by their proportions and ratios. Boxes of different sizes are generated by changing the aspect ratio.
[0036] Step 2.4: Roi Align samples the feature image, performs pixel interpolation on the sampling points, and then aggregates the sampling points within each unit to obtain the aggregated image; During the Roi Align process, the feature images of different sizes generated by the RPN are resampled to the same size. The feature images of different sizes are sampled into a one-dimensional vector through the pooling layer for classification and regression tasks.
[0037] Roi Align uses bilinear interpolation to interpolate the sampling points pixel by pixel, and then aggregates the sampling points within each unit to obtain the output aggregated image.
[0038] Step 2.5: The output unit processes the aggregated image through the loss function to obtain the segmentation result of the sheep outline, outputs the category and bounding box image, and obtains the outer contour of the sheep from the bounding box image.
[0039] Step 3: Determine the sheep's posture when it is moving based on the angle formed by the minimum rectangle and the minimum area rectangle, as well as the relative position of the highest point of the sheep's body and the sheep's head; The minimum area rectangle is the smallest rectangle that encloses the sheep. The minimum rectangle is the smallest bounding rectangle of the bounding box image. Sheep exhibit various postures while traversing the path, including jumping, raising their heads, and lowering their heads. During a jump, the minimum area rectangle may deviate. To better capture this posture information, the angle formed by the minimum area rectangle and the minimum rectangle is calculated. This angle reflects the degree of body bending and leg extension, facilitating posture assessment.
[0040] like Figure 3 Shown is a schematic diagram of the jumping posture of the sheep in the present invention.
[0041] This application records the number and angles of sheep in different body positions, including 309 sheep with their heads down, with an angle of 2.84±3.64, 76 sheep with their heads up, with an angle of 3.16±2.45, and 163 sheep with their heads jumping, with an angle of 15.44±8.35. In the head-down and head-up states, there is no significant difference in the angle between the minimum area rectangle and the diagonal of the minimum area rectangle. However, when the sheep is in a jumping state, the body presents an upward posture, resulting in an angle that is significantly higher than the head-down and head-up states. This application uses the results of the decision tree, whose value is greater than 8.9, as the parameter for identifying jumping posture in subsequent verification experiments.
[0042] Table 1. Angle statistics of sheep in different walking postures
[0043] Note: Different lowercase letters indicate statistical significance between different postures (P<0.05).
[0044] A neural network is then used to detect the sheep's mask, thereby assessing the sheep's highest point and head position for posture analysis. Based on the position of the highest point and head, the sheep image is segmented into four regions: upper left, lower left, upper right, and lower right. For example, if the highest point is in the upper right and the head is above the hips, the sheep is classified as looking upward; however, if the highest point is in the upper right but the head is below the hips, the sheep is classified as looking downward.
[0045] Step 4: Use the shape features of the contour points of the outer contour to identify the characteristic parts of the sheep in the moving state, obtain the body size feature points based on the characteristic parts, and make annotations.
[0046] Body height: the vertical distance from the highest point of the withers to the ground.
[0047] Cross height: the vertical distance from the cross to the ground.
[0048] Body length: The straight-line distance from the tip of the shoulder to the rear end of the ischial tuberosity.
[0049] Chest depth: the vertical distance from the highest point of the withers to the lower edge of the sternum.
[0050] Chest circumference: The circumference of the chest measured from the rear edge of the shoulder blade perpendicular to the body axis.
[0051] Chest width: The width of the chest at the back edge of the shoulder blades.
[0052] Tube circumference: The circumference of the thinnest part of the tube bone, usually measured 1 / 3 from the bottom to the top of the left front leg.
[0053] Body length: the straight-line distance from the front edge of the shoulder blade to the end of the buttocks.
[0054] The state recognition model is established using the contour points of the outer shape. The state recognition model is used to characterize the shape features and identify the sheep's posture. The state recognition model includes: head-up state recognition model, head-down state recognition model, back and curved surface recognition model.
[0055] 4.1. The characteristic points of body size in the head-up position include: body oblique length and chest depth, cross-section height, and body height.
[0056] Cross height: Obtain the convex hull point of the sheep's outline by calculating the convex hull function, and verify its rightmost overlapping point in the sheep's outline as the feature point of the cross.
[0057] like Figure 4 FIG. 1 is a schematic diagram showing the calculation of the oblique length and chest depth of sheep in the present invention.
[0058] Body height: Define the line connecting the apex of the sheep's head and the hip point as line a, and obtain all contour points from line a. Calculate the distance between the contour points and line a, and select the point with the longest distance as the body height feature point.
[0059] The calculation methods for body oblique length and chest depth are as follows: This study used a recursive algorithm-based method to extract the maximum inscribed rectangle within the spatial domain to calculate these parameters. First, the maximum circumscribed rectangle was determined to define the spatial region. Then, a recursive algorithm was used to identify multiple inscribed rectangles within this region. Subsequently, the areas of these inscribed rectangles were calculated and expressed in a list format. Using the properties of the stack, the area of the largest rectangle was determined. The diagonal position of the largest inscribed rectangle represented the characteristic point of body oblique length, and the distance of chest depth was the distance between the characteristic point of shoulder height and the characteristic point to the right of body oblique length.
[0060] 4.2. The characteristic points of body size in the head-down state include: oblique body length, chest depth, body height, and cross-body height.
[0061] like Figure 5 Shown is a side view of a sheep according to the present invention.
[0062] Body height and cross-section height: Because the shoulder blades and hip bones protrude when the sheep's head is lowered, the locations of the body height and cross-section height feature points can be identified by screening the protruding areas. The distance between the left and right boundary points of the sheep's body is taken as D. The body height range is 3 / 8D-4 / 8*D, and the cross-section height range is 6 / 8-7 / 8*D. U-chord length curvature has good noise and rotation resistance performance and meets the above three conditions, so this algorithm is used to calculate discrete curvature. Therefore, the point of maximum curvature calculated based on U-chord length curvature is the location of the body height and cross-section height when the head is lowered.
[0063]
[0064] in , . , and They are , and The coordinates of , U is a setting constant.
[0065] The calculation methods for body oblique length and chest depth are as follows: This study uses a recursive algorithm to extract the maximum inscribed rectangle within the spatial domain to calculate these parameters. First, the maximum circumscribed rectangle is determined to define a spatial region. Then, a recursive algorithm is used to identify multiple inscribed rectangles within this region. Subsequently, the areas of these inscribed rectangles are calculated and presented in a list format. Using the stack property, the area of the largest rectangle is determined. The diagonal position of the largest inscribed rectangle represents the feature point of body oblique length, and the distance of chest depth is the distance between the feature point of shoulder height and the feature point to the right of body oblique length.
[0066] 4.3. Body measurement feature points of the back and curved surface include: body width, hip width, chest circumference, and tube circumference.
[0067] like Figure 6 Shown is an image of the back of a sheep in the present invention.
[0068] Body Width and Rump Width: The back of the Ujumchin sheep is convex due to the presence of the shoulder blades and hip joints. To calculate body width and rump width, a specific area must be defined. First, the area for calculating the body and rump width of the Ujumchin sheep is determined. Then, a curvature algorithm is used to calculate the curvature of the upper and lower points within this area to determine the locations of the body and rump widths. Finally, the absolute value of the difference between the y-values of these points is calculated to determine the body and rump widths of the Ujumchin sheep.
[0069] Chest Circumference: The chest circumference of the Ujumchin sheep is approximately elliptical in cross-section. Measurements of the back and side views provide the chest width and depth, corresponding to the major and minor axes of the ellipse, respectively. Chest circumference can be calculated using an integral formula.
[0070]
[0071] Where l is the chest circumference, α is 1 / 2 of the chest width, and β is 1 / 2 of the chest depth.
[0072] Pipe circumference: The cross section of the pipe circumference is close to a circle, and the contour point value range is 1 / 3 of the distance from the lower point of the breast depth to the sheepshoe point. Obtain the diameter d of the pipe circumference and substitute it into the circle formula , calculate C, which is the circumference of the sheep.
[0073] The terms used in this invention are descriptive and exemplary, rather than restrictive. Since the present invention can be embodied in a variety of forms without departing from the spirit or essence of the technical solution, it should be understood that the above-described embodiments are not limited to any of the foregoing details, but should be interpreted broadly within the spirit and scope of the appended claims. Therefore, all changes and modifications that fall within the scope of the claims or their equivalents are intended to be covered by the appended claims.
Claims
1. A multi-posture sheep moving state recognition method based on machine vision, characterized in that: include: Acquire images of sheep to obtain images and collect body size data; The maskrcnn convolutional neural network is used to detect sheep images and determine the sheep category. The feature information of the sheep image is filtered through convolution, upsampling and element-wise addition operations. The sampling points are interpolated to form a bounding box image. The sheep's outline is obtained from the bounding box image, and the sheep category, bounding box image and outline are output. The posture of the sheep in motion is determined based on the angle formed by the minimum rectangle and the minimum area rectangle, as well as the relative position of the highest point of the sheep's body and the sheep's head.
2. The multi-posture sheep moving state recognition method based on machine vision according to claim 1, characterized in that: The shape features of the contour points of the outer contour are used to identify the characteristic parts of the sheep in the moving state, and the body size feature points are obtained according to the characteristic parts and marked.
3. The multi-posture sheep moving state recognition method based on machine vision according to claim 1, characterized in that: The steps to use maskrcnn to identify sheep images include: The input part receives pre-processed sheep images and label data for model training; The backbone network uses ResNet101 as a deep convolutional neural network, which performs convolution, upsampling, and element-wise addition on the sheep images to obtain the fused feature images. The region proposal network uses boxes and rules to filter the feature information in the feature image and filter the feature image; Roi Align samples the feature image, performs pixel interpolation on the sampling points, and then aggregates the sampling points in each unit to obtain an aggregated image; The output unit processes the aggregated image through a loss function to obtain the segmentation result of the sheep outline, outputs the category and bounding box image, and obtains the outer contour of the sheep from the bounding box image.
4. The multi-posture sheep moving state recognition method based on machine vision according to claim 1, characterized in that: The minimum area rectangle refers to the rectangle with the smallest area that encloses the sheep. The minimum rectangle is the minimum bounding rectangle of the bounding box image. By calculating the diagonal angle formed by the minimum area rectangle and the minimum rectangle, the degree of body bending and leg extension of the sheep can be reflected and the posture can be judged. A neural network is used to detect the sheep's mask and evaluate the sheep's highest point and head position for posture analysis.
5. The multi-posture sheep moving state recognition method based on machine vision according to claim 2, characterized in that: The contour points of the outer contour are used to establish a state recognition model, which is used to characterize the shape features and to identify the posture of the sheep.
6. The multi-posture sheep moving state recognition method based on machine vision according to claim 5, characterized in that: The state recognition model includes: head-up state recognition model, head-down state recognition model, back and curved surface recognition model.
7. The multi-posture sheep moving state recognition method based on machine vision according to claim 6, characterized in that: The body size feature points of the head-up state include: body oblique length and chest depth, cross height, and body height; the convex hull point of the sheep contour points is obtained by calculating the convex hull function, and its rightmost overlapping point in the sheep contour is verified as the feature point of the cross; the straight line connecting the sheep head vertex and the hip point is defined as a straight line, and all contour points are obtained from the straight line. By calculating the distance between the contour point and the straight line, the point with the longest distance is selected as the body height feature point; the maximum inscribed rectangle in the spatial domain is extracted based on a recursive algorithm to calculate the body oblique length and chest depth, and the maximum circumscribed rectangle is determined to define the spatial area. The recursive algorithm is used to identify multiple inscribed rectangles in the area; the area of the inscribed rectangle is calculated and expressed in list format. The stack property is used to determine the area of the maximum inscribed rectangle. The diagonal position of the maximum inscribed rectangle represents the feature point of the body oblique length, and the distance of the chest depth is the distance between the shoulder height feature point and the right feature point of the body oblique length.
8. The multi-posture sheep moving state recognition method based on machine vision according to claim 7, characterized in that: The body dimension feature points of the head-down state include: oblique body length, chest depth, body height, and cross-body height. The head-down state recognition model uses a recursive algorithm to extract the largest inscribed rectangle in the spatial domain to establish the head-down state recognition model; the largest circumscribed rectangle is determined to define the spatial area, and then a recursive algorithm is used to identify multiple inscribed rectangles within the area; the areas of these inscribed rectangles are calculated and expressed in a list format. Using the properties of the stack, the largest rectangle area is determined. The diagonal position of the largest inscribed rectangle represents the feature point of the body oblique length, and the distance of the chest depth is the distance between the shoulder height feature point and the feature point on the right side of the body oblique length.
9. The multi-posture sheep moving state recognition method based on machine vision according to claim 8, characterized in that: The body size feature points of the back and curved surface recognition model include: body width, hip width, chest circumference, and tube circumference.
10. The multi-posture sheep moving state recognition method based on machine vision according to claim 9, characterized in that: The maximum curvature point calculated using the U-chord length curvature is the location where the body height and the cross height are in the head-down state. The U-chord length curvature calculation formula is: in , . , and They are , and The coordinates of , U is the setting constant; Chest circumference is calculated using the formula: , Among them, l is the chest circumference, α is 1 / 2 of the chest width, and β is 1 / 2 of the chest depth; The cross section of the pipe circumference is close to a circle. The contour point range is 1 / 3 of the distance from the lower point of the breast depth to the sheepshoe point. The diameter d of the pipe circumference is obtained and substituted into the circle formula. , calculate C, which is the circumference of the sheep.
Citation Information
Patent Citations
Device and method for automatically measuring sheep body size from side-view and top-view double-view-angle image
CN115396576A
Movable sheep body size character measuring device and method
CN119325918A
Cited By
Method and system for judging direction of head of quadruped animal and computer equipment
CN121330034A
X-ray imaging-based goose body size and bone phenotype precise measurement method, system and device
CN122510328A