Method and apparatus for image processing

Abstract: An image processor (10) is provided in which imaging data obtained by an image sensor (12) is processed for purposes of detecting motion. An optical flow field generator (16) processes the image data to provide condition number-based smoothed optical flow vectors, and stores those smoothed vectors in memory (18). The optical flow field stored in memory (18) is accessed and further processed by analyzer (20) for purposes of providing users with information on the motion of objects in the image plane of image sensor (12). Such user information may be displayed on a monitor (22).

Description: TECHNICAL FIELD OF THE INVENTION This invention relates generally to the field of image processing, and more particularly to an improved method and apparatus for indicating motion. BACKGROUND OF THE INVENTION As image processing technology has advanced, so has the number of applications for the technology. In particular, image processing systems have proved extremely useful in moving object indication applications. In the field of moving object indication, sequential images from a sensor can be analyzed to create an optical flow field. See, e.g., "Determining Optical Flow", B.K.P. Horn and B.G. Schunck, Computer Vision, p. 185, North-Holland Publishing, 1981. This optical flow field is an array of vectors indicating the magnitude and direction of movement on a pixel by pixel basis. The optical flow field can then be used to indicate motion or to track a moving object, for example, for purposes of targeting or security monitoring. Other uses of the optical flow field include sensor motion estimation, terrain structure estimation, and autonomous navigation. Because of noise introduced in acquiring images, errors often exist in the optical flow vectors generated for a given object. For example, if the optical flow vectors corresponding to an object moving across the image plane of an image sensor should be equal at any given point in time, noise introduced by the image sensor could result in non-equal optical flow vectors corresponding to the object. To minimize these errors, smoothing operations are performed on the optical flow vectors. See, e.g., "Image Flow: Fundamentals and Algorithms", B.G. Schunck, Motion Understanding - Robot and Human Vision, Chapter 2, Kluwer Academic Publishers, 1988. Present imaging systems rely on "guesses" made by a human operator to determine certain factors involved in minimizing errors in optical flow fields. Therefore, a need has arisen for a system that performs error minimization (smoothing) based upon the image, rather than on ad hoc determinations by the user of the system. An article by Vishal Markandey and Bruce Flinchbaugh from the Proceedings of the 3 rd International Conference on Computer Vision in Osaka (1990, pp 38-41) discloses an optical flow field calculation based on multispectral constraints. The components of the optical flow field are found from simultaneous equations having coefficients of the spatial derivatives of the pixel intensity and a constant term of the temporal derivative, each equation dealing with the intensity at a particular wavelength of light. The document states that smoothing of the optical field is performed as described in the article by B.G. Schunck second referred to above. In the Markandey and Flinchbaugh article a condition number is also calculated from the matrix of the spatial derivatives for each point of the images to confirm that the solution of the simultaneous equations was numerically stable. In the Schunck article smoothing is achieved by minimising between motion boundaries only a cost for the lack of smoothness in the optical flow field and a cost for the difference between the smoothed and unsmoothed optical flow fields. In the minimisation a constant weighting factor is applied to the lack of smoothness cost. An article by Berthold Horn and Brain Schunck entitled "Determining Optical Flow" in Computer Vision edited by J.M. Brady and published by North-Holland, 1981, discloses calculating subject to a smoothness constraint an optical flow field from a single set of pixel brightness data. In the minimisation a constant weight is given to the lack of smoothness cost and an appropriate value of that weight is stated to be the expected noise in the magnitude squared of the brightness gradient. An article by Masanobu Yamamoto entitled "Three-Dimensional Analysis of a Scene Containing Multiple Moving Objects from Image Sequence and Depth" from Systems & Computers in Japan Vol. 18, No.5, 1987, discloses a method of extracting objects from an image using a segmentation technique. Condition numbers are calculated for the objets to give an indication of the ambiguity of their motion. SUMMARY OF THE INVENTION According to the present invention there is provided a method of processing images, comprising the steps of: generating an image signal in an image sensor; transmitting the image signal to an optical flow field generator; generating an optical flow field comprising a plurality of optical flow vectors; characterised in that the method further comprises: generating a condition number for each of the optical flow vectors; and smoothing the optical flow field by minimizing for each optical flow vector the sum of a lack of accuracy of the respective optical flow vector and a product of the condition number of the respective optical flow vector and a lack of smoothness of the respective optical flow vector. According to the present invention there is also provided an image processor comprising: an image sensor for generating an image signal; an optical flow field generator operable to generate a first optical flow field comprising a plurality of optical flow vectors; and circuitry for transmitting said image signal to said optical flow field generator; characterised in that the optical flow field generator is operable to generate a condition number for each of the optical flow vectors and is operable to generate a smoothed optical flow field by minimizing for each optical flow vector the sum of a lack of accuracy of the respective optical flow vector and a product of the condition number of the respective optical flow vector and a lack of smoothness of the respective optical flow vector. The method and apparatus substantially eliminate or reduce disadvantages and problems associated with prior systems for processing images. According to one embodiment, image signals are generated using an image sensor and transmitted to an optical flow field generator. The optical flow field generator generates a smooth optical flow field and stores the smooth optical flow field in a memory. The optical flow field generator smooths the optical flow field by generating a condition number for each optical flow vector in the optical flow field and then minimizing the sum of the lack of accuracy and the product of the condition number and lack of smoothness for each optical flow vector. The stored, smooth optical flow field may be processed to indicate or track motion. An important technical advantage of the present invention inheres in the fact that the optical flow field is smoothed based on a condition number generated for each of the optical flow vectors. The condition number is used as a weighting factor to improve smoothing processing of the optical flow field. BRIEF DESCRIPTION OF THE DRAWINGS For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following description taken in conjunction with the accompanying drawing wherein: FIGURE 1 illustrates a block diagram of an image processing system constructed according to the teachings of the present invention; and FIGURE 2 illustrates detection of terrain or object shape according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION FIGURE 1 illustrates a block diagram of an imaging system 10 constructed according to the teachings of the present invention. An image sensor 12 is used to sense images and generate image signals to be processed. Image sensor 12 may comprise any one of a number of image sensors. For example, image sensor 12 may comprise forward looking infrared sensors or visible light TV sensors. More than one image sensor can be used with the present invention to provide additional information on the images to be processed. As shown in FIGURE 1, image sensor 14 may be used in parallel with image sensor 12. With this additional sensor, two channels of image data are available for processing. Image sensors 12 and 14 may or may not be the same type of image sensor. For example, image sensor 12 may be a forward looking infrared sensor and image sensor 14 may be a green light sensor. The image signals generated by optical sensors 12 and 14 are transmitted by transmission circuitry, such as output drivers, to optical flow field generator 16. Optical flow field generator 16 generates an optical flow field for the images sensed by sensors 12 and 14. The optical flow vector associated with each pixel of image data may be represented as O i,j = u i,j x + v i,j y wherein O ij is the optical flow vector for a pixel located at row i in column j, and u i,j is the magnitude in the x direction of the optical flow vector for the pixel located at row i in column j , v i,j is the magnitude in the y direction of the optical flow vector for the pixel located at row i in column j , and x and and y and are unit vectors in the x and y directions, respectively. For any pixel, the values for u and v are computed from the following equations Au + Bv + C = 0 Du + Ev + F = 0 A, B, C, D, E, and F are functions of image intensity. Where two image sensors are provided, such as image sensors 12 and 14 of FIGURE 1, A, B, C, D, E, and F may comprise first order derivatives of the image intensity of a given pixel. A, B, and C are calculated with respect to the image signal from one sensor, e.g., image sensor 12, such that A is the first order derivative of the image intensity of a given pixel with respect to x , B is the first order derivative of the image intensity with respect to y , and C is the first order derivative of the image intensity with respect to time.D, E, and F are calculated with respect to the image signal for a separate sensor, e.g., image sensor 14, such that D is the first order derivative of the image intensity with respect to the x direction, E is the first order derivative of the image intensity with respect to the y direction, and F is the first order derivative of the image intensity with respect to time. If only one image sensor is used, then A, B, C, D, E, and F are second order derivatives. In such a case, A is the second order derivative of the image intensity with respect to x and x, B is the second order derivative of the image intensity with respect to x and y , C is the second order derivative of the image intensity with respect to x and t, D is the second order derivative of the image intensity with respect to y and x , E is the second order derivative of the image intensity with respect to y and y , and F is the second order derivative of the image intensity with respect to y and t . In all of above cases, x and y are spatial coordinates representing the conventional x and y directions on an x - y axis and t represents time. It should be understood that more than two sensors can be used to provide signals for generating optical flow vectors without departing from the teachings of the present invention. For examples of the derivations of Equations 2 and 3, see, e.g., "Determining Optical Flow", B.K.P. Horn and B.G. Schunck, Computer Vision, p. 185, North Holland Publishing, 1981; "Multispectral Constraints for Optical Flow Computation", V. Markandey and B.E. Flinchbaugh, Proc. Third Intl. Conf. on Computer Vision, p. 38, 1990; and "Constraints for the Computation of Optical Flow", F. Girosi, A. Verri, and V. Torre, Proc. Workshop on Visual Motion, IEEE, p. 116, 1989. Equations 2 and 3 can be solved for u and v provided that the matrix is non-singular. It can be shown that the condition number of matrix E is c = ∥ E ∥ ∥ E -1 ∥, where ∥ E ∥ is the square root of the largest eigenvalue of E T E . The condition number, c , provides a confidence measure for each optical flow vector that may be used in smoothing the optical flow field. Flow field smoothing is performed by minimizing a weighted sum of two terms, where the first term, e s , is a measure of the lack of smoothness of the flow field, and the second term, e c , is a measure of the lack of accuracy. The two terms, e s and e c , may be represented by the following formulas. where u x and u y are partial deriatives of u with respect to spacial coordinates x and y, and v x and v y are partial derivatives of v with respect to spacial coordinations x and y. The magnitude of the initial flow vector calculated according to formulas 2 and 3 in the x and y directions are and , respectively. Smoothing is performed by minimizing the weighted sum of Equations 6 and 7, as given by Equation 8 below: where c ( x c ,y c ) is the condition number of the central pixel in the area of summation. It can be shown that Equation 8 may be minimized using the following iterative equations: u n+ 1 ( i,j ) = 1 1+20 c ( i,j ) [ u n ( i,j ) + c ( i,j )( u n ( i -1, j -1) + u n ( i + 1, j - 1)+ u n ( i -1, j +1) + u n ( i +1, j +1)) + 4 c ( i , j )( u n ( i,j -1) + u n ( i , j +1) + u n ( i+ 1, j ) + u n ( i- 1, j ))] v n +1 ( i,j ) = 1 1+20 c ( i,j ) [ v n ( i,j ) + c ( i,j )( v n ( i -1, j -1) + v n ( i +1, j -1) + v n ( i -1, j +1) + v n ( i +1, j +1)) + 4 c ( i , j )( v n ( i , j -1) + v n ( i , j +1) + v n ( i +1, j ) + v n ( i -1, j ))] where n is the number of iterations. As can be seen from Equation 8, the condition number of the E matrix for a given pixel is multiplied by the measure of the lack of smoothness at that pixel as a weighting factor. Use of the condition number as a weighting factor in Equation 8 provides for a weighting factor that is based on the image signal rather than ad hoc determinations by the user of the image processing system. Use of Equations 9 and 10 to calculate the optical flow vectors for an optical flow field provides an improved smoothing technique for image analysis systems performing motion indication or analogous functions. According to one embodiment of the present invention, before using the smoothing functions of Equations 9 and 10, a median filter can be used to eliminate noise spikes from the original optical flow vectors calculated according to Equations 2 and 3. Such a median filter could be a 3 x 3 spatial extent median filter, although filters of other sizes may also be used. The optical flow vectors resulting from such median filters could then be smoothed according to Equations 9 and 10. The condition number-based optical flow field smoothing described above can be implemented on a general purpose computer capable of converting the video signals to digital values and then performing the smoothing processing. In the alternative, a dedicated microprocessor based system or application specific integrated circuit could be used to perform the condition number-based smoothing described above. The number of iterations of Equations 9 and 10 performed depends on the requirements of imaging system 10. The number of iterations of Equations 9 and 10 could be determined by the speed of the system performing the optical flow field generation. For example, if each pixel is to be smoothed 30 times a second, the number of iterations may depend upon the length of time required by optical flow field generator 16 to perform the smoothing operation for a particular pixel. As another example, since each iteration of Equations 9 and 10 reduces the error expressed in Equation 7, iterations of equations 9 and 10 may be stopped when the rate of error reduction with successive iterations becomes insignificantly small, as in the case of asymptotic convergence, or if the error actually starts increasing with successive iterations after reaching a minima point. Once the optical flow field has been generated by optical flow field generator 16, the optical flow field is stored in a memory 18. Memory 18 may comprise, for example, a random access memory. The form of the data stored in memory 18 may be in the form of a two-dimensional array, wherein the magnitude in both the x and the y directions of the optical flow vectors for each pixel are stored. The magnitudes in the x and y direction for each optical flow field vector may be real numbers. Memory 18 is accessed by analyzer 20. Analyzer 20, in general, processes the optical flow field stored in memory 18 for the purpose required by imaging system 10, and may comprise a microprocessor based system operating to determine motion based on the magnitude and direction of the vectors making up the optical flow field. In particular, analyzer 20 may comprise a moving target indication system, in which information on moving targets may be provided through monitor 22 to an operator of imaging system 10. It should be recognized that monitor 22 shown in FIGURE 1 is for purposes of example only, and could be another type of output device, such as a printer or other device designed to operate in response to a given type of movement. Another example of analyzer 20 is a robust tracking system, in which moving objects are tracked, for example, for targeting purposes. According to one embodiment of the present invention, analyzer 20 may comprise a terrain structure or object shape processor. FIGURE 2 illustrates one embodiment of the operation of terrain or object shape detection by sensor motion. As shown in FIGURE 2, a sensor 24 is moved in a known pattern, resulting in changes in the relative position of an object 26 with respect to sensor 24. This change in relative position is equivalent to motion, and the shape of the object (or the terrain structure) can be detected by analyzing the optical flow fields generated during sensor movement. In this way, three-dimensional terrain structures or object shapes may be measured, and representations of these shapes or structures, such as maps, may be created. Another technique by which object shape may be estimated is by analyzing intensity changes caused by lighting changes. It should be understood that "motion indication", as used herein, describes both motion of objects and sensor motion, and thus includes the example of three-dimensional representation generation. Moreover, since the teachings herein relate to image intensity, "motion indication" also includes detection of intensity or shading changes. In summary, an imaging system is provided in which image signals generated by image sensors are processed and optical flow vectors are produced. These optical flow vectors are further processed by a condition number-based smoothing operation. These smoothed optical flow vectors are then accessed to provide information, such as motion or terrain structure information, on the image sensed by the image sensors. Although the present invention has been described in detail, it should be understood that various changes, substitutions and alterations can be made without departing from the invention as defined by the appended claims.

