1. Field of the Invention
The present invention relates to a method for generating three-dimensional form data having a small amount of data than the original three-dimensional form data and an apparatus therefor.
2. Description of the Prior Art
Active stereo methods are used for measuring a form of an object of various kinds including a human body without contact with the object at a fast speed. A slit projection method, referred to light cutting method generally, is a representative method thereof. In these methods, an object is imaged by illuminating it with a light for detection, and a three-dimensional image (or distance image) is generated by using the principle of trigonometry. The three-dimensional image is a set of pixels in correspondence to three-dimensional positions of points of the object. The slit light projection method uses a slit light having a linear section as light for detection.
A three-dimensional form model of a whole object can be generated by imaging the object from a plurality of positions and by synthesizing three-dimensional images appropriately. The three-dimensional form model or a part thereof of an object can be used for computer graphics, computer-aided design or the like.
When the above-mentioned active stereo method is used, data has a large amount as large as several tens thousands to several hundred thousands points. If the amount of data is so large, there is a serious burden on handling the three-dimensional form data with a computer, or it takes a long time to display a picture or to operate the data. Thus, processing speed becomes low.
Various techniques have been proposed to reduce the amount of data of three-dimensional form model using polygon representation. For example, it is proposed to delete a vertex from the data in the order of shortness of the distance of a vertex from an average polygon of adjacent polygons until the thinning ratio becomes a specified value (“Decimation of Triangle Meshes”, Computer Graphics, 26, 2, Jul. 1992)). In this method, the three-dimensional form data are thinned out by increasing polygons having shapes similar to a flat plane, so that the density of points is smaller at portions having simple patterns and is larger at portions having complicated patterns.
A user of computer graphics or the like usually wants to process characteristic lines such as edges of an object. Practically, points along characteristic lines become necessary to reproduce a contour of an object for data processing or animation. However, the prior art methods do not necessarily produce a result that a user intended to generate.
In order to solve this problem, a three-dimensional measuring instrument of point contact type may be used to input points one by one along a line intended by a user. However, this technique takes an elaborate work and a long time because the number of input points is as large as several tens thousands to several hundred thousands.
An object of the present invention is to provide a method for generating three-dimensional form data, including characteristic lines desired by a user, from original three-dimensional form data.
When three-dimensional form data are thinned out based on a three-dimensional form model, horizontal closed curves and vertical lines intersecting the closed curves are produced so that the closed curves and the lines includes-the three-dimensional form model. Then, the closed curves and the lines are projected to the three-dimensional form model, and a curved surface including a curve group along the three-dimensional form model is generated. Next, the curved surface is modified by moving lines in the curve group projected to the three-dimensional form model, in order to include characteristic lines desired by a user in the form model. For example, movement of control points, deletion of a longitude or a meridian and the like are performed in order to modify the curves and lines. Movement of a longitude or a meridian is included in the movement of control points. The three-dimensional form data after thinning out comprise data for specifying whether it is a longitude or a meridian, data for specifying a segment of a parametric curve, coordinates of end points of each segment and data on continuity, and coordinate data on control points.
An advantage of the present invention is that three-dimensional form data of a smaller amount is generated from the original three-dimensional form data, while including characteristic lines desired by a user.
Another advantage of the present invention is that a curve intended by a user can be generated easily.
A further advantage of the present invention is that a curve after movement can be determined easily at a fast speed of calculation therefor.
These and other objects and features of the present invention will become clear from the following description taken in conjunction with the preferred embodiments thereof with reference to the accompanying drawings, and in which:
Referring now to the drawings, wherein like reference characters designate like or corresponding parts throughout the views,
The closed surface layout section 11 arranges a closed surface CCS1 or CCS2 formed virtually with longitudes BCP and meridians BCM for a three-dimensional form model TM1 or TM2 so that the closed surface CCS1, CCS2 includes the three-dimensional form model TM1, TM2 at positions wherein at least a part of an axis AX1 as a center exist inside the three-dimensional form model TM1, TM2.
The curve data generation section 12 generates data on a parametric curve group along the surface of the three-dimensional form model TM1, TM2 by projecting the longitudes BCP and meridians BCM to the axis AX1.
The move instruction section 13 instructs movement of control points of the parametric curve group, or movement, addition or deletion of longitudes or meridians thereof.
The modification section 14 modifies the parametric curves so that portion of the parametric curves relevant to the movement of the control points move along the surface of the three-dimensional model TM1, TM2 when the control points of the parametric curves are moved.
The three-dimensional form data processor 1 receives three-dimensional form data TD1 on an object obtained by a three-dimensional camera with slit light projection method or transmitted from another computer. The three-dimensional form data TD1 has a high density of points of the object, and it consists of a large amount of data. The screen 2 is set so that it is parallel to a plane including coordinate axes Wx and Wy of world coordinate system, and the three-dimensional form TM1 and a closed surface CCS1 to be explained later are set at positions wherein they can be projected to the screen 2. The three-dimensional form data TD1 may be either of a surface model, a solid model or a wire frame model. The three-dimensional model TM1 may be generated by the form data processor 1. The three-dimensional form data processor 1 generates three-dimensional form data TM3 having an amount of data smaller than that of the three-dimensional form data TM1. The as-received three-dimensional form data TD1 may also be output as the form data TM3. The form data TM3 may be stored in a flexible disk or are supplied through a communication line to another computer.
The operation with the three-dimensional form data processor 1 are explained below.
Next, each processing in the main chart is explained in detail. In this embodiment, Bezier curves of third order are used as spline curves. However, instead of Bezier curves of third order, Bezier curves of a higher order, spline curves other than Bezier curves, or parametric curves other than the spline curves may also be used. Bezier curves are a kind of spline curves, and Bezier curves may be described as spline curves in this description.
Longitudes BCP and meridians BCM as Bezier curves are explained further in detail. The control points for a j-th. Bezier segment BSG of i-th longitude BCPi are denoted as follows:
Bi,j0, Bi,j1, Bi,j2, Bi,j3,
wherein
Bi,j0=Bi,j−13.
A point P in the Bezier segments are described with the following Eq. (1):
Pi,j(t)=J3,0(t)Bi,j0+J3,1(t)Bi,j1+J3,2(t)Bi,j2+J3,4(t) Bi,j3 (1)
wherein 0≦t≦1.
On the other hand, the control points for a j-th Bezier segment BSG of i-th meridian BCMi are represented as follows:
Qi,j0, Qi,j1, Qi,j2, Qi,j3,
where
Qi,j0=Qi,j−13.
Further,
Bi,j0=Qj,10.
Next, the axis AX1 is adjusted (step S12). In this adjustment, the three-dimensional form model TM1 or the Bezier curve group BCG1 is moved so that the closed surface CCS1 consisting of the Bezier curves includes the three-dimensional form group TM1 and the axis AX1 passes the inside of the three dimensional form model TM1 as near as possible to the center thereof. In order to move the axis AX1, an end point of the axis AX1 is dragged by the pointing device on the screen. Then, the end point moves by an amount in correspondence to the movement of the pointing device on a plane perpendicular to the viewing direction of the screen 2. The axis AX1 may be inclined with respect to the coordinate axes of the world coordinate system.
Next, auxiliary points are generated (step S13) Auxiliary points used for fitting to the form model TM1 are defined as points P obtained by setting t=t0, t1, . . . , tk (0≦t≦1) in Eq. (1). In the example shown in
Next, the auxiliary points and the end points are projected to the three-dimensional form model TM1 (step S14). Then, new auxiliary points and end points are determined as intersection points Q of vertical lines extending from the original auxiliary points and end points with a surface (polygon) of the three-dimensional form model TM1. If v(d, e, f) is a direction vector projecting a point P(a, b, c) to the three-dimensional form model TM1,
(x−a)/d=(y−b)/e=(z−c)/f.
If an equation of one triangular polygon of the three-dimensional form model is expressed as
lx+my+nz=0,
the intersection Q(x, y, z) is determined as follows:
Next, it is confirmed if the point Q exists in the particular triangular polygon. If vertices of the triangular polygon are denoted as A, B and C, the point Q exists within the triangular polygon if the following relation holds:
ΔABC=ΔQAB+ΔQBC+αQCA.
On the other hand, the point Q does not exist within the triangular polygon if the following relation holds:
ΔABC<ΔQAB+ΔQBC+ΔQCA.
Then, it is confirmed whether the point Q exists in the triangular polygon or not, by using the following Eq. (3)
ΔABC=|{right arrow over (AB)}×{right arrow over (AC)}|,
and
ΔQAB+ΔQBC+ΔQCA=|{right arrow over (QA)}×{right arrow over (QB)}|+|{right arrow over (QB)}×{right arrow over (QC)}|+|{right arrow over (QA)}×{right arrow over (QB)}| (3)
If the point Q does not exist in the triangular polygon, the above-mentioned process is repeated to a next triangular polygon.
Next, meridians BCM and longitudes BCP, as Bezier curves along the three-dimensional form model TM1 are determined from the auxiliary points pi,j(t1), . . . , pi,j(tk) on the three-dimensional form model TM1 (step S15). Bezier curves on the three-dimensional form model TM1 are denoted as Ri,j(T). Then,
(D)=(C)(B), (4)
where
(D)=(Pi,j(t0), Pi,j(t1) . . . Pi,j(tk))T (6)
and
J is a basis function of a Bezier curve, and it is expressed in Eqs. (8) and (9).
where
(B) is determined by a following relation:
(B)=((C)T(C))−1(C)T(D) (10)
Then, the following Eq. (11) holds:
Pi,j(t)=J3,0(t)B0+J3,1(t)B1+J3,2(t)B2+J3,4(t)B4,
By processing qi similarly, the Bezier curves are fitted to the three-dimensional form model TM1 as if the form model TM as an object is covered with a net.
If C1 continuity is needed at connection parts of adjacent Bezier curves Pi,j and Pi,j+1, a constraint condition
Bi,j3−Bi,j2=Bi,j+1−Bi,j+10,
is added to the above-mentioned relations. Because
Bi,j3=Bi,j+13,
the constraint condition is rewritten as follows:
Bi,j+11=2Bi,j−Bi,j2. (12)
By operating the above-mentioned relations on all the (2m−1)*n Bezier segments BSG, as shown in
Thus, the three-dimensional form model TM1 is expressed by the Bezier curve group BCG2, and data showing the second Bezier curve group BCG2 is used as its three-dimension-al form data TD2. The three-dimensional form data TD2 comprise data for specifying whether it is a longitude or a meridian, data for specifying a segment of a Bezier curve, coordinates of end points of each segment and data on continuity, and coordinate data on control points. The amount of data of the three-dimensional form data TD2 is usually much smaller than that of the three-dimensional form data TD1 though it depends on the number and the order of the longitudes BCP and the meridians BCM.
However, the three-dimensional form data obtained by the fitting often do not extract characteristics of the three-dimensional form model TM1. Then, the Bezier curve group BCG2 are modified to extract characteristics sufficiently. By modifying the Bezier curve group BCG2, a pattern of the three-dimensional form model TM1 can be expressed with Bezier curves of a number as small as possible. The modification includes movement of control points, movement in the unit of line, addition of a line and deletion of a line (refer to the flow shown in FIG. 3). The modification is performed after one of the modes is specified.
The modification is explained below in detail. First, the movement of control points (step S2 in
In the flow shown in
Bi,j0,
three control points
Bi,j0, Bi,j1, and Bi,j−12
are moved in parallel.
Next, auxiliary points AUC after the movement existing in a part which is changed by the movement of the control points are recalculated by following Eq. (13) (step S22):
Pij1(tk)=J3,0(tk)Bi,j0+J3,1(tk)Bi,j1+J3,2(tk)Bi,j2+J3,3(tk)Bi,j3, (13)
wherein
Then, as shown in
Because the auxiliary points are projected vertically, the positions of the control points are kept the same when viewed by the user. Therefore, the position after the movement can be specified directly on the screen 2. However, they may be projected in the direction of the axis AX1 as in the fitting explained above. In this case, the positions of the control points are changed after the projection according to the uneven surface of the three-dimensional form model, so that the positions after the movement may be shifted from the specified positions, and the user may need to modify the positions after the movement again.
Next, Bezier curves passing through the auxiliary points AUD projected to the three-dimensional model TM1 are recalculated by using Eqs. (4)-(11) (step S24).
When other control points are moved, similar processing are performed.
By moving control points as described above, the Bezier curves are moved on the three-dimensional form model TM1 eventually. Then, by repeating the movement of control points, Bezier curve group BCG2 can be modified without increasing an amount of data, while extracting characteristics of the three-dimensional form model TM1 sufficiently.
Next, movement in the unit of line (step S3 in
First, the user drags a point at a longitude BCP1 or a meridian BCM with the pointing device. Then, a point Ra specified by the pointing device after dragging is projected to the three-dimensional form model TM1 to determine a point R on the model TM1 (step S31).
Next, if a j-th Bezier segment BSG of an i-th meridian BCM is specified at step S31 for moving the i-th meridian, tp is determined so that the specified Bezier curve passes through the above-mentioned point R by using Eq. (14).
Qi,j0 1=J3,0(tp)Bj,i0+J3,1(tp)Bj,i1+J3,2(tp)Bj,i2+J3,3(tp)Bj,i+1,
Qi,j+10 1=J3,0(tp)Bj+1,i+J3,1(tp)Bj+1,iJ3,2(tp)Bj+1,iJ3,3(tp)Bj+1,i+10,
Qi,j1 1=(1−tp)(Qi,j1−Qi,j0)+tp(Qi+1,j1−Qi+1,j0)+Qi,j0 1,
and
Qi,j2 1=(1−tp)(Qi,j2−Qi,j+10)+tp(Qi+1,j2−Qi+1,j+10)+Qi,j+10 1. (14)
By using the tp, auxiliary points qi,j, Pi,j of all the Bezier segments BSG of the i-th meridian BCM are calculated for j=0, 1, . . . , M, as follows (step S33):
qij1(tk)=J3,0(tk)Qi,j0 1+J3,1(tk)Qi,j1 1+J3,2(tk)Qi,j2 1+J3,3(tk)Qi,j+10 1, (15)
wherein
If a longitude BCP is specified for the movement, auxiliary points q and p are calculated for j=0, 1, . . . , M as follows:
pj,i−11(tk)=J3,0(U)Bj,i−10+J3,1(U)Bj,i−11+J3,2(U)Bj,i−12+J3,3(U)Bj,i−10,
Then, the auxiliary points are projected to the three-dimensional form model TM1 (step S34), and Bezier curves are recalculated (step S35).
Next, the addition of a line (step S4 in
R=J3,0(tp)Qi,j0+J3,1(tp)Qi,j1+J3,2(tp)Qi,j2+J3,3(tp)Qi,j+0.
Then, control points are calculated by using tp as follows (step S43):
Bj,i0 1=J3,0(tp)Qi,j0+J3,1(tp)Qi,j1+J3,2(tp)Qi,j2+J3,3(tp)Qi,j+10,
Bj,i+10 1=J3,0(tp)Qi+1,j0+J3,1)tp)Qi+1,j1+J3,2(tp)Qi+1,j2+J3,3(tp)Qi+1,j+10,
Bj,i1 1=(1−tp)(Bj,i1−Bj,i0)+tp(Bj+1,i1−Bj+1,i0)+Bj,i0,
and
Bj,i+10=J3,0(tp)Qi+1,j0+J3,1(tp)Qi+1,j1+J3,2(tp)Qi+1,j2+J3,3(tp)Qi+1,j+10. (18)
Next, auxiliary points Pj,i(tk) are calculated by using the obtained control points (step S44):
Pj,i(tk)=J3,0(tk)Bj,i0 1+J3,1(tk)Bj,i1 1+J3,0(tk)Bj,i2 1+J3,0(tk)Bj,i+10 1 (19)
wherein
Next, the calculated auxiliary points are projected to the three-dimensional form model TM1 (step S45). Then, Bezier curves are calculated for the projected auxiliary points, similarly to at step S15 (step S46).
Next, auxiliary points q of lines intersecting the inserted line are calculated as shown below (step S47). For example, when a longitude BCP is inserted, auxiliary points of meridians BCM intersecting the longitude are calculated.
qi,j(L)=J3,0(L)Qi,j0+J3,1(L)Qi,j1+J3,2(L)Qi,j2+J3,3(L)Qi,j+10, (20)
Next, Bezier curves are calculated by using the calculated auxiliary points q, similarly at step S15 (step S48). Thus, the line is inserted.
Next, the deletion of a line (step S5 in
Then, auxiliary points p of lines intersecting the specified line are calculated (step S52). That is, the auxiliary points of Bezier segments BSG of pj,i and Pj,i−1 connecting to the Bezier curve to be deleted are calculated.
pi,j(L)=J3,0(L)Bi,j0+J3,1(L)Bi,j1+J3,2(L)Bi,j2+J3,3(L)Bi,j+10,
Then, an i-th meridian BCM is deleted (step S53), and the auxiliary points calculated at step S52 are projected to the three-dimensional model TM1 (step S54). Finally, Bezier curves are recalculates similarly at step S15 (step S55).
Thus, a modified Bezier curve group BCG3 is obtained as shown in FIG. 9C. Data on the modified Bezier curves BCG3 are output as three-dimensional form data TD3 of the three-dimensional form model TM1. A surface data determined as explained below may be added to the three-dimensional form data TD3.
Next, the processing is explained for determining a surface by using the modified Bezier curve group BCG3 (step S7 in FIG. 3). It is assumed here that a surface spans a portion defined by i-th and (i+1)-th meridians BCM and j-th and (j+1)-th longitudes BCP. If the surface is divided to K*P polygons, the vertices of the polygons are (K+1)*(P+1) points obtained by the following relation:
qi,j(tk, tp)=J3,0(tp)Qj,i0 1+J3,1(tp)Qj,i1 1+J3,2(tp)Qj,i2 1+J3,3(tp)Qj,i+10 1, (23)
wherein
Qi,j0=J3,0(tk)Bj,i0+J3,1(tk)Bj,i1+J3,2(tk)Bj,i2+J3,3(tk)Bj,i+10,
Qi,j1 1=(1−tk)(Qi,j1−Qi,j0)+tk(Qi+1,j1−Qi+1,j0),
Qi,j2 1=(1−tk)(Qi,j2−Qi,j+10)+tk(Qi+1,j2Qi+1,i+1,i+1),
and
Qi,j+10 1=J3,0(tk)Bj+1,i0+J3,1(tk)Bj+1,i1+J3,2(tk)Bj+1,i2+J3,3)(tk)Bj+1,i+10. (24)
The surface consists of K*P quadrilateral polygons of qi,j(k,p), qi,j(k+1,p), qi,j(k+1,p+1) and qi,j (k,p+1) where k=0, 1, . . . , K and p=0, 1, . . . , P. A polygon model can be obtained by performing the above operation on all i's and j's.
Next, another example is explained with reference to
In
Then, as shown in
As explained above, in the three-dimensional form data processor 1, a user moves, adds or deletes spline curves by operating the input device 40 while spline curves are restrained to contact the surface of the three-dimensional form model TM1, TM2. Thus, the user produces the three-dimensional form data TD3 which he or she intends to generate, while keeping characteristic lines of the three-dimensional form model TM1, TM2. Because data on points on characteristic lines are available, they may be easily modified at later steps. The number of points in the three-dimensional form data TD3 is much smaller than that in the original three-dimensional form data TD1, and an amount of the data of the former is much smaller than that of the latter. Therefore, the processing can be operated fast when a three-dimensional form model is displayed based on the three-dimensional form data TD3 or it is moved or rotated. Further, the operation is fast because no curved surfaces are used in the modification of the spline curve group.
In the above-mentioned embodiment, the cylindrical closed surface CCS1 is formed with the Bezier curves BCG1. However, the closed surface may have a different shape such as a cone or a truncated cone. Further, it may be spherical. In this case, projection is performed not to the axis AXE, but to the center of the sphere.
Although the present invention has been fully described in connection with the preferred embodiments thereof with reference to the accompanying drawings, it is to be noted that various changes and modifications on the structure or a part thereof, the processings, the order or the processings or operation thereof are apparent to those skilled in the art. Such changes and modifications are to be understood as included within the scope of the present invention as defined by the appended claims unless they depart therefrom.
Number | Date | Country | Kind |
---|---|---|---|
7-295110 | Nov 1995 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
4643578 | Stern | Feb 1987 | A |
4731853 | Hata et al. | Mar 1988 | A |
4993835 | Inoue et al. | Feb 1991 | A |
5398293 | Sato et al. | Mar 1995 | A |
5615318 | Matsuura | Mar 1997 | A |
5627949 | Letcher, Jr. | May 1997 | A |
5742291 | Palm | Apr 1998 | A |
5754680 | Sato et al. | May 1998 | A |