CN114693883A - Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud - Google Patents

Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud Download PDF

Info

Publication number
CN114693883A
CN114693883A CN202011641336.8A CN202011641336A CN114693883A CN 114693883 A CN114693883 A CN 114693883A CN 202011641336 A CN202011641336 A CN 202011641336A CN 114693883 A CN114693883 A CN 114693883A
Authority
CN
China
Prior art keywords
point cloud
pig
data
live pig
view
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
CN202011641336.8A
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.)
China Agricultural University
Original Assignee
China Agricultural University
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 China Agricultural University filed Critical China Agricultural University
Priority to CN202011641336.8A priority Critical patent/CN114693883A/en
Publication of CN114693883A publication Critical patent/CN114693883A/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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Agronomy & Crop Science (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Animal Husbandry (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Mining & Mineral Resources (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention provides a live pig body ruler measurement and weight prediction method based on single-view 3D point cloud, which comprises the steps of obtaining a single-view depth image and 3D point cloud data of a live pig by using a Kinect v2 camera; importing the screened 3D point cloud data into Trimble RealWorks; extracting the characteristics of the 3D point cloud of the segmented target pig to obtain body length, body width, body height and volume data; and obtaining a multiple linear regression prediction model between the body length, the body width, the body height and the volume data and the body weight by using a multiple linear regression method. According to the method, the body size data with high accuracy is obtained by using a computer vision method based on single-view 3D point cloud, and the body weight prediction model with high prediction accuracy is obtained. The invention has low cost, low difficulty and non-contact type, and can replace the traditional measuring method.

Description

Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud
Technical Field
The invention belongs to the technical field of computer vision, and particularly relates to a live pig body ruler measurement and weight prediction method based on single-view 3D point cloud.
Background
The phenotypic characters of animals are the result of the combined action of genetic factors and environmental factors, and the heritability of each character is also very different. The body size is an important character, and the body weight of the animal can be effectively predicted through the measurement of the body size. The body size data and the weight data of the live pigs are key data reflecting the growth vigor of the live pigs and are important parameters related to feed management and health management of the live pigs, and even the benefits of pig farms and the benefits of pig raising. The traditional measuring method mainly comprises the steps of assisting manual measurement by using tools, obtaining body length, body width, body height and other body ruler data by means of a ruler, and obtaining body weight data by means of a weighing scale or a wagon balance. In some farms with poor economic conditions and small scale, the body size and weight are also estimated visually. The biggest defects of the traditional methods are that the time and the labor are consumed, the contact type measurement method cannot avoid the stress response of the pigs, and the real-time phenotypic character data cannot be obtained so as to monitor the growth of the pigs in time.
With the development of computer vision in recent years, a plurality of researchers provide references for animal body size measurement and weight prediction based on computer vision methods such as RGB images, depth images or 3D point clouds, and the like, so that the dependence on the traditional method can be reduced, but the problems of complex processing process, stress on pigs caused by handheld equipment, need of independent feeding and observation, high cost, inconvenience for small-scale farm popularization and the like still exist.
Disclosure of Invention
In order to solve the problems, the invention provides a live pig body ruler measurement and weight prediction method based on single-view 3D point cloud, which comprises the following steps:
the method comprises the following steps: acquiring a single-view-angle depth image and 3D point cloud data of a live pig by using a Kinect v2 camera;
step two: screening the depth image obtained in the step one by taking the condition that the body of the live pig in the image is complete and straight and no adhesion occurs as a standard, reserving the pig meeting the standard, recording the pig as a target pig, and recording the pig not meeting the standard as a non-target pig;
step three: importing the 3D point cloud data corresponding to the depth image screened in the second step into Trimble RealWorks;
step four: in a registration mode, defining horizontal and vertical directions by using the imported 3D point cloud;
step five: the 3D point cloud of each target pig is obtained through segmentation, and ground point cloud data near the target pig are also reserved during segmentation due to the fact that the depression angle 3D point cloud lacks pig foot information;
step six: making a section which is vertical to the horizontal direction and bisects the back of the live pig, and fitting a longitudinal intersecting line of the contour of the live pig;
step seven: selecting two measuring points of the pig ears and the pig tails, calculating the sum of multipoint distances between the two measuring points on the longitudinal intersecting line obtained in the sixth step, and recording the sum as body length data;
step eight: making a section which is vertical to the horizontal direction and bisects the body length obtained in the step seven, and fitting a transverse intersecting line of the live pig contour;
step nine: calculating the horizontal distance between two end points of the transverse intersecting line obtained in the step eight, and recording the horizontal distance as body width data;
step ten: calculating the vertical distance from the intersection point of the longitudinal intersecting line obtained in the step six and the transverse intersecting line obtained in the step eight to the ground, and recording as height data;
step eleven: calculating the integral of the vertical distance from each point on the back of the pig to the ground, and recording the integral as volume data;
step twelve: inputting the body length, body width and body height data obtained in the seventh step, the ninth step and the tenth step and the volume data obtained in the eleventh step, and obtaining a multiple linear regression prediction model of the body weight by using a multiple linear regression method.
Further, in the first step, the Kinect v2 camera is placed right above the water diversion area of the pigsty, and the collection program is controlled to obtain the overlook depth image and the 3D point cloud data of the pigs.
Further, in the fourth step, the vertical direction is the direction parallel to the vertical rail in the pigsty, and the horizontal direction is the direction parallel to the horizontal rail in the pigsty.
The invention has the beneficial effects that: according to the method, the body size data with high accuracy is obtained by using a computer vision method based on single-view 3D point cloud, and the body weight prediction model with high prediction accuracy is obtained. The invention has low cost and difficulty, and can replace the traditional measuring method.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flow chart of a live pig body ruler measurement and weight prediction method based on single-view 3D point cloud.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention relates to a live pig body ruler measurement and weight prediction method based on single-view 3D point cloud, which comprises the following steps:
the method comprises the following steps: and acquiring a single-view-angle depth image and 3D point cloud data of the live pig by using a Kinect v2 camera.
The Kinect v2 camera is arranged right above a water diversion area of the swinery, and through controlling a C + + acquisition program based on a PCL library, a depth image and 3D point cloud data of the pigs in the overlooking mode are obtained at the same time. The depth image is stored in the bmp format and the 3D point cloud data is stored in the txt format.
Step two: and (3) screening the depth image obtained in the step one by taking the condition that the live pigs in the image are complete and straight and do not adhere, wherein the pigs meeting the standard in the image are recorded as target pigs to be measured in the next step, and the pigs not meeting the standard are recorded as non-target pigs.
Step three: and D, selecting 3D point cloud data corresponding to the depth image of the target pig screened in the second step, converting the txt format into the asc format, and importing the asc format into Trimble RealWorks.
Step four: and in the registration mode, defining horizontal and vertical directions by using the imported 3D point cloud. The vertical direction is the direction that is on a parallel with vertical railing in the swinery, and the horizontal direction is the direction that is on a parallel with horizontal railing in the swinery.
Selecting the function of ' orientation ' -defining z-axis ', firstly selecting the point at the bottom of any vertical railing, then selecting the point at the top of the same vertical railing, and defining the two selected points as a vertical axis. Selecting "orientation" - "defines a horizontal axis" function, defined as a horizontal axis by selecting two points on the horizontal rail.
Two points on the horizontal rail are selected, and a horizontal axis is defined by the two points.
Step five: and (4) segmenting to obtain the 3D point cloud of each target pig, and reserving ground point cloud data near the target pig during segmentation due to the fact that the 3D point cloud of the depression angle lacks pig foot information.
And in the analysis-modeling mode, selecting a mapping-segmentation function, and only keeping the point cloud in the target pig and the ground area nearby the target pig under the current frame. This step can eliminate noise interference from railings, troughs, sinks, and non-target pigs.
Step six: and (4) making a tangent plane which is perpendicular to the horizontal direction and bisects the back of the live pig, and fitting a longitudinal intersecting line of the contour of the live pig.
And under the analysis _ modeling mode, establishing a longitudinal tangent plane by using the 3D point cloud of the target pig segmented in the last step. In a top view, a tangent plane perpendicular to the horizontal is established along the bisector of the back of the pig. The individual section thickness was set to 0.005 m and a longitudinal section line was established with a threshold value of 0.
Step seven: and (4) selecting two measuring points of the pig ears and the pig tails, calculating the sum of the multipoint distances between the two measuring points on the longitudinal intersecting line obtained in the step six, and recording the sum as body length data.
And under the analysis-modeling mode, selecting a ' measurement ' -multipoint distance measurement ' function, and calculating the multipoint distance between the starting points of the longitudinal intersecting lines by taking the intersection point of the longitudinal intersecting line and the pig ear connecting line as the starting point and the point of the pig tail on the longitudinal intersecting line as the terminal point.
Step eight: and (5) making a section which is vertical to the horizontal direction and bisects the body length obtained in the step seven, and fitting a transverse intersecting line of the live pig contour.
In the analysis _ modeling mode, in the top view perspective, a tangent plane perpendicular to the horizontal direction is created along a tangent line bisecting the body length obtained in step seven. The individual section thickness was set to 0.005 m and a transverse section line was established with a threshold of 0.
Step nine: and e, calculating the horizontal distance between two end points of the transverse intersecting line obtained in the step eight, and recording the horizontal distance as body width data.
And (4) because the 3D point cloud with the single visual angle does not exist in the point cloud of the lower half of the live pig, the transverse intersecting line obtained in the step eight is cut off before reaching the waist and abdomen position of the live pig, and therefore the horizontal distance between two end points of the transverse intersecting line is calculated, namely the body width. And in the analysis-modeling mode, selecting a ' measurement ' -parallel distance measurement ' function, and selecting two ends to calculate the horizontal distance.
Step ten: and (4) calculating the vertical distance from the intersection point of the longitudinal intersecting line obtained in the step six and the transverse intersecting line obtained in the step eight to the ground, and recording as height data.
And under the analysis _ modeling mode, selecting a function of measuring to measuring the vertical distance, taking the intersection point of the longitudinal section line obtained in the step six and the transverse section line obtained in the step eight as a starting point, taking one optional point in the ground point cloud on the transverse section line as an end point, and calculating the vertical distance between the two points.
Step eleven: and calculating the integral of the vertical distance from each point on the back of the pig to the ground, and recording the integral as volume data.
And under an analysis _ modeling mode, selecting a ' surface ' -volume calculation ' function, increasing the offset until the ground is taken as a reference surface, calculating the volume from the point cloud of the pig back of the target pig to the reference surface, setting the resolution to be 0.03 m, and only keeping the positive value of the volume.
Step twelve: inputting the body length, body width and body height data obtained in the seventh step, the ninth step and the tenth step and the volume data obtained in the eleventh step, and obtaining a multiple linear regression prediction model of the body weight by using a multiple linear regression method.
Multiple linear regression studies the quantity dependence relationship between a dependent variable and a plurality of independent variables, and the general expression is
y=β01x1+...+βpxp+ε (1)
Wherein y is a dependent variable, x1...xpIs p independent variables, beta0Is a constant term, β1...βpIs the partial regression coefficient, epsilon random error.
Inputting the body length, body width and body height data obtained in the seventh step, the ninth step and the tenth step, the volume data obtained in the eleventh step and the real weight value of the target pig, and fitting a multiple linear regression prediction model.
Multicollinearity is a common problem when performing multiple regression analysis. Multicollinearity refers to the existence of an approximately linear relationship between arguments, i.e., one argument can be approximately represented by a linear function of the other argument. And checking whether multiple collinearity exists according to the numerical value of the variance expansion factor, and processing the multiple collinearity problem by adopting a stepwise regression method and a ridge regression method.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (3)

1. A live pig body ruler measurement and weight prediction method based on single-view 3D point cloud is characterized by comprising the following steps:
the method comprises the following steps: acquiring a single-view-angle depth image and 3D point cloud data of a live pig by using a Kinect v2 camera;
step two: screening the depth image obtained in the step one by taking the integrity, straightness and no adhesion of the live pig in the image as standards, reserving the pig meeting the standards, and recording as a target pig; pigs that did not meet the standard were recorded as non-target pigs;
step three: importing the 3D point cloud data corresponding to the depth image screened in the second step into Trimble RealWorks;
step four: in a registration mode, defining horizontal and vertical directions by using the imported 3D point cloud;
step five: dividing to obtain 3D point cloud of each target pig, wherein ground point cloud data near the target pig is also reserved during dividing due to the fact that the 3D point cloud of the depression angle lacks pig foot information;
step six: making a section which is vertical to the horizontal direction and bisects the back of the live pig, and fitting a longitudinal intersecting line of the contour of the live pig;
step seven: selecting two measuring points of the pig ears and the pig tails, calculating the sum of multipoint distances between the two measuring points on the longitudinal intersecting line obtained in the sixth step, and recording the sum as body length data;
step eight: making a section which is vertical to the horizontal direction and bisects the body length obtained in the step seven, and fitting a transverse intersecting line of the live pig contour;
step nine: calculating the horizontal distance between two end points of the transverse intersecting line obtained in the step eight, and recording the horizontal distance as body width data;
step ten: calculating the vertical distance from the intersection point of the longitudinal intersecting line obtained in the step six and the transverse intersecting line obtained in the step eight to the ground, and recording as height data;
step eleven: calculating the integral of the vertical distance from each point on the back of the pig to the ground, and recording the integral as volume data;
step twelve: inputting the body length, body width and body height data obtained in the seventh step, the ninth step and the tenth step and the volume data obtained in the eleventh step, and obtaining a multiple linear regression prediction model of the body weight by using a multiple linear regression method.
2. The live pig body ruler measuring and weight predicting method based on the single-view-angle 3D point cloud as claimed in claim 1, wherein the method comprises the following steps: in the first step, the Kinect v2 camera is placed right above the water diversion area of the pigsty, and the overlook depth image and the 3D point cloud data of the pigs are obtained by controlling the acquisition program.
3. The live pig body ruler measuring and weight predicting method based on the single-view-angle 3D point cloud as claimed in claim 1, wherein the method comprises the following steps: in the fourth step, the vertical direction is parallel to the direction of the vertical rail in the pigsty, and the horizontal direction is parallel to the direction of the horizontal rail in the pigsty.
CN202011641336.8A 2020-12-31 2020-12-31 Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud Pending CN114693883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011641336.8A CN114693883A (en) 2020-12-31 2020-12-31 Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011641336.8A CN114693883A (en) 2020-12-31 2020-12-31 Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud

Publications (1)

Publication Number Publication Date
CN114693883A true CN114693883A (en) 2022-07-01

Family

ID=82136232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011641336.8A Pending CN114693883A (en) 2020-12-31 2020-12-31 Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud

Country Status (1)

Country Link
CN (1) CN114693883A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116416260A (en) * 2023-05-19 2023-07-11 四川智迅车联科技有限公司 Weighing precision optimization method and system based on image processing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116416260A (en) * 2023-05-19 2023-07-11 四川智迅车联科技有限公司 Weighing precision optimization method and system based on image processing
CN116416260B (en) * 2023-05-19 2024-01-26 四川智迅车联科技有限公司 Weighing precision optimization method and system based on image processing

Similar Documents

Publication Publication Date Title
Song et al. Automated body weight prediction of dairy cows using 3-dimensional vision
CN110986788B (en) Automatic measurement method based on three-dimensional point cloud livestock phenotype body size data
Shuai et al. Research on 3D surface reconstruction and body size measurement of pigs based on multi-view RGB-D cameras
Weber et al. Estimation of backfat thickness using extracted traits from an automatic 3D optical system in lactating Holstein-Friesian cows
CN104344877B (en) The field enumeration Weighing method of a kind of chicken and system
CN111696139B (en) White feather breeding hen group weight estimation system and method based on RGB image
US20160295838A1 (en) Method and device to monitor growth of an animal, in particular a calf
US10154654B2 (en) Arrangement and method to determine a body condition score of an animal
Li et al. Body size measurement and live body weight estimation for pigs based on back surface point clouds
Lu et al. Extracting body surface dimensions from top-view images of pigs
CN114693883A (en) Live pig body ruler measurement and weight prediction method based on single-view-angle 3D point cloud
Zhao et al. Automatic body condition scoring system for dairy cows based on depth-image analysis
CN110490161B (en) Captive animal behavior analysis method based on deep learning
Shi et al. Automatic estimation of dairy cow body condition score based on attention-guided 3D point cloud feature extraction
CN204255483U (en) The field enumeration weighing system of a kind of chicken
Shorten Computer vision and weigh scale-based prediction of milk yield and udder traits for individual cows
Lassen et al. Repeatabilities of individual measures of feed intake and body weight on in-house commercial dairy cattle using a 3-dimensional camera system
Liu et al. Estimation of weight and body measurement model for pigs based on back point cloud data
CN115272237A (en) Single-PC-based multi-view cattle body size automatic measurement method
KR102355681B1 (en) Method for providing management guidline based on feeding standard
CN114898100A (en) Point cloud data extraction method, device, system, equipment and storage medium
CN117523603A (en) Intelligent pig performance determination method and system
Zong et al. Comparisons of non-contact methods for pig weight estimation
KR102595842B1 (en) Method for controlling amount of fodder for sows based on artificial intelligence and apparatus therefor
Lu MingZhou et al. Extracting body surface dimensions from top-view images of pigs.

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