Claims: A method of processing images, comprising the steps of: generating an image signal in an image sensor (12,14,24); transmitting the image signal to an optical flow field generator (16) ; generating an optical flow field comprising a plurality of optical flow vectors; characterised in that the method further comprises generating a condition number for each of the optical flow vectors; and smoothing the optical flow field by minimizing for each optical flow vector the sum of a lack of accuracy of the respective optical flow vector and a product of the condition number of the respective optical flow vector and a lack of smoothness of the respective optical flow vector. The method of claim 1, further comprising: storing the smoothed optical flow field in a memory (18); and processing the smoothed optical flow field. The method of claim 2, wherein said step of processing comprises the step of tracking the motion of an object depicted in a portion of the image. The method of claim 2 or claim 3, wherein said step of processing comprises indicating to an operator any moving objects sensed by the image sensor. The method of any of claims 2 to 4, further comprising providing the memory (18) as a random access memory. The method of any preceding claim, further comprising the step of median filtering the optical flow field prior to said step of smoothing the optical flow field. The method of any preceding claim, further comprising the step of targeting moving objects sensed by the image sensor. The method of any preceding claim, further comprising the step of moving the image sensor in a predetermined pattern; and generating a three-dimensional representation of images sensed by the image sensor. An image processor comprising: an image sensor (12,14,24) for generating an image signal; an optical flow field generator (16) operable to generate a first optical flow field comprising a plurality of optical flow vectors; and circuitry for transmitting said image signal to said optical flow field generator; characterised in that the optical flow field generator is operable to generate a condition number for each of the optical flow vectors and is operable to generate a smoothed optical flow field by minimizing for each optical flow vector the sum of a lack of accuracy of the respective optical flow vector and a product of the condition number of the respective optical flow vector and a lack of smoothness of the respective optical flow vector. The image processor of claim 9, comprising an analogue to digital converter for converting said image signal to a digital image signal. The image processor of claim 9 or claim 10, further comprising: a memory (18) coupled to said optical flow field generator for storing said smoothed optical flow field; and an analyzer (20) for processing said smoothed optical flow field. The image processor of claim 11, wherein said memory (18) comprises a random access memory. The image processor of claim 11 or claim 12, wherein said analyzer (20) comprises a moving target indicator for indicating to an operator any moving objects sensed by said image sensor. The image processor of claim 13, further comprising a monitor (22) for displaying the indication of object motion. The image processor of any of claims 11 to 14, further comprising an image sensor moving device for moving the image sensor (24) in a predetermined pattern, and wherein said analyzer (20) is operable to generate a three-dimensional representation of images sensed by the image sensor. The image processor of any one of claims 9 to 15, further comprising a median filter for filtering the optical flow field before generating said smoothed optical flow field. The image processor of any of claims 9 to 16, further comprising a tracking system for tracking moving objects sensed by said image sensor.

Inventors: FLINCHBAUGH BRUCE E, MARKANDEY VISHAL, FLINCHBAUGH, BRUCE E., MARKANDEY, VISHAL
Applicants: TEXAS INSTRUMENTS INC, TEXAS INSTRUMENTS INCORPORATED
Application year: 1993
Main classification: G06T7
IPC codes: G06T5, G06T1, G06T7