System and method for measuring body weight and body size of sheep

The sheep weight and body size measurement system, which combines a PLC controller and a computer with an image acquisition module, solves the problems of low efficiency, large errors, and severe stress reactions in sheep weight and body size measurement. It achieves automated, high-precision weight and body size measurement and supports systematic data management.

CN121430786APending Publication Date: 2026-01-30广西农业职业技术大学 +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511443836.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing technologies for measuring sheep weight and body size are inefficient, prone to large errors, cause severe stress reactions, and involve isolated data, making it difficult to achieve automated and high-precision management.

Method used

The sheep weight and body size measurement system is composed of a PLC controller and computer, along with an image acquisition module, a weighing module, and an identification module. Through the design of the guide channel, identification channel, and weighing module, it realizes automated and non-contact weight and body size measurement of sheep. It also combines a depth camera for image processing and 3D point cloud model reconstruction.

Benefits of technology

It has achieved fully automated measurement of sheep weight and body size, reducing human error and stress response, improving measurement efficiency and accuracy, and supporting systematic management and analysis of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121430786A_ABST
    Figure CN121430786A_ABST
Patent Text Reader

Abstract

The invention discloses a sheep weight and size measuring system and method, and relates to the technical field of animal husbandry breeding intelligent management. Firstly, the invention discloses a sheep weight and body size measuring system, which comprises a PLC (Programmable Logic Controller), a computer, a channel module, a blocking module, an identity recognition module, an entrance module, an image acquisition module, a weighing module and a grouping module, wherein the PLC is in communication connection with the computer. Secondly, the invention discloses a method for measuring the weight and the body size of the sheep, and the method comprises the following steps: S1, driving the sheep into a guide channel at the entrance of the system, and arranging a queue; and S2, a worker starts a blocking module to communicate the recognition channel with the guide channel, and after the first sheep enters the recognition channel, the blocking module is started again to block the space between the recognition channel and the guide channel and block the next sheep. The device has the advantages of automation, high precision and non-contact, so that personal errors and sheep stress are reduced, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent management of livestock breeding, and particularly relates to a system and method for measuring the weight and size of sheep. BACKGROUND

[0002] In modern livestock farming, the weight and size of sheep are key indicators of their growth and development, genetic performance, health level, and market value. Traditional measurement methods mainly rely on manual contact measurement using tools such as measuring rods and tape measures, which have the following significant shortcomings:

[0003] 1. Low efficiency: Manual measurement of each sheep takes a long time and cannot meet the needs of large-scale breeding farms.

[0004] 2. Stress reaction: Restraint and contact measurement of sheep can cause tension and stress in the flock, affecting their growth and development and health.

[0005] 3. Large measurement error: The measurement results are highly subjective and have poor repeatability and consistency due to factors such as operator proficiency and sheep posture.

[0006] 4. Isolated data: Measurement data is usually recorded manually, making it difficult to implement electronic and systematic management and analysis.

[0007] Although existing technologies have attempted to use ordinary cameras for measurement, they are limited by the perspective distortion of two-dimensional images, the complexity of scale calibration, and the requirement for sheep posture, which often results in insufficient precision and practicality. SUMMARY

[0008] The technical problem to be solved by the present application is to provide a system and method for measuring the weight and size of sheep, which has the advantages of automation, high precision, and non-contact, to reduce human error and sheep stress and improve work efficiency.

[0009] To solve the above technical problems, the present application adopts the following technical solutions:

[0010] Firstly, the application discloses a sheep weight and size measurement system, comprising a PLC controller, a computer, a channel module, a blocking module, an identity recognition module, an entrance module, an image acquisition module, a weighing module and a grouping module; wherein the PLC controller and the computer are in communication connection; the channel module comprises a guiding channel and an identification channel which are adjacent, and a sheep can only pass through the two channels one by one; the blocking module is arranged between the guiding channel and the identification channel, and is used for controlling the sheep to enter the identification channel one by one; the identity recognition module is arranged in the identification channel, and is in communication connection with the computer, and is used for reading the information of the electronic ear tag of the sheep and sending the information of the sheep to the computer for display; the entrance module comprises an entrance door and a first driving device, the entrance door is arranged between the weighing module and the identification channel, the first driving device is electrically connected with the PLC controller, and the PLC controller is used for controlling the first driving device to drive the opening and closing of the entrance door according to the instruction issued by the computer; the weighing module is electrically connected with the PLC controller, and is used for acquiring the weight of the sheep, and the weight of the sheep is sent to the computer after being processed by the PLC controller; the image acquisition module comprises at least one side-view depth camera and a top-view depth camera, and is fixed on the side and the top of the weighing module respectively, and is used for synchronously acquiring the depth image and the color image of the sheep and sending the images to the computer, and the computer is used for sequentially executing background segmentation and target extraction, key point recognition, three-dimensional point cloud model reconstruction and size parameter calculation on the images; the computer is used for storing the measurement results, displaying the weight and size data and generating a historical data report; the grouping module comprises a grouping door and a second driving device, the grouping door is provided with a plurality of grouping doors, the entrance door and the plurality of grouping doors enclose the whole weighing module, and each grouping door is connected with a second driving device; the second driving device is electrically connected with the PLC controller, a plurality of weight thresholds are arranged in the computer, each grouping door corresponds to a weight threshold, when the sheep reaches one of the weight thresholds, the computer issues an instruction to the PLC controller and controls the second driving device corresponding to the grouping door to work and open the grouping door, so that the sheep leaves the weighing module and enters the corresponding grouping area.

[0011] Further, the weighing module comprises a base, a weighing sensor and a weighing platform; the base is square, and the weighing platform is arranged above the base; the weighing sensor is provided with four, and is uniformly distributed between the weighing platform and the base, and the weighing sensor is electrically connected with the PLC controller.

