CN103919556A - Cow body shape trait index data collecting method based on three-dimensional measuring - Google Patents

Cow body shape trait index data collecting method based on three-dimensional measuring Download PDF

Info

Publication number
CN103919556A
CN103919556A CN201310655845.XA CN201310655845A CN103919556A CN 103919556 A CN103919556 A CN 103919556A CN 201310655845 A CN201310655845 A CN 201310655845A CN 103919556 A CN103919556 A CN 103919556A
Authority
CN
China
Prior art keywords
milch cow
dimensional
measured
point
image
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
CN201310655845.XA
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.)
TIANJIN TIANSHI TECHNOLOGY Co Ltd
Original Assignee
TIANJIN TIANSHI TECHNOLOGY 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 TIANJIN TIANSHI TECHNOLOGY Co Ltd filed Critical TIANJIN TIANSHI TECHNOLOGY Co Ltd
Priority to CN201310655845.XA priority Critical patent/CN103919556A/en
Publication of CN103919556A publication Critical patent/CN103919556A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides a cow body shape trait index data collecting method based on three-dimensional measuring. The method includes: respectively mounting two shooting equipment at multiple preset positions on two sides of a fence; calibrating the shooting equipment, and collecting images as background images; using the upper shooting equipment to collect ground images, and calculating the three-dimensional coordinates of matching feature points; collecting images as original images; acquiring cow images of to-be-measured cows; performing three-dimensional reconstruction on each area of the to-be-measured cows according to the matching feature points; converting the coordinates measured in each three-dimensional area into a uniform coordinate system to obtain the overall three-dimensional description of the to-be-measured cows; calculating the corresponding body shape trait index data of the to-be-measured cows. By the method, cow body shape trait measuring is achieved, high trait measuring precision is achieved, high reality sense is achieved, requirements can be satisfied, manual measuring can be replaced, and promising application prospect is achieved.

Description

