Optical flow computation for moving sensors
This application is a continuation of application Ser. No. 07/543,622, filed Jun. 26, 1990, now abandoned. 
    
    
     TECHNICAL FIELD OF THE INVENTION 
     This invention relates to computer vision, and more particularly to optical flow computations when both the observer and the target are moving. 
     BACKGROUND OF THE INVENTION 
     Computer vision has many applications, and is generally characterized by the use of a digital imaging system to produce an image, which is then analyzed with a computer for a subsequent decision. Many applications of computer vision involve identifying and locating objects in the image. Other applications of computer vision involve tracking a moving object. The camera or other image capturing device is the &#34;observer&#34; and the moving object is the &#34;target&#34;. 
     To achieve computer vision in these applications, some methods use computations based on optical flow. In general terms, optical flow is understood by remembering that an image is a digitized representation of a continuous intensity variation of a scene in the physical world. The image changes as the objects in view, or the observer, or both, move with respect to each other. This movement gives rise to an optical flow, which associates a two dimensional velocity with each point on the two dimensional image plane. The result is an instantaneous velocity field on the image plane, which represents the optical flow of a number of points. 
     The optical flow reveals information about the shape of objects in the scene, which become determinate if the motion parameters are known. Other applications of optical flow include recovery of observer or target motion parameters. 
     A shortcoming of existing optical flow methods is the absence of methods for analyzing optical flow of a moving target that generates its own optical flow within an optical flow field due to a moving observer. Although one known method analyzes optical flow when the observer is moving, as well as the target, the observer&#39;s motion is only rotational and not translational. This method is described in an article by Ken-ichi Kanatani, entitled &#34;Transformation of Optical Flow by Camera Rotation&#34;, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 10, No. 2, March 1988. 
     A need exists for a method of analyzing optical flow when both the observer and the target are moving with complete freedom of motion. 
     SUMMARY OF THE INVENTION 
     One aspect of the invention is a method for determining the movement of an object viewed with a computer vision system, when both the object and the observation point of the computer vision system are in motion. The computer vision system is used to obtain two frames of the object and its background scene, with the two frames being separated by a known time interval. The object&#39;s apparent optical flow parameters are expressed in terms of camera motion values and its true optical flow parameters. The result is a system of equations, which may be solved for the object&#39;s true optical flow parameters. 
     Another aspect of the invention is a system for use on a moving observation station for determining the motion of an observed object. An imaging system produces at least two digitized images of the object and its background. These images are separated by a known time interval. A computer is in data communication with the imaging system and receives the digitized images. The computer is programmed to determine the true optical flow parameters of the object, using the method described in the preceding paragraph. 
     A technical advantage of the invention is that if the motion of the observation point is known, the method can be used to determine the motion of a moving target. A moving target can be tracked and its movements predicted with an autonomous imaging system. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates an imaging system on board an aircraft in flight, used to obtain images of a moving object on the ground as part of implementation of the invention. 
     FIG. 2 illustrates perspective projection of a scene viewed by the imaging system of FIG. 1. 
     FIGS. 3A and 3B illustrate the apparent motion of a stationary object viewed with a moving imaging system. 
     FIGS. 4A and 4B illustrate the apparent motion of a moving object viewed with a moving imaging system. 
     FIG. 5 is a matrix expression that relates an object&#39;s apparent motion, its true motion, and camera motion parameters. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     FIG. 1 is an example of a system that implements the method of the invention. The following description illustrates an implementation of the invention on a moving observation station, which in this example, is a moving vehicle on which an imaging system is mounted. However, the invention could be implemented in a number of other environments, such as an imaging system in a robotic apparatus. Also, the invention could be easily implemented in simulated, as well as real world, environments. An imaging system 11 is placed on board a moving vehicle 12, which in this example is an aircraft in flight. Target 13 is a moving object on the ground. Target 13 may be any shape or size. 
     Target 13 and its background are herein referred to as the &#34;scene&#34;. The representation of the scene produced by imaging system 11 is herein referred to as the &#34;image&#34;. 
     Imaging system 11 includes a camera 11a or any other device for capturing an image signal. The receiving lens of camera 11a, is referred to herein as the &#34;observation point&#34;. Imaging system also includes a device for converting the image signal into digital values. Imaging systems 11 suitable for implementing the invention are known in the art of computer vision. 
     For purposes of this description, camera 11a and target 13 are assumed to have motion with translational and rotational components in three dimensional space. This is consistent with the most general form of the method of the invention. As will be clear from the explanation below, if motion is constrained with respect to one or more of these components, the appropriate terms may be set to zero. 
     If target 13 is not moving, but the observation point of imaging system 11 is moving, target 13 nevertheless has an apparent motion. If both the observation point and target 13 are moving, target 13 has an apparent motion that is a combination of the motion of the observation point and its own motion. The object of the invention is to separate the motion of the observation point from the apparent motion of target 13 so that the true motion of target 13 with respect to its background can be determined. 
     Camera 11a is used to provide at least two successive frames of the scene over a period of time. The time interval between any two frames is herein referred to as Δt. As will be clear from the explanation below, the invention operates with a minimum of two frames and one Δt. The duration of Δt is related to accuracy in that during Δt, motion is assumed to be linear. Thus, the smaller the duration of Δt, the more likely the assumption is accurate. Also, the use of a series of measurements and calculations over a series of Δt&#39;s can be used statistically to improve the accuracy of the method. 
     In addition to imaging system 11, aircraft 12 carries an on-board computer system 14 for processing the digital image generated by imaging system from the scene. Computer system 14 need not necessarily be on-board, but the invention is particularly advantageous for autonomous applications, in which an on-board computer system 14 is used to interpret the scene. The results may be used to trigger further on-board action or communicated to a remote station. 
     Imaging system 11 is assumed to provide perspective projection. This is one model of image formation, known in the art of computer vision. The perspective projection model provides a correspondence between points in the scene and points in the image by assuming an optical imaging system with an ideal pinhole at a fixed distance in front of the image plane. It is assumed that only light coming from the pinhole can reach the image plane, with each point on the image corresponding to a particular direction defined by a ray from that point through the pinhole. 
     FIG. 2 illustrates the geometry of imaging system 11, with perspective projection. The center of projection of the perspective projection is the origin, O, of an XYZ coordinate system. This origin is located at camera 11a, or more specifically, its observation point. The image plane is at Y=f, where f is the focal length of the camera 11a. Point A represents a point of target 13, which may be any detectable point on the target surface. 
     A point A in the scene is projected to the point A&#39; in the image plane, such that: ##EQU1## and  where (X,Y,Z) is a vector connecting O to A, and V&#39;=(x,f,y) is a vector connecting O to A&#39;. 
     The motion of camera 11a is assumed to be such that its rotational velocities about the three axes are w x , w y , and w z , and its translational velocities are v x , v y , and v z . For purposes of this description, ##EQU2## and ##EQU3## Also, ##EQU4## is a magnification parameter. These notations for V x , V y , and a are for convenience in the calculations below. 
     The values w x , w y , w z , V x , V y , and a are assumed to be capable of measurement, and are referred to herein as the camera motion values. As explained below, these camera motion values and Δt are used to express the apparent optical flow parameters of target 13 in terms of its true optical flow parameters. The result is a set of equations, which can be solved for the true optical flow parameters of target 13. 
     FIGS. 3A and 3B illustrate the apparent motion of a stationary object and its background as affected by motion of camera 11asuch as a stationary target 13 in a scene detected by imaging system 11. FIGS. 3A and 3B are separated by a time interval, Δt. For purposes of simplifying the illustration, the translational motion of camera 11a is in the x direction only. 
     Due to the motion of camera 11a, the point (x, y) will appear to move to a point (x&#39;, y&#39;) during Δt, such that: 
     
         x&#39;=x+δx 
    
     
         y&#39;=y+δy 
    
     where δx and δy are incremental values, computed according to geometric transformation algorithms as follows: 
     
         δx=(w.sub.z y-w.sub.y +V.sub.x)Δt+(-x.sup.2 w.sub.y +x yw.sub.x -xa)Δt 
    
     
         δy=(-w.sub.z x+w.sub.x +V.sub.y)Δt+(-xyw.sub.y +y.sup.2 w.sub.x -ya)Δt 
    
     These equations represent horizontal and vertical displacement, i.e., the distance that the point moves during Δt. 
     FIGS. 3A and 3B illustrate only the apparent motion of target 13 due to camera motion. As stated above, however, an object of the invention is to analyze optical flow when both the observation point, or origin O, and the point of interest, here a point associated with target 13, are moving. If two scenes are captured by imaging system 11 over a finite duration of time, i.e., Δt, target 13 will have moved in one respect because of its own motion, and in another respect because of the motion of imaging system 11. 
     Target 13, because it is in motion, generates an optical flow. Other objects in the scene, which may be moving at different speeds with respect to the ground or which may be stationary, generate a different optical flow. If a vector is drawn from the initial position to the final position of a given point in the image, the optical flow of that point is represented in vector form. The motion of each pixel in the image can be represented with an optical flow vector. 
     For a moving planar surface, viewed from a stationary observation point, the optical flow of any point is given by: 
     
         u(x,y)=u.sub.0 +Ax+By+(Ex+Fy)x                             (1) 
    
     
         v(x,y)=v.sub.0 +Cx+Dy+(Ex+Fy)y                             (2) 
    
     where u 0 , v 0 , A, B, C, D, E, and F are eight parameters that represent the &#34;true&#34; optical flow of any point in the scene. 
     These eight true optical flow parameters are determined by object motion, geometry, and imaging geometry. More specifically, where the planar surface patch is described as Z=pX+qY+r, the translations velocity is (a, b, c), and the rotation velocity is (w 1 , w z , w 3 ), with respect to a reference point, ##EQU5## Proof of these equations is set out in the article referenced in the background section of this application, entitled &#34;Transformation of Optical Flow by Camera Rotation&#34;. 
     If camera 11a is also moving, the optical flow of any point has the form: 
     
         u&#39;(x&#39;, y&#39;)=u&#39;.sub.0 +A&#39;x&#39;+B&#39;y&#39;+(E&#39;x&#39;+F&#39;y&#39;)x&#39;               (3) 
    
     
         v&#39;(x&#39;, y&#39;)=v&#39;.sub.0 +C&#39;x&#39;+D&#39;y&#39;+(E&#39;x&#39;+F&#39;y&#39;)y&#39;               (4) 
    
     These eight optical flow parameters, u&#39; 0 , v&#39; 0 , A&#39;, B&#39;, C&#39;, D&#39;, E&#39;, and F&#39; represent the &#34;apparent&#34; optical flow parameters, which combine the motion of camera 11a and any motion of the object with which point (u&#39;, v&#39;) is associated. The similarity in form of the expressions for optical flow, regardless of whether camera 11a is moving, derives from the fact that a planar surface remains planar no matter from where it is viewed. 
     FIGS. 4A and 4B illustrate the optical flow generated by an object, such as target 13, when both the object and camera 11a are moving. For purposes of simplifying the illustration, the movement of the object is in the y direction only. A point (x,y) on the object has an apparent motion, which is a combination of camera motion illustrated in FIGS. 3A and 3B and the object&#39;s own motion. 
     If u and v are the optical flow velocity components, then under the transformation x to x&#39; and y to y&#39;, u and v transform as: ##EQU6## 
     Using the above expressions for x&#39; and y&#39;, the following expressions are partial differential relationships between δx, δx&#39;, δy, and δy&#39;: ##EQU7## 
     By substitution and matrix multiplication of the above expressions, u&#39; and v&#39; may be expressed as follows: 
     
         u&#39;=u+u(-2xw.sub.y +yw.sub.x -a)Δt+v(w.sub.z +xw.sub.x)Δt(10) 
    
     
         v&#39;=v+v(2yw.sub.x -xw.sub.y -a)Δt+u(-w.sub.z +yw.sub.y)Δt(11) 
    
     Equations (10) and (11) may be expressed in shorthand form as: 
     
         u&#39;=u+δu                                              (12) 
    
     
         v&#39;=v+δv                                              (13) 
    
     Substituting the expressions for u and v from equations (12) and (13) into equations (10) and (11), the following relationships between δu, δv, and  --  t are obtained: ##EQU8## 
     The desired form for the optical flow equations, including camera motion, is the form of equations (3) and (4) above. The following expressions may be substituted into the left hand sides of (3) and (4): 
     
         u&#39;=u+δu 
    
     
         v&#39;=v+δv 
    
     The following expressions may be substituted into the right hand sides of (3) and (4): ##EQU9## 
     If these expressions, and the expressions for δx and δy set out above, are substituted into equations (3) and (4), the following equations are obtained: ##EQU10## 
     Equations (14) and (16) provide two expressions for δu and equations (15) and (17) provide two equations for δv. These expressions are second order polynomials in x and y, thus the unknown parameters can be determined by comparing coefficients. This results in the following expressions: 
     
         δu.sub.0 =Aw.sub.y Δt-AV.sub.x Δt-Bw.sub.x Δt-BV.sub.y Δt+v.sub.o w.sub.z Δt       (18) 
    
     
         δv.sub.0 =-u.sub.o w.sub.z Δt+Cw.sub.y Δt-CV.sub.x Δt-Dw.sub.x Δt-DV.sub.y Δt              (19) 
    
     
         δA=-2u.sub.o w.sub.y Δt+Cw.sub.2 Δt+v.sub.o w.sub.x Δt+Bw.sub.2 Δt+2Ew.sub.y Δt-2EV.sub.x Δt-Fw.sub.x Δt-FV.sub.y Δt                                (20) 
    
     
         δB=u.sub.o w.sub.x Δt+Dw.sub.2 Δt-Aw.sub.x Δt+Fw.sub.y Δt-FV.sub.x Δt              (21) 
    
     
         δC=-Aw.sub.z Δt-v.sub.o w.sub.y Δt+Dw.sub.z Δt-Ew.sub.x Δt-EV.sub.y Δt              (22) 
    
     
         δD=-Bw.sub.z Δt-u.sub.o w.sub.y Δt+2v.sub.o w.sub.x Δt-Cw.sub.z Δt+Ew.sub.y Δt-EV.sub.x Δt-2Fw.sub.x Δt-2FV.sub.y Δt                               (23) 
    
     
         δE=-Aw.sub.y Δt+Cw.sub.x Δt+aEΔt+Fw.sub.z Δt(24) 
    
     
         δF=-Bw.sub.y Δt+Dw.sub.x Δt+aFΔt-Ew.sub.2 Δt(25) 
    
     Equations (18)-(25) are a system of equations that can be expressed in matrix form. Using the fact that: ##EQU11## we obtain the solution matrix set out in FIG. 5. This matrix represents a system of equations, which relate the optical flow parameters before and after camera motion, in terms of the motion parameters of the camera. 
     The matrix expression in FIG. 5 has the form A=MB, where A represents the optical flow parameters with camera motion, B represents the optical flow parameters without camera motion, and M is a matrix whose components are functions of camera motion parameters and Δt. 
     A can be obtained from an observed optical flow field by performing a least squares fit to the form of equations (1) and (2). M can be computed from known motion parameters of camera 11a. With A and M thus determined, B can be obtained from the expression: 
     
         B=M.sup.-1 A 
    
     As stated above, this method is for the general case that accommodates any kind of camera and target motion. The same method can be used for special cases, where one or more motions are constrained. In fact, these special cases are simpler to solve because the appropriate motion terms may be set to zero, which makes the solution matrix easier to solve. 
     Other Embodiments 
     Although the invention has been described with reference to specific embodiments, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiments, as well as alternative embodiments will be apparent to persons skilled in the art. It is, therefore, contemplated that the appended claims will cover all modifications that fall within the true scope of the invention.