[0012] Furthermore, the base has mounting slots located near its four sides; one side of the base communicates with the identification channel, and a first column is provided on each of the two upper sides of this side. The first column has a hollow structure, with its hollow portion communicating with the mounting slot, and the opposite sidewalls of the two first columns have first straight holes along their length; the first driving device includes a first motor, a first lead screw, a first moving block, a first sprocket, and a first chain; the first motor is located in the mounting slot and directly below one of the first columns, and is electrically connected to the PLC controller; two first lead screws are provided, one in each of the two first columns, and the head of the first lead screw... The end is rotatably connected to the upper end face of the first column, and the tail end extends into the mounting groove; the tail end of the first column located above the first motor is fixedly connected to the rotating shaft of the first motor; a first sprocket is provided on the shaft of each of the two first lead screws near their tail ends, and the two first sprockets are connected by a first chain; two first moving blocks are provided, respectively on the two first lead screws, and the first moving blocks are provided with through holes installed on the first lead screws, and the inner wall of the through holes is provided with internal threads that match the external threads of the first lead screws; the side walls of the first moving blocks extend out of the first straight holes; the entrance gate is located between the two first moving blocks, and the two sides of the lower end of the entrance gate are respectively connected to one of the first moving blocks.

[0013] Furthermore, a second column is provided on each of the upper two sides of the remaining three sides of the base. The second column has a hollow structure, with its hollow part communicating with the mounting groove. The opposite sidewalls of the two second columns on the same side have second straight holes along their length. A grouping gate is provided between the two second columns on the same side. For any grouping gate, the second drive device connected to it includes a second motor, a second chain, two second lead screws, two second moving blocks, and two second sprockets. The second motor is located in the mounting groove and directly below the second column on one side of the grouping gate. The second motor is electrically connected to the PLC controller. The two second lead screws are respectively located on... The second column on both sides of the group gate has a second lead screw whose head end is rotatably connected to the upper end face of the second column, and whose tail end extends into the mounting groove. The tail end of the second lead screw located above the second motor is fixedly connected to the rotating shaft of the second motor. A second sprocket is provided on the shaft of each of the two second lead screws near their tail ends. The two second sprockets are connected by a second chain. A second moving block is installed on each of the two second lead screws. The second moving block has a through hole installed on the second lead screw. The inner wall of the through hole has an internal thread that matches the external thread of the second lead screw. The group gate is located between the two second moving blocks, and the two sides of the lower end of the group gate are respectively connected to a second moving block.

[0014] Furthermore, multiple infrared sensing modules are installed along the height of the first column. Each infrared sensing module includes an infrared transmitter and an infrared receiver positioned opposite each other on the two first columns. The infrared receiver is electrically connected to the PLC controller. Pressure sensors electrically connected to the PLC controller are installed on the lower surfaces of the entrance door and the group door.

[0015] Secondly, this invention discloses a method for measuring the weight and body size of sheep, comprising the following steps:

[0016] Step S1: Herd the sheep into the guide passage at the system entrance and line them up.

[0017] Step S2: The staff activates the barrier module to connect the identification channel and the guide channel. After the first sheep enters the identification channel, the barrier module is activated again to block the identification channel and the guide channel and prevent the next sheep from entering.

[0018] Step S3: After the sheep enter the identification channel, the identification module automatically reads its electronic ear tag information and sends the sheep information to the computer for display. The computer sends an instruction to the PLC controller, and the PLC controller controls the first drive device to drive the entrance door to open, and the sheep enter the weighing module.

[0019] Step S4: When the weighing sensor can detect the pressure signal and the infrared receivers of all infrared sensing modules can receive infrared light, the PLC controller controls the first drive device to drive the entrance door to close, so as to prevent the sheep from leaving the weighing platform during the weighing process.

[0020] Step S5: The weighing sensor acquires the sheep's weight data. The PLC controller processes the data and sends it to the computer. The side-view depth camera and the top-view depth camera simultaneously acquire the sheep's depth image and color image and send them to the computer. The computer is used to sequentially perform background segmentation and target extraction, key point recognition, 3D point cloud model reconstruction and body size parameter calculation on the images.

[0021] Step S6: The computer stores the measurement results, displays the weight and body size data, and generates historical data reports. Based on the weight threshold of the sheep's weight data, it sends an instruction to the PLC controller to control the second drive device corresponding to the threshold to work, so that the corresponding grouping door opens.

[0022] In step S7, the sheep leave through the opened group gate and enter the corresponding group area. When the pressure signal detected by the weighing sensor is close to 0, the PLC controller controls the second drive device to drive the group gate to close.

[0023] In step S8, the staff restarts the barrier module to allow the second sheep to enter the recognition channel. After the second sheep enters the recognition channel, the barrier module is restarted again to block the third sheep. This process is repeated until the last sheep is measured.

[0024] The sheep weight and body size measurement system and method provided by this invention have the following beneficial effects:

[0025] After the barrier device is activated, the sheep enter the identification channel through the guide channel. The sheep's information is identified by the identification module and sent to the computer. The computer sends instructions to the PLC controller, which controls the first drive module to open the entrance gate and allow the sheep to enter the weighing module. The weighing module acquires the sheep's weight, which is then processed by the PLC controller and sent to the computer. Simultaneously, the image acquisition module acquires depth and color images of the sheep and sends them to the computer. The computer then performs background segmentation and target extraction, key point recognition, 3D point cloud model reconstruction, and body size parameter calculation on the images to obtain the sheep's body size data. The computer stores the measurement results, displays the weight and body size data, and generates historical data reports. The PLC controller then drives the corresponding second drive device based on the weight threshold of the sheep's weight data to open the corresponding grouping gate, allowing the sheep to enter the corresponding grouping area. This achieves full automation of the entire process from identification, weighing, body size measurement, data storage and analysis to grouping, with the advantages of automation, high precision, and non-contact operation. This reduces human error and sheep stress, significantly saves manpower and time, and improves work efficiency. Attached Figure Description

[0026] Figure 1 This is a structural schematic diagram of an embodiment of the present invention.

[0027] Figure 2 This is a principle block diagram of an embodiment of the present invention.

[0028] Figure 3 This is a schematic diagram of the identification channel in an embodiment of the present invention.

[0029] Figure 4 This is a schematic diagram showing the connection of the entry module, weighing module, and grouping module in an embodiment of the present invention.

[0030] Figure 5 yes Figure 4 Top view.

