The invention relates generally to camera or range sensor systems including time-of-flight (TOF) sensor systems, and more particularly to correcting errors in measured TOF distance (motion blur) resulting from relative motion between the system sensor and the target object or scene being imaged by the system.
Electronic camera and range sensor systems that provide a measure of distance from the system to a target object are known in the art. Many such systems approximate the range to the target object based upon luminosity or brightness information obtained from the target object. However such systems may erroneously yield the same measurement information for a distant target object that happens to have a shiny surface and is thus highly reflective, as for a target object that is closer to the system but has a dull surface that is less reflective.
A more accurate distance measuring system is a so-called time-of-flight (TOF) system.
Under control of microprocessor 160, a source of optical energy 120 is periodically energized and emits optical energy via lens 125 toward an object target 20. Typically the optical energy is light, for example emitted by a laser diode or LED device 120. Some of the emitted optical energy will be reflected off the surface of target object 20, and will pass through an aperture field stop and lens, collectively 135, and will fall upon two-dimensional array 130 of pixel detectors 140 where an image is formed. In some implementations, each imaging pixel detector 140 captures time-of-flight (TOF) required for optical energy transmitted by emitter 120 to reach target object 20 and be reflected back for detection by two-dimensional sensor array 130. Using this TOF information, distances Z can be determined.
Emitted optical energy traversing to more distant surface regions of target object 20 before being reflected back toward system 100 will define a longer time-of-flight than radiation falling upon and being reflected from a nearer surface portion of the target object (or a closer target object). For example the time-of-flight for optical energy to traverse the roundtrip path noted at t1 is given by t1=2·Z1/C, where C is velocity of light. A TOF sensor system can acquire three-dimensional images of a target object in real time. Such systems advantageously can simultaneously acquire both luminosity data (e.g., signal amplitude) and true TOF distance measurements of a target object or scene.
As described in U.S. Pat. No. 6,323,942, in one embodiment of system 100 each pixel detector 140 has an associated high speed counter that accumulates clock pulses in a number directly proportional to TOF for a system-emitted pulse to reflect from an object point and be detected by a pixel detector focused upon that point. The TOF data provides a direct digital measure of distance from the particular pixel to a point on the object reflecting the emitted pulse of optical energy. In a second embodiment, in lieu of high speed clock circuits, each pixel detector 140 is provided with a charge accumulator and an electronic shutter. The shutters are opened when a pulse of optical energy is emitted, and closed thereafter such that each pixel detector accumulates charge as a function of return photon energy falling upon the associated pixel detector. The amount of accumulated charge provides a direct measure of round-trip TOF. In either embodiment, TOF data permits reconstruction of the three-dimensional topography of the light-reflecting surface of the object being imaged.
Some systems determine TOF by examining relative phase shift between the transmitted light signals and signals reflected from the target object. Detection of the reflected light signals over multiple locations in a pixel array results in measurement signals that are referred to as depth images. U.S. Pat. No. 6,515,740 (2003) and U.S. Pat. No. 6,580,496 (2003) disclose respectively Methods and Systems for CMOS-Compatible Three-Dimensional Imaging Sensing Using Quantum Efficiency Modulation.
In
Many factors, including ambient light, can affect reliability of data acquired by TOF systems. As a result, in some TOF systems the transmitted optical energy may be emitted multiple times using different systems settings to increase reliability of the acquired TOF measurements. For example, the initial phase of the emitted optical energy might be varied to cope with various ambient and reflectivity conditions. The amplitude of the emitted energy might be varied to increase system dynamic range. The exposure duration of the emitted optical energy may be varied to increase dynamic range of the system. Further, frequency of the emitted optical energy may be varied to improve the unambiguous range of the system measurements.
In practice, TOF systems may combine multiple measurements to arrive at a final depth image. But if there is relative motion between system 100 and target object 20 while the measurements are being made, the TOF data and final depth image can be degraded by so-called motion blur. For example, while acquiring TOF measurements, system 100 may move, and/or target object 20 may move, or may comprise a scene that include motion. Motion blur results in distance data that is erroneous, and thus yields a final depth image that is not correct.
What is needed is a method and system to detect and compensate for motion blur in TOF systems.
The present invention provides such a method and system.
The present invention provides a method and system to detect and remove motion blur from final depth images acquired using TOF systems. The invention is preferably implemented in software executable by the system microprocessor, and carries out of the following procedure. Consecutive depth images I1, I2, I3 . . . In are acquired by the system and are globally normalized and then locally normalized. The thus-processed images are then subjected to coarse motion detection to determine the presence of global motion and/or local motion. If present, global motion and local motion are corrected and a final image in which motion blur has been substantially compensated for if not substantially eliminated results.
Other features and advantages of the invention will appear from the following description in which the preferred embodiments have been set forth in detail, in conjunction with their accompanying drawings.
As noted, it usually is advantageous to obtain multiple data measurements using a TOF system 100′. Thus, microprocessor 160 may program via input/output system 190 optical energy emitter 120 to emit energy at different initial phases, for example to make system 100′ more robust and more invariant to reflectivity of objects in scene 20, or to ambient light level effects in the scene. If desired, the length (exposure) and/or frequency of the emitter optical energy can also be programmed and varied. Each one of the acquired data measurements produces a depth image of the scene. However the acquired scene images may have substantially different brightness levels since the exposure and/or the initial phase of the emitted optical energy can directly affect the acquired intensity levels.
In practice, each of the detected images may take tens of milliseconds to acquire. This is a sufficiently long time period during which motion could occur in the scene 20 being imaged and/or movement of system 100′ relative to the scene. When there is motion in the scene, it is likely that each of these images contains measurements from objects with different depths. As a result, a depth data value obtained by system 100′ from the combination of these images could easily be erroneous, and would the resultant final depth image. It is the function of the present invention, executable routine 175, to normalize the detected data in a sequence of acquired depth images, and then detect and correct for relative motion between the acquisition system and the target object or scene. The present invention results in final depth images that are substantially free of motion blur.
Referring to
According to the present invention, preferably each image is initially normalized at method steps 310, 320 to compensate for motion between adjacent images, e.g., between images I0 and I1, between images I1 and I2, and so on. Initially one of the acquired images is selected as a reference image. Without limitation, let the first acquired image I0 be the reference image, although another of the images could instead be used.
Before trying to detect the presence of motion between each image I1, I2, . . . In and the reference image I0, the sequence of images I0, I1, I2, I3 . . . In are normalized, preferably using two types of normalization. At step 310, global normalization compensates for the differences in the images due to global settings associated with system 100′ (but not associated with target object or scene 20). Then at step 320, local normalization is applied as well to compensate for differences associated with target 20 (but not system 100′).
Next, at method step 330 coarse motion detection is applied to determine which pixel detectors 140 in array 130 have captured motion. Method steps 330, 340, 350 serve two functions. First, the nature of the pixel detector-captured motion is categorized in terms of being global motion or local motion. Method step 340 determines whether the motion is global motion, e.g., motion that results from movement of system 100′ or at least movement of sensor array portion 130. Method step 350 determines whether the motion is local motion due to movement in scene 20. Second, the ability of steps 330, 340, 350 to categorize the type of motion improves performance of routines to compensate for the respective type of the motion.
Once the global and/or local characteristic of the motion has been determined, the appropriate motion correction or compensation is carried out at method steps 360, 370. At method step 360, global motion is compensated for over the entire image, after which local motion is compensated for at the pixel detector level. After each of these compensations is applied, the images I0,I1,I2, . . . In should have the same view of the acquired scene, and as such these corrected images can now be combined to generate a depth image that is free of motion blur, as shown by method step 380.
Having broadly described the methodology shown in
Referring to globalization method step 310, multiple images (I0, I1, I2, . . . In) will typically have been captured under different conditions. For instance, the images may be captured with different emitted energy phases, and/or with different exposure durations, and may exhibit different intensity levels. At method step 310 all images I1, I2, . . . In are normalized to have comparable intensity levels with the reference image I0.
In one embodiment, the mean and the standard deviation of the image I0 are obtained. Let μ0 and σ0 be the mean and standard deviation of the reference image I0. Let μi and σi be the mean and standard deviation of one of the images Ii where i=1 . . . n. Let Ii(x,y) the intensity value of the image li at pixel location (x,y). Then, the image Ii(x,y) can be normalized to obtain the normalized image IiN(x,y) as follows:
As a consequence, the normalized image IiN has the same mean and standard deviation as the reference image I0.
Alternatively, normalization can be implemented using histogram based techniques where the density function of the image is estimated. In another embodiment, normalization is implemented using an edge image, assuming here that image edges are preserved regardless of the brightness changes in the scene. An edge image, obtained by an edge detector algorithm can be applied on the input images I0, I1, I2, . . . In, to yield edge images E0, E1, E2, . . . En, These edge images are provided as an input to method step 339, where motion is detected and then at steps 340, 350, 360, 370 characterized and appropriately compensated for.
Referring now to
In one embodiment, a methodology similar to the global normalization method carried out at step 310 may be used. In this embodiment the mean and standard deviation normalization, or edge normalization can be applied on image patches (e.g., sub-images), as opposed to being applied to the entire image.
Referring now to the coarse level motion detection steps shown in
Method step 330 provides coarse level motion detection to increase the efficiency of the algorithm. What is desired here is the creation of a map Mk for each image k=1,2, . . . n, where the map denotes the existence of motion at a particular pixel (x,y) on each image. Each pixel of Mk(x,y) is either 0 or 1, where the value of 1 denotes the presence of motion.
In one embodiment, motion between consecutive frames of acquired images is defined as a change between consecutive frames. This can be implemented by examining the normalized images IiN. More specifically, at every pixel (x,y), the difference to the normalized reference image I0N is determined. If this difference is greater than a threshold (T), then the map image is assigned a value of 1:
This map can advantageously increase the efficiency of the following steps, where the calculations are only applied to pixels where Mi(x,y)=1.
In method steps 340, 360, global motion compensation compensates for system 100′ motion, more specifically motion in pixel detector array 130, which motion is primarily in the (x-y) plane. It is implicitly assumed that any rotational motion is programmable as finite (x-y) motions.
In one embodiment, a global block matching method is used, in which a large portion of the image is used as the block. The algorithm inputs are the normalized images IiN, or the edge images Ei from global normalization step.310. The algorithm finds the motion vector (Δx, Δy) where the following function energy function (ε) is minimized:
As such, global block matching essentially carries out an optimization procedure in which the energy function (ε) is calculated at a finite set of (Δx, Δy) values. Then the (Δx, Δy) pair that minimizes the energy function is chosen as the global motion vector.
In another embodiment, the block matching algorithm is improved by a log-search in which the best (Δx, Δy) pair is obtained and then improved by a more local search around the first (Δx, Δy) pair. The iteration continues while, at each iteration, the search area is reduced around the previous match so that a finer motion vector is detected.
In yet another embodiment, global motion is determined using a phase-detection method. For instance, in a TOF system that uses phase shift method to determine distance, if the measurement from symmetric phases (such as 0° and 180°) are not symmetric, the discrepancy is an indication of a local or global motion.
Referring to
In the above equation, optimization is applied on a window wi,p around every pixel (or group of pixel) p of image Ii. The solution to this problem may be carried out using a Lucas-Kanade tracker, which reduces the analysis to the following equation:
In the above equation, Ix and Iy are the spatial derivatives of the image I in x and y directions respectively. The relationship represents the temporal derivative of the image I, where Δx and Δy are the motion vectors. The pixels in the window w can be used to solve this optimization problem using an appropriate optimization algorithm. Common iterative optimization algorithms can be used to solve for Δx and Δy. In one embodiment, a pyramidal approach is used, where an initial estimate of the motion vector is found using one or more down-sampled versions of the image, and the fine motion is extracted using the image. This approach reduces failure modes such as the locking of an optimization algorithm at a local maximum.
After method step 350 detects local motion, applicable correction or compensation is made at method step 370. Once the motion vector [Δx, Δy] is determined for every pixel p, and every image Ii, motion compensation is readily established by constructing an image Ii0 for each image Ii:
Ii0N(x,y)=IN(x+Δx,y+Δy)
Referring now to method step 380, at this juncture all operations between image Ii and I0 may now be carried out using images Ii0N and I0N. The result following method step 380 is the construction of a depth image that is substantially free of motion blur.
Implementation of the above-described steps corrects motion blur in a TOF system, for example system 100′.
Modifications and variations may be made to the disclosed embodiments without departing from the subject and spirit of the invention as defined by the following claims.
Priority is claimed to co-pending U.S. provisional patent application Ser. No. 60/650,919 filed 8 Feb. 2005, entitled “A Method for Removing the Motion Blur of Time of Flight Sensors”.
Number | Date | Country | |
---|---|---|---|
60650919 | Feb 2005 | US |