100 SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 LINE BASED CAMERA CALIBRATION IN MACHINE VISION DYNAMIC APPLICATIONS Antonio Maria Garcia Tommaselli 1 and Clésio Luis Tozzi2 1 Departamento de Cartografia Universidade Estadual Paulista - Pres. Prudente e_mail:tomaseli@prudente.unesp.br 2 Depto de Eng. da Computação e Automação Industrial Universidade Estadual de Campinas e_mail: clesio@dca.fee.unicamp.br Abstract: The problem of dynamic camera calibration considering moving objects in close range environments using straight lines as references is addressed. A mathematical model for the correspondence of a straight line in the object and image spaces is discussed. This model is based on the equivalence between the vector normal to the interpretation plane in the image space and the vector normal to the rotated interpretation plane in the object space. In order to solve the dynamic camera calibration, Kalman Filtering is applied; an iterative process based on the recursive property of the Kalman Filter is defined, using the sequentially estimated camera orientation parameters to feedback the feature extraction process in the image. For the dynamic case, e.g. an image sequence of a moving object, a state prediction and a covariance matrix for the next instant is obtained using the available estimates and the system model. Filtered state estimates can be computed from these predicted estimates using the Kalman Filtering approach and based on the system model parameters with good quality, for each instant of an image sequence. The proposed approach was tested with simulated and real data. Experiments with real data were carried out in a controlled environment, considering a sequence of images of a moving cube in a linear trajectory over a flat surface. 1 INTRODUCTION Camera Calibration is a standard problem both in Photogrammetric and Machine Vision applications in which geometric informations are to be extracted from a scene. In these systems the basic problem is the determination of several camera parameters, including camera location and orientation related to the object reference system and intrinsic camera parameters. In most environments the camera intrinsic parameters can be considered stable in relation to time if the focus is fixed and consequently the camera calibration problem can be reduced to determination of the extrinsic camera parameters (position and orientation of the image reference system). This more constrained problem is often named as Location problem or Space Resection in Photogrammetry. This assumption can be considered realistic because modern digital cameras are stable and offer good geometry and low noise. The classical calibration or space resection methods solve the problem using control points, which coordinates are known both in image and in object reference systems. The non-linearity of the model and problems in point location in digital images are the main drawbacks of the classical approaches. The proposed solutions to overcome these problems include the use of linear models instead of points and has attracted the attention of researchers (Lenz and Tsai (1988), Fischler and Bolles (1981)) or the use of linear features: Tommaselli and Lugnani (1988), Mulawa and Mikhail (1988), Dhome et al (1989), Chen et al (1989), Salari and Jong (1990), Liu et al (1990), Wang and Tsai (1990), Lee et al (1990), Echigo (1990), Chen and Jiang (1991), Chen and Tsai (1991), Tommaselli and Tozzi (1996), Prescott and McLean (1997), Quan and Kanade (1997). Prescott and McLean (1997) presented some experiments using real data comparing their line based method for calibration of radial lens distortion with the point based linear method of Tsai (Lenz and Tsai, 1988) and reported similar results showing the accuracy potential of line based approaches. Linear features are easier to locate than points and can be determined with subpixel precision, but the automatic feature extraction and correspondence remain a drawback mainly in real time Machine Vision applications (Gruen, 1992). One approach to solve the correspondence problem of sets of straight lines has been proposed by Dal Poz and Tommaselli (1998), but the search for matches can still be time consuming. This problem of correspondence is the main difficulty in the dynamic calibration problem because the camera location and orientation must be determined for a sequence of movements either of the camera or of the object being observed. DeGeeter et al (1997) proposed a Kalman based approach to partially automate teleoperated tasks in a nuclear environment using IR and ultrasonic sensors integrating new measurements with iterations reducing linearization errors and improving convergence. For the cases wherein the object model is known and an estimated camera position and orientation is available (for example: either a conveyor belt with linear movement and constant velocity or a manipulator with known kinematics SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 101 model) Tommaselli and Tozzi(1996) proposed a recursive procedure to increase the throughput of the system in the feature extraction step. A mathematical model using straight lines was derived and a recursive filtering approach, based on Kalman Filtering, was developed and used to feedback the feature extraction step. The position of the selected feature (a straight line in the object model) is predicted and the feature extraction process is restricted to a small window enclosing only the feature, instead of the whole image. The better the camera location estimate is the smaller is the window to be processed and thus computational effort needed for feature extraction is significantly reduced. Fig. 1 Interpretation plane and normal vectors. For dynamic systems if the estimates for the motion parameters were available, it would be feasible the extension of the recursive procedure to the next instant (next image). Using the system model, the estimated motion parameters and the filtered state (camera or object position and orientation) the feature position is predicted for the next instant and the new window position and size are computed. As a consequence of the filtering approach the prediction accuracy of the straight feature position is improved as time goes by and consequently the window is reduced allowing the elimination of the mentioned bottleneck for the dynamic space resection. Objectives: The main objective of this work is to present an approach to solve the dynamic camera calibration problem using straight lines as references. The mathematical model proposed by Tommaselli and Tozzi (1996) for the correspondence of a straight line in the object and image spaces is adopted. Kalman Filtering is used to estimate the camera parameters sequentially. 2 MATHEMATICAL MODEL The mathematical model proposed by Tommaselli and Tozzi (1996) is based on the equivalence between the vector normal to the interpretation plane in the image space and the vector normal to the rotated interpretation plane in the object space. The interpretation plane contains the straight line in the object space (L), the projected straight line in the image space (l), and the perspective centre of the camera (PC) (Fig. 1). The vector N, normal to the interpretation plane in the image space, is given by:           ρ θ θ - sinf. cosf. - = N (1) Where f is the camera focal length, θ and ρ are the parameters of the straight line in the image plane using its normal representation (cosθ.x + sinθ.y - ρ = 0). The vector n, normal to the interpretation plane in the object space, is defined by the vector product of the direction vector of the straight line (d) and the vector difference (PC-C) (See Fig. 1).                         )Y - Yl.( + )X - Xm.(- )Z - Zl.( + )X - Xn.( )Z - Zm.( + )Y - Yn.(- = n n n = n 1c1c 1c1c 1c1c z y x (2) Where: Xc, Yc, Zc are the coordinates of the Perspective Centre (PC) of the camera related to the object reference system; X1, Y1, Z1 are the 3D coordinates of a known point (C) of a straight line in the object model; l, m, n are the components of the direction vector d of the straight line; all defined in the object space reference system. Multiplying vector n by the rotation matrix R eliminates angular differences between the object and the image reference systems and results in a vector normal to the interpretation plane in object space that has the same orientation as vector N, normal to the interpretation plane in the image space, but different in magnitude. n R = N λ (3) where λ is a scale factor and R is the rotation matrix defined by the sequence Rz(κ).Ry(ϕ).Rz(ω) of rotations (4).             φωφωφ κφωκωκφωκωκφ κφωκωκφωκωκφ coscoscossinsin sinsincoscossinsinsinsincoscossincos cossincossinsincossinsinsincoscoscos - + - - - + (4) Equation (3) can be rewritten as:                         n.r + n.r + n.r n.r + n.r + n.r n.r + n.r + n.r - = - f. f. z33y32x31 z23y22x21 z13y12x11 λ ρ θ θ sin cos (5) with the rij's being the elements of the rotation matrix R. The element λ can be algebraically eliminated. Equation (5) is split into two sets of equations, according to the value of parameter θ (orientation of the straight line in the image) in order to avoid divisions by zero. 102 SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 for 45°°°° < θθθθ ≤≤≤≤ 135°°°° or 225°°°° < θθθθ ≤≤≤≤ 315°°°° n.r + n.r + n.r n.r + n.r + n.r = f. - n.r + n.r + n.r n.r + n.r + n.r = z23y22x21 z33y32x31 z23y22x21 z13y12x11 θ ρ θ sin cot (6) The elements of the parametric equation (y = a.x + b) are: a = - cot θθθθ and b = ρρρρ/sin θθθθ Eq.(6) can be rewritten as: n.r + n.r + n.r n.r + n.r + n.r f. - = b n.r + n.r + n.r n.r + n.r + n.r - = a z23y22x21 z33y32x31 z23y22x21 z13y12x11 (7) for 0°°°° < θθθθ ≤≤≤≤ 45°°°° or 135°°°° < θθθθ ≤≤≤≤ 225°°°° or 315°°°° < θθθθ ≤≤≤≤ 360°°°°: n.r + n.r + n.r n.r + n.r + n.r = f. - n.r + n.r + n.r n.r + n.r + n.r = z13y12x11 z33y32x31 z13y12x11 z23y22x21 θ ρ θ cos tan (8) In this case a new parameterisation for the straight line must be introduced: x = a* .y + b* (9) where: a* = -tan θ and b* = ρ/cos θ (10) Thus, eq. (8) can be rewritten as: n.r + n.r + n.r n.r + n.r + n.r f. - = b n.r + n.r + n.r n.r + n.r + n.r - = a z13y12x11 z33y32x31* z13y12x11 z23y22x21* (11) 3 ITERATED EXTENDED KALMAN FILTERING (IEKF) The IEKF (Iterated Extended Kalman Filtering) is a recursive method for state estimation, which enables an observation to be processed once it becomes available. A more detailed description of the IEKF can be obtained, for example, in Jazwinski (1970). Equation (12) represents a discrete dynamic stochastic system: w )t , x( + )t, t , x( = x 1 +k kkk1 +k k1 +k Γφ (12) Particularly, for a linear system: x )t ,t( F = )t ,t ,x( kk1 +k k1 +k kφ (13) where: xk is the n-vector state at an instant tk; φ is an n-vector state transition function; Γ is an (nxr) matrix; wk is an r-vector, called state transition noise (wk~ N(0,Qk)); F is an (nxr) matrix of state transition. Let zk be the observation vector: n + )t ,x(h = z kkkk with k = 1, 2, ... (14) where: • zk are the observations at tk;; • nk is the vector of measurement noise, nk ~ N(0,Rk). Equation (14) describes the measurement model. The IEKF (Iterated Extended Kalman Filtering) is based on an iterator, which is analysed for each iteration to verify the filter convergence. This iterator is given by: ))ˆ -x̂ (M -)t ,h( -z(K +x̂ = ˆ i1 -k |kk;kikk;1 -k |k1 + i ii ηηη ηη (15) where: • ))ˆ -x̂ (M -)t ,h( -z i1 -k |kk;kik i ηη η( are the predicted residuals; • K ik;η is the Kalman gain matrix at tk using estimates for the state vector given by η i . The Kalman gain is expressed by: )R + M P M(M P = K -1 kk; T 1 -k |kk; T k;1 -k |kk; iiii ηηηη (16) • with )R + M P M -1 kk; T 1 -k |kk; ii ηη( being the predicted covariance matrix, and; • M ik;η is the partial derivatives matrix of function h with respect to the elements of the state vector:         ∂ ∂ x )t,x(h = M m kk j xk; k (17) • Pk|k-1 is the predicted covariance matrix, which is obtained based on the updating of the covariance matrix computed at tk; • x̂ 1 -k |k is the predicted state at tk, based on measurements at tk computed using the linearized state transition function; • η i is the iterator, which is an estimate for x̂ k|k at tk . At the first iteration x̂ = 1 -k |k1η , which is the predicted state estimate at tk based on measurements taken at tk-1. The result of the first iteration, η 2 , is used in the second iteration and this process is carried out until there is no further improvement in η i . Thus, the final estimate for x̂ k|k is given by the last iterator η i . Since the state estimate has converged the filtered covariance matrix can be computed and is given by: K R K + )M K - I(P)M K - I( = P T kkk T kk1 -k |kkkk|k (18) When multiple uncorrelated observations are available at time tk it is possible to compute recursively the estimates for the state at time tk. This is accomplished by introducing one observation at a time and assuming that F = I and ΓΓΓΓ = Q = 0; that is, the state remains unchanged at tk and its estimate and covariance matrix are recursively improved for each new observation introduced. This strategy is the base of the SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 103 recursive approach that reduces the feature search space in the image (Tommaselli and Tozzi, 1996). A PRIORI ESTIMATE 0|1̂x 0|1̂P Extraction of the jth line η i = xk|k-1 COVARIANCE MATRIX Pj k|k IITERATOR ηi+1 i = i+1 xk|k = η i+1 k = k+1 STATE TRANSITION kkx |1ˆ + Pk+1|k Next observation j = j+1 KALMAN GAIN ITERATIONS Fig. 2 Flow chart of the proposed approach. In dynamic systems once the filtered state is computed at tk it is feasible the prediction of the state for the next instant tk+1. If the system model is linear then the following equations can be used to update the estimates to the next instant: x̂ . F = x̂ k|kkk|1+k (19) Q + F P F = P k T kk|kkk|1+k (20) The application of the IEKF to the dynamic camera calibration, results in the following dimensions for matrices and vectors: 6x1 6ηηηη1 2M2 6P6 6K2 2z1 where: [ ]Z , Y , X ,,, = x̂ ccc T k ωφκ is the state vector at time tk; zk are the observations at tk (a and b or a* and b*); η is an iterator; K is the Kalman gain matrix; M is the partial derivatives matrix; P is the state covariance matrix. 4 DYNAMIC CAMERA CALIBRATION USING STRAIGHT LINES AND KALMAN FILTERING The proposed concept of Dynamic Object Location assumes that both the inner parameters of the camera and the object model are known and stable. In this sense, the problem can be considered a Dynamic Space Resection. It is required both an "a priori" estimate for the location and orientation parameters at t0 and the elements of the system model (this set of parameters enables the computation of the predicted estimates using eq. (19) and (20)). At an instant tk , [ ]Z , Y , X , , , = x ccc T k ωφκ is the state vector defining the camera position and orientation and Pk is its covariance matrix; ]b [a, = z Tj k is the observation vector for the jth feature in the image. The sequence of steps for the proposed approach to the solution of the dynamic camera calibration problem is described below (Fig. 2): 1. At the initial instant (t0) the a priori estimate for state vector x̂ |01 and its covariance matrix P1|0, are assigned to variables x̂ 1 -k |1 and P1|k-1 respectively; 2. Using the predicted state vector estimate x̂ 1 -k |1 a search window is computed from the projected endpoints of the jth straight line, taking into account both the covariance matrix of the predicted state estimate P1|k-1 and the straight line length. Edges are then detected within the search window and the observation vector z j k is obtained applying an edge segmentation technique, e.g., Hough transform (Ballard and Brown, 1982) or θ-ρ grouping (Dudani and Luk, 1978). Systematic errors are eliminated at this step using pre- computed intrinsic calibration parameters. If more than one line is detected within the search window the predicted values for θ and ρ are used for the selection of the most probable one; 3. The Iterated Extended Kalman Filter is applied and a state estimate x̂ k|1 and its covariance matrix P1|k are computed using the observation vector z j k obtained in the previous step; 4. The filtered state parameters and its covariance matrix obtained using the jth observation is considered as a predicted value for the (j+1)th observation and the algorithm proceeds on to Step 2. After each step, the filtered state is better than the previous one; hence, the displacement between the acquired image feature and the projected one is progressively reduced, resulting in a reduction of the search window. This procedure is repeated until all available lines in the object model have been processed at tk; 5. A prediction x̂ k|1+k and Pk+1|k for the next time tk+1 is established using the available estimates and the system model. In the case of object location usually a conveyor belt whose velocity is approximately known transports the object. Using these predicted estimates the algorithm proceeds on to Step 2. This procedure is repeated until there are no more images to be processed. 5 FEATURE EXTRACTION Once a state estimate is available (either an "a priori" estimate or a filtered estimate) the definition of a search window in the image space is feasible. The aim of the feature extraction process is to find a straight line in the image, which corresponds to a straight line in the object space. The edges in the image are detected using the Sobel operators. The elements which have the gradient magnitude greater than a defined threshold are considered as belonging to an edge. In order to connect these elements a segmentation procedure is 104 SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 used. In the θ-ρ grouping method (Dudani and Luk, 1978) edge pixels are classified using three grouping steps, known as θ-, ρ- and xy-grouping. The θ-grouping gathers the edge pixels that have gradient directions within a specific angular range, e.g., θ1 to θ2, selected based on the θ distribution; the ρ-grouping classify the edge pixels of θ groups according to their ρ-values (computed for each pixel using the equation: ρ = x.cosθ + y.sinθ); the xy-grouping verify discontinuities within each θ-ρ group. There could be several lines within a window but only one corresponding to the object straight line. This line is selected based on the predicted θ-ρ values which are compared with the θ-ρ groups. The edge pixel coordinates are defined in the frame buffer reference system. These coordinates must be transformed (scaled and translated) to an approximated centre of the image. The systematic errors are then corrected using equations (21). )r.k)(c - y( + c - y = y d).c - x( + )r.k)(c - x( + c - x = x 2 1yfyfi sxf 2 1xfxfi (21) where: • xi and yi are the image coordinates of a pixel related to the image centre; • xf and yf are the coordinates of the same pixel in the frame buffer; • cx and cy are the image coordinates of the image centre; • k1 is the coefficient of radial distortion (higher order coefficients and decentering distortion are neglected); • ds is the scale factor in the x-axis; The intrinsic camera calibration parameters are supposed to be previously computed in a batch procedure. Finally, a Least Squares adjustment is used to fit a straight line to the selected set of image edge points, with subpixel precision. In order to avoid gross errors, the residuals are computed and verified after line fitting, eliminating the pixel with largest residual and performing a new line fitting recursively. 6 RESULTS In this section results obtained with the proposed recursive procedure using real data are presented and discussed. Experiments with real data using a partially controlled environment were performed in order to verify the accuracy potential of the proposed solution to the dynamic camera calibration problem. Extensive experiments with simulated data were carried out previously and used to guide the set up of the real environment. Images were collected using a Kentec-CCD camera, with 15mm nominal focal length and grabbed by an AT-Vista board, installed in an IBM compatible computer. The images were grabbed with 512x400x8 bits, but only the 200 even lines were used in order to speed up the real time process. The inner orientation parameters were obtained using self-calibrating bundle adjustment, with six convergent images taken from a set of 20 circular targets and with an approximated image centre at the centre of the frame buffer (256, 200). The values of the intrinsic camera parameters an their standard deviations are presented in table 1. Table 1. Intrinsic camera calibration parameters of the CCD camera. Parameter cx (mm) cy (mm) Radial distortion x scale factor focal length (mm) Value -0.1478 0.0487 0.000323 0.06847 16.3896 σx 0.0165 0.0191 0.000031 0.00021 0.0633 The edge images were obtained using the Sobel operators. The scatterings in the line fitting procedure were in the range of 10µm to 1µm, depending on the quality of the image. Covariance propagation was applied in order to take into account the effects of the errors in the inner orientation parameters in the observations (Tommaselli and Tozzi, 1996). Reliable system models are required to have proper responses from the proposed model. In this sense, the proposed approach can be taught as a complementary strategy that must be combined with other sensor feedback. The system model is used to predict feature positions in the image in order to constraint the feature extraction step. The presented experiment was proposed just to study the accuracy of the model and its robustness with noisy imagery. For more complex environments (non-linear trajectories and complex objects) it is clear that accurate initial parameters must be available and better feature extraction algorithms must be derived. In this experiment the camera was installed on a tripod, observing a cube of 70mm. This cube was moved following a straight line in the XY plane, in order to simulate a conveyor belt motion. It was supposed a movement in Y direction with a 70mm displacement between successive cube positions. "A priori" estimates for the state vector in the first image were approximately measured in the experimental set (predicted values). It was supposed a state error of 20 (rotations) and 10mm (translations) in the object reference system with respect to the camera system. The edge images obtained in this experiment are presented in fig. 3. It is worth of note that in the first and second images two edges were not detected, due to weak contrast between the faces of the cube that define those edges. (a) (b) Fig 3 Sequence images simulating a cube in a conveyor belt: (a) original grabbed images; (b) edge images obtained with Sobel operators SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 105 A linear movement in the XY plane describes the system model for this kind of dynamic system. The rotations are the same and translations are only affected by an Y-displacement except by the random perturbations in the state (state transition noise). The predicted covariance matrix at the first instant was obtained from the expected errors in the predicted state (direct measurements); these errors were within 30 (rotations) and 10mm (translations). The predicted covariance matrix at the next instant (tk+1)was obtained using eq. (23), from the covariance matrix of the state transition noise and the covariance matrix of the filtered state (tk). In order to avoid filter divergence the state transition noise was supposed to be within 20 (rotations) and 10mm (translations). Equations (19) and (20) were slightly adapted to this case. If homogeneous transformations were used then it would be feasible to establish the matrix F. However it is easier to write the system model as a translation transformation in the following form: x + x = x kk|1+k ∆ (22) where: [ ]Z Y X = x ccc T∆∆∆∆∆∆∆ ωφκ The ∆xi elements can be obtained as a function of the conveyor velocity and the sample time of the vision system. In this experiment it was supposed only Y-displacements. Thus: [ ]0 70mm 0 0 0 0 = x T∆ Using covariance propagation (equation (20)) the predicted estimates at tk+1 can be stated as: Q + P = P kk|kk|1+k (23) where Qk is the covariance matrix of the state transition noise. In this experiment Qk was stated as:                               )(10mm..... .)(10mm.... ..)(10mm... ...)2(.. ....)2(. .....)2( = Q 2 2 2 20 20 20 k (24) Table 2 presents the results for each image processed. It can be observed the gradual reduction of the estimated standard deviations (from the filtered covariance matrix) for each image of the sequence. Table 3 presents the differences between the state vectors obtained from the sequence of images. It was expected null discrepancies, except in Y-direction (∆Y = 70mm) because the movement was linear over XY plane. The rotational discrepancies were in the range 10' to 1015'. These values are consistent with the expected state transition error in real environments. The translational discrepancies were in the range of 0.4mm to 14.4mm. Table 3 Differences between state vectors for sequential images 2 - 1 3 - 2 4 - 3 ∆κ rad 0.010306 0.021393 -0.019996 ∆φ 0.003027 -0.006060 0.022586 ∆ω -0.014580 -0.008992 0.005294 ∆Xc mm -2.533 -4.962 14.588 ∆Yc 76.313 75.779 63.506 ∆Zc -8.270 0.376 -10.495 The highest discrepancies were observed between images 3 and 4. In the fourth image the edges of the cube are grouped in the corner of the frame and this weak geometric configuration can produce poor results. These errors in translational parameters may also be originated by systematic errors in the inner orientation parameters, mainly in the focal length. Previous simulations have shown that translational parameters are more affected by weak configurations and by errors in the focal length than rotational parameters when using the proposed mathematical model. These problems could be also originated by the narrow angle of camera and the weak geometry provided by such as small angles bundles. These geometric drawbacks can be easily eliminated with suitable camera configurations and more accurate calibration of the inner orientation parameters. The modern digital cameras are much more stable and suitable for these industrial tasks. The proposed approach have shown its robustness with noisy imagery; it is worth of note that even with missing edges (first and second images, fig. 3 (b)) the algorithm proceed well with no impact in the final results. The weak points of the method are the dependence of good predicted estimates and the straight-line model that requires planar faces in the objects. The extension of the approach to use corners and other linear features is being under evaluation. 7 CONCLUSIONS A recursive approach based on straight-line correspondences and state estimation using Kalman Filtering has been presented for Table 2. Results of a dynamic camera calibration for a moving cube in a conveyor belt Image 1 Image 2 Image 3 Image 4 Filtered State Standard Deviation Filtered State Standard Deviation Filtered State Standard Deviation Filtered State Standard Deviation κ rad 2.30021 0.00431 2.31051 0.00364 2.33190 0.00234 2.31191 0.00218 φ 0.77688 0.00580 0.77991 0.00473 0.77385 0.00386 0.79644 0.00334 ω -0.55384 0.00489 -0.56842 0.00436 -0.57741 0.00315 -0.57211 0.00296 Xc mm 621.534 4.735 619.001 3.930 614.039 2.954 628.627 2.987 Yc 245.242 2.540 321.555 2.522 397.334 2.382 460.840 2.603 Zc 524.301 4.174 516.031 3.464 516.407 3.081 505.913 2.708 106 SBA Controle & Automação Vol. 10 no. 02/ Maio, Jun., Jul., Agosto 1999 the solution of the dynamic camera calibration and space resection problems. The proposed solution was tested using real data. Experiments were carried out in a controlled environment, using a sequence of 4 images of a moving cube in a linear trajectory over a XY plane. Some problems were observed in the translational parameters originated by weak configurations and unreliable calibration parameters. The discrepancies in the rotational parameters were within the expected range. The obtained accuracy and the dynamic nature of the method show the applicability of the proposed approach in several different tasks related with Machine Vision and Photogrammetry. Further improvements can be obtained adopting more accurate inner parameters and using more stable and higher resolution CCD cameras. More effective edge detection and segmentation techniques must be studied and applied to this approach as well as the extension of the model to use corners and other linear features. 8 REFERENCES Ballard, D.H. and Brown, C.M., 1982. Computer Vision, New Jersey: Prentice-Hall, 1982. 522p. Chen, S.Y. and Tsai, W.H., 1991. Determination of Robot Locations by Common Object Shapes, IEEE Transactions on Robotics and Automation, Vol. 7, No. 1, pp. 149-156. Chen, Z.; Tseng, D. and Lin, J., 1989. A Simple Vision Algorithm for 3-d Position Determination using a Single Calibration Object, Pattern Recognition, Vol. 22, No. 2, pp. 173-187. Chen, W. and Jiang, B. C., 1991. 3-D camera calibration using vanishing point concept, Pattern Recognition, Vol. 24, No. 1, pp. 57-67. Dal Poz, A.P. and Tommaselli, A.M.G., 1998, Strategy to detect ground control in digital images. In: Proceedings of the SPIE conference on control in Digital Images, Orlando, Fl, EUA, 1998. De Geeter, J.; Van Brussel, H. and De Schutter, J., 1997. A Smoothly Constrained Kalman Filter. IEEE Transactions on PAMI. Vol. 10, No. 5, pp. 1171-1177. Dhome, M.; Richetin, M.; Lapresté, J. and Rives, G., 1989. Determination of the attitude of 3-D objects from a single perspective view, IEEE Transactions on PAMI, Vol. 11, No. 12, pp. 1265-1278. Dudani, S.A. and Luk, A.L., 1978. Locating straight-line edge segments on outdoor scenes, Pattern Recognition, Vol. 10, pp. 145-157. Echigo, T., 1990. A camera calibration technique using three sets of parallel lines, Machine Vision and Applications, Vol. 3, pp. 159-167. Fischler, A. M. and Bolles, R. C., 1981. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography, Communications of the ACM, Vol. 24, No. 6, pp. 381-395. Gruen, A. W., 1992. Recent advances of photogrammetry in robot vision, ISPRS Journal of Photogrammetry and Remote Sensing, Vol. 47, pp. 307-323. Jazwinski, A.H., 1970. Stochastic Processes and Filtering Theory. New York: Academic Press, 376 p. Lee, R.; Lu, P.C and Tsai, W.H., 1990. Robot location using single views of retangular shapes, Photogrammetric Engineering and Remote Sensing, Vol. 56, No. 2, pp. 231-238. Lenz, R. K. and Tsai, R. Y., 1988. Techniques for Calibration of the Scale Factor and Image Center for High Accuracy 3-D Machine Vision Metrology, IEEE Transactions on PAMI. Vol. 10, No. 5. Liu, Y.; Huang, T. S. And Faugeras, O. D., 1990. Determination of camera location from 2-D to 3-D line and point correspondences, IEEE Transactions on PAMI, Vol. 12, No. 1, pp. 28-37. Mulawa, D. C. and Mikhail, E. M., 1988. Photogrammetric treatment of linear features, In: Proceedings of the International Society for Photogrammetry and Remote Sensing, 1988, Kyoto, Commission III, pp. 383-393. Prescott, B. and Mclean G.I., 1997. Line Base Correction of Radial Lens Distortion. Graphical Models and Image Processing. Vol. 59, No 1, pp. 39-47. Quan, L. and Kanade, T., 1997. Affine Structure from Line Correspondences With Uncalibrated Affine Cameras. IEEE Transactions on PAMI. Vol. 19, No. 8, pp. 834- 845. Salari, E. and Jong, C., 1990. A method to calculate the structure and motion parameters from line correspondences, Pattern Recognition, Vol. 23, No. 6, pp. 553-561. Tommaselli, A.M.G. and Lugnani, J. B., 1988. An alternative mathematical model to the collinearity equation using straight features, In: Proceedings of the International Society for Photogrammetry and Remote Sensing, Kyoto, Commission III, pp. 765-774. Tommaselli, A.M.G. and Tozzi, C. L., 1996. A recursive approach to Space Resection using straight lines, Photogrammetric Engineering and Remote Sensing, Vol. 62, No 1, pp 57-66. Wang, L.L. and Tsai, W.H., 1990. Computing camera parameters using vanishing-line information from a rectangular parallelepiped, Machine Vision and Applications, Vol.3,pp.12