A kind of collecting method of the milch cow build characteristic index based on three-dimensional measurement
Technical field
The present invention relates to image technique field, the collecting method of the conformation trait index that particularly a kind of milch cow based on three-dimensional measurement is measured.
Background technology
Now, people recognize that milch cow build is an important indicator of judgement milk production of cow and milk cattle genetics and breeding just gradually.Now milch cow build is detected and mostly adopts manual method, not only workload is large, but also may cause the error of measurement data larger because of anthropic factor, thereby makes measurement result lack objectivity.Utilize dimensional visual measurement method to gather the conformation trait parameter of milch cow, can avoid contact measured object.Compare with above-mentioned manual measurement efficient and convenient, efficiency is high, precision is high, can avoid the impact of subjective factors.By the pattern of body form change of continuous each growth stage of monitoring milch cow, estimate out their growth model, can improve productivity effect, also can be better for directive function be played in the seed selection of milch cow, selection-breeding and breed improvement.
At present, the milch cow build characteristic index measuring method of processing based on image is mostly all based on two dimensional image.For example, by gathering the two dimensional image of 3 directions in milch cow dead ahead, positive side and dead astern, utilize image processing techniques to process it, thereby realize the measurement of characteristic index.The method only can be evaluated height, the structure of unrealized milch cow threedimensional model, and the characteristic index that therefore cannot realize under three-dimensional coordinate is measured.
Summary of the invention
Object of the present invention is intended at least solve one of described technological deficiency.
For this reason, the object of the invention is to propose a kind of collecting method of the milch cow build characteristic index based on three-dimensional measurement, comprise the steps:
At a plurality of predeterminated positions of fence both sides, settle respectively two capture apparatus, wherein, described a plurality of predeterminated positions comprise the upper, middle and lower of described fence both sides;
Described capture apparatus is demarcated, and described capture apparatus gathers image after demarcating with image as a setting completing;
Utilize superposed described capture apparatus to gather ground image, and described ground image is carried out feature point detection and mated, calculate the three-dimensional coordinate of matching characteristic point;
Described capture apparatus milch cow to be measured enter fence and in stable condition after, gather image simultaneously and using as original image;
The described background image of capture apparatus collection every described and described original image are processed to remove background area, obtain the dairy cow image of described milch cow to be measured;
The dairy cow image of the described capture apparatus of adjacent position is carried out feature point detection and mated, and complete three-dimensionalreconstruction is carried out in each region of described milch cow to be measured according to the matching characteristic point obtaining;
After completing three-dimensionalreconstruction, a plurality of gauge points are set in adjacent 3D region, the coordinate transform that 3D region described in each is measured under unified coordinate system to obtain described milch cow integral body three-dimensional description to be measured;
According to the whole three-dimensional description of described milch cow to be measured, calculate the conformation trait achievement data that described milch cow to be measured is corresponding.
According to the collecting method of the milch cow build characteristic index based on three-dimensional measurement of the embodiment of the present invention, adopt the method for three-dimensional measurement of stereoscopic vision to rebuild the threedimensional model of milch cow, realized the conformation trait index measurement to milch cow, first by three-dimensional target, carry out the demarcation of photographic head, then utilize SIFT matching algorithm that image is carried out feature point extraction and mated, finally by projection matrix, calculate the three-dimensional coordinate of matching characteristic point.For the limited problem of photographic head angular field of view in binocular vision, the present invention arranges gauge point by the public territory in adjacent viewpoint, according to gauge point, calculate the transformational relation of different coordinates, each local feature point is transformed under unified coordinate system, thereby realize the three-dimensional splicing of each regional area under different points of view, the milch cow model of rebuilding is thus more satisfactory, and certainty of measurement and measurement efficiency meet evaluation requirement.Realize on this basis the measurement of milch cow conformation trait, certainty of measurement is high, has stronger sense of reality, and character certainty of measurement is higher, meets the demands, and can replace hand dipping, has good application prospect.By the threedimensional model rebuild multi-angle observation milch cow conformation trait easily and efficiently, and for further laying the foundation by threedimensional model Measuring Object volume.
In one embodiment of the invention, after calculating the three-dimensional coordinate of matching characteristic point, also comprise the steps: to calculate to describe the almost plane of the three-dimensional point cloud on ground, and the datum mark calculating described almost plane as index.
In yet another embodiment of the present invention, the datum mark that the index of the health height using described almost plane as described milch cow is calculated.
In another embodiment of the present invention, adopt yardstick invariant features conversion SIFT algorithm that the dairy cow image of the described capture apparatus of adjacent position is carried out feature point detection and mated.
In one embodiment of the invention, the matching characteristic point that described basis obtains completes three-dimensionalreconstruction is carried out in each region of described milch cow to be measured, comprises the steps:
Matching characteristic point, according to the principle of spatial point three-dimensional reconstruction, is calculated to the three-dimensional point set of described matching characteristic point to complete the three-dimensionalreconstruction to each region of described milch cow to be measured,
Wherein, establish p 1and p 2for the matching characteristic point of a P on two described capture apparatus, any point in the dairy cow image that some P is described capture apparatus, establishes M 1and M 2be respectively p 1and p 2projection matrix, X-Y scheme picture point p 1and p 2with the mapping relations of three dimensions point be:
λ C 1 u 1 v 1 1 = m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 X Y Z 1 λ C 2 u 2 v 2 1 = m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 X Y Z 1 ,
Wherein, (u 1, v 1, 1) and (u 2, v 2, 1) and be respectively p 1and p 2homogeneous coordinates in image separately, (X, Y, Z, 1) is the homogeneous coordinates of P point under world coordinate system, λ c1and λ c2for proportionality coefficient.
In yet another embodiment of the present invention, in each region completing described milch cow to be measured, carry out three-dimensionalreconstruction, after obtaining the three-dimensional point set of described matching characteristic point, also comprise the steps: to utilize graphic package interface OpenGL to show described three-dimensional point set.
In another embodiment of the present invention, the described coordinate transform that 3D region described in each is measured under unified coordinate system to obtain described milch cow integral body three-dimensional description to be measured, comprise the steps:
Calculate the spatial alternation matrix in adjacent subarea territory;
Calculate the translation vector in adjacent subarea territory;
According to described spatial alternation matrix and described translation vector, the coordinate transform that 3D region described in each is measured is under unified coordinate system.
Wherein, described translation vector is:
t x t y t z = x 1 g y 1 g z 1 g - R x 2 g y 2 g z 2 g
Wherein, [t xt yt z] tfor translation vector, (x 1g, y 1g, z 1g) be the barycentric coodinates expression of described the first coordinate system, (x 2g, y 2g, z 2g) be the barycentric coodinates expression of described the second coordinate system, R is spatial alternation matrix.
In one embodiment of the invention, according to the whole three-dimensional description of described milch cow to be measured, calculate the conformation trait achievement data that described milch cow to be measured is corresponding, comprising: the height of described milch cow, hind leg side-looking, buttocks angle, buttocks are wide, hoof tips degree and teat length.
The aspect that the present invention is additional and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Accompanying drawing explanation
Above-mentioned and/or additional aspect of the present invention and advantage accompanying drawing below combination obviously and is easily understood becoming the description of embodiment, wherein:
Fig. 1 is according to the flow chart of the collecting method of the milch cow build characteristic index based on three-dimensional measurement of the embodiment of the present invention;
Fig. 2 is according to the schematic diagram of the collecting method of the milch cow build characteristic index based on three-dimensional measurement of the embodiment of the present invention;
Fig. 3 is for to carry out feature point detection and the schematic diagram mating according to the dairy cow image of the embodiment of the present invention;
Fig. 4 is the three-dimensionalreconstruction schematic diagram according to the milch cow of the embodiment of the present invention;
Fig. 5 is the threedimensional model schematic diagram according to the milch cow of the embodiment of the present invention.
The specific embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Below by the embodiment being described with reference to the drawings, be exemplary, be intended to for explaining the present invention, and can not be interpreted as limitation of the present invention.
Below with reference to Fig. 1 to Fig. 5, the collecting method of the milch cow build characteristic index based on three-dimensional measurement of the embodiment of the present invention is described.Wherein, the present invention adopts binocular stereo vision principle to carry out three-dimensional measurement to the conformation trait index of milch cow.
As shown in Figure 1, the collecting method of the milch cow build characteristic index based on three-dimensional measurement of the embodiment of the present invention, comprises the steps:
Step S101, a plurality of predeterminated positions in fence both sides distribute and settle two capture apparatus.Wherein, capture apparatus can adopt video camera.
In one embodiment of the invention, a plurality of predeterminated positions comprise the upper, middle and lower of fence both sides.
As shown in Figure 2, in the upper, middle and lower of fence both sides, industrial camera is set respectively, thereby the image of upper body part, middle part and bottom that can gather milch cow to be measured is so that subsequent treatment.
Step S102, demarcates capture apparatus, and this capture apparatus gathers image after demarcating with image as a setting completing.
In one embodiment of the invention, adopt the method for binocular stereo vision to carry out three-dimensional measurement to testee: first, video camera to be demarcated and the projection matrix of definite video camera.
The object of demarcating is the corresponding relation of determining between the image coordinate system of video camera and the world coordinate system in space, object place.The imaging model of video camera can be divided into linearity and nonlinear model, and the pass that can obtain between them according to video camera linear imaging model is
λ u v 1 = f / dx 0 u 0 0 f / dy v 0 0 0 1 R t X w Y w Z w 1 - - - ( 1 )
Wherein, the focal length that f is video camera; Dx, dy are respectively the distance between image row, column pixel; u 0
And v 0for the coordinate of video camera photocentre in image, they are only relevant with video camera internal structure, are called the intrinsic parameter of video camera; [R t], by the determining positions of video camera and world coordinate system, is called external parameters of cameras. and the process of camera calibration is exactly the process that solves the inside and outside parameter of video camera.Nonlinear model has been considered the distortion that camera lens causes, the distortion factor correcting image that can obtain by demarcation.
In addition, camera model also can be expressed from the next:
λ u i v i 1 = m 11 m 12 m 13 m 14 m 21 m 22 m 23 m 24 m 31 m 32 m 33 m 34 x wi y wi z wi 1 = M x wi y wi z wi 1 - - - ( 2 )
Wherein, the matrix that M is 3 * 4, is called projection matrix, and formula (2) comprises 3 equations:
λu i = x wi m 11 + y wi m 12 + z wi m 13 + m 14 λv i = x wi m 21 + y wi m 22 + z wi m 23 + m 24 λ = x wi m 31 + y wi m 32 + z wi m 33 + m 34 - - - ( 3 )
By cancellation λ in the 3rd equation substitution the first two in equation group (3), obtain 2 about m ijlinear equation:
x wi m 11 + y wi m 12 + z wi m 13 + m 14 - x wi u i m 31 - y wi u i m 32 - z wi u i m 33 = u i m 34 x wi m 21 + y mi m 22 + z wi m 23 + m 24 - x wi v i m 31 - y wi v i m 32 - z wi v i m 33 = v i m 34 - - - ( 4 )
In concrete calibration process, adopt three-dimensional target as demarcating thing, by the fixing rear target image that gathers of two camera positions, by physical coordinates and its corresponding relation between coordinate in image of angle point in target, set up some about m ijlinear equation. suppose demarcate to adopt n angle point, according to formula (4), can obtain 2n linear equation, by appointment m 34=1, when 2n>11, with method of least square, can obtain m ijsolution, thereby obtain the projection matrix M of video camera.
The projection matrix that obtains two video cameras after demarcation is respectively
M 1 = 13.0361 0.1354 8.7904 1260.7201 3.6987 14.4983 - 2.5269 486.7264 0.0049 0 . 0001 - 0.0033 1
M 2 = 16.2569 0.0093 4.2901 1148.4420 3.4371 15.2457 - 4.0503 562.1011 0.0039 0.0002 - 0 . 0048 1 - - - ( 5 )
According to the coordinate of angle point on the video camera projection matrix of demarcating and two images, calculate its world coordinates, thereby obtain the error amount with real world coordinates.The AME that calculates 91 angle points on demarcation target is 0.208, mm, and standard deviation is 0.086, mm, and the precision of demarcation is higher.
Step S103, utilizes superposed capture apparatus to gather ground image, and ground image is carried out feature point detection and mated, and calculates the three-dimensional coordinate of matching characteristic point.
In one embodiment of the invention, after calculating the three-dimensional coordinate of matching characteristic point, also comprise the steps: to calculate to describe the almost plane of the three-dimensional point cloud on ground, and the datum mark calculating almost plane as index.
Wherein, the datum mark that the index of the health height using almost plane as milch cow is calculated.
Step S104, capture apparatus milch cow to be measured enter fence and in stable condition after, gather image simultaneously and using as original image.
Step S105, processes to remove background area to the background image of every capture apparatus collection and original image, obtains the dairy cow image of milch cow to be measured.
Step S106, carries out feature point detection and mates the dairy cow image of the capture apparatus of adjacent position, and according to the matching characteristic point obtaining, three-dimensionalreconstruction is carried out in each region of milch cow to be measured.
In one embodiment of the invention, adopt yardstick invariant features conversion SIFT algorithm that the dairy cow image of the capture apparatus of adjacent position is carried out feature point detection and mated.
First image is smoothly obtained to the Gaussian image of one group of multilamellar with the Gaussian filter function of different scale, again original image is carried out to sub-sampling, equally sub-sampling image is carried out to the Gaussian image that gaussian filtering obtains second group of different scale, by that analogy, obtain having Gauss's yardstick pyramid of many group multilamellar Gaussian image, then adjacent two-layer Gaussian image in every group is subtracted each other, obtain difference of Gaussian pyramid DOG (difference of Gaussian).Whether detect a point is maximum or minima in 8 points of this etale neighborhood of DOG metric space and upper and lower two-layer 2 * 9 points.If so, assert that this point is a characteristic point.Each characteristic point, according to the gradient direction characteristic of its this etale neighborhood pixel, is calculated to its gradient and directioin parameter, and generating feature vector description.SIFT feature is the local feature of image, at metric space, finds extreme point, and the characteristic point of extraction maintains the invariance to brightness flop, yardstick convergent-divergent, rotation, and noise is also kept to stability to a certain degree.
SIFT characteristic matching adopts the Euclidean distance of characteristic vector as the similarity measurement standard of coupling, computed image I 1middle characteristic point and image I 2middle characteristic point is apart from the ratio of minima and sub-minimum.If be less than predetermined threshold value, get the minimum point of distance as corresponding match point.Reduce threshold value, can obtain less matching double points, but matching is stronger.In concrete matching process, add polar curve constraint criterion, according to known to utmost point geometrical relationship, image I 1middle characteristic point is at I 2the match point one of middle correspondence fixes on its corresponding polar curve equation, due to the existence of error, considers at corresponding polar curve and around in scope, mates, and when improving matching speed, coupling degree of accuracy also obtains certain raising.Wherein, Fig. 3 (a) shows the image after cutting apart, and Fig. 3 (b) shows the result after images match.
The matching characteristic point obtaining, according to the principle of spatial point three-dimensional reconstruction, is calculated to the three-dimensional point set of matching characteristic point to complete the three-dimensional reconstruction to each region of milch cow to be measured.
Three-dimensional reconstruction is the inverse process of projection, namely the three-dimensional coordinate to definite spatial point by subpoint.Wherein, any point in the dairy cow image that some P is capture apparatus, the picture point of some P on two video camera C1 and C2, C1 and C2 video camera have been demarcated, establish p 1and p 2for the matching characteristic point of a P on two capture apparatus, p1 and p2 are the corresponding point of space same point P, establish M 1and M 2be respectively p 1and p 2projection matrix, X-Y scheme picture point p 1and p 2with the mapping relations of three dimensions point be:
λ C 1 u 1 v 1 1 = m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 X Y Z 1 λ C 2 u 2 v 2 1 = m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 X Y Z 1 - - - ( 6 )
Wherein, (u 1, v 1, 1) and (u 2, v 2, 1) and be respectively p 1and p 2homogeneous coordinates in image separately, (X, Y, Z, 1) is the homogeneous coordinates of P point under world coordinate system, λ c1and λ c2for proportionality coefficient.
λ in formula (3), formula (4) subtractive (6) c1and λ c2after, obtain 4 linear equation about X, Y, Z:
( u 1 m 31 1 - m 11 1 ) X + ( u 1 m 32 1 - m 12 1 ) Y + ( u 1 m 33 1 - m 13 ) Z = m 14 1 - u 1 m 34 1 ( v 1 m 31 1 - m 21 1 ) X + ( v 1 m 32 1 - m 22 1 ) Y + ( v 1 m 33 1 - m 23 1 ) Z = m 24 1 - v 1 m 34 1 ( u 2 m 31 2 - m 11 2 ) X + ( u 2 m 32 2 - m 12 2 ) Y + ( u 2 m 33 2 - m 13 2 ) Z = m 14 2 - u 2 m 34 2 ( v 2 m 31 2 - m 21 2 ) X + ( v 2 m 32 2 - m 22 2 ) Y + ( v 2 m 33 2 - m 23 2 ) Z = m 24 2 - v 2 m 34 2 - - - ( 7 )
Supposed that in theory p1 and p2 are the corresponding point of space same point P, the equation group of simultaneous must have unique solution. and in actual applications, because data are always noisy, can adopt method of least square to obtain the three-dimensional coordinate of spatial point.From geometrical relationship angle, what represent is two, space intersection between lines point, because some extraneous factors make these two straight lines, not necessarily intersect, but become different surface beeline, the least squares sense solution of therefore trying to achieve is the mid point of the beeline place line segment between two different surface beelines.
In one embodiment of the invention, in each region completing milch cow to be measured, carry out three-dimensionalreconstruction, after obtaining the three-dimensional point set of matching characteristic point, also comprise the steps: to utilize graphic package interface OpenGL to show three-dimensional point set.Fig. 4 (a) and Fig. 4 (b) show respectively observable result figure under two different visual angles.
Step S107 after completing three-dimensionalreconstruction, arranges a plurality of gauge points in adjacent 3D region, the coordinate transform that each 3D region is measured under unified coordinate to obtain milch cow integral body three-dimensional description to be measured.
Because the measuring range of binocular stereo vision is limited, for the larger object of three-dimensional surface curvature, once rebuild and can only obtain local three-dimensional information, in order to access the three-dimensional data information of target object integral body, during specific implementation, object is divided into several subregions.After the image of two camera acquisition different angles of fixing by position, utilize two CCD camera measure system to carry out data acquisition to it, by moving target object, realize the two width images that gather adjacent subarea territory again, and carry out the collection of data, by that analogy, until all subregion image acquisition complete.
In one embodiment of the invention, the coordinate transform that each 3D region is measured under unified coordinate system to obtain milch cow integral body three-dimensional description to be measured, comprise the steps: to calculate spatial alternation matrix and the translation vector in adjacent subarea territory, then adjacent according to the spatial alternation matrix peace phase shift calculating, the coordinate transform that each 3D region is measured is under unified coordinate system.
Particularly, suppose that the coordinate of gauge point P under the first coordinate system A is (x 1, y 1, z 1), the coordinate under the second coordinate system B is (x 2, y 2, z 2), the variation relation of two coordinate systems is:
x 1 y 1 z 1 = R x 2 y 2 z 2 + t x t y t z = R 1 R 2 R 3 R 4 R 5 R 6 R 7 R 8 R 9 x 2 y 2 z 2 + t x t y t z - - - ( 8 )
Wherein, R is spatial alternation matrix, [t xt yt z] tfor translation vector.
Be provided with n gauge point, for simplifying, calculate first by labelling point coordinates center of gravity under two coordinate systems, the barycentric coodinates of two coordinate systems are expressed as formula (9), and gauge point center of gravity coordinates table is shown formula (10).
x 1 g = Σ i = 1 n x 1 i n , y 1 g = Σ i = 1 n y 1 i n , z 1 g = Σ i = 1 n z 1 i n x 2 g = Σ i = 1 n x 2 i n , y 2 g = Σ i = 1 n y 2 i n , z 2 g = Σ i = 1 n z 2 i n - - - ( 9 )
x 1 ‾ = x 1 - x 1 g , y 1 ‾ = y 1 - y 1 g , z 1 ‾ = z 1 - z 1 g x 2 ‾ = x 2 - x 2 g , y 2 ‾ = y 2 - y 2 g , z 2 ‾ = z 2 - z 2 g - - - ( 10 )
Formula (8) is after center of gravity, and two coordinate system spatial alternation model representations are:
x 1 ‾ y 1 ‾ z 1 ‾ = R x 2 ‾ y 2 ‾ z 2 ‾ - - - ( 11 )
Obtain after rotation parameter, according to following formula, calculate translation parameters.
t x t y t z = x 1 g y 1 g z 1 g - R x 2 g y 2 g z 2 g - - - ( 12 )
Wherein, [t xt yt z] tfor translation vector, (x 1g, y 1g, z 1g) be the barycentric coodinates expression of the first coordinate system, (x 2g, y 2g, z 2g) be the barycentric coodinates expression of the second coordinate system, R is spatial alternation matrix.
Spatial alternation matrix R meets orthogonality, and only to have 3 parameters be independently, introduces Rodrigues parameter when calculating R, and it represents the direction of rigid body rotating shaft when fixed point rotary.The second coordinate system is vectorial s=(s with respect to the Rodrigues parameter of the first coordinate system x, s y, s z), spatial alternation matrix can utilize antisymmetric matrix
S = 0 - s z s y s z 0 - s x - s y s x 0 - - - ( 13 )
Be expressed as:
R=(I-S) -1(I+S) (14)
Formula (13) and formula (14) substitution formula (11) arrange
0 z 1 ‾ + z 2 ‾ - ( y 1 ‾ + y 2 ‾ ) - ( z 1 ‾ + z 2 ‾ ) 0 x 1 ‾ + x ‾ 2 y 1 ‾ + y 2 ‾ - ( x 1 ‾ + x 2 ‾ ) 0 s x s y s z = x 1 ‾ - x 2 ‾ y 1 ‾ - y 2 ‾ z 1 ‾ - z 2 ‾ - - - ( 15 )
For the individual gauge point pair of n (n >=3), can obtain one group of equation group, utilize method of least square to solve, can obtain Rodrigues parameter, according to formula (14), try to achieve spatial alternation matrix R, according to formula (12), can try to achieve translation vector.
Fig. 5 (a) and Fig. 5 (b) show respectively the threedimensional model of the milch cow of two different visual angles.
Step S108, according to the whole three-dimensional description of milch cow to be measured, calculates the conformation trait achievement data that milch cow to be measured is corresponding.
One-level conformation trait to milch cow is measured, and most of conformation traits can be converted into the measurement of angle between distance between 2 or at 3, and minority character can provide result by range estimation.
In one embodiment of the invention, according to the whole three-dimensional description of milch cow to be measured, the corresponding conformation trait achievement data that can calculate milch cow to be measured, wherein achievement data comprises: the height of milch cow, hind leg side-looking, buttocks angle, buttocks are wide, hoof tips degree and teat length etc.
(1) height
According to the height of WITHERS point, measure, labelling milch cow is intersection point and the WITHERS point on three hoof and ground wherein, and known 3 intersection points are conllinear not, can uniquely determine that a plane be horizontal plane.The vertical dimension of putting horizontal plane by calculating WITHERS is milch cow height.
Suppose that 3 intersection points are respectively m 1(x 1, y 1, z 1), m 2(x 2, y 2, z 2) and m 3(x 3, y 3, z 3), the normal vector of well-determined plane can be expressed as formula (16), and plane equation is expressed as formula (17).Vector n is represented with (A, B, C), plane equation is converted into A (x-x1)+B (y-y1)+C (z-z1)=0, with general expression, be expressed as Ax+By+Cz+D=0, D=-(Ax1+By1+Cz1) wherein, point gets final product through type (18) to the distance of plane and calculates.
n=m 1m 2×m 1m 3 (16)
m 1m·n=0 (17)
d = | Ax 0 + By 0 + Cz 0 + D | / A 2 + B 2 + C 2 - - - ( 18 )
(2) hind leg side-looking: measure the angle that hind leg elbow joint place flies angle, back leg flies 3 of Nodes labellings in image.Suppose that be respectively m at 3 1(x 1, y 1, z 1), m 2(x 2, y 2, z 2) and m 3(x 3, y 3, z 3), the inner product of vector is expressed as formula (19), and transforming and obtaining angle between 3 is formula (20), and formula (21) is vectorial mould.
m 1m 2·m 3m 2=|m 1m 2||m 3m 2|cosθ (19)
θ=arccos(|m 1m 2·m 3m 2/|m 1m 2||m 3m 2|) (20)
| m 1 m 2 | = ( x 2 - x 1 ) 2 + ( y 2 - y 1 ) 2 + ( z 2 - z 1 ) 2 - - - ( 21 )
(3) buttocks angle
According to the angle of the line between haunch and ischium and horizontal plane, measure. labelling haunch point and puncta ischidiacum, calculate the angle between 2 definite vectors and horizontal plane normal vector, its complementary angle is required angle.
(4) buttocks is wide
According to the width between two haunch, measure. two haunch points of labelling, according to any two points spacing formula in space ( x 1 - x 2 ) 2 + ( y 1 - y 2 ) 2 + ( z 1 - z 2 ) 2 Buttocks can be calculated wide.
(5) hoof tips degree
According to the angle of cut at the bottom of hoof sidewall and hoof, measure, i.e. labelling hoof sidewall and hoof point 2 points, the angle of cut of its line and horizontal plane is hoof tips degree.
(6) teat length refers to measure front teat length.
According to the collecting method of the milch cow build characteristic index based on three-dimensional measurement of the embodiment of the present invention, adopt the method for three-dimensional measurement of stereoscopic vision to rebuild the threedimensional model of milch cow, realized the conformation trait index measurement to milch cow, first by three-dimensional target, carry out the demarcation of photographic head, then utilize SIFT matching algorithm that image is carried out feature point extraction and mated, finally by projection matrix, calculate the three-dimensional coordinate of matching characteristic point.For the limited problem of photographic head angular field of view in binocular vision, the present invention arranges gauge point by the public territory in adjacent viewpoint, according to gauge point, calculate the transformational relation of different coordinates, each local feature point is transformed under unified coordinate system, thereby realize the three-dimensional splicing of each regional area under different points of view, the milch cow model of rebuilding is thus more satisfactory, and certainty of measurement and measurement efficiency meet evaluation requirement.Realize on this basis the measurement of milch cow conformation trait, certainty of measurement is high, has stronger sense of reality, and character certainty of measurement is higher, meets the demands, and can replace hand dipping, has good application prospect.By the threedimensional model rebuild multi-angle observation milch cow conformation trait easily and efficiently, and for further laying the foundation by threedimensional model Measuring Object volume.
The present invention can by dynamic tracking and sum up cow breast inside and outside character with physiological process Changing Pattern and and Milk Production between relation, set up the relational model between the form and function of cow mammary gland, for milch cow becomes more meticulous to raise, lay the foundation.
In the description of this description, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And the specific features of description, structure, material or feature can be with suitable mode combinations in any one or more embodiment or example.
Although illustrated and described embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, those of ordinary skill in the art can change above-described embodiment within the scope of the invention in the situation that not departing from principle of the present invention and aim, modification, replacement and modification.Scope of the present invention is extremely equal to and limits by claims.

