Specific embodiment
The present invention is described in detail with reference to the accompanying drawings and detailed description.
The entire protocol of the inventive method includes:
1. depth camera is demarcated
Demarcated using Zhang Shi standardizations, the depth image of multiple different angles is obtained using Kinect depth cameras.To original
Beginning depth image is up-sampled, and depth image resolution ratio is improved, in order to extracted with high accuracy angle point.By on scaling board each
Corresponding relation between the picture point of characteristic point and its image plane, i.e., complete to demarcate by every homography matrix of image, can pass through
OpenCV realizes that automatically extracting angle point information completes to demarcate.
2. depth image treatment
Using joint bilateral filtering algorithm, depth image quality is strengthened using high-resolution coloured image, subtracted
Noise jamming in few depth image.
3. a cloud is merged and skeleton point acquisition of information
Adjacent point cloud chart picture is carried out into registration using ICP (iteration closest approach) algorithms, is calculated residing for a certain amplitude point cloud image
Coordinate system shoots each width relative to the spin matrix and translation vector of previous adjacent point cloud chart coordinate system as residing for obtain
The relative attitude of the camera of point cloud chart picture, and using coordinate system residing for the first amplitude point cloud image as human body point cloud model after fusion
Coordinate system, carries out the fusion of cloud, obtain point cloud chart as while, obtain the crucial skeleton point point cloud letter of human body initial attitude
Breath, with fast searching to human body key feature.Point cloud fusion flow chart is as shown in figure 4, skeleton point such as Fig. 9 in original point cloud chart
It is shown.
4. human dimension is calculated
1) pre-process
The following noise of removal foot:The point cloud that x coordinate value is approximately equal to the x values of crown point is found, y values is carried out from big to small
Sequence, calculates the y value differences of former and later two points, and the y values of less that point are ground wherein in corresponding two points of largest interval
The y values in face, remove below foot and put cloud on this basis.
2) rigid body translation of 3 D human body point cloud
So that, for X-axis is positive, top is positive Y-axis on the left of human body, front is oriented Z axis forward direction, and sole is XOZ planes, is entered
The rigid body translation of row point cloud.
Q=RS+T
Q is the human body point cloud matrix after rigid body translation, and S is original human body point cloud matrix, and R is the spin matrix of 3*3,
T is the translation vector of 3*1.
Method based on skeleton point translation rotation human body
Because kinect is uncertain with the relative position of human body, the human body data cloud that fusion is produced can be caused in coordinate system
In position do not know.
It with the data of the skeleton point obtained from kinect is foundation that this method is, the data to cloud data and skeleton point are entered
Row rigid body translation, by the human body point Cloud transform of certain position in coordinate system to a kind of position of standard, in order to follow-up people
Body dimensional measurement.
The process of conversion is foundation skeleton point, calculates the angle of skeleton point and reference axis, and all skeleton points and coordinate
The relative position of origin, and in this, as the parameter of rigid body translation, during manikin and all skeleton points transformed into coordinate system
Determination position.
3) human body layering
(1) human body point converge conjunction Q=(x, y, z) | x ∈ (xl,xu),y∈(yl,yu),z∈(zl,zu)}。
(2) the array QX, QY (the point cloud of said three-dimensional body) of the layering set of human body point cloud.
Wherein, QXi=(x, y, z) | and x ∈ [dx*i, dx* (i+1)), y ∈ (yl,yu),z∈(zl,zu) (parallel YOZ cuts
The point cloud in face).
QYi=(x, y, z) | x ∈ (xl,xu),y∈[dy*i,dy*(i+1)),z∈(zl,zu) (the point in parallel YOZ sections
Cloud)
Dx, dy represent interlamellar spacing, and l represents lower bound, and u represents the upper bound.
So far, three-dimensional point set changes into the array QX, QY of multiple two-dimensional section collection.
4) human body segmentation
For the human body point cloud chart by above-mentioned treatment.We need to extract following first kind characteristic point for human body point
Cut.
First kind characteristic point:P1(perineum point), P2(left armpit point), P3(right armpit point), P4(left acromion point), P5(right shoulder
Peak dot), P6(left SNP SIDE NECK POINT), P7(right SNP SIDE NECK POINT).
First kind characteristic point acquisition methods
After determining perineum point and armpit point general location and x coordinate value bound using skeleton point, according to multiple human bodies
Longitudinal section QXi, dimensionality reduction operation is carried out to each intersecting surface.Operation result is synthesized into a point set, dimensionality reduction is carried out to point set again
Operation just can obtain perineum point and armpit point.And acromion point and SNP SIDE NECK POINT equally can be according to human body point cloud intersecting surface and the points
The corresponding dimensionality reduction operation of characteristic use is obtained.First kind feature point extraction result is as shown in Figure 1.
Dimensionality reduction operation is as follows,
Computing of the point set of one dimensional line to zero dimension point:
X (y/z) maximum (small) values of point set P are found and return to the point.
Computing of the point set of two-dimensional surface to zero dimension point:
The point away from reference line L closest (remote) is taken out in the point set P of two-dimensional surface and the point is returned.
The skeleton point and human body proportion that wherein each point value bound and search datum mark are obtained by kinect determine.The party
Method thinking is succinct, calculates rapid, registration.
Human body segmentation's method
Split both arms first, look for armpit point.
Travel through all of point, find out in human height's ratio 0.68 and on institute a little, operation afterwards is based on this
A little points, equivalent to the only lookup more than chest locations.
In x-axis positive direction, every very little x values scope traversal point within this range, the minimum point Y of record y-coordinateminN。
I.e. equivalent to vertical section is done, the minimum point on section is found out.
Find out [Ymin1,Ymin2…YminN] in maximum Ymax=Max { Ymin1,Ymin2…YminN, YmaxAs left armpit
The y-coordinate value of point, it is possible thereby to left armpit point is found, as shown in Figure 8.
X coordinate value according to left armpit point does vertical section segmentation left arm.Similarly in the negative semiaxis segmentation right arms of x.
Then split both legs, look for perineum point.
All of point is traveled through, the maximum point i.e. head peak of y values is found, its x value is recorded.
The y values of point of human height's ratio at 0.5 are found out, is screened out all outside this x values left and right 10cm scope, in y
It is worth the point outside upper and lower 10cm scopes.
For all points for screening, every very little x values scope traversal point within this range, record y value minimums
Point YminN。
Find out [Ymin1,Ymin2…YminN] in maximum Ymax=Max { Ymin1,Ymin2…YminN, YmaxAs perineum point
Y-coordinate value, it is possible thereby to find perineum point.
Horizontal cross-section segmentation both legs are done by the y-coordinate value of perineum point.Left and right arms can be carried out according to acromion point and armpit point
Segmentation.Left and right leg can be split according to perineum point.
So far human body segmentation is completed.Generate left leg, right leg, left arm, the point cloud of right arm and the body without left and right arms.After rotation
Left arm point cloud it is as shown in Figure 5.
5) feature location and Size calculation
With reference to GB GB1610-2008 and actual custom made clothing demand for the definition of human dimension, choose following 37
Size is calculated.
Highly:Height, cervical vertebra point is high, and left (right side) shoulder height, breastheight, waist is high, and stern is high, and perineum point is high, and left (right side) knee height is left
(right side) ankle is high.
Width:Shoulder breadth, chest breadth, waist is wide, hip breadth.
Thickness:Chest depth, waist is thick, hip depth.
Degree of enclosing:Neck circumference, bust, waistline, hip circumference, left (right side) thigh rhizosphere, left (right side) elbow encloses, left (right side) wrist circumference, left (right side)
Upper-arm circumference, left (right side) arm rhizosphere, left (right side) knee circumference, left (right side) ankle encloses.
Angle:Shoulder angle
First, we calculate Equations of The Second Kind characteristic point.
Equations of The Second Kind characteristic point:Crown point, sole point, cervical vertebra point, waist point, stern point, left (right side) wrist point, left (right side) elbow point is left
(right side) knee point, left (right side) ankle point
Equations of The Second Kind feature point calculating method
Crown point, sole point, cervical vertebra point, waist point, stern point can operate acquisition by dimensionality reduction.
Wrist point, elbow point, knee point, ankle point can be obtained by skeleton point.
Equations of The Second Kind feature point extraction result is as shown in Figure 2.Here is the computational methods of needles of various sizes.Height calculation method
Height calculation results are the corresponding height (y-coordinate value) of its characteristic point.
Width calculation method
Shoulder breadthWherein L (pix,piZ) < 0, PiIt is by SPL, SPR, 3 points of CerP determined
Characteristic face by the orderly point after G (convex closure) computing.Wherein, SPLIt is left acromion point, SPRIt is right acromion point, CerP is cervical vertebra
Point, L represents SPL, SPR2 points of plane and straight line equations for being determined, piX, piZ represents PiX coordinate and z coordinate.
Remaining width calculation result is the width (x directions minimax value difference) of characteristic face where its characteristic point.
THICKNESS CALCULATION method
Thickness calculations are the thickness (z directions minimax value difference) of characteristic face where its characteristic point.Degree of enclosing calculating side
Method
Degree of enclosing result of calculation is G (convex closure) operation result of characteristic face where its characteristic point, and wherein G operation is as follows.
The method that degree of enclosing is calculated by characteristic face:
(I) determine to carry out required result medium filtering or mean filter or do not filter according to required position
(II) one-dimensional profile line is asked for using algorithm of convex hull
The point of required intersecting surface is processed first with algorithm of convex hull, so as to remove internal point, only retains peripheral point
Point converge conjunction, exclude internal noise interference, the tight state of tape during the real measurement of simulation reduces measurement error.So far,
One-dimensional profile line is obtained by two-dimensional surface.Convex closure effect such as Fig. 6, shown in 7.
(III) cubic spline interpolation fitting is carried out to result so that contour line is more smoothed
(IV) ask for enclosing length
It is that the point from characteristic point to converge appoint in conjunction and takes one to enclose long mode of asking at unordered when being in a cloud contour line
Result is initialized as 0 by individual point as current point, and then greed selects the point nearest from current point, and asks between 2 points
Distance is added in result, the current point put as greed selection next time that greed selection is obtained, iteration the method, Zhi Daoji
All of point is calculated.Last o'clock to first distance of point is finally calculated, and the distance is added in result.
When step (I) algorithm of convex hull uses Garham ' s Scan algorithms to carry out convex closure, institute's invocation point cloud is orderly point cloud,
The current point of Garham ' s Scan institutes invocation point cloud and the distance of next point can be directly calculated, using next point as current point,
Iteration this step.Last o'clock to first distance of point is finally calculated, and the distance is added in result.So can be with profit
Avoid seeking a cloud again sequence so as to improve arithmetic speed with Garham ' s Scan algorithmic characteristics.
Angle computation method
Left shoulder angle
Wherein NRPLxIt is left SNP SIDE NECK POINT x coordinate value, NRPLyIt is left SNP SIDE NECK POINT y-coordinate value, SPLxIt is left acromion point x coordinate
Value, SPLyIt is left acromion point y-coordinate value.
Error analysis:
In 1cm, angular error meets the requirement of custom made clothing to scale error within 5 degree.
The standard deviation of error measures stability in tolerance interval with preferable.