The present invention relates to a method for determining bias in an inertial measurement unit of an image acquisition device.
It is known that inertial measurement units (IMU) comprising for example, a gyroscope can accurately measure short-term or relative changes in orientation of a device such as a camera, but suffer from a constant error (bias) that can additionally change over time (drift).
This drift can be determined and compensated for by using other sensors including magnetometers, accelerometers or other fiduciary points, but it may be not feasible or desirable to use or add such functionality and cost to a device. It will also be appreciated that even when available, magnetometers themselves need to be periodically re-calibrated and as such could not necessarily be relied upon all of the time to correct for other sensor drift.
In “Bias Compensation of Gyroscopes in Mobiles with Optical Flow”, AASRI Procedia 9, 2014, pp152-157, László Kundra and Péter Ekler consider the problem of using gyroscopes where the integration of raw angular rates with non-zero bias leads to a continuous drift of estimated orientation. A sensor fusion algorithm uses optical flow from the camera of the device. An orientation estimator and bias removal method are based on complementary filters, in combination with an adaptive reliability filter for the optical flow features. The feedback of the fused result is combined with the raw gyroscope angular rates to compensate for the bias.
The problem with this approach is that finding a global transformation between frames and converting it into camera orientation change is extremely CPU intensive. Using the motion vectors directly leads to large errors caused by erroneous motion estimates (outliers). Indeed one potential implementation suggests employing the RANSAC algorithm to reject such outliers when determining optical flow, but this would add significant computational overhead, so making the approach unfeasible or unattractive for implementation in portable image acquisition devices such as smartphones.
It is an object of the present invention to provide an improved method for determining IMU sensor bias.
According to the present invention there is provided a method for determining bias in an inertial measurement unit of an image acquisition device according to claim 1.
The invention finds particular utility in a device IMU having only a gyroscope. But even when an accelerometer is available, it can only be used to determine bias compensation for all but 1 axis. It is not possible to compensate for the axis parallel to the gravity vector.
In a further aspect there is provided an image processing device arranged to perform the method of claim 1; and a computer program product comprising computer readable instructions, which when executed in an image processing device are arranged to perform the method of claim 1.
An embodiment of the invention will now be described, by way of example, with reference to the accompanying drawings, in which:
Referring to
Such image acquisition devices 10 can include downstream dedicated image processing units which can analyse acquired images and process such images either to extract information from the images or to correct the images. Such processing can include face detection and tracking, object recognition or distortion correction such as disclosed in PCT Application WO2014/005783 (Ref: FN-384). Other processing can determine frame-to-frame motion, for example, as disclosed in WO2014/146983 (Ref: FN-389) and PCT Application No. PCT/EP2017/050390 (Ref: FN-495), the disclosures of which are incorporated herein by reference.
In the present specification, such processing units, which can be dedicated hardware modules or a generic central processing unit (CPU), are indicated as processing unit (PU) 16 which is capable of running either low-level firmware/software or in the case of the CPU, application software, capable of obtaining image information from memory 14 and further processing the images.
In the present specification, we refer to images being provided by IPP 12, however, it will be appreciated that these can comprise either individually acquired images or images within a video sequence.
It is known for image acquisition devices 10 to include inertial measurement units (IMU) 18 which can indicate a trajectory of device movement during image acquisition, enabling processing unit(s) 16 to use that information to correct an acquired image to take into account blur caused by involuntary or unwanted device motion during image capture or to stabilize video sequences. Indeed PCT Application No. PCT/EP2017/050390 (Ref: FN-495) discloses how such correction can take into account optical image stabilisation (OIS) which might be performed by a lens during image acquisition. Note that the description below is based on the assumption that OIS is switched off, but where known, this could be taken into account in variations of the described embodiment.
The IMU 18 sensors can comprise: gyroscopic sensors providing measures of rotational velocity around each of the three spatial axes (X,Y,Z); and accelerometers which provide measures of translational acceleration during image sequence capture and the direction of the gravitational force. The IMU can further include a magnetometer indicating the absolute angular orientation of the device relative to the earth's magnetic field.
As mentioned above, IMU sensors and gyroscopic sensors, in particular, tend to suffer from bias and drift.
Embodiments of the present invention use image-based motion estimation which, although suffering from noise and other disturbances, over a longer term, can provide an indicator proportional to the bias (B) in an IMU sensor.
Referring to
This estimate comprises a 16×16 array E[ ] of 256 2D motion vectors (two of which E1, E2 are indicated—these motion vectors can be stored as circular (polar) or Cartesian coordinates) extending over the input image. Note that in this case, as is common, the image acquisition device employs a rolling shutter technique where one or more lines (rows) of pixels of an image are read from an image sensor during successive exposure intervals.
Also note that an array of motion vectors is provided for exemplary purposes only—any arrangement of motion vectors, even random, could be used.
As such, IMU measurements acquired during frame exposure need to be synchronised or correlated with the acquisition time for the portion of an image providing each row of the estimated motion vector array E[ ]. Thus, for example, the IMU measurements for the row of the movement array containing E2 will precede those for E1, assuming the start of field (SOF) is read from the top down. Nonetheless, it will be appreciated that the same interval df applies between a time of acquisition of one portion of an image and the corresponding portion of the image in a previously acquired frame.
Referring to
This is a one-off operation and the mapped points act as anchors in 3D space and are used as a reference when processing all frames. In
In the next step, the 3D anchor points, such as V1 and V2, are transformed according to their respective locations in a previously acquired frame based on the camera orientation measured by the IMU 18. Thus, the embodiment attempts to determine a location in 3D space corresponding to the position of the reference point V1 according to a difference in its measured orientation at an acquisition time in a given image and its measured orientation at an acquisition time for the same point in the previously acquired image.
This done by determining the time t of acquisition of each estimated motion vector in the array E[ ] (each row shares the same time) in a given frame and the previous frame.
Then the position of the camera measured by the IMU 18 is used to determine the camera orientations for each row of the array E[ ] in the present frame and the previously acquired frame. These measures can be represented in quaternion form as a quaternion function Q(t) representing the camera orientation at time t. Q(t) is obtained by numerical integration of the angular velocity ω sampled at interval dt. The value of ω can be measured by a gyroscope as a vector containing angular velocities around the gyroscope's local coordinate system axes:
ω=[ωx,ωy,ωz]
Without taking into account bias, given the device orientation at the time of the previous gyroscope sample Q(t-dt), an update quaternion {dot over (Q)} can be defined as:
{dot over (Q)}=0.5Q(t-dt)·[0,ω]
With dot representing the quaternion multiplication in this case. Thus, a new orientation of the device after an interval dt can be calculated as follows:
Q=Q(t-dt)+{dot over (Q)}dt
and this can be normalised as follows:
As explained, the gyroscope measurement contains a constant error called gyroscope bias B=[Bx, By, Bz]. If not removed, bias leads to error accumulation over time that significantly affects the measurement of the device's orientation. When bias is known, the update quaternion formula can have the following form:
{dot over (Q)}=0.5Q(t-dt)·[0,ω-B]
Knowing the camera orientation at the time t and the frame interval df it is possible to calculate the location of the point in 3D space represented by V (for example V1, V2) in the previous frame which will be denoted by Vm:
Vm=V·(Q(t)−1·Q(t-df)).
The power of −1 denotes the quaternion conjugation operation.
It will be seen from the description above that using quaternion functions to determine Vm is computationally efficient, but nonetheless determining the coordinates for the vector Vm according to the measured orientation for a reference point in a given frame and in a previously acquired frame can also be performed using other techniques such as a rotational matrix.
Now, if we consider one of the motion vectors from the array E[ ] estimated by the means of image analysis being denoted as {right arrow over (E)}={right arrow over (AY)}, where A corresponds to the 2D reference point corresponding to a 3D space anchor point V. Thus, Y represents the location of A in 2D space in the previously acquired frame. Knowing the camera's sensor timing it is possible to determine the time t when the pixel underlying the point A was captured and to correlate this with a measured motion based location for the point Vm. The point Y, being the result of the 2D motion vector {right arrow over (E)} on a 2D reference point location can also be projected into the 3D space, again using the same lens projection model transformation as for the reference points, to form the estimated vector Ve in 3D space.
Thus, knowing the measured orientation Vm in 3D space at the same time as the end points of each estimated motion vector, we can provide a corresponding estimated orientation Ve in 3D space.
In an ideal case, where no measurement and estimation errors were present, the measured and estimated motions should have the same effect (Vm=Ve). However, in a real life situation, there will be some error Vm≠Ve as indicated by the differences between: Vm1 and Ve1; and Vm2 and Ve2 in
It will be appreciated that any estimated motion vector {right arrow over (E)} within the array E[ ] and its counterpart in 3D space Ve can contain errors, either due to noise or due to object motion within a scene being imaged. Nonetheless, a component of the difference comprises a systematic error caused by IMU sensor bias and the present method attempts to identify this error in as efficient as manner as possible.
As suggested in László Kundra and Péter Ekler, one approach to identifying the systematic error would be to use the least squares method to estimate a rotation matrix between measured and estimated vectors Vm, Ve. However, due to what may be a significant number of outliers in the motion matrix, a method such as RANSAC would be needed to reliably determine this rotation matrix and that would consume a significant amount of CPU power. Also, the rotation matrix would have to be converted to rotation angles to compensate for gyro bias and this would add several costly trigonometrical functions.
On the other hand, referring to
Vc=Vm×Ve
as this is closely related to the angle between Vm and Ve and this value can be used to apply a correction to the bias estimation B used above.
A simple use of the measure Vc would be to take an average/mean of the values for at least some of the cells of the array E[ ] over a frame or a number of frames. However, such a measure would be subject to a high level of noise as the estimated motion measurements in particular can contain significant outliers caused by parallax and moving objects. Those outliers would likely affect the mean values in a significant way introducing high estimation errors.
On the other hand, using a median value tends to more effectively eliminate outliers. However, this generally requires:
In some embodiments, an estimate of median value M which does not require memory or sorting is employed. A recursive formula for one such estimate M of the k-th sample is as follows:
Mk=Mk-1+η sign(sk-Mk-1),
where η is a very small value (e.g. 0.000001) and s is the current sample value.
In the present case, this approach can be used to update an estimate for the bias vector B directly from cross-product vector Vc as follows:
B=B−1+η sign(Vc),
where B−1 denotes the bias estimate from the previous iteration.
This bias value B can then be used in the quaternion measurements above to provide a more accurate measurement of camera orientation at any given instant in real-time. Every time the quaternion update is calculated, the most recent estimate of B is used. This provides constant updates of correction even with the bias drifting over time.
It will be seen that using this embodiment, the bias component is updated as a function of information derived from a number of frames, yet without the processing burden of needing to store values and determine a median for a large number of values.
In refinements of the above disclosed embodiments, only selected vectors within any given estimated motion vector array E[ ] marked as valid after motion estimation are used in bias estimation. Indeed, validity or weight factors for the motion vectors {right arrow over (E)} of the array E[ ] can be used to improve robustness of the bias estimate. Also, in the case of a scene with no details or extremely fast motion that results in rejection of all the vectors of the array E[ ], the last known bias estimate can still be used. This way erroneous or exceptional situations do not affect bias estimation or prevent calculation of camera orientation.
Referring now to
This method can be readily extended to work with other motion estimation methods than disclosed in WO2014/146983 (Ref: FN-389) and PCT Application No. PCT/EP2017/050390 (Ref: FN-495). For example, motion estimation can be based on tracked or matched feature points from within a scene being imaged without any significant changes to the method.
Thus the reference points within a frame for which measured orientations and orientations based on estimated motion are determined and compared do not need to be distributed regularly across a frame or even to extent across an entire frame.
This application claims priority to and is a continuation of U.S. patent application Ser. No. 16/154,450 filed on Oct. 8, 2018 which is a continuation of U.S. patent application Ser. No. 15/468,409 filed on Mar. 24, 2017, issued on Oct. 9, 2018 as U.S. Pat. No. 10,097,757, the entire contents of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5649237 | Okazaki | Jul 1997 | A |
5912676 | Malladi et al. | Jun 1999 | A |
6130912 | Chang et al. | Oct 2000 | A |
8493454 | Kohn et al. | Jul 2013 | B1 |
9232138 | Baldwin | Jan 2016 | B1 |
20030114984 | Scherzinger | Jun 2003 | A1 |
20040027450 | Yoshino | Feb 2004 | A1 |
20050100192 | Fujimura et al. | May 2005 | A1 |
20070291047 | Harville et al. | Dec 2007 | A1 |
20110218733 | Hamza | Sep 2011 | A1 |
20120078510 | Ma | Mar 2012 | A1 |
20130194418 | Gonzalez-Banos et al. | Aug 2013 | A1 |
20140049658 | Yamazaki | Feb 2014 | A1 |
20150092048 | Brunner et al. | Apr 2015 | A1 |
20170004358 | Bose et al. | Jan 2017 | A1 |
20170004371 | Getz et al. | Jan 2017 | A1 |
20170016728 | Sheard | Jun 2017 | A1 |
20170359518 | de Foras | Dec 2017 | A1 |
Number | Date | Country |
---|---|---|
2306149 | Apr 2011 | EP |
2481098 | Dec 2011 | GB |
WO2008014472 | Jan 2008 | WO |
WO2010051147 | May 2010 | WO |
WO2014005783 | Jan 2014 | WO |
WO2014146983 | Sep 2014 | WO |
WO2017140438 | Sep 2014 | WO |
Entry |
---|
European Search Repod dated Aug. 28, 2018 (Search Completed on Aug. 21, 2018) in Application No. 18160155.0, Munich, Germany, pp. 1-7. |
International Search Report and Written Opinion for International Application PCT/EP2013/061611, completed Sep. 4, 2013, dated Sep. 16, 2013, 11 Pgs. |
International Search Report for International Application PCT/EP2014/055125, completed Jun. 30, 2014, dated Sep. 23, 2014, 6 Pgs. |
International Search Report and Written Opinion for International Application PCT/EP2017/050390, completed Jun. 8, 2017, dated Jun. 20, 2017, 20 Pgs. |
Jayant Kumar, et al: “Fast Rule-Line Removal Using Integral Images and Support Vector Machines”, 2011 International Conference on Document Analysis and Recognition, Sep. 1, 2011, pp. 584-588. |
Karpenko, A. et al. “Digital Video Stabilization and Rolling Shutter Correction using Gyroscopes”, Mar. 1, 2011, Stanford Tech Report CTSR Mar. 2011, retrieved from internet: URL: https:l/graphics.stanford.edu/papers/stabilization/Karpendo_gyro_pdf, pp. 1-7. |
Kundra, L, et al: “Bias Compensation of Gyroscopes in Mobiles with Optical Flow”, AASRI Procedia 9, 2014, 2014 AASRA Conference on Circuit and Signal Processing {CSP 2014), pp. 152-157. |
Lai, M.ML et al: “Coding of image sequences using course quantization and feature based hierarchical block matching”, Image Processing and its Application, 1992, International Conference on Maastricht, Netherlands, London, UK, IEE, US, Jan. 1, 1992, pp. 586-589. |
Lepetit V, et al. “Monocular Model-Based 30 Tracking of Rigid Objects: A Survey”, Foundations and Trends in Computer Graphics and VI, Now Publishers, Inc , US_ vol. 1, No. 1, Jan. 1, 2005, pp. 1-89. |
Nam, K.M. et al: “A Fast Hierarchical Motion Vector Estimation Algorithm Using Mean Pyramid”, IEEE Transactions on Circuits and Systems for Video Technology, IEEE Service Center, Piscataway, NJ, US, vol. 5, No. 4, Aug. 1, 1995, pp. 344-351. |
Nguyen V. A. et al: “Fast Block-Based Motion Estimation Using Integral Frames”, IEEE Signal Processing Letters, EEE Service Center, Piscataway, NJ, US, vol. 11, No. 9, Sep. 1, 2004, pp. 744-747. |
Sauer, K. et al: “Efficient Block Motion Estimation Using Integral Projection”, IEE Transactions on Circuits and Systems for Video Technology, IEEE Service Center, Piscataway, NJ, US, vol. 6, No. 5, Oct. 1, 1996, pp. 513-518. |
Non Final Office Action dated Oct. 24, 2019 for U.S. Appl. No. 16/154,450 “Method for Determining Bias in an Inertial Measurement Unit of an Image Acquisition Device” Stec, 14 pages. |
Number | Date | Country | |
---|---|---|---|
20200389592 A1 | Dec 2020 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 16154450 | Oct 2018 | US |
Child | 17000698 | US | |
Parent | 15468409 | Mar 2017 | US |
Child | 16154450 | US |