School of Computer Science Carnegie Mellon UniversityPittsburgh, Pennsylvania 15213-3890 Abstract We present a sequential factorization method for recovering the three-dimensional shape of an objectand the motion of the camera from a sequence of images, using tracked features. The factorization method originally proposed by Tomasi and Kanade produces robust and accurate results incorporatingthe singular value decomposition. However, it is still difficult to apply the method to real-time applications since it is based on a batch-type operation and the cost of the singular value decomposition islarge. We develop the factorization method into a sequential method by regarding the feature positions as a vector time series. The new method produces estimates of shape and motion at each frame. The sin-gular value decomposition is replaced with an updating computation of only three dominant eigenvectors, which can be performed in time, while the complete singular value decomposition requires operations for a matrix. Also, the method is able to handle infinite sequences since it does not store any increasingly large matrices. Experiments using synthetic and real images illustratethat the method has nearly the same accuracy and robustness as the original method. O P2( ) O FP2( ) F P* A Sequential Factorization Method for Recovering Shape and Motion from Image Streams Toshihiko Morita and Takeo Kanade 8 June 1994CMU-CS-94-158 This research is sponsored by the Department of the Army, Army Research Office under Grant No. DAAH04-94-G-0006. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Department of the Army or the U.S. Government. . ACM Computing Reviews Keywords: 1.2.10 Vision and Scene Understanding, 1.2.9 Robotics,1.4.6 Segmentation, 1.4.8 Scene Analysis, 1.4.1 Digitization 3 1. Introduction Recovering both the 3D shape of an object and the motion of the camera simultaneouslyfrom a stream of images is an important task and has wide applicability in many tasks such as navigation and robot manipulation. Tomasi and Kanade[1] first developed a factorizationmethod to recover shape and motion under an orthographic projection model, and obtained robust and accurate results. Poelman and Kanade[2] have extended the factorization methodto scaled-orthographic projection and paraperspective projection. This method closely approximates perspective projection in most practical situations so that it can deal withimage sequences which contain perspective distortions. Although the factorization method is a useful technique, its applicability is so far limited tooff-line computations for the following reasons. First, the method is based on a batch-type computation; that is, it recovers shape and motion after all the input images are given. Sec-ond, the singular value decomposition, which is the most important procedure in the method, requires operations for features in frames. Finally, it needs to store alarge measurement matrix whose size increases with the number of frames. These drawbacks make it difficult to apply the factorization method to real-time applications. This report presents a sequential factorization method that considers the input to the systemas a vector time series of feature positions. The method produces estimates of shape and motion at each input frame. A covariance-like matrix is stored instead of feature positions,and its size remains constant as the number of frames increases. The singular value decomposition is replaced with a computation, updating only three dominant eigenvectors, whichcan be performed in time. Consequently, the method becomes recursive. We first briefly review the factorization method by Tomasi and Kanade. We then present oursequential factorization method in Section 3. The algorithm's performance is tested using synthetic data and real images in Section 4. O FP2( ) P F O P2( ) 4 2. Theory of the Factorization Method: Review 2.1 Formalization The input to the factorization method is a measurement matrix , representing image positions of tracked features over multiple frames. Assuming that there are features over frames, and letting be the image position of feature at frame , is a matrix such that . (1) Each column of contains all the observations for a single point, while each row containsall the observed x-coordinates or y-coordinates for a single frame. Suppose that the camera orientation at frame is represented by orthonormal vectors , , and , where corresponds to the x-axis of the image plane and to the y-axis. The vectors and are collected over frames into a motion matrix such that . (2) Let be the location of feature in a fixed world coordinate system, whose origin is set atthe center-of-mass of all the feature points. These vectors are then collected into a shape matrix such that . (3) Note that W P F xfp yfp,( ) p f W 2F P* W x11 ... x1P : : xF1 ... xFP y11 ... y1P : : yF1 ... yFP = W f if jf kf if jf if jf F M R2F 3*I^ M i1T : iFT j1T : jFT = sp p S R3 P*I^ S s1 ... sP= 5 . (4) With this notation, the following equation holds by assuming an orthographic projection. (5) Tomasi and Kanade[1] pointed out the simple fact that the rank of is at most 3 since it isthe product of the motion matrix and the shape matrix . Based on this rank theory, they developed a factorization method that robustly recovers the matricesand from . 2.2 Subspace Computation The actual procedure of the factorization method consists of two steps. First, the measure-ment matrix is factorized into two matrices of rank 3 using the singular value decomposition. Assume, without loss of generality, that . By computing the singular value decomposition of , we can obtain orthogonal matrices and such that , (6) where = diag( ) and . In reality, the rank of W is not exactly 3,but approximately 3. is made from the first three columns of the left singular matrix of . Likewise, consists of the first three singular values and is made from the first threerows of the right singular matrix. By setting and (7) we can factorize into , (8) where the product is the best possible rank three approximation to . It is well known that the left singular vectors span the column space of while the rightsingular vectors span its row space. The span of , namely motion space, determines the motion, and the span of , namely shape space, determines the shape. The rank theoryclaims that the dimension of each subspace is at most three, and the first step of the factorization method finds those subspaces in the high dimensional input spaces. Both spaces aresaid to be dual in the sense that one of them can be computed from the other. This observation helps us to further develop the sequential factorization method. sp p 1= Pa* 0= W MS= W2F 3* M 3 P* S MS W 2F P>= W R2F P*I^ U R2F 3*I^ V RP 3*I^ W U\Sigma VT= \Sigma s1 s2 s3, , s1 s2 s3 0>>= >=U W \Sigma V M^ U= S^ \Sigma VT= W W M^ S^= M^ S^ W U WV U V 6 2.3 Metric Transformation The decomposition of equation (8) is not completely unique: it is unique only up to an affinetransformation. The second step of the method is necessary to find a non-singular matrix , which transforms and into the true solutions and as follows. (9) (10) Observing that rows and of must satisfy the normalization constraints, and , (11) we obtain the system of overdetermined equations such that (12) where is a symmetric matrix (13) and, and are the rows of . By denoting , , and , (14) the system (12) can be rewritten as , (15) where , , and are defined by 3 3*A M^ S^ M S M M^ A= S A 1- S^= if jf M ifTif jfTjf 1= = ifTjf 0= 3F i^fTLi^f 1= j^fTLj^f 1= i^fTLj^f 0= L R3 3*I^ L ATA= i^f j^f M^ ifT if1 if2 if3, ,[ ]= jfT jf1 jf2 jf3, ,[ ]= L l1 l2 l3 l2 l4 l5 l3 l5 l6 = Gl c= G R3F 6*I^ l R6I^ c R3FI^ 7 , , , (16) and . (17) The simplest solution of the system is given by the pseudo-inverse method such that . (18) The vector determines the symmetric matrix , whose eigendecomposition gives . As aresult, the motion and the shape are derived according to equations (9) and (10). The matrix is an affine transform which transforms into in the motion space, whilethe matrix transforms into in the shape space. Obtaining this transform is the main purpose of the second step of the factorization method, which we call metric transformation. G gT i1 i1,( ) : gT iF iF,( ) gT j1 j1,( ) : gT jF jF,( ) gT i1 j1,( ) : gT iF jF,( ) = l l1 : l6 = c 1 : : : : 1 0 : 0 thi" i"y' i"i" u" 2F thy' u" F = gT af bf,( ) af1bf1 2af1bf2 2af1bf3 af2bf2 2af2bf3 af3bf3= l GTG( ) 1- GTc= l L AM S A M^ MA 1- S^ S 8 3. A Sequential Factorization Method 3.1 Overview In the original factorization method, there was one measurement matrix containingtracked feature positions throughout the image sequence. After all the input images are given and the feature positions are collected into the matrix , the motion and shape arethen computed. In real-time applications, however, it is not feasible to use this batch-type scheme. It is more desirable to obtain an estimate at each moment sequentially. The input tothe system must be viewed as a vector time series. At frame , two vectors containing feature positions such that and (19) are given. Immediately after receiving these vectors, the system must compute the estimatesof the camera coordinates , and the shape at that frame. At the next frame, new samples and arrive and new camera coordinates and are to be computed aswell as an updated shape estimate . The key to developing such a sequential method is to observe that the shape does not changeover time. The shape space is stationary, and thus, it should be possible to derive from without performing expensive computations. More specifically, we store the feature vectors and in a covariance-type matrix defined recursively by . (20) As shown later, the rank of is at most three and its three dominant eigenvectors spanthe shape space. Once is obtained, the camera coordinates at frame can be computed simply by multiplying the feature vectors and the eigenvectors as follows. , (21) This framework makes it possible to estimate camera coordinates immediately after receiv-ing feature vectors at each frame. All information obtained up to the frame is accumulated in and used to produce the estimates at that frame. In equation (20), the size of is fixed to , which only depends on the number of fea-ture points. Therefore, the algorithm does not need to store any matrices whose sizes increase over time. The computational effort in the original factorization method is dominated by the cost of thesingular value decomposition. In the framework above, we need to compute eigenvectors of . Note that, however, we only need the first three dominant eigenvectors. Fortunately, sev-eral methods exist to compute only the dominant eigenvectors with much less computation W W f xfT xf1 xf2 ... xfP, , ,[ ]= yfT yf1 yf2 ... yfP, , ,[ ]= if jf Sfx f 1+ yf 1+ if 1+ jf 1+S f 1+ SfS f 1- xf yfZ f RP P*I^ Zf Zf 1- xfxfT yfyfT+ += Zf QfQ f f i^fT xfTQf= j^fT yfTQf= Qf Zf P P* Zf 9 necessary to compute all the eigenvectors. Before describing the details of our algorithm, webriefly review these techniques in the following section. 3.2 Iterative Eigenvector Computation Among the existing methods which can compute dominant eigenvectors of a square matrix,we introduce two methods, the power method and orthogonal iteration[3]. The power method is the simplest, which computes the most dominant eigenvector, i.e., an eigenvectorassociated with the largest eigenvalue. It provides the starting point for most other techniques, and is easy to understand. The method of orthogonal iteration, which we adopt inour method, is able to compute several dominant eigenvectors. 3.2.1 Power Method Assume that we want to compute the most dominant eigenvectors of an matrix . Given a unit 2-norm , the power method iteratively computes a sequence of vectors : for end The second step of the iteration is simply a normalization that prevents from becomingvery large or very small. The vectors generated by the iteration converge to the most dominant eigenvector of . To examine the convergence property of the power method,suppose that is diagonalizable. That is, with an orthogonal matrix , and . If (22) and , then it follows that (23) where is a constant. Since , equation (23) shows that the vectors point more and more accurately toward the direction of the dominant eigenvector , and the convergence factor is the ratio . n n* B q 0( ) RnI^ q k( ) k 1 2 ..., ,= y k( ) Bq k 1-( )= q k( ) y k( ) y k( ) 2/= q k( )q k( ) BB X 1- BX diag l 1 ... ln, ,( )=X x 1 ... xn, ,[ ]= l1 l2 ... ln>= >=> q 0( ) b1x1 b2x2 ... bnxn+ + += b1 0z' q k( ) cBkq 0( ) c bjljkxj j 1= na* e` o/ae o" cb1l1 k x1 bjb 1 lj l1e` o/ae o" kx jj 2= na*+ e` o/ae o"= = = c l1 l2 ... ln>= >=>q k( ) x 1r l 2 l1/= 10 3.2.2 Orthogonal Iteration A straightforward generalization of the power method can be used to compute several dom-inant eigenvectors of a symmetric matrix. Assume that we want to compute dominant eigenvectors of a symmetric matrix , where . Starting with anmatrix with orthonormal columns, the method of orthogonal iteration generates a sequence of matrices : for (QR factorization) end The second step of the above iteration is the QR factorization of , where is an orthog-onal matrix and is an upper triangular matrix. The QR factorization can be achieved by the Gram-Schmidt process. This step is viewed as a normalization process that is similar tothe normalization used in the power method. Suppose that is the eigendecomposition of with an orthogonal matrix , and . It has been shown in [3] that the subspace generated by the iteration converges to at a rate proportional to , i.e., , (24) where and is a constant. The function dist represents the subspace dis-tance defined by (25) The method offers an attractive alternative to the singular value decomposition in situationswhere is a large matrix and a few of its largest eigenvalues are needed. In our case, these conditions clearly hold. In addition, the rank theory of the factorization method[1] guaran-tees that the ratio is very small, and as a result, we should achieve fast convergence for computing the first three eigenvectors. 3.3 Sequential Factorization Algorithm As in the original method, the sequential factorization method consists of two steps, sequen-tial shape space computation and sequential metric transformation. pB Rn n*I^ 1 p n<= <= n p* Q0 Q k Rn p*I^ k 1 2 ..., ,= Yk BQk 1-= QkRk Yk= Yk QkR k XTBX diag l1 ... ln, ,( )= B X x1 ... xn, ,[ ]= l1 l2 ... ln>= >=> range Qk( ) span x1 ... xp, ,{ } lp 1+ lp/ dist range Qk( ) range Xp( ),( ) c lp 1+l p k<= Xp x1 ... xp, ,[ ]= c dist range Qk( ) range Xp( ),( ) QkQkT XpXpT- 2= B l4 l3/ 11 3.3.1 A Sequential Shape Space Computation In the sequential factorization method, we consider the feature vectors, and , as a vec-tor time series. Let us denote the measurement matrix in the original factorization method at frame by . Then, it grows in the following manner: (26) Now let us define a matrix time series by . (27) From the definition, it follows that . (28) Since the rank of is at most three, the rank of is also at most three. If (29) is the singular value decomposition of , where and are orthogonalmatrices, and , then . (30) This means the eigenvectors of are equivalent to the right singular vectors of .Hence, it is possible to obtain the shape space by computing the eigenvectors of . To compute , we combine orthogonal iteration with updating by equation (27). Given a matrix with orthonormal columns and a null matrix , the following algorithm generates a sequence of matrices : [Algorithm (1)] for f = 1, 2, .... (1) (2) (3) (QR factorization) xfT yfT f Wf W1 x1 T y1T ,= W2 x1T x2T y1T y2T ,= ..., Wf x1T : xfT y1T : yfT ,= ... Zf RP P*I^ Zf Zf 1- xfxfT yfyfT+ += Zf WfTWf= Wf Zf Wf Uf\Sigma fVfT= Wf Uf R2f 3*I^ Vf RP 3*I^\Sigma f diag sf 1, sf 2, sf 3,, ,( )= Zf Uf\Sigma fVfT( ) TUf\Sigma fVfT Vf\Sigma f2VfT= = Zf Vf WfZ f VfP 3* Q 0 Z0 RP P*I^Q f RP 3*I^ Zf Zf 1- xfxfT yfyfT+ += Y ZfQf 1-= QfR Y= 12 end The index corresponds to the frame number and each iteration is performed frame byframe. The matrix generated by the algorithm is expected to converge to the eigenvectors of . While the original orthogonal iteration works with a fixed matrix, the above algo-rithm works with the matrix , which varies from iteration to iteration incorporating new features. In other words, the sequential factorization method folds the update of into theorthogonal iteration. If the randomly changes over time, no convergence is expected to appear. However, it can be shown that , for all . (31) Therefore, is stationary and converges to as in theorthogonal iteration. Even when noise exists, if the noise is uncorrelated or the noise space is orthogonal to the signal space , then is still equal toand the convergence can be shown. The following convergence rate of the algorithm is deduced from the convergence rate of the orthogonal iteration. (32) 3.3.2 Stationary Basis for the Shape Space Algorithm (1) presented in the previous section produces the matrix , which converges tothe matrix that spans the shape space. The true shape and motion are determined from the shape space by a metric transformation. It is not straightforward at this point, however,to apply the metric transformation sequentially. The problem is that, even though is stationary, the matrix itself changes as the number of frames increases.This is due to the nature of singular vectors. They are the basis for the row and column subspaces of a matrix, and the singular value decomposition chooses them in a special way.They are more than just orthonormal. As a result, they rotate in the 3D subspace . Recall that the matrix obtained in metric transformation (9) is a transformfrom (or ) to in the subspace . Since changes at each frame, also changes. Consequently, the matrix also changes frame by frame. For clarity, let us denote an matrix at frame as . The fact that changes at eachframe makes it difficult to estimate iteratively and efficiently. Thus we need to add an additional process to obtain stationary basis for the shape space to update matrix . Let us define a projection matrix onto the by , (33) where is the output from Algorithm (1). Needless to say, the rank of is at most three. Since (= ) is stationary, the projection matrix must be stationary. f Q fV f Zf Z f Z frange V f( ) range Vf( ) range WfT( ) range ST( )= = f range Vf( ) range Qf( ) range Vf( ) range Vf( ) range Vf( ) range ST( ) dist range Qf( ) range Vf( ),( ) c sk 4,s k 3,k 1= fO~<= QfV f range Vf( ) Vf range Vf( ) AM^ f Uf Mf range M^ f( ) Vf UfA A f Af AfA f A f Hf RP P*I^ range Qf( ) Hf QfQfT= Qf Hf range Qf( ) range M^ f( ) Hf 13 It is thus possible to obtain the stationary basis for the shape space by replacing with the eigenvectors of . An iterative method similar to Algorithm (1) can be used to reduce the amount of computa-tion. Given a matrix with orthonormal columns, the iterative method below generates a matrix , which provides the stationary basis for the shape space. [Algorithm (2)] for f = 1, 2, .... (QR factorization) end 3.3.3 Sequential Metric Transformation In the previous section, we derived the shape space in terms of . Once is obtained, it ispossible to compute camera coordinates and as , (34) These coordinates are used to solve the overdetermined equations (12) and the true cameracoordinates are recovered in the same way as in the original method. Doing so, however, requires storing all the coordinates and , the number of which may be very large.Instead, we use the following sequential algorithm. [Algorithm (3)] for f = 1, 2, .... , end Let and be the matrices and at frame , where and are defined in Section 2.3From the definition, it follows that (35) . (36) Assigning equations (35) and (36) to equation (18), we have Qf Hf P 3* Q0Q f RP 3*I^ Hf QfQfT= Y HfQf 1-= QfR Y= Qf Qfi^ f j^f i^fT xfTQf= j^fT yfTQf= i^f j^f i^fT xfTQf= j^fT yfTQf= Df Df 1- g i^f i^f,( ) gT i^f i^f,( ) g j^f j^f,( ) gT j^f j^f,( ) g i^f j^f,( ) gT i^f j^f,( )+ + += Ef Ef 1- g i^f i^f,( ) g j^f j^f,( )+ += Gf cf G c f G c Df GfTGf= Ef GfTcf= 14 (37) which gives the symmetric matrix . The eigendecomposition of yields the affine trans-form and, as a result, the camera coordinates and the shape are obtained as follows: (38) (39) Algorithm (3) followed by equations (37), (38), and (39) completes the sequential method.The size of matrices and are fixed to and , and the method does not store any matrices that grow, even in the sequential metric transformation. lf Df 1- Ef= Lf LfA f ifT i^fTAf= jfT j^fTAf= Sf Af 1- Qf= Df Ef 6 6* 6 1* 15 4. Experiments 4.1 Synthetic Data In this section we compare the accuracy of our sequential factorization method with that ofthe original factorization method. Since both methods are essentially based on the rank theory, we do not expect any difference in the results. Our purpose here is to confirm that thesequential method has the same accuracy of shape and motion recovery as the original method. 4.1.1 Data Generation The object in this experiment consists of 100 random feature points. The sequences are cre-ated using a perspective projection of those points. The image coordinates of each point are perturbed by adding Gaussian noise, which we assume to simulate tracking error and imagenoise. The standard deviation of the Gaussian noise is set to two pixels of a pixel image. The distance of the object center from the camera is fixed to ten times the object size.The focal length is chosen so that the projection of the object covers the whole image. The camera is rotated as shown in Figure 1, while the object is translated to keep itsimage at the image center. Quantization errors are not added since we assume that we are able to track features with a subpixel resolution. Figure 1 True camera motion The camera roll, pitch, and yaw are varied as shown in this figure. Thesequence consists of 150 frames. 512 512* 512 512* 0 20 40 60 80 100 120 140 Frame 0 10 20 30 40 50 60 Rotation (deg.) RollPitch Yaw 16 When discussing the accuracy of the sequential method, one needs to consider its dynamicproperty regarding the 3D recovery. The accuracy of the recovery at a particular frame by the sequential method depends on the total amount of motion up to that time, since therecovery is made only from the information obtained up to that time. At the beginning of an image sequence, for example, the motion is generally small, so high accuracy can not beexpected. The accuracy generally improves as the motion becomes larger. The original method does not have this dynamic property, since it is based on a batch-type scheme anduses all the information throughout the sequence. In order to compare both methods under the same conditions, we perform the followingcomputations beforehand. First, we form a submatrix , which only contains the feature positions up to frame . The original factorization is applied to the submatrix, then theresults are kept as solutions at frame . They are the best estimates given by the original method. Repeating this process for each frame, we derive the best estimates, with which ourresults are compared. 4.1.2 Accuracy of the Sequential Shape Space Computation We first discuss the convergence property of the sequential shape space computation. Thesequential factorization method starts with Algorithm (1) in Section 3.3.1, iteratively generating the matrix which is an estimate for the true shape space . Let us represent theestimation error with respect to the true shape space by (40) Recall that the function dist provides a notion of difference between two spaces. On theother hand, the original method produces the best estimate for the shape space by computing the right singular vectors of the submatrix , and its error with respect to the trueshape space is also represented by (41) Comparing both errors, Figure 2 shows that they are almost identical. That is, the errorsgiven by the sequential method are almost equal to those given by the original method. At the beginning of the sequence, the amount of motion is small and both errors are rela-tively large. The ratio of the 4th to 3rd singular values, shown in Figure 3, also indicates that it is difficult to achieve good accuracy at the beginning. Both errors, however, quicklybecome smaller as the camera motion becomes larger. After about the 20th frame, constant errors of are observed in this experiment. The solutions given by the two methods are so close that the graphs are completely over-lapped. Thus, we also plot their difference defined by (42) in Figure 4. Although is relatively large at the beginning, it quickly becomes Wff f Qf ST Es dist span Qf( ) span ST( ),( )= Vf Wf Eo dist span Vf( ) span ST( ),( )= 3 10 2-* \Delta E dist span Qf( ) span Vf( ),( )= \Delta E 17 Figure 2 Shape space errors Shape space estimation errors by the sequential method (solid line) and theoriginal method (dashed line) with respect to the true shape space. The errors are defined by subspace distance and plotted logarithmically. Figure 3 Singular value ratio The ratio of the 4th to 3rd singular values, that is . 0 20 40 60 80 100 120 140 Frame 10-2 10-1 100 Subspace distance Sequential factorizationOriginal factorization (Es)(Eo) 0 20 40 60 80 100 120 140 Frame 10-2 10-1 Ratio s4 s3/ 18 Figure 4 Difference of shape space errors The difference of the estimates by the sequential and original methods,versus the frame number. The difference is plotted logarithmically. very small. In fact, after about the 30th frame, is less than , while andare both . 4.1.3 Accuracy of the Motion and Shape Recovery The three plots of Figure 5 show errors in roll, pitch, and yaw in the recovered motion: thesolid lines correspond to the sequential method, the dotted lines to the original method. The difference in motion errors between the original and sequential methods is quite small. Both results are unstable for a short period at the beginning of the sequence. After that, theyshow two kinds of errors: random and structural. Random errors are due to Gaussian noise added to the feature positions. Structural errors are due to perspective distortion, and relateto the motion patterns. The structural errors show a negative peak at about the 60th frame and are almost constant between the 90th and 120th frames. Note the pattern corresponds tothe motion pattern shown in Figure 1. Of course, these intrinsic errors cannot be eliminated in the sequential method. The point toobserve is that the differences between the two solutions are sufficiently smaller than the intrinsic errors. Shape errors which are compared in Figure 6 also indicate the same results. Again, the dif-ferences between the two methods are quite small compared to the intrinsic errors which the original method possesses. Note that no Gaussian noise appears in the shape errors since 0 20 40 60 80 100 120 140 Frame 10-9 10-8 10-7 10-6 10-5 10-4 10-3 10-2 10-1 Difference \Delta E \Delta E 1 10 7-* Es Eo3 10 2-* 19 they are averaged over all the feature points. We conclude from these results that the sequential method is nearly as accurate as the origi-nal method except that some extra frames are required to converge. 20 Figure 5 Motion errors Errors of recovered camera roll (top), pitch (middle), and yaw (bottom). Theerrors given by the sequential method are plotted with solid lines, while the errors given by the original method are plotted with dotted lines. 0 20 40 60 80 100 120 140 Frame -0.8 -0.4 0.0 0.4 0.8 Yaw error (deg.) SequentialOriginal 0 20 40 60 80 100 120 140 Frame -0.8 -0.4 0.0 0.4 0.8 Pitch error (deg.) SequentialOriginal 0 20 40 60 80 100 120 140 Frame -0.8 -0.4 0.0 0.4 0.8 Roll error (deg.) SequentialOriginal 21 Figure 6 Shape error This figure compares the shape errors given by the two method. The errors givenby the sequential method are plotted with solid lines, while the errors given by the original method are plotted with dotted lines. The errors are computed as the root-mean-square errors of the recovered shape with respect to the true shape, at each frame. 0 20 40 60 80 100 120 140 Frame 10-2 10-1 Shape error SequentialOriginal 22 4.2 Real Images Experiments were performed on two sets of real images. The first set is an image sequenceof a satellite rotating in space. Another experiment uses a long video recording (764 images) of a house taken with a hand-held camera. These experiments demonstrate the applicabilityof the sequential factorization method in real situations. In both experiments, features are selected and tracked using the method presented by Tomasi and Kanade[1]. 4.2.1 Satellite Images Figure 7 shows an image of the satellite with selected features indicated by small squares.The image sequence was digitized from a video recording[4] actually taken by a space shuttle astronaut. The feature tracker automatically selected and tracked 32 features throughoutthe sequence of 101 images. Of these, five features on the astronaut maneuvering around the satellite were manually eliminated because they had a different motion. Thus, the remaining27 features were processed. Figure 8 shows the recovered motion in terms of roll, pitch, and yaw. The side view of the recovered shape is displayed in Figure 9, where the features on thesolar panel are marked with opaque squares and others with filled squares. No ground-truth is available for the shape or the motion in this experiment. Yet, it appears that the solutionsare satisfactory, since the features on the solar panel almost lie in a single line in the side view. 4.2.2 House Images Figure 10 shows the first image of the sequence used in the second experiment. Using ahand-held camera, one of the authors took this sequence while walking. It consists of 764 images which correspond to about 25 seconds. The feature tracker detected and tracked 62features. The recovered motion and shape are shown in Figures 11 and 12. It is clearly seen that the shape is qualitatively correct. It is also reasonable to observe that only the camerayaw is increasing, because the camera is moving parallel to the ground. In addition, note that the computed roll motion reveals the pace of the recorder's steps, which is about 1 step persecond. Further evaluation of accuracy in these experiments is difficult. However, this qualitativeanalysis of the results with real images, and quantitative analysis of the results with synthetic data essentially shows that the sequential method works as well with real images asthe original batch method. 23 Figure 7 An image of a satellite The first frame of the satellite image sequence. The superimposed squaresindicate the selected features. 24 Figure 8 Recovered motion of satellite Recovered camera roll (solid line), pitch (dashed line), and yaw (dottedline) for the satellite image sequence. Figure 9 Side view of the recovered shape A side view of the recovered shape of the satellite. The features on thesolar panel are shown with opaque squares and others with filled squares. Notice that the features on the solar panel correctly lie in a single plane. 0 10 20 30 40 50 60 70 80 90 100 Frame 0 2 4 6 8 10 12 14 Rotation (deg.) RollPitch Yaw 25 Figure 10 An image of a house The first frame of the house image sequence. The superimposed squaresindicate the selected features. 26 Figure 11 Recovered motion of house Recovered camera roll (solid line), pitch (dashed line), and yaw (dottedline) for the house image sequence. Figure 12 Top view of the recovered shape A view of the recovered shape of the house from above. The features onthe two side walls are correctly recovered. 0 100 200 300 400 500 600 700 Frame 0 5 10 15 20 Rotation (deg.) RollPitch Yaw 27 4.3 Computational Time Finally, we compare the processing time of the sequential method with the original method.The computational complexity of the original method is dominated by the cost of the singular value decomposition, which needs computations for a mea-surement matrix with [5]. Note that corresponds to the number of frames and to the number of features. On the other hand, the complexity of the sequential method is for computing dominant eigenvectors, plus for updating the matrix. Computing the solution for frame F, therefore, takes only using the sequentialmethod, while the original method would require operations. Figure 13 shows the actual processing time of the sequential method on a Sun4/10 comparedtogether with that of the original method. The number of features varied from 10 to 500, while the number of frames was fixed at 120. The processing time for selecting and trackingfeatures was not included. The singular value decomposition of the original method is based on a routine found in [6]. The results sufficiently agree with our analysis above. In addition,when the number of features is less than 40, the sequential method is possible to run within 1/30 ms, which means video-rate processing on a Sun4/10. Figure 13 Processing time The processing time of the sequential method on a Sun4/10 (solid line)compared with that of the original method (dotted line), as a function of the number of features which is varied from 10 to 500. The number offrames is fixed at 120. 14FP2 11P3 3/+ 2F P*2F P>= F P 22P2 44P+ 4P2 ZO P2( ) O FP2( ) 101 102 Number of features 100 101 102 103 104 105 Time (ms) SequentialOriginal 28 5. Conclusions We have presented the sequential factorization method, which provides estimates of shapeand motion at each frame from a sequence of images. The method produces as accurate and robust results as the original method, while significantly reducing the computational com-plexity. The reduction in complexity is important for applying the factorization method to real-time applications. Furthermore, the method does not require storing any growing matri-ces so that its implementation in VLSI or DSP is feasible. Faster convergence in the shape space computation could be achieved using more sophisti-cated algorithms such as the orthogonal iteration with Ritz acceleration[3] instead of the basic orthogonal iteration. Also, it is possible to use scaled orthographic projection or parap-erspective projection[2] to improve the accuracy of the sequential factorization method. Acknowledgments The authors wish to thank Conrad J. Poelman and Richard Madison for their helpful com-ments. 29 References [1] Carlo Tomasi and Takeo Kanade, Shape and motion from image streams: a factor-ization method, Technical Report CMU-CS-91-172, Carnegie Mellon University, 1991. Later published as Carlo Tomasi and Takeo Kanade, "Shape and Motionfrom Image Streams Under Orthography: A Factorization Method", International Journal of Computer Vision, Vol. 9, No. 2, pp. 137-154, November 1992. [2] Conrad J. Poelman and Takeo Kanade, A paraperspective factorization method forshape and motion recovery, Technical Report CMU-CS-92-208, Carnegie Mellon University, 1992. Revised and superceded as Technical Report CMU-CS-93-219,Carnegie Mellon University, 1993. Part of the latter technical report is presented at and included in the Proceedings of the Third European Conference on ComputerVision, Vol I, pp. 97-110, Stockholm, Sweden, May 1994. [3] Gene H. Golub and Charles F. Van Loan, Matrix computations, second edition,The Johns Hopkins University Press, 1989. [4] Satellite rescue in space: highlights of shuttle flights 41C & 51A, #V41, The Holi-day Video Library, Finley-Holiday Film Corporation. [5] Pierre Comon and Gene H. Golub, Tracking a few extreme singular values andvectors in signal processing, Proceedings of the IEEE, Vol. 78, no. 8, pp. 1327- 1343, 1990. [6] William H. Press, Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling,Numerical recipes in C: the art of scientific computing, Cambridge University Press, 1988.