[0031] Figure 6 yes Figure 5 AA sectional view.

[0032] Figure 7 yes Figure 5 BB cross-sectional view.

[0033] Figure 8 This is a structural schematic diagram of the weighing module according to an embodiment of the present invention.

[0034] Figure 9 This is a schematic diagram showing the connection between the entrance gate, the first slider, the camera, and the driving device in an embodiment of the present invention.

[0035] Figure 10 This is a schematic diagram of the structure of the first driving device of the present invention after omitting the first slider.

[0036] Figure 11 This is a schematic diagram of the connection between the grouping gate and the second slider in an embodiment of the present invention.

[0037] Figure 12 This is a schematic diagram of the structure of the second driving device of this embodiment of the invention after omitting the second slider.

[0038] Figure 13 This is a schematic diagram of the barrier module according to an embodiment of the present invention.

[0039] The diagram is labeled as follows: 1. PLC controller; 2. Computer; 3. Guide channel; 4. Identification channel; 5. Identity recognition module; 61. Entrance door; 611. First slider; 62. First motor; 63. First lead screw; 64. First moving block; 65. First sprocket; 66. First chain; 71. Group gate; 711. Second slider; 72. Second motor; 73. Second chain; 74. Second lead screw; 75. Second moving block; 76. Second sprocket; 81. Base; 811. Mounting slot; 82. Weighing sensor; 83. Weighing Platform; 84. First column; 841. First linear hole; 842. First slide rail; 85. Second column; 851. Second linear hole; 852. Second slide rail; 9. Infrared sensing module; 91. Infrared transmitter; 92. Infrared receiver; 10. Pressure sensor; 201. Third motor; 202. Whip; 301. Support column; 302. Baffle; 303. Electric telescopic rod; 304. Telescopic button; 401. Top-view depth camera; 402. Side-view depth camera; 50. Signal indicator light; 60. Control button. Detailed Implementation

[0040] The present invention will now be described in conjunction with the accompanying drawings. The specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the present invention. Various modifications and improvements to the technical solutions of the present invention made by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope of the present invention.

[0041] like Figures 1 to 13As shown, the sheep weight and body size measurement system of this embodiment includes a PLC controller 1, a computer 2, a channel module, a barrier module, an identification module 5, an entry module, an image acquisition module, a weighing module, a grouping module, and a power supply module.

[0042] The PLC controller 1 and computer 2 are connected for communication. The computer 2 and PLC controller 1 are connected for communication via an RS485 interface. The computer 2 and PLC controller 1 transmit information via an RS485 bus.

[0043] The passage module includes two adjacent guide passages, 3 and 4. Sheep can only pass through one at a time in each passage, preventing crowding and confusion, and effectively avoiding fright and injury to the sheep, thus reducing stress. Both passages are composed of guardrails.

[0044] A barrier module is installed between the guide channel and the identification channel to control sheep entering the identification channel one by one. In this embodiment, the barrier module includes support columns 301, baffles 302, electric telescopic rods 303, and telescopic buttons 304. Two support columns 301 are provided, located on either side between the guide channel 3 and the identification channel 4. The upper surface of each support column 301 has a groove extending downwards along its height. The two ends of the baffles 302 are respectively placed in the grooves of the two support columns 301 to block the sheep between the guide channel 3 and the identification channel 4. Two electric telescopic rods 303 are provided, connected to the lower ends of the baffles 302 to adjust their height. Both electric telescopic rods 303 and the telescopic button 304 controlling their extension and retraction are electrically connected to the PLC controller 1. A relay is installed between the electric telescopic rod 303 and the PLC controller 1. The telescopic button 304 is located on the surface of the identification channel 4. When in use, a worker needs to stand next to the telescopic button 304. After a sheep enters the identification channel 4, the worker can press the telescopic button 304 to control the electric telescopic rod 303 to shorten, causing the baffle 302 to drop and block between the guide channel 3 and the identification channel 4. After the previous sheep has been weighed, the telescopic button 304 is pressed again to extend the electric telescopic rod 303 and move the baffle 302 upward, allowing the next sheep to enter the identification channel 4. This process is repeated to ensure that the weighing is carried out in an orderly manner.

[0045] The identification module 5 is located in the identification channel 4 and is connected to the computer 2. It is used to read the electronic ear tag information of sheep and send the sheep information to the computer 2 for display. In this embodiment, the identification module 5 is an RFID reader. It uses RFID technology to read the electronic ear tag information of sheep through an ultra-high frequency ear tag reader. The computer 2 is equipped with data management software and has a basic information file of sheep, which can accurately associate weight data with individual sheep, resulting in a high identification accuracy rate.

[0046] The entry module includes an entrance gate 61 and a first drive device. The entrance gate 61 is located between the weighing module and the identification channel 4. The first drive device is electrically connected to the PLC controller 1. The PLC controller 1 is used to control the first drive device to drive the opening and closing of the entrance gate 61 according to the instructions issued by the computer 2.

[0047] The weighing module is electrically connected to the PLC controller 1 and is used to obtain the weight of the sheep. The sheep weight is processed by the PLC controller 1 and then sent to the computer 2.

[0048] The image acquisition module includes at least one side-view depth camera 402 and a top-view depth camera 401, which are fixed to the side and top of the weighing module, respectively, and are connected to a computer for synchronous acquisition of depth and color images of sheep and sending them to the computer. The computer 2 is used to sequentially perform background segmentation and target extraction, key point recognition, 3D point cloud model reconstruction, and body size parameter calculation on the images.

[0049] Computer 2 is used to store measurement results, display weight and body size data, and generate historical data reports.

[0050] The grouping module includes grouping gates 71 and second drive devices. Multiple grouping gates 71 are provided. The entrance gate 61 and multiple grouping gates 71 surround the entire weighing module. Each grouping gate 71 is connected to a corresponding second drive device for driving its opening and closing. The second drive device is electrically connected to the PLC controller 1. The computer 2 is set with multiple weight thresholds. Each grouping gate 71 corresponds to one weight threshold. When a sheep reaches one of the weight thresholds, the PLC controller 1 controls the second drive device that drives the opening and closing of the grouping gate 71 corresponding to that threshold to work and open the grouping gate 71, allowing the sheep to leave the weighing module and enter the corresponding grouping area.