Claims (9)

1. a collecting method for the milch cow build characteristic index based on three-dimensional measurement, is characterized in that, comprises the steps:
At a plurality of predeterminated positions of fence both sides, settle respectively two capture apparatus, wherein, described a plurality of predeterminated positions comprise the upper, middle and lower of described fence both sides;
Described capture apparatus is demarcated, and described capture apparatus gathers image after demarcating with image as a setting completing;
Utilize superposed described capture apparatus to gather ground image, and described ground image is carried out feature point detection and mated, calculate the three-dimensional coordinate of matching characteristic point;
Described capture apparatus milch cow to be measured enter fence and in stable condition after, gather image simultaneously and using as original image;
The described background image of capture apparatus collection every described and described original image are processed to remove background area, obtain the dairy cow image of described milch cow to be measured;
The dairy cow image of the described capture apparatus of adjacent position is carried out feature point detection and mated, and complete three-dimensionalreconstruction is carried out in each region of described milch cow to be measured according to the matching characteristic point obtaining;
After completing three-dimensionalreconstruction, a plurality of gauge points are set in adjacent 3D region, the coordinate transform that 3D region described in each is measured under unified coordinate system to obtain described milch cow integral body three-dimensional description to be measured;
According to the whole three-dimensional description of described milch cow to be measured, calculate the conformation trait achievement data that described milch cow to be measured is corresponding.
2. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 1, is characterized in that, after calculating the three-dimensional coordinate of matching characteristic point, also comprises the steps:
Calculating is to describe the almost plane of the three-dimensional point cloud on ground, and the datum mark calculating described almost plane as index.
3. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 2, is characterized in that, the datum mark that the index of the health height using described almost plane as described milch cow is calculated.
4. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 1, it is characterized in that, adopt yardstick invariant features conversion SIFT algorithm that the dairy cow image of the described capture apparatus of adjacent position is carried out feature point detection and mated.
5. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 1, is characterized in that, the matching characteristic point that described basis obtains completes three-dimensionalreconstruction is carried out in each region of described milch cow to be measured, comprises the steps:
Matching characteristic point, according to the principle of spatial point three-dimensional reconstruction, is calculated to the three-dimensional point set of described matching characteristic point to complete the three-dimensionalreconstruction to each region of described milch cow to be measured,
Wherein, establish p 1and p 2for the matching characteristic point of a P on two described capture apparatus, any point in the dairy cow image that some P is described capture apparatus, establishes M 1and M 2be respectively p 1and p 2projection matrix, X-Y scheme picture point p 1and p 2with the mapping relations of three dimensions point be:
λ C 1 u 1 v 1 1 = m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 X Y Z 1 λ C 2 u 2 v 2 1 = m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 X Y Z 1 ,
Wherein, (u 1, v 1, 1) and (u 2, v 2, 1) and be respectively p 1and p 2homogeneous coordinates in image separately, (X, Y, Z, 1) is the homogeneous coordinates of P point under world coordinate system, λ c1and λ c2for proportionality coefficient.
6. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 5, it is characterized in that, in each region completing described milch cow to be measured, carry out three-dimensionalreconstruction, after obtaining the three-dimensional point set of described matching characteristic point, also comprise the steps:
Utilize graphic package interface OpenGL to show described three-dimensional point set.
7. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 1, it is characterized in that, the described coordinate transform that 3D region described in each is measured under unified coordinate system to obtain described milch cow integral body three-dimensional description to be measured, comprise the steps:
Calculate the spatial alternation matrix in adjacent subarea territory;
Calculate the translation vector in adjacent subarea territory;
According to described spatial alternation matrix and described translation vector, the coordinate transform that 3D region described in each is measured is under unified coordinate system.
8. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 7, is characterized in that, described translation vector is:
t x t y t z = x 1 g y 1 g z 1 g - R x 2 g y 2 g z 2 g
Wherein, [t xt yt z] tfor translation vector, (x 1g, y 1g, z 1g) be the barycentric coodinates expression of described the first coordinate system, (x 2g, y 2g, z 2g) be the barycentric coodinates expression of described the second coordinate system, R is spatial alternation matrix.
9. the collecting method of the milch cow build characteristic index based on three-dimensional measurement as claimed in claim 1, it is characterized in that, according to the whole three-dimensional description of described milch cow to be measured, calculate the conformation trait achievement data that described milch cow to be measured is corresponding, comprising: the height of described milch cow, hind leg side-looking, buttocks angle, buttocks are wide, hoof tips degree and teat length.
CN201310655845.XA 2013-12-09 2013-12-09 Cow body shape trait index data collecting method based on three-dimensional measuring Pending CN103919556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310655845.XA CN103919556A (en) 2013-12-09 2013-12-09 Cow body shape trait index data collecting method based on three-dimensional measuring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310655845.XA CN103919556A (en) 2013-12-09 2013-12-09 Cow body shape trait index data collecting method based on three-dimensional measuring

