CN113313833A - Pig body weight estimation method based on 3D vision technology - Google Patents

Pig body weight estimation method based on 3D vision technology Download PDF

Info

Publication number
CN113313833A
CN113313833A CN202110725030.9A CN202110725030A CN113313833A CN 113313833 A CN113313833 A CN 113313833A CN 202110725030 A CN202110725030 A CN 202110725030A CN 113313833 A CN113313833 A CN 113313833A
Authority
CN
China
Prior art keywords
pig
weight
image
vision technology
head
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110725030.9A
Other languages
Chinese (zh)
Inventor
樊士冉
杜晓冬
彭子杰
李笑笑
李太山
刘文哲
杨季凡
张兴
龚华忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xinliu Agriculture And Animal Husbandry Technology Co ltd
New Hope Group Co ltd
Shandong New Hope Liuhe Agriculture And Animal Husbandry Technology Co ltd
Sichuan New Hope Liuhe Pig Breeding Technology Co ltd
Xiajin New Hope Liuhe Agriculture And Animal Husbandry Co ltd
Tibet Xinhao Technology Co ltd
Shandong New Hope Liuhe Group Co Ltd
New Hope Liuhe Co Ltd
Original Assignee
Beijing Xinliu Agriculture And Animal Husbandry Technology Co ltd
New Hope Group Co ltd
Shandong New Hope Liuhe Agriculture And Animal Husbandry Technology Co ltd
Sichuan New Hope Liuhe Pig Breeding Technology Co ltd
Xiajin New Hope Liuhe Agriculture And Animal Husbandry Co ltd
Tibet Xinhao Technology Co ltd
Shandong New Hope Liuhe Group Co Ltd
New Hope Liuhe Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xinliu Agriculture And Animal Husbandry Technology Co ltd, New Hope Group Co ltd, Shandong New Hope Liuhe Agriculture And Animal Husbandry Technology Co ltd, Sichuan New Hope Liuhe Pig Breeding Technology Co ltd, Xiajin New Hope Liuhe Agriculture And Animal Husbandry Co ltd, Tibet Xinhao Technology Co ltd, Shandong New Hope Liuhe Group Co Ltd, New Hope Liuhe Co Ltd filed Critical Beijing Xinliu Agriculture And Animal Husbandry Technology Co ltd
Priority to CN202110725030.9A priority Critical patent/CN113313833A/en
Publication of CN113313833A publication Critical patent/CN113313833A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a pig body weight estimation method based on a 3D vision technology, which relates to the field of breeding equipment, and adopts the technical scheme that an RGBD camera is used for carrying out image acquisition on pigs; screening the acquired images; the screened image enters a 3D point cloud modeling channel to obtain a three-dimensional space model of the pig; according to the obtained three-dimensional model, combining a weight estimation model to obtain the weight of the pig; the resulting body weight results were evaluated. The invention has the beneficial effects that: the detection precision of the scheme based on the machine vision technology is lower than that of manual detection in certain aspects, and the detection method has the advantages of high detection speed, low long-term running cost, time saving, labor saving and the like. The 3D vision technology-based weight estimation method can capture the overall information of the pig body, has great potential in improving the accuracy of pig weight estimation, and is beneficial to improving the feasibility and robustness of the technology.

Description