[0051] The power module is used to provide the operating voltage.

[0052] The weighing module in this embodiment includes a base 81, weighing sensors 82, and a weighing platform 83. The base 81 is square, and the weighing platform 83 is positioned above the base 81. This embodiment uses four weighing sensors 82, model HBMZ6FC3, which have strong resistance to off-center loading, are suitable for multi-dimensional force measurement during animal movement, and are adaptable to the humid and dusty environment of a farm. The four weighing sensors 82 are evenly distributed between the weighing platform 83 and the base 81. The weighing sensors 82 are electrically connected to a PLC controller 1. The signals detected by the four weighing sensors 82 are sent to the PLC controller 1, which converts the detected signals into weight values. The sum of the data measured by the four weighing sensors 82 is the weight of the sheep. The PLC controller 1 then sends the sheep's weight to a computer 2 for storage.

[0053] An installation groove 811 is provided inside the base 81 near its four sides. One side of the base 81 is connected to the identification channel 4. A first column 84 is provided on each of the two upper sides of this side. The first column 84 has a hollow structure, and its hollow part is connected to the installation groove 811. The opposite sidewalls of the two first columns 84 are provided with first straight holes 841 along their length.

[0054] The first driving device in this embodiment includes a first motor 62, a first lead screw 63, a first moving block 64, a first sprocket 65, and a first chain 66. The first motor 62 is mounted in the mounting groove 811 and located directly below one of the first columns 84. It is electrically connected to the PLC controller 1. A relay connects the first motor 62 and the PLC controller 1 to drive the first motor 62. Two first lead screws 63 are provided, each located in one of the two first columns 84. The head end of the first lead screw 63 is rotatably connected to the upper surface of the first column 84, and the tail end extends into the mounting groove 811. To improve the stability of the rotation of the first lead screw 63, a bearing is provided inside the first column 84. The tail end of the first column 84 located above the first motor 62 is fixedly connected to the shaft of the first motor 62. Each of the two first lead screws 63 has a first sprocket 65 near its tail end. The two first sprockets 65 are connected by a first chain 66. The rotation of the shaft of the first motor 62 drives the connected first lead screw 63 to rotate. Under the linkage of the first sprocket 65 and the first chain 66, the other first lead screw 63 also rotates. Two first moving blocks 64 are provided, one on each of the two first lead screws 63. The first moving block 64 has a through hole for mounting on the first lead screw 63, and the inner wall of the through hole has an internal thread that matches the external thread of the first lead screw 63. The side wall of the first moving block 64 extends out of the first straight hole 841. The entrance gate 61 is located between the two first moving blocks 64, and the two sides of the lower end of the entrance gate 61 are connected to one of the first moving blocks 64 respectively. The lower side wall of the entrance gate 61 is connected to the side wall of the first moving block 64 that extends out of the first straight hole 841. After the first lead screw 63 rotates, the first moving block 64 moves along the length of the first lead screw 63, and drives the entrance door 61 to move, thereby achieving the purpose of opening and closing the entrance door 61. By definition, when the first motor 62 rotates forward, the first moving block 64 moves upward; when the first motor 62 rotates in reverse, the first moving block 64 moves downward.

[0055] To make the movement of the entrance door 61 more stable, the side walls of the two first columns 84 are provided with first slide rails 842 along their height direction. The first slide rails 842 and the first straight holes 841 are not on the same plane. The two sides of the entrance door 61 are provided with first sliders 611 embedded in the first slide rails 842. The length of the first sliders 611 is equal to the length of the first slide rails 842. When the entrance door 61 is closed, the first sliders 611 are all located in the first slide rails 842, which improves the stability of the two sides of the entrance door 61 when sheep rush into it.

[0056] In this embodiment, a second column 85 is provided on the upper two sides of the remaining three sides of the base 81. The second column 85 has a hollow structure, and its hollow part is connected to the mounting groove 811. The sidewalls of the two second columns 85 on the same side are provided with second straight holes 851 along their length direction. A grouping door 71 is provided between the two second columns 85 on the same side. That is, in the remaining three sides of the base 81, a second column 85 is provided on the upper two sides of each side, and a grouping door 71 is provided. The grouping door 71 is located between the two second columns 85 on the same side.

[0057] For any group gate 71, the second drive device connected to it includes a second motor 72, a second chain 73, two second lead screws 74, two second moving blocks 75, and two second sprockets 76. The second motor 72 is located in the mounting groove 811 and directly below the second column 85 on one side of the group gate 71. The second motor 72 is electrically connected to the PLC controller 1, and a relay is installed between the second motor 72 and the PLC controller 1. The two second lead screws 74 are respectively installed in the second columns 85 on both sides of the group gate 71, with the head end of the second lead screw 74 rotatably connected to the upper end face of the second column 85, and the tail end of the second lead screw 74 extending into the mounting groove 811. To improve the stability of the rotation of the second lead screw 74, bearings are installed inside the second column 85. The tail end of the second lead screw 74 located above the second motor 72 is fixedly connected to the shaft of the second motor 72. A second sprocket 76 is provided on the shaft of each of the two second lead screws 74 near their tail ends. The two second sprockets 76 are connected by a second chain 73. A second moving block 75 is installed on each of the two second lead screws 74. The second moving block 75 has a through hole installed on the second lead screw 74, and the inner wall of the through hole has an internal thread matching the external thread of the second lead screw 74. The group gate 71 is located between the two second moving blocks 75, and each side of the lower end of the group gate 71 is connected to one of the second moving blocks 75. The second driving device in this embodiment has the same components and works on the same principle as the first driving device. The rotation of the shaft of the second motor 72 drives the two second lead screws 74 to rotate, allowing the second moving blocks 75 to move the group gate 71 along the length of the second lead screws 74, thereby achieving the purpose of opening or closing the group gate 71. By definition, when the second motor 72 rotates forward, the second moving block 75 moves upward; when the second motor 72 rotates in reverse, the second moving block 75 moves downward.

[0058] To make the movement of the group gate 71 more stable, for any group gate 71, the side walls of the second pillars 85 on both sides are provided with second slide rails 852 along their height direction. The two sides of the group gate 71 are provided with second sliders 711 embedded in the second slide rails 852. The length of the second sliders 711 is equal to the length of the second slide rails 852. When the group gate 71 is closed, the second sliders 711 are all located in the second slide rails 852, which improves the stability of the two sides of the group gate 71 when sheep rush into the group gate 71.

[0059] In this embodiment, computer 2 inputs three weight thresholds to PLC controller 1. For example, threshold 1: 10 < sheep weight ≤ 30kg, threshold 2: 30 < sheep weight ≤ 50kg, and threshold 3: sheep weight > 50kg. The three grouping gates 71 are labeled as gate A, gate B, and gate C, respectively. Gate A corresponds to threshold 1, gate B corresponds to threshold 2, and gate C corresponds to threshold 3. When the weighing sensor 82 detects that the sheep's weight is at threshold 1, PLC controller 1 controls the second drive device that drives gate A to open, so that gate A opens and the sheep enters the corresponding grouping area after exiting through gate A. After the sheep walks off the weighing platform 83, the weight value detected by the weighing sensor 82 is almost zero. PLC controller 1 controls the second drive device to close again, waiting for the next sheep to be weighed before controlling the corresponding second drive device to operate.

[0060] In this embodiment, one top-view depth camera 401 is installed, positioned directly above the weighing platform 83 of the weighing module; four side-view depth cameras 402 are installed, respectively on the entrance gate 61 and the three grouping gates 71. The top-view depth camera 401 and the side-view depth cameras 402 are Intel RealSense D455 models, which have built-in RGB sensors and can simultaneously output aligned depth and color images. Once the sheep enter the weighing module and the entrance gate is closed, the depth cameras begin capturing images of the sheep.

[0061] In this embodiment, multiple infrared sensing modules 9 are arranged along the height of the first column 84. Each infrared sensing module 9 includes an infrared transmitter 91 mounted on one of the first columns 84 and an infrared receiver 92 mounted on the other. The infrared receiver 92 is electrically connected to the PLC controller 1 and is used to provide feedback on whether infrared light has been received. When the identification module 5 identifies the sheep signal, the computer 2 sends a command to the PLC controller 1. The PLC controller 1 then controls the first drive device to open the entrance door 61. In this case, the PLC controller 1 only controls the first drive device to close the entrance door 61 when the weighing sensor 82 can detect pressure and all infrared receivers 92 of the infrared sensing modules 9 can receive the infrared light emitted by the infrared transmitter 91. Other conditions will not close the entrance door 61, including: "the weighing sensor 82 cannot detect pressure" and "the weighing sensor 82 can detect pressure, but some infrared receivers 92 cannot receive the infrared light emitted by the infrared transmitter 91," thus preventing sheep from failing to enter the weighing module. Both the infrared transmitter 91 and the infrared receiver 92 are provided with a cover, and the cover is provided with a light-transmitting hole, so that the infrared receiver 92 can only receive the infrared rays emitted by the infrared transmitter 91 that is positioned opposite it.

[0062] In addition, pressure sensors 10 are installed on the lower end face of the entrance door 61 and all grouping doors 71. The pressure sensors 10 are electrically connected to the PLC controller 1. When the entrance door 61 and grouping doors 71 are closed, if the lower end face of the door comes into contact with the sheep's body, a pressure signal is generated. This pressure signal is transmitted to the PLC controller 1, which controls the first drive device and the second drive device to stop working to prevent the sheep from being trapped by the door.

[0063] Both the entrance gate 61 and the identification channel 4 are equipped with a driving device, which includes a third motor 201 and a whip 202. One end of the whip 202 is fixedly connected to the shaft of the third motor 201, and the other end is used to slap the sheep. The third motor 201 is electrically connected to the PLC controller 1, and a relay is installed between the third motor 201 and the PLC controller 1. The PLC controller 1 is used to control the shaft of the third motor 201 to rotate 180° clockwise and counterclockwise repeatedly. When the sheep is successfully identified by the identification module 5 in the identification channel 4, the PLC controller 1 controls the first drive device to open the entrance gate 61, and at the same time controls the third motor 201 of the driving device in the channel to work. The shaft of the third motor 201 drives the whip 202 to rotate, slapping the sheep's body and causing it to walk forward into the weighing module. After weighing is completed, PLC controller 1 drives the second drive device to open the grouping gate 71. At the same time, it controls the third motor 201 of the driving device on the entrance gate 61 to work, causing the whip 202 to rotate and slap the sheep's body to make them walk out of the weighing module. The driving device can be used after connecting to PLC controller 1 as needed, or the sheep can be driven forward manually.

[0064] Multiple indicator lights 50 and control buttons 60, electrically connected to the PLC controller 1, are installed on the identification channel 4. When a sheep is identified by the identification module 5 but does not fully enter the weighing module for an extended period, when the sheep does not leave the weighing module after weighing, when the pressure sensor 10 detects a signal, or when the sheep leaves the weighing module, the corresponding indicator lights 50 illuminate to remind the staff to take appropriate action. The first and second drive devices can be controlled independently via the control buttons 60.

[0065] Based on the above system, this embodiment also discloses a method for measuring the weight and body size of a sheep, which includes the following steps:

[0066] Step S1: Drive the sheep into the guide passage at the system entrance and line them up.

[0067] In step S2, the staff activates the barrier module to connect the identification channel and the guide channel. After the first sheep enters the identification channel, the barrier module is activated again to block the next sheep between the identification channel and the guide channel. Specifically, the staff presses the telescopic button to raise the barrier, allowing the first sheep to enter the identification channel. After the first sheep enters the identification channel, the staff presses the telescopic button again to lower the barrier, blocking the next sheep.

[0068] In step S3, after the sheep enter the identification channel, the identification module automatically reads their electronic ear tag information and sends the sheep information to the computer for display. The computer sends instructions to the PLC controller, and the PLC controller controls the first drive device to open the entrance gate and the driving device to work, so that the sheep enter the weighing module.

[0069] Step S4: When the weighing sensor can detect the pressure signal and the infrared receivers of all infrared sensing modules can receive infrared light, the PLC controller controls the first drive device to drive the entrance door to close, so as to prevent the sheep from leaving the weighing platform during the weighing process.

[0070] In step S5, the weighing sensor acquires the sheep's weight data, the PLC controller processes the data and sends it to the computer, the side-view depth camera and the top-view depth camera simultaneously acquire the sheep's depth image and color image and send them to the computer, the computer uses the images to sequentially perform background segmentation and target extraction, key point recognition, 3D point cloud model reconstruction and body size parameter calculation.

[0071] In step S6, the computer stores the measurement results, displays the weight and body size data, and generates historical data reports. Based on the weight and body size threshold of the sheep, it sends a command to the PLC controller to control the second drive device corresponding to the threshold to open the corresponding grouping gate.

[0072] In step S7, the sheep leave through the opened group gate and enter the corresponding group area. When the pressure signal detected by the weighing sensor is close to 0, the PLC controller controls the second drive device to drive the group gate to close. Then, the corresponding signal indicator light is controlled to illuminate, indicating that the weighing of the first sheep has ended.

[0073] In step S8, the staff activates the barrier module again to allow the second sheep to enter the identification channel. After the second sheep enters the identification channel, the barrier module is activated again to block the third sheep. Specifically, the staff presses the telescopic button again to raise the barrier and allow the second sheep to enter the identification channel. After the second sheep enters the identification channel, the staff presses the telescopic button again to lower the barrier and block the third sheep. This process is repeated until the last sheep is measured.

[0074] In step S5 above, background segmentation and target extraction include the following steps:

[0075] Step S511: Input depth images and RGB images from the side-view depth camera and the top-view depth camera.

[0076] Step S512, depth map background segmentation, includes:

[0077] Background modeling: During system initialization, multiple frames of depth maps are acquired in a sheepless state to establish a static background model (average depth value of each pixel).

[0078] Foreground detection: After the sheep enter the weighing module, the current depth image is compared with the background model pixel by pixel. If the depth value decreases significantly (the object is closer), the pixel is marked as the foreground.

[0079] Morphological processing: Opening (denoising, eliminating small spaces at the edges of hair) and closing (filling, completing the receding and possibly missing areas between the abdomen) operations are performed on the initially obtained foreground mask to obtain a complete and smooth sheep outline mask.

[0080] Step S513, RGB image semantic segmentation, including:

[0081] Pre-trained deep learning semantic segmentation models (such as U-Net, DeepLabV3+) are used to perform pixel-level classification on RGB images, directly outputting the pixel regions of sheep.

[0082] Step S514: Perform logical fusion (such as "logical AND" operation to ensure the result is pure; "logical OR" operation to fill in the missing depth information area) on the depth mask obtained in step S512 and the RGB mask obtained in step S513 to generate the final binary mask.

[0083] Step S515 outputs a clean, binary sheep target mask.

[0084] In step S5 above, key point identification includes the following steps:

[0085] Step S521: Input the RGB image region of the sheep after background segmentation.

[0086] Step S522, model inference, includes:

[0087] The cropped sheep images are input into a deep learning keypoint detection model (such as HRNet or HigherHRNet). This model has been trained on a large number of manually annotated sheep images and is able to learn the shape and structural features of the sheep.

[0088] The model outputs a heatmap for each predefined key point (such as withers, chest bottom, shoulder end, buttock end, etc.), and the brightest position in the heatmap is the most likely location of that key point.

[0089] Step S523, coordinate decoding, includes:

[0090] A peak-finding operation is performed on the heatmap of each key point to find the pixel coordinates (u,v) of the maximum value point, thereby obtaining the precise location of all key points in the two-dimensional image;

[0091] Step S524: Output a list containing all identified keypoints and their two-dimensional pixel coordinates.

[0092] In step S5 above, the reconstruction of the 3D point cloud model includes the following steps:

[0093] Step S531: Depth images from different viewpoints, intrinsic and extrinsic parameter matrices of the depth camera (obtained through calibration), and two-dimensional coordinates of key points obtained from key point recognition.

[0094] Step S532, point cloud generation, includes:

[0095] Using the camera intrinsic parameter matrix, the corresponding three-dimensional coordinates (X,Y,Z) of each foreground pixel in the depth image are calculated by back projection, generating a preliminary three-dimensional point cloud.

[0096] Step S533, Coordinate System I and Fusion, includes:

[0097] By using the camera extrinsic matrix, point clouds generated from different side and top views are transformed into the same coordinate system.

[0098] The point cloud registration algorithm is used to accurately stitch together point clouds from multiple perspectives to form a complete and dense 3D point cloud model of sheep.

[0099] Step S534, mapping key points to 3D, includes:

[0100] By using the two-dimensional coordinates (u,v) of each key point and its corresponding depth value d, they are mapped onto a three-dimensional point cloud to obtain the three-dimensional spatial coordinates of the key points.

[0101] Step S535, point cloud post-processing, includes:

[0102] Filtering: Removes outlier noise points.

[0103] Downsampling: Reduces point cloud density and improves processing efficiency.

[0104] Step S536: Output the 3D point cloud model of the sheep, as well as the 3D spatial coordinates of the key points in the point cloud.

[0105] In step S5 above, the body size parameter calculation includes the following steps:

[0106] Step S541: Input the 3D point cloud model and the 3D coordinates of the key points.

[0107] Step S542: Calculate the sheep's height, length, chest girth, and cannon bone circumference, where...

[0108] Improved calculation: Directly obtain the three-dimensional coordinates of the "wither" point, and the body height = the Z coordinate value of the wither point (assuming the ground is the Z=0 plane).

[0109] Body length calculation: Obtain the three-dimensional coordinates of the "shoulder end" and "hip end" points. Body length = three-dimensional Euclidean distance between the two points.

[0110] Chest circumference calculation: The body axis direction is determined by the "wither" point and the "chest bottom" point. A cross-sectional plane passing through the "chest bottom" point and perpendicular to the body axis is constructed. All points near the cross-section are extracted from the 3D point cloud. The cross-sectional point cloud is projected onto the plane, and a contour is fitted (such as the convex hull algorithm). The perimeter of the contour is calculated, which is the chest circumference.

[0111] Tube circumference calculation: On the point cloud of the left forelimb, locate the upper 1 / 3 of the tube bone, extract the point cloud of the cross section at that location, fit the contour and calculate the circumference.

[0112] Step S543: Output body size parameters.

[0113] In summary, the sheep weight and body size measurement system and method of this embodiment have the advantages of automation, high precision and non-contact operation, which can reduce human error and sheep stress and improve work efficiency.

Claims

1. A sheep weight body dimensions measuring system characterised by, The application relates to a sheep body size and weight measuring device, which comprises a PLC controller, a computer, a channel module, a blocking module, an identity recognition module, an entrance module, an image acquisition module, a weighing module and a grouping module. The PLC controller and the computer are in communication connection. The channel module comprises adjacent guide channels and recognition channels, and a sheep can only pass through the two channels one by one. The blocking module is arranged between the guide channels and the recognition channels and is used for controlling the entry of a sheep into the recognition channels. The identity recognition module is arranged in the recognition channels and is in communication connection with the computer, is used for reading the electronic ear tag information of the sheep and sending the sheep information to the computer for display. The entrance module comprises an entrance door and a first driving device, the entrance door is arranged between the weighing module and the recognition channels, the first driving device is electrically connected with the PLC controller, and the PLC controller is used for controlling the opening and closing of the entrance door according to the instruction issued by the computer. The weighing module is electrically connected with the PLC controller and is used for acquiring the body weight of the sheep, and the body weight of the sheep is sent to the computer after being processed by the PLC controller. The image acquisition module comprises at least one side-view depth camera and one overhead depth camera, is fixed on the side and the top of the weighing module respectively and is used for synchronously acquiring the depth image and the color image of the sheep and sending the images to the computer, and the computer is used for sequentially executing background segmentation and target extraction, key point recognition, three-dimensional point cloud model reconstruction and body size parameter calculation on the images. The computer is used for storing the measurement results, displaying the body weight and body size data and generating a historical data report. The grouping module comprises a grouping door and a second driving device, the grouping door is arranged in plurality, the entrance door and the plurality of grouping doors enclose the whole weighing module, each grouping door is connected with one second driving device, the second driving device is electrically connected with the PLC controller, a plurality of body weight thresholds are arranged in the computer, each grouping door corresponds to one body weight threshold, when the sheep reaches one of the body weight thresholds, the computer issues an instruction to the PLC controller and controls the second driving device corresponding to the threshold to work and opens the grouping door, so that the sheep leaves the weighing module and enters the corresponding grouping area.

2. The system of claim 1, wherein, The weighing module comprises a base, weighing sensors and a weighing platform, the base is square, the weighing platform is arranged above the base, the weighing sensors are arranged in four, are evenly distributed between the weighing platform and the base and are electrically connected with the PLC controller.

3. The system of claim 2, wherein, The base is internally provided with mounting grooves close to the four side edges, one side edge of the base is in communication with the recognition channels, two first vertical columns are arranged above the two sides of the side edge, the first vertical columns are hollow structures, the hollow parts are in communication with the mounting grooves, and the opposite side walls of the two first vertical columns are provided with first straight holes along the length direction. The first driving device comprises a first motor, two first leadscrews, two first moving blocks, and two first sprockets; the first motor is arranged in the installation groove and directly below one of the first upright columns, and is electrically connected with the PLC controller; the two first leadscrews are arranged in the two first upright columns respectively, the head end of the first leadscrew is rotatably connected with the upper end surface of the first upright column, and the tail end of the first leadscrew extends into the installation groove; the tail end of the first upright column above the first motor is fixedly connected with the rotating shaft of the first motor; the two first leadscrews are arranged with a first sprocket on the rod near the tail end of the first leadscrew respectively, and the two first sprockets are connected through a first chain; the two first moving blocks are arranged on the two first leadscrews respectively, the first moving block is arranged with a through hole arranged on the first leadscrew, and the inner wall of the through hole is arranged with internal threads matched with the external threads of the first leadscrew; the side wall of the first moving block extends out of the first straight hole; the entrance door is arranged between the two first moving blocks, and the lower end of the entrance door is connected with one of the first moving blocks on each side.

4. The system of claim 3, wherein, The upper sides of the remaining three sides of the base are each arranged with a second upright column, the second upright column has a hollow structure, the hollow part is communicated with the installation groove, the opposite side walls of the two second upright columns on the same side are arranged with a second straight hole along the length direction of the second upright column, and a sub-group door is arranged between the two second upright columns on the same side; For any one sub-group door, the second driving device connected with the sub-group door comprises a second motor, a second chain, two second leadscrews, two second moving blocks, and two second sprockets; the second motor is arranged in the installation groove and directly below the second upright column on one side of the sub-group door, and is electrically connected with the PLC controller; the two second leadscrews are arranged in the second upright columns on the two sides of the sub-group door respectively, the head end of the second leadscrew is rotatably connected with the upper end surface of the second upright column, and the tail end of the second leadscrew extends into the installation groove; the tail end of the second leadscrew above the second motor is fixedly connected with the rotating shaft of the second motor; the two second leadscrews are arranged with a second sprocket on the rod near the tail end of the second leadscrew respectively, and the two second sprockets are connected through a second chain; the two second moving blocks are arranged on the two second leadscrews respectively, the second moving block is arranged with a through hole arranged on the second leadscrew, and the inner wall of the through hole is arranged with internal threads matched with the external threads of the second leadscrew; the sub-group door is arranged between the two second moving blocks, and the lower end of the sub-group door is connected with one of the second moving blocks on each side.

5. The system of claim 3, wherein, A plurality of infrared sensing modules are arranged on the first upright column along the height direction of the first upright column; the infrared sensing module comprises an infrared emitter and an infrared receiver arranged opposite to each other on the two first upright columns, and the infrared receiver is electrically connected with the PLC controller; the lower end surface of the entrance door and the sub-group door is arranged with a pressure sensor electrically connected with the PLC controller.

6. The system of claim 1, wherein, The blocking module comprises support columns, a baffle, electric telescopic rods and a telescopic button; the support columns are provided with two, respectively located on both sides between the guide channel and the identification channel, and a groove is formed in the upper end surface of the support column along the height direction thereof; the two ends of the baffle are respectively arranged in the grooves of the two support columns and used for blocking between the guide channel and the identification channel; the electric telescopic rods are provided with two, respectively connected with the lower end surfaces of the two ends of the baffle and used for adjusting the height of the baffle; the two electric telescopic rods and the telescopic button for controlling the telescopic rods are electrically connected with the PLC controller.

7. The system of claim 1, wherein, The entrance door and the identification channel are provided with a driving device, which comprises a third motor and a whip, one end of the whip is fixedly connected with the rotating shaft of the third motor, and the other end is used for slapping the sheep, and the third motor is electrically connected with the PLC controller.

8. A method of measuring the body size of sheep in a system as claimed in claim 5, characterised in that, The method comprises the following steps: Step S1, the sheep are queued in the guide channel of the system entrance; Step S2, the staff starts the blocking module to connect the identification channel and the guide channel, the first sheep enters the identification channel, and the blocking module is started again to block the next sheep between the identification channel and the guide channel; Step S3, after the sheep enter the identification channel, the identity recognition module automatically reads the electronic ear tag information of the sheep, and sends the information of the sheep to the computer for display, the computer sends an instruction to the PLC controller, the PLC controller controls the first driving device to drive the entrance door to open, and the sheep enter the weighing module; Step S4, when the weighing sensor can detect the pressure signal, and the infrared receivers of all the infrared sensing modules can receive the infrared rays, the PLC controller controls the first driving device to drive the entrance door to close, so as to prevent the sheep from leaving the weighing platform during the weighing process; Step S5, the weighing sensor acquires the weight data of the sheep, the PLC controller processes the data and sends it to the computer, the side-view depth camera and the overhead depth camera synchronously collect the depth image and the color image of the sheep and send them to the computer, the computer is used for sequentially executing background segmentation and target extraction, key point recognition, three-dimensional point cloud model reconstruction and body size parameter calculation on the images; Step S6, the computer stores the measurement results, displays the weight and body size data, and generates a historical data report, and according to the weight threshold value of the weight data of the sheep, sends an instruction to the PLC controller to control the second driving device corresponding to the threshold value to work, so that the corresponding group door is opened; Step S7, the sheep leave from the opened group door and enter the corresponding grouping area, when the pressure signal detected by the weighing sensor approaches 0, the PLC controller controls the second driving device to work to drive the group door to close; Step S8, the staff starts the blocking module again to let the second sheep enter the identification channel, and the second sheep enters the identification channel, and the blocking module is started again to block the third sheep, and the cycle is repeated until the last sheep is measured.

9. The method of claim 8, wherein, In step S5, The background segmentation and target extraction comprise the following steps: Step S511, input the depth image and the RGB image from the side-view and overhead depth cameras; Step S512, depth image background segmentation, which comprises: Background modeling: when the system is initialized, multiple frames of depth images are collected in the absence of sheep to establish a static background model; Foreground detection: after the sheep enters the weighing module, the current depth image is compared with the background model pixel by pixel. If the depth value is significantly smaller, it is marked as foreground; Morphological processing: open and close operations are performed on the preliminary foreground mask to obtain a complete and smooth sheep contour mask; Step S513, RGB image semantic segmentation, comprising: using a pre-trained deep learning semantic segmentation model to perform pixel-level classification on the RGB image, and directly outputting a sheep pixel region; Step S514, logically fusing the depth mask obtained in step S12 and the RGB mask obtained in step S13 to generate a final binary mask; Step S515, outputting a pure and binary sheep target mask; Key point recognition, comprising the following steps: Step S521, inputting a sheep RGB image region after background segmentation; Step S522, model inference, comprising: inputting the cropped sheep image into a deep learning key point detection model; the model outputs a heat map for each predefined key point, and the position with the highest brightness in the heat map is the most likely position of the key point; Step S523, coordinate decoding, comprising: performing peak finding operation on the heat map of each key point to find the pixel coordinates (u, v) of the maximum value point, thereby obtaining the accurate positions of all key points in the two-dimensional image; Step S524, outputting a list containing all recognized key points and their two-dimensional pixel coordinates.

10. The method of claim 9, wherein, In step S5, three-dimensional point cloud model reconstruction, comprising the following steps: Step S531, depth images from different angles, intrinsic and extrinsic parameter matrices of the depth camera, and key point two-dimensional coordinates obtained from key point recognition; Step S532, point cloud generation, comprising: using the camera intrinsic matrix, calculating the corresponding three-dimensional coordinates (X, Y, Z) of each foreground pixel in the depth image through back projection to generate a preliminary three-dimensional point cloud; Step S533, coordinate system unification and fusion, comprising: using the camera extrinsic matrix, converting the point clouds generated from different angles of view to the same coordinate system; using a point cloud registration algorithm to accurately splice the point clouds from multiple angles of view to form a complete and dense sheep three-dimensional point cloud model; Step S534, key point mapping to 3D, comprising: using the two-dimensional coordinates (u, v) and the corresponding depth value d of each key point to map them to the three-dimensional point cloud to obtain the three-dimensional spatial coordinates of the key points; Step S535, point cloud post-processing, comprising: filtering: removing outlier noise points; downsampling: reducing the point cloud density; Step S536, outputting the three-dimensional point cloud model of the sheep and the three-dimensional spatial coordinates of the key points in the point cloud; body size parameter calculation, comprising the following steps: Step S541, inputting the three-dimensional point cloud model and the three-dimensional coordinates of the key points; Step S542, calculating the body height, body length, chest circumference, and pipe circumference of the sheep; Step S543, outputting the body size parameters.

Citation Information

Cited By

  • Method for measuring weight and body size of pig

    CN122176759A

  • Method for determining the weight and size of a pig

    CN122176759B