Publications (1)

Publication Number Publication Date
CN103919556A true CN103919556A (en) 2014-07-16

Family

ID=51138132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310655845.XA Pending CN103919556A (en) 2013-12-09 2013-12-09 Cow body shape trait index data collecting method based on three-dimensional measuring

Country Status (1)

Country Link
CN (1) CN103919556A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104677277A (en) * 2015-02-16 2015-06-03 武汉天远视科技有限责任公司 Method and system measuring geometric attribute of object or distance
CN104809688A (en) * 2015-05-08 2015-07-29 内蒙古科技大学 Affine Transform registration algorithm-based sheep body measuring method and system
CN107374641A (en) * 2017-08-30 2017-11-24 青岛市畜牧兽医研究所 Dynamic identifies the 3D scanning systems of the milk cow bodily form
CN112419414A (en) * 2020-12-07 2021-02-26 河南科技大学 Device for acquiring three-dimensional point cloud of breast area of dairy stock
CN113670421A (en) * 2021-08-25 2021-11-19 聊城大学 Animal body chi of equus and weight rapid survey appearance

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104677277A (en) * 2015-02-16 2015-06-03 武汉天远视科技有限责任公司 Method and system measuring geometric attribute of object or distance
CN104809688A (en) * 2015-05-08 2015-07-29 内蒙古科技大学 Affine Transform registration algorithm-based sheep body measuring method and system
CN104809688B (en) * 2015-05-08 2017-11-07 内蒙古科技大学 Sheep body body measurement method and system based on affine transformation registration Algorithm
CN107374641A (en) * 2017-08-30 2017-11-24 青岛市畜牧兽医研究所 Dynamic identifies the 3D scanning systems of the milk cow bodily form
CN112419414A (en) * 2020-12-07 2021-02-26 河南科技大学 Device for acquiring three-dimensional point cloud of breast area of dairy stock
CN112419414B (en) * 2020-12-07 2023-03-07 河南科技大学 Device for obtaining three-dimensional point cloud of breast area of dairy stock
CN113670421A (en) * 2021-08-25 2021-11-19 聊城大学 Animal body chi of equus and weight rapid survey appearance

Similar Documents

Publication Publication Date Title
CN110264567B (en) Real-time three-dimensional modeling method based on mark points
CN103411553B (en) The quick calibrating method of multi-linear structured light vision sensors
CN105243637B (en) One kind carrying out full-view image joining method based on three-dimensional laser point cloud
CN103315739B (en) The nuclear magnetic resonance image method and system of motion artifacts is exempted based on Dynamic Tracing Technology
CA2731680C (en) System for adaptive three-dimensional scanning of surface characteristics
US8340402B2 (en) Device and method for detecting a plant
CN106651900B (en) A kind of overhead strawberry three-dimensional modeling method in situ based on contours segmentation
CN103919556A (en) Cow body shape trait index data collecting method based on three-dimensional measuring
CN107194991A (en) A kind of three-dimensional global visualization monitoring system construction method updated based on skeletal point local dynamic
CN103075960B (en) Multi-visual-angle great-depth micro stereo visual-features fusion-measuring method
CN102589516B (en) Dynamic distance measuring system based on binocular line scan cameras
CN111724433A (en) Crop phenotype parameter extraction method and system based on multi-view vision
CN102831601A (en) Three-dimensional matching method based on union similarity measure and self-adaptive support weighting
JP2013178656A (en) Image processing device, image processing method, and image processing program
CN106767562B (en) A kind of measurement method and human body measurement method based on machine vision and speckle
CN101329764A (en) Method for positioning video camera using two arbitrary coplane circles
CN112258651B (en) Three-dimensional reconstruction method for dairy cow body surface point cloud under shielding condition
CN110243307A (en) A kind of automatized three-dimensional colour imaging and measuring system
CN113470106B (en) Non-contact cow body size information acquisition method
CN115272187A (en) Vehicle-mounted dynamic field frame-to-frame relevance based field rice and wheat lodging global evaluation method
Nguyen et al. Comparison of structure-from-motion and stereo vision techniques for full in-field 3d reconstruction and phenotyping of plants: An investigation in sunflower
CN110230979A (en) A kind of solid target and its demarcating three-dimensional colourful digital system method
CN109801360A (en) Stomach and intestine three-dimensionalreconstruction and method for visualizing based on image
CN110675436A (en) Laser radar and stereoscopic vision registration method based on 3D feature points
CN115082777A (en) Binocular vision-based underwater dynamic fish form measuring method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140716