Pig body weight estimation method based on 3D vision technology
Technical Field
The invention relates to the field of breeding equipment, in particular to a pig body weight estimation method based on a 3D vision technology.
Background
Under the condition of severe prevention and control of African swine fever, a non-contact measurement technology is particularly important. The growth information of pig body size, weight and the like is an important index for describing the quality and nutritional status of the pig. In terms of quality, the pig's living body ruler can be used to estimate its lean meat percentage, back fat thickness, eye muscle area, etc. In terms of nutritional status, the daily gain parameter of animals is one of the important indicators for judging the growth trend of the animals. The traditional process of measuring the body size and the weight mainly comprises the steps of manually driving pigs, weighing the pigs, and mainly adopting a subjective measuring and recording mode. This traditional mode has provided huge challenge to the stability of equipment among the long-term aquaculture environment, because is controlled by agricultural production's complex environment, high temperature, high humidity environment can influence the measurement stability and the accuracy of sensor, and the animal is the living body, can't cooperate the detection according to people's will, and if force restrain it to in the artifical weighing device simultaneously, undoubtedly can cause huge stress to it.
The technology for detecting the body size and the estimated body weight of the pig in a non-contact way based on the machine vision technology is also an enthusiastic direction for researchers in recent years, for example: the inspection robot for Jingdong farming and pasturing is combined with an AI algorithm to intelligently check, estimate weight and the like of a target pig, an awning system of Rui animal science and technology company automatically counts the number of live pig storage columns, tracks the body shape, weight, behavior change and the like of the live pig, a looker track robot of a small dragon crawling company finishes the weight measurement, fat measurement and check work of the pig by taking the columns as units by utilizing an AI vision technology. Although the detection precision based on the visual technology is lower than that of manual detection in some aspects and cannot be identified accurately in percent, the method has the advantages of high detection speed, low long-term operation cost and the like, so that the technology has wide research space and good application effect. And traditional manual detection work load is big, and measurement of efficiency is low, unable automatic continuous monitoring, uses machine vision to replace artifical the detection, will liberate the demand to the labour, reduces the production management cost of enterprise, improves the production level of counting intellectuality. However, most of the existing visual weight estimation technologies are limited to two-dimensional images, weight estimation models are established based on pig body back areas and pig body size parameters, the machine vision technology is attributed to the development process of equipment, the two-dimensional image processing technology is realized by an RGB (red, green and blue) color camera, and in terms of weight estimation precision, 2D images can only acquire local pig body information, so that the accuracy of measurement results is limited. In addition, the problem of error transmission caused by secondary measurement exists in the pig body weight estimation method in the existing scheme, and the secondary transmission of errors can cause the error accumulation of the body weight estimation result, namely the mean square error of the final measurement result is increased.
Disclosure of Invention
Aiming at the technical problems, the invention provides a pig weight estimation method based on a 3D vision technology.
The technical scheme is that S1, an RGBD camera is used for carrying out image acquisition on the pigs;
s2, screening the image acquired in S1, and judging whether the image acquired currently is an ideal frame or not by means of an ideal frame method; if yes, the image is reserved; if not, deleting the image;
s3, enabling the image screened by the S2 to enter a 3D point cloud modeling channel to match edge points of different viewing angles, wherein the process is completed by means of the functions of an RGBD camera, a three-dimensional space model of a pig is obtained after successful matching, and the contour model of the appearance of the pig also comprises three-dimensional coordinates x, y and z of each contour point;
s4, obtaining the weight of the pig according to the three-dimensional model obtained in the S3 by combining a weight estimation model, wherein the weight estimation model is as follows:
BW=α×ρ×V+β×L+δ×H
wherein BW is the weight of a pig in kg, and alpha is the correction coefficient of the body density; rho is the pig body density, has close relation with the pig body obesity degree and the growth stage, and has the default value of 0.975g/cm3V is the volume obtained according to the three-dimensional model of the pig body obtained in S3, and beta isA limb mass correction factor; l is the mass of the four limbs of the pig, the mass difference of the four limbs of the pigs at different ages of days is corrected by a coefficient beta, and the unit of L is kg; delta is a correction coefficient of the pig head mass; h is the mass of the pig head, the mass difference of the pig heads of pigs with different ages in days is corrected by a coefficient delta, and the unit of H is kg; correction factor correction empirical values were obtained by measuring only a large number of pigs, the number being chosen to be 200 and 800.
Considering that the transformation of the pig head and the pig legs is approximately linearly changed along with the increase of the day age compared with the pig body, the volume of the pig head and the pig legs can be cut off in a three-dimensional model, and the volume is multiplied by rho to obtain the weight of the pig head and the pig legs, and is corrected by beta and delta empirical coefficients;
the purpose of adding correction coefficients in the formula is to better fit the BW value and make it accurate;
and S5, evaluating the weight result obtained in the S4, if the result is a reasonable result, saving a record, and taking the saved record as a reference weight value at the next measurement.
Preferably, in S2, the image acquired in S1 is screened, and whether the image acquired currently is an ideal frame is determined by an ideal frame method; if yes, the image is reserved; if not, deleting the image;
specifically, images of the postures of lowering, raising, bending and inclining pigs are deleted, and the accuracy of the final result of the weight estimation algorithm is greatly influenced by abnormal postures, which is similar to the concept that people need standard postures for shooting certificates.
Preferably, in S4, the volume is obtained according to the three-dimensional pig model obtained in S3, in which the method includes removing the head and the four limbs from the three-dimensional model, and calculating the pig body by approximating the pig body to an elliptical cylinder, and the removing is selected because the head and the four limbs have relatively stable mass but have a large influence on the calculation result of the model;
according to the formula, the method comprises the following steps of,
Figure BDA0003138269320000031
wherein V is the volume of pig body, SiIs the face of the ith cross sectionAccumulating;
Figure BDA0003138269320000032
wherein, S is the two-dimensional section area, a is the starting point of the measuring pixel point, b is the key point of the measuring pixel point, and f (x) is the pixel point function.
Preferably, in the step S4, because the body size and the body weight of the pig at different growth stages are nonlinear, the pig needs to be modeled at the growth stages respectively, the modeling stages are divided into 20-60 kg, 60-110 kg and 110-150 kg, the modeling difference is reflected in the difference of the correction coefficients, and the estimated model formula is not changed.
Preferably, in S5, the weight results obtained in S4 are evaluated, specifically,
establishing a fluctuation range of a weight growth curve of the pig as a reference standard, judging whether the weight result obtained in the step S4 is within a normal reference range, and if the weight result measured in the step S4 is beyond the normal range, not recording information; if the weight results measured at S4 are within the normal growth range, the weight results are reasonable results.
For example, the weight fluctuation of a 70kg pig in one day does not exceed 3-4%, if the calculated result value exceeds the range of 67.2kg-72.8kg, the pig is marked as unqualified, and the recorded information is not stored. The qualified weight estimation result is stored in the local database together with the ear tag number of the qualified weight estimation result, and is used as a reference weight value in the next measurement.
Preferably, in S1, the RGBD camera is used to capture images of the pigs, specifically, the images of the pigs are captured at a fixed time.
Shooting angles of the camera to the pigs are top view angles and side view angles;
considering that the weight of a pig fluctuates in one day, it is recommended to fix the estimated weight time, for example, focusing on the weight estimation work at 8:00 am or 16:00 pm.
Preferably, in S4, the method for removing the head and the limbs from the three-dimensional model includes removing the head through a section perpendicular to the ground of the pig ear root connecting line, and removing the limbs through a section at the intersection of the limbs and the abdomen in the horizontal direction.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: the detection precision of the scheme based on the machine vision technology is lower than that of manual detection in certain aspects, and the detection method has the advantages of high detection speed, low long-term running cost, time saving, labor saving and the like. The 3D vision technology-based weight estimation method can capture the overall information of the pig body, has great potential in improving the accuracy of pig weight estimation, and is beneficial to improving the feasibility and robustness of the technology.
Drawings
FIG. 1 is an overall flow chart of an embodiment of the present invention.
Fig. 2 is a schematic representation of a two-dimensional cross-section 1/2 of a pig according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an ideal frame screening standard positioning box according to an embodiment of the invention.
Fig. 4 is a schematic diagram of an ideal frame screening disqualification positioning box according to an embodiment of the present invention.
Fig. 5 is a schematic diagram illustrating a determination of an ideal frame image tilt angle according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are merely illustrative of the invention and are not intended to be limiting.
It should be noted that the embodiments and features of the embodiments of the present invention may be combined with each other without conflict.
Example 1
The invention provides a pig body weight estimation method based on a 3D vision technology, and S1, an RGBD camera is used for carrying out image acquisition on pigs;
s2, screening the image acquired in S1, and judging whether the image acquired currently is an ideal frame or not by means of an ideal frame method; if yes, the image is reserved; if not, deleting the image;
s3, enabling the image screened by the S2 to enter a 3D point cloud modeling channel to match edge points of different viewing angles, wherein the process is completed by means of the functions of an RGBD camera, a three-dimensional space model of a pig is obtained after successful matching, and the contour model of the appearance of the pig also comprises three-dimensional coordinates x, y and z of each contour point;
s4, obtaining the weight of the pig according to the three-dimensional model obtained in the S3 by combining a weight estimation model, wherein the weight estimation model is as follows:
BW=α×ρ×V+β×L+δ×H
wherein BW is the weight of a pig in kg, and alpha is the correction coefficient of the body density; rho is the pig body density, has close relation with the pig body obesity degree and the growth stage, and has the default value of 0.975g/cm3V is the volume obtained according to the three-dimensional pig model obtained in S3, and beta is the correction coefficient of the four limbs mass; l is the mass of the four limbs of the pig, the mass difference of the four limbs of the pigs at different ages of days is corrected by a coefficient beta, and the unit of L is kg; delta is a correction coefficient of the pig head mass; h is the mass of the pig head, the mass difference of the pig heads of pigs with different ages in days is corrected by a coefficient delta, and the unit of H is kg; correction factor correction empirical values were obtained by measuring only a large number of pigs, the number being chosen to be 200 and 800.
Considering that the transformation of the pig head and the pig legs is approximately linearly changed along with the increase of the day age compared with the pig body, the volume of the pig head and the pig legs can be cut off in a three-dimensional model, and the volume is multiplied by rho to obtain the weight of the pig head and the pig legs, and is corrected by beta and delta empirical coefficients;
the purpose of adding correction coefficients in the formula is to better fit the BW value and make it accurate;
and S5, evaluating the weight result obtained in the S4, if the result is a reasonable result, saving a record, and taking the saved record as a reference weight value at the next measurement.
In S2, screening the image acquired in S1, and judging whether the image acquired currently is an ideal frame or not by means of an ideal frame method; if yes, the image is reserved; if not, deleting the image;
specifically, images of the postures of lowering, raising, bending and inclining pigs are deleted, and the accuracy of the final result of the weight estimation algorithm is greatly influenced by abnormal postures, which is similar to the concept that people need standard postures for shooting certificates.
In S4, the volume is obtained according to the three-dimensional pig model obtained in S3, the method is that the head and the four limbs are removed from the three-dimensional model, the pig body is calculated by approximating the pig body to an elliptical cylinder, and the head and the four limbs have relatively stable quality but have large influence on the calculation result of the model, so the removal is selected; referring to fig. 2, according to the formula,
Figure BDA0003138269320000051
wherein V is the volume of pig body, SiIs the area of the ith cross section;
Figure BDA0003138269320000052
wherein, S is the two-dimensional section area, a is the starting point of the measuring pixel point, b is the key point of the measuring pixel point, and f (x) is the pixel point function.
In the step S4, due to the fact that the body sizes and the body weights of the pigs in different growth stages are nonlinear, the pig growth stages are required to be used for modeling respectively, the modeling stages are divided into 20-60 kg, 60-110 kg and 110-150 kg, modeling differences are reflected in correction coefficient differences, and the estimation model formula is not changed.
In S5, the weight results obtained in S4 are evaluated, specifically,
establishing a fluctuation range of a weight growth curve of the pig as a reference standard, judging whether the weight result obtained in the step S4 is within a normal reference range, and if the weight result measured in the step S4 is beyond the normal range, not recording information; if the weight results measured at S4 are within the normal growth range, the weight results are reasonable results.
For example, the weight fluctuation of a 70kg pig in one day does not exceed 3-4%, if the calculated result value exceeds the range of 67.2kg-72.8kg, the pig is marked as unqualified, and the recorded information is not stored. The qualified weight estimation result is stored in the local database together with the ear tag number of the qualified weight estimation result, and is used as a reference weight value in the next measurement.
In S1, an RGBD camera is used for image acquisition of the pigs, specifically, the images of the pigs are acquired at a fixed time.
Shooting angles of the camera to the pigs are top view angles and side view angles;
considering that the weight of a pig fluctuates in one day, it is recommended to fix the estimated weight time, for example, focusing on the weight estimation work at 8:00 am or 16:00 pm.
In S4, the method for removing the head and the limbs in the three-dimensional model comprises the steps of removing the head through a section perpendicular to the ground direction of the pig ear root connecting line, and removing the limbs through a section of the intersection point of the limbs and the abdomen in the horizontal direction.
Example 2
Referring to fig. 3 to 5, in step S2 on the basis of embodiment 1, the image acquired in step S1 is screened, and whether the image acquired currently is an ideal frame is determined by an ideal frame method; the scheme provides a screening method of ideal frames of pig images based on a machine vision technology,
s201, driving the pigs with images to be acquired into a detection channel, acquiring the images of the pigs by using an RGBD (red, green and blue) camera, preprocessing the acquired images, and converting the images into image frames for storage;
the width of the detection channel in the S201 is smaller than the body length of the pig, and a one-way channel relative to the pig is formed;
the step S201 is to pre-process the acquired image, including preliminary screening of the image, retaining the image with clear edge outline and normal image exposure of the pig body, and performing image denoising and image enhancement on the retained image, where the image enhancement is to specifically adjust brightness of the area where the pig body is located in the image.
S202, carrying out contour framing on the pig body in the image frame obtained in the S201 to obtain a contour frame; the method comprises the steps of using a frame based on Windows/Ubuntu + Tensorflow + Faster-RCNN to realize accurate positioning and frame selection of the pig body outline;
s203, presetting standard positioning frame parameters corresponding to different growth stages of the pigs according to the body sizes of the pigs in the different growth stages;
the standard positioning frame is a rectangular frame, and the standard positioning frame parameters comprise a length range value and a width range value.
S204, comparing the outline frame in the image frame with the standard positioning frame, and carrying out primary screening;
and comparing the outline frame in the image frame with the standard positioning frame, and performing primary screening, specifically, comparing the parameters of the outline frame obtained in the step S202 with the parameters of the standard positioning frame in the step S203, if the parameters of the outline frame exceed the parameters of the standard positioning frame, determining that the corresponding image is a disqualified image, and if the parameters of the outline frame are within the range of the parameters of the standard positioning frame, retaining the corresponding image.
Comparing the outline frame in the image frame with the standard positioning frame, carrying out primary screening, screening the pig body image symmetry, taking the central point of the outline frame as a reference point, taking the pig body image short axis as a reference line, obtaining an intersection point A and an intersection point B formed by the edges of the two sides of the pig body and the short axis, and judging the image symmetry by judging the pixel value geometric distance from the intersection point A and the intersection point B to the reference point.
The short axis of the pig body image passes through the reference point.
Screening for pig body image symmetry degree includes,
step one, screening the height value of the pig body image, specifically, acquiring the vertical distance from a reference point to the ground, wherein if the vertical distance is more than 40cm, the image is an effective image, and if the vertical distance is less than or equal to 40cm, the image is an ineffective image;
the calculation method from the center point of the contour frame to the ground is that the coordinate Z-axis height value of the center point of the contour frame is obtained through an RGBD camera, namely a depth camera, namely the difference between the height of the camera from the ground and the height of the camera from the back of the pig body is calculated through a depth image.
Step two, the intersection point A and the intersection point B are intersection points of the pig body edge contour points and the image contour short axis passing center points, and the pixel geometric distance from the intersection point A and the intersection point B to a reference point is calculated;
step three, recording the ratio of the intersection point A to the intersection point B as
And D, calculating the ratio of the intersection point to the intersection point B according to the pixel value geometric distance calculated in the step two, recording the ratio as w, and judging that the image is effective when the ratio satisfies 0.8< w < 1.2.
When the numerical value of w is estimated, recording an intersection point A of the standard positioning frame as body _ A and recording an intersection point B as body _ B;
marking the intersection point A of the outline frame as body _ A 'and the intersection point B as body _ B';
respectively calculating the geometrical distances of the pixel values from the body _ A, body _ A 'and the body _ B, body _ B' to the center in the schematic diagram;
calculating the ratio w of body _ A to body _ B to form a reference value range of 0.8-1.2, and calculating the ratio w of body _ A 'to body _ B' to determine whether 0.8< w <1.2 is satisfied.
And S5, performing secondary screening according to the inclination of the outline frame in the image after the primary screening, performing angle correction on the image after the secondary screening, and removing the part except the outline frame to be used as an ideal frame.
Performing secondary screening according to the gradient of the outline frame in the image after primary screening, performing angle correction on the image after secondary screening, and removing the part except the outline frame as an ideal frame,
defining an included angle between a long axis of the outline frame and a horizontal axis of the image as an inclined angle beta, screening the images reserved by S4, and reserving the image frames meeting the inclined angle of-15 degrees < beta <15 degrees;
the remaining image frame is corrected to leave only a portion within the outline frame, and rotated in a direction in which the β angle tends to 0 ° until β becomes 0 °, thereby obtaining an ideal frame.
Example 3
On the basis of embodiment 1, the scheme provides a pig weight estimation process, which mainly comprises system calibration (initialization), pig ear tag reading, image acquisition, image screening, 3D point cloud modeling, weight estimation model calculation, data analysis, report generation and the like, wherein the 3D point cloud modeling is to establish a three-dimensional shape model of a pig in a three-dimensional space through top views and left and right view images captured by an RGBD camera, and the data analysis is to perform theoretical value comparison analysis on a result output by an estimation model, for example: the weight fluctuation of 70kg pigs in one day does not exceed 3-4%, if the output result value exceeds the range, the measurement is not recorded, and one-time photographing and weight estimation calculation are completed in real time, so that the pigs to be detected can only be subjected to image acquisition for multiple times, ideal results are obtained and then stored and recorded, and further a report is generated. The method operation flow chart is shown in figure 1.
The image acquisition system in the scheme is intended to select an RGBD camera (RealSense D435), and the main parameters are as follows: the RGB image resolution is 1920 multiplied by 1080@30fps, the horizontal shooting visual field is 69.4 degrees, the vertical shooting visual field is 42.5 degrees, the fixed-focus lens (Haowei technology OV2740, focal length is 1.88mm) adopts a shutter mode, and the lens distortion is less than or equal to 1.5 percent. The Depth image resolution is 1280 multiplied by 800@30fps, 848 multiplied by 480@90fps, the horizontal shooting visual field is 91.2 degrees, the vertical shooting visual field is 65.5 degrees, the fixed-focus lens (Haowei technology OV9282, focal length is 1.93mm), the lens distortion is less than or equal to 1.5 percent, and the maximum shooting distance is 2m (error is less than 2 percent). Because of the RGBD camera resolution ratio who chooses for use is high, can present pig profile detail, realizes more accurate pig profile edge detection, to pig body key point, for example: the head, the tail root, the ear root and the like are well identified, in addition, in the image screening stage, whether the currently acquired image is an ideal frame or not is judged by means of an ideal frame method, namely, postures of the pig such as head lowering, head raising, bending and inclining need to be eliminated, because abnormal postures can greatly influence the accuracy of the final result of the weight estimation algorithm, the concept is similar to the concept that people need standard postures when shooting certificates.
When the pig ear tag is read, the overlooking and top views are shot, the 3D point cloud modeling channel is carried out on the screened image, edge points of different visual angles are matched, and the three-dimensional model of a pig in the three-dimensional space can be obtained after the edge points are successfully matched. The weight estimation calculation model selected by the invention is as follows:
BW=α×ρ×V+β×L+δ×H
wherein BW is the weight of a pig in kg, and alpha is the correction coefficient of the body density; rho is the pig body density, has close relation with the pig body obesity degree and the growth stage, and has the default value of 0.975g/cm3V is the volume obtained according to the three-dimensional pig body model obtained in S3, and beta is fourLimb mass correction factor; l is the mass of the four limbs of the pig, the mass difference of the four limbs of the pigs at different ages of days is corrected by a coefficient beta, and the unit of L is kg; delta is a correction coefficient of the pig head mass; h is the mass of the pig head, the mass difference of the pig heads of pigs with different ages of days is corrected by a coefficient delta, and the unit of H is kg.
Compared with a volume model for directly calculating the length, the width and the height of the pig, the method can more accurately describe the volume of the pig, and an accurate pig weight value is obtained through the thought of volume multiplied by density, but research in domestic and foreign countries is less in the aspects of pig volume and density. Due to the fact that the body size and the body weight of the pig at different growth stages are nonlinear, modeling for distinguishing the growth stages of the pig needs to be considered, for example: in the stages of piglets, breeding and fattening, correction coefficients of all stages are different, 20-150 kg of pigs in the day age of the growth stage are mainly considered in the actual scene, and the stages can be roughly divided into 20-60 kg, 60-110 kg and 110-150 kg.
And carrying out three-dimensional modeling on the images acquired for multiple times, and calculating a weight estimation result until a reasonable pig growth curve weight position is met, namely, the weight fluctuation of a 70kg pig in one day does not exceed 3-4%, if the calculation result value exceeds the range of 70% +/-4%, marking as unqualified, and not storing the recorded information. The qualified weight estimation result is stored in the local database together with the ear tag number of the qualified weight estimation result, and is used as a reference weight value in the next measurement. Considering that the weight of a pig fluctuates in one day, it is recommended to fix the estimated weight time, for example, focusing on the weight estimation work at 8:00 am or 16:00 pm.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A pig weight estimation method based on a 3D vision technology is characterized by comprising the following steps of,
s1, carrying out image acquisition on the pig by using an RGBD camera;
s2, screening the image acquired in S1, and judging whether the image acquired currently is an ideal frame or not by means of an ideal frame method; if yes, the image is reserved; if not, deleting the image;
s3, enabling the image screened in the S2 to enter a 3D point cloud modeling channel, matching edge points of different visual angles, and obtaining a three-dimensional space model of a pig after successful matching;
s4, obtaining the weight of the pig according to the three-dimensional model obtained in the S3 by combining the weight estimation model;
and S5, evaluating the weight result obtained in the S4, if the result is a reasonable result, saving a record, and taking the saved record as a reference weight value at the next measurement.
2. The method for estimating the pig weight based on the 3D vision technology as claimed in claim 1, wherein in the step S2, the image acquired in the step S1 is screened, and whether the image acquired currently is an ideal frame is determined by an ideal frame method; if yes, the image is reserved; if not, deleting the image;
specifically, images of the pigs in the postures of head lowering, head raising, bending and tilting are deleted.
3. The 3D vision technology-based pig weight estimation method according to claim 2, wherein in S4, the volume is obtained according to the three-dimensional pig model obtained in S3, by removing the head and four limbs from the three-dimensional pig model and considering the pig body as an elliptical cylinder for calculation;
according to the formula, the method comprises the following steps of,
Figure FDA0003138269310000011
wherein V is the volume of pig body, SiIs the area of the ith cross section;
Figure FDA0003138269310000012
wherein, S is the two-dimensional section area, a is the starting point of the measuring pixel point, b is the key point of the measuring pixel point, and f (x) is the pixel point function.
4. The method for estimating the weight of the pig based on the 3D vision technology as claimed in claim 3, wherein in the step S4, the pig is modeled in the growth stages respectively, and the modeling stages are 20-60 kg, 60-110 kg and 110-150 kg.
5. The method for estimating pig weight based on 3D vision technology according to claim 4, wherein in S5, the weight result obtained in S4 is evaluated, specifically,
establishing a fluctuation range of a weight growth curve of the pig as a reference standard, judging whether the weight result obtained in the step S4 is within a normal reference range, and if the weight result measured in the step S4 is beyond the normal range, not recording information; if the weight results measured at S4 are within the normal growth range, the weight results are reasonable results.
6. The method for estimating the pig weight based on the 3D vision technology according to any one of claims 1 to 5, wherein in S1, the RGBD camera is used for image acquisition of the pig, specifically, the image acquisition of the pig is performed at a fixed time.
7. The method of claim 3, wherein in the step S4, the head and the limbs are removed from the three-dimensional model by removing the head from a section perpendicular to the ground of the pig ear root line and removing the limbs from a section horizontal to the abdomen at the intersection of the limbs and the abdomen.
8. The method for estimating the weight of the pig based on the 3D vision technology as claimed in claim 7, wherein in the step S4, the weight estimation model is as follows:
BW=α×ρ×V+β×L+δ×H
wherein BW is the weight of a pig, and alpha is the correction coefficient of body density; rho is the pig body density, V is the volume, the volume is obtained according to the pig body three-dimensional model obtained in S3, and beta is the four-limb mass correction coefficient; l is the quality of the four limbs of the pigs, and the quality difference of the four limbs of the pigs at different ages of days is corrected by a coefficient beta; delta is a correction coefficient of the pig head mass; h is the quality of the pig head, and the difference of the quality of the pig head of pigs with different ages of days is corrected by a coefficient delta.
9. The 3D vision technology-based pig weight estimation method according to claim 8, characterized in that the default value of pig body density p is 0.975g/cm3
CN202110725030.9A 2021-06-29 2021-06-29 Pig body weight estimation method based on 3D vision technology Pending CN113313833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110725030.9A CN113313833A (en) 2021-06-29 2021-06-29 Pig body weight estimation method based on 3D vision technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110725030.9A CN113313833A (en) 2021-06-29 2021-06-29 Pig body weight estimation method based on 3D vision technology

