Summary of the invention
The purpose of this invention is to provide that a kind of usefulness is two-dimensional encoded carries out the method for three-dimensional tracking measurement to moving object, it is that the human body that solves moving object, particularly motion carries out the problem of three-D profile tracking measurement.The present invention carries out image acquisition with two video cameras simultaneously to testee, wherein maintain a certain distance between two ccd video cameras, utilize the principle of the binocular stereo vision of human eye to carry out three-dimensional measurement, the geometric figure that employing is then arranged according to certain Regulations is formed the surface of two-dimensional encoded plane attached to testee, can find match point according to queueing discipline between the image that two video cameras are obtained.Calculate this position in three dimensions according to the parallaxometer of same match point in two width of cloth images.
The ultimate principle of utilizing binocular stereo vision to carry out three-dimensional measurement is a triangulation method.When about after the relative position of two video cameras determines, according to the same point on the testee about in two video cameras the difference of image space just can calculate the locus of this point.In computer vision field, generally adopt the characteristic matching mode in order to guarantee measuring accuracy, promptly select the unique point on the object, calculate as angle point, boundary line etc.But to relatively slicker and more sly object, for example human body is looked for quite difficulty of match point.The present invention adopts the geometric figure with obvious characteristic to rearrange two-dimensional encoded plane according to certain rule on two dimensional surface, and with two-dimensional encoded plane attached to the testee surface, thereby formed a series of match point on the testee surface.This just makes and can find match point according to queueing discipline between the image of two video cameras acquisitions.
The geometric figure that is used to encode can be that square, triangle, hexagon, circle or other have the geometric figure of obvious characteristic.As long as the figure that computing machine can accurately be discerned all can adopt.Here it should be noted, because the geometric figure on the testee often becomes certain included angle with the plane of delineation, its projection meeting in image deforms geometric figure, for example, square is along with the difference of projection angle can be rectangle, rhombus etc., if a foursquare part is blocked, just might be trapezoidal or triangle.Therefore, select different geometric figures to carry out to avoid using the geometric figure of obscuring easily when two-dimensional encoded.The geometric figure that coding is adopted preferably can be desired consistent with three-dimensional reconstruction software.Can make data processing convenient like this.
In the image with the colored CCD acquisition, three kinds of colors of red, green, blue are independent mutually, are called three primary colors.When active computer carried out Flame Image Process, we can separate these three kinds of chromatic zoneses at an easy rate, thereby color characteristic is than the easier identification of geometric properties.We form one group with adjacent geometric figure in order to obtain big code plane with limited color, and the ordering in each group is all inequality.For example, encode with three kinds of colors of RGB, 4 geometric figures are one group, according to the permutation and combination principle, 81 kinds of different permutation and combination methods can be arranged altogether.Arrangement mode in each group can be that the geometric figure of delegation is formed one group, also can be that the geometric figure of row is formed one group, can also be that adjacent several geometric figures are formed one group.Geometric number can be determined according to the real needs of measuring in each group.Can both be determined uniquely that in order to make in the code plane each match point in a code period, the ordering of each group only occurs once.
In actual measurement, we can not get single redness, green or blue.Because a variety of causes always has some parasitic lights.In measurement, belong to noise.In order to make measuring system have certain anti-interference capability, make the difference between each color reach maximum as far as possible.Under 24 color modes, three kinds of each colors of color of RGB can have 256 GTGs.For the difference that makes color reaches maximum, each color is only got 0 and 255 two value.At this moment make up with three kinds of colors, can obtain white, red, green, blue, and their complementary color is black, green grass or young crops, product, Huang.If do back of the body background color, also have 7 kinds of colors can be used for encoding with black.
Under many circumstances, do not need very big code plane, and need decoding speed faster.At this moment can adopt three kinds of colors of RGB to encode, perhaps adopt four kinds of colors of red, green, blue and white to encode.Only encode with these several colors, fastest when carrying out Computer Processing.
Geometric number is many more in each group, and is just many more according to its arrangement mode of permutation and combination principle, and the two-dimensional encoded plane of being formed is just big more.But will consider also that simultaneously if there is the part element to be blocked in one group, can't determine uniquely that for the encoded radio of this group this just causes the blind area of measurement, geometric number is many more in one group, the scope of blocking the blind area of being caused is also just big more.When dynamic human body was measured, people's limbs blocked certain part of trunk through regular meeting, if block the excessive result that will influence measurement in the blind area of causing.
To block the blind area of being caused and reduce to minimum in order to make, the present invention forms one group with four adjacent squares, and when carrying out encoding process, the square on each non-edge all is an element in adjacent four groups simultaneously, as shown in Figure 1.Wherein R, G, B represent the square of three kinds of colors of red, green, blue respectively.With any 1 G is in the code planes (Fig. 1 e) formed of 3 * 3 at center square, can regard as by four 2 * 2 coding unit is staggered and form.Wherein, first group (Fig. 1 a) in the element in the lower right corner simultaneously also be the element in the lower left corner in second group (Fig. 1 b), it still be the element in upper right corner in the 3rd group (Fig. 1 c) and the element in the 4th group (Fig. 1 d) middle upper left corner.Encode in the two-dimensional encoded plane that obtains according to this rule, four adjacent elements can be formed one group arbitrarily, and their ordering is unique in a code period.When carrying out encoding process according to this rule, any one element is subjected to blocking and can have any impact to other element.
Encode according to above rule with three kinds of colors of red, green, blue, can form one 9 * 9 code plane, as shown in Figure 2; When the testee surface area is big, can adopt more color to encode, also can be spliced into bigger code plane with the several encoding cycle.
Concrete measuring process of the present invention is described in detail as follows:
1) makes the color 2 D code plane according to two-dimensional encoded ordering shown in Figure 2 with the square of red green blue three kinds of colors.If human body is measured, then make the coding clothes.
2) with the surface of color 2 D code plane attached to testee.If human body is measured, the clothes of then will encoding are through on measured's the body.
3) form three-dimensional tracing measurement system with two video cameras.The relative position of two video cameras remains unchanged, but can whole move and object is carried out tracking measurement.
4) before actual measurement, system is proofreaied and correct with the object of known three-D profile.Tracing measurement system through overcorrect will keep constant in whole measuring process.
5) with three-dimensional tracing measurement system measuring to the foregoing three-dimensional body that has adhered to the color 2 D code plane.
6) image of measuring is sent into computing machine.
7) match point about computing machine is found out by image processing program in two width of cloth images, and calculate the pairing locus of match point according to the parallaxometer of match point in two width of cloth images.
8) according to the position of the spatial point that measures three-dimensional model with 3 d modeling software reconstruction of objects in computing machine.The difficulty of obtaining object dimensional information maximum with the principle of binocular vision is to look for match point.The present invention adopts color 2 D plane geometric figure Methods for Coding to solve this difficult problem effectively.The clothes made from color 2 D plane geometric figure coding are through the person when going up, and not only can measure the three-D profile of human body, and can carry out tracking measurement to the motor behavior of human body.Because whole measuring process is to carry out under white light conditions, thereby can adapt to the condition of various in-site measurements.The present invention makes at computer three-dimensional animation, and there is wide application prospect in fields such as athletic choice and training.
Embodiment
Embodiment 1
At first make the color 2 D code plane according to two-dimensional encoded ordering shown in Figure 2 with the square of three kinds of colors of RGB with computer drawing software, and make two-dimensional encoded plane with color printer output, the wherein foursquare length of side is 10mm, and the interval between each square also is 10mm.Is 135mm with two-dimensional encoded plane attached to diameter, on the right cylinder of high 200mm.Form measuring system with two video cameras according to device shown in Figure 3.Two video cameras are placed on 1,2 position respectively, and make them be in same level height.Video output signals is sent into computing machine by image pick-up card, and the resolution of image pick-up card is 688 * 516 pixels, 24 true color patterns.About making as far as possible, the configuration of light throws light on evenly, to reduce the shade on the testee.
Before carrying out actual measurement, proofread and correct measuring system.Because cylindrical radius and height all are known, can be used for system is proofreaied and correct.Respectively right cylinder is sampled and send into computing machine through image pick-up card withvideo camera 1,2, the sample graph that obtains as shown in Figure 4 and Figure 5.In computing machine, by image processing software each foursquare color is discerned, and obtained this foursquare encoded radio according to the color of its adjacent square.
On two-dimensional encoded plane, each foursquare four angle can be used as four match points.When measurement image is handled, accurately determine the position of each angle point, and determine its position in the space by the parallax of each angle point in the image of the left and right sides.
Fig. 6 is the spatial point that records according to experiment, carries out the result of three-dimensional reconstruction in computing machine with VRML2.0.The benefit of carrying out three-dimensional reconstruction with VRML2.0 is can carry out three-dimensional by browser to browse.From the effect of three-dimensional reconstruction, basic is consistent with actual object.
Embodiment 2
Measuring system is proofreaied and correct the back throughembodiment 1 and is kept constant, and we carry out three-dimensional measurement to manikin.Square with three kinds of colors of red, green, blue is attached to the manikin surface according to ordering shown in Figure 2, with measuring system the model is measured.Fig. 7, Fig. 8 are respectively the sample graph that left and right cameras obtains.By computer programs process, can obtain the volume coordinate of four angle points of each square.According to the spatial point that experiment records, in computing machine, carry out three-dimensional reconstruction with VRML2.0.Fig. 9 is the result by manikin three-dimensional measurement value three-dimensional reconstruction in computing machine.