Publications (1)

Publication Number Publication Date
CN113313833A true CN113313833A (en) 2021-08-27

Family

ID=77380753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110725030.9A Pending CN113313833A (en) 2021-06-29 2021-06-29 Pig body weight estimation method based on 3D vision technology

Country Status (1)

Country Link
CN (1) CN113313833A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537175A (en) * 2021-09-16 2021-10-22 长沙鹏阳信息技术有限公司 Same-fence swinery average weight estimation method based on computer vision
CN113706512A (en) * 2021-08-31 2021-11-26 内蒙古大学 Live pig weight measurement method based on deep learning and depth camera
CN115100683A (en) * 2022-06-22 2022-09-23 马上消费金融股份有限公司 Duplication estimating method, duplication estimating device, duplication estimating equipment and storage medium
CN115226651A (en) * 2022-08-19 2022-10-25 深圳进化动力数码科技有限公司 Intelligent pig raising live pig weight estimation method and device, electronic equipment and medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000057693A1 (en) * 1999-03-30 2000-10-05 Bosluis Patente (Edms.) Beperk Animal actuated applicator
CN105205858A (en) * 2015-09-18 2015-12-30 天津理工大学 Indoor scene three-dimensional reconstruction method based on single depth vision sensor
US9226481B1 (en) * 2013-03-14 2016-01-05 Praveen Paripati Animal weight monitoring system
CN108961269A (en) * 2018-06-22 2018-12-07 深源恒际科技有限公司 Pig weight measuring method and system based on image
CN109410321A (en) * 2018-10-17 2019-03-01 大连理工大学 Three-dimensional rebuilding method based on convolutional neural networks
CN110415363A (en) * 2019-08-05 2019-11-05 上海神添实业有限公司 A kind of object recognition positioning method at random based on trinocular vision
CN110415282A (en) * 2019-07-31 2019-11-05 宁夏金宇智慧科技有限公司 A kind of milk cow weight forecasting system
CN110530477A (en) * 2019-09-28 2019-12-03 四川农业大学 Replacement gilt weight predictor method
CN110693499A (en) * 2019-11-14 2020-01-17 河北农业大学 System and method for detecting animal body size and weight
CN110728208A (en) * 2019-09-24 2020-01-24 内蒙古大学 Information processing method and system in yak grazing management based on body condition scoring
CN110869977A (en) * 2017-06-29 2020-03-06 吉斯艾集团有限责任公司 Animal body weight estimation based on regression
CN111542222A (en) * 2017-11-06 2020-08-14 犊瑞乳品设备有限公司 System and method for estimating the weight of livestock
CN111612850A (en) * 2020-05-13 2020-09-01 河北工业大学 Pig body size parameter measuring method based on point cloud
CN111639629A (en) * 2020-06-15 2020-09-08 安徽工大信息技术有限公司 Pig weight measuring method and device based on image processing and storage medium
CN112560355A (en) * 2021-02-22 2021-03-26 常州微亿智造科技有限公司 Method and device for predicting Mach number of wind tunnel based on convolutional neural network
CN112655019A (en) * 2018-06-25 2021-04-13 农场监测公司 Monitoring livestock in an agricultural enclosure

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000057693A1 (en) * 1999-03-30 2000-10-05 Bosluis Patente (Edms.) Beperk Animal actuated applicator
US9226481B1 (en) * 2013-03-14 2016-01-05 Praveen Paripati Animal weight monitoring system
CN105205858A (en) * 2015-09-18 2015-12-30 天津理工大学 Indoor scene three-dimensional reconstruction method based on single depth vision sensor
CN110869977A (en) * 2017-06-29 2020-03-06 吉斯艾集团有限责任公司 Animal body weight estimation based on regression
CN111542222A (en) * 2017-11-06 2020-08-14 犊瑞乳品设备有限公司 System and method for estimating the weight of livestock
CN108961269A (en) * 2018-06-22 2018-12-07 深源恒际科技有限公司 Pig weight measuring method and system based on image
CN112655019A (en) * 2018-06-25 2021-04-13 农场监测公司 Monitoring livestock in an agricultural enclosure
CN109410321A (en) * 2018-10-17 2019-03-01 大连理工大学 Three-dimensional rebuilding method based on convolutional neural networks
CN110415282A (en) * 2019-07-31 2019-11-05 宁夏金宇智慧科技有限公司 A kind of milk cow weight forecasting system
CN110415363A (en) * 2019-08-05 2019-11-05 上海神添实业有限公司 A kind of object recognition positioning method at random based on trinocular vision
CN110728208A (en) * 2019-09-24 2020-01-24 内蒙古大学 Information processing method and system in yak grazing management based on body condition scoring
CN110530477A (en) * 2019-09-28 2019-12-03 四川农业大学 Replacement gilt weight predictor method
CN110693499A (en) * 2019-11-14 2020-01-17 河北农业大学 System and method for detecting animal body size and weight
CN111612850A (en) * 2020-05-13 2020-09-01 河北工业大学 Pig body size parameter measuring method based on point cloud
CN111639629A (en) * 2020-06-15 2020-09-08 安徽工大信息技术有限公司 Pig weight measuring method and device based on image processing and storage medium
CN112560355A (en) * 2021-02-22 2021-03-26 常州微亿智造科技有限公司 Method and device for predicting Mach number of wind tunnel based on convolutional neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
付为森;滕光辉;杨艳;: "种猪体重三维预估模型的研究", 农业工程学报, no. 2, 30 December 2006 (2006-12-30) *
周道雷;李保明;施正香;: "断奶仔猪运输前后的体重变化", 中国畜牧杂志, no. 23, 10 December 2007 (2007-12-10) *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706512A (en) * 2021-08-31 2021-11-26 内蒙古大学 Live pig weight measurement method based on deep learning and depth camera
CN113706512B (en) * 2021-08-31 2023-08-11 内蒙古大学 Live pig weight measurement method based on deep learning and depth camera
CN113537175A (en) * 2021-09-16 2021-10-22 长沙鹏阳信息技术有限公司 Same-fence swinery average weight estimation method based on computer vision
CN113537175B (en) * 2021-09-16 2022-06-03 湖南朗国视觉识别研究院有限公司 Same-fence swinery average weight estimation method based on computer vision
CN115100683A (en) * 2022-06-22 2022-09-23 马上消费金融股份有限公司 Duplication estimating method, duplication estimating device, duplication estimating equipment and storage medium
CN115226651A (en) * 2022-08-19 2022-10-25 深圳进化动力数码科技有限公司 Intelligent pig raising live pig weight estimation method and device, electronic equipment and medium
CN115226651B (en) * 2022-08-19 2023-09-19 深圳进化动力数码科技有限公司 Live pig weight estimation method and device for intelligent pig raising, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN113313833A (en) Pig body weight estimation method based on 3D vision technology
CN111862048B (en) Automatic fish posture and length analysis method based on key point detection and deep convolution neural network
CN107667903B (en) Livestock breeding living body weight monitoring method based on Internet of things
US9367930B2 (en) Methods and systems for determining fish catches
CN112232978B (en) Aquatic product length and weight detection method, terminal equipment and storage medium
CN114241031B (en) Fish body ruler measurement and weight prediction method and device based on double-view fusion
CN108961269A (en) Pig weight measuring method and system based on image
CN109141248A (en) Pig weight measuring method and system based on image
JP7074185B2 (en) Feature estimation device, feature estimation method, and program
CN112257564B (en) Aquatic product quantity statistical method, terminal equipment and storage medium
EP3940643A1 (en) Underwater 3d reconstruction device
CN110969654A (en) Corn high-throughput phenotype measurement method and device based on harvester and harvester
CN110741964A (en) Automatic sheep identification and sheep body determination device under computer assistance
CN113484867A (en) Imaging sonar-based fish school density detection method in closed space
CN113793350A (en) Fry counting Internet of things device and fry condition statistical method
CN109191461A (en) A kind of Countryside Egg recognition methods and identification device based on machine vision technique
CN115512215A (en) Underwater biological monitoring method and device and storage medium
CA3230401A1 (en) Systems and methods for the automated monitoring of animal physiological conditions and for the prediction of animal phenotypes and health outcomes
CN113706512B (en) Live pig weight measurement method based on deep learning and depth camera
CN109581897A (en) A kind of agricultural greenhouse Data Management Analysis system based on Internet of Things
CN111783720A (en) Cattle rumination behavior detection method based on gun-ball linkage
Liu et al. Estimation of weight and body measurement model for pigs based on back point cloud data
CN116721344A (en) Vegetation detection method, device and equipment based on aerial photographing equipment
CN115100683A (en) Duplication estimating method, duplication estimating device, duplication estimating equipment and storage medium
CN113449638B (en) Pig image ideal frame screening method based on machine vision technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination