SINGLE CAMERA CALIBRATION
20230230279 · 2023-07-20
Assignee
Inventors
- Abhinav Pandey (Polegate, GB)
- Nauman Javed (Burgess Hill, GB)
- Rodolfo Cignoli (Hove, GB)
- Saharsh Bishnoi (Lancing, GB)
- Alexander Kadyrov (Eastbourne, GB)
- Robert Gillott (Hove, GB)
Cpc classification
G06T7/80
PHYSICS
International classification
G06T7/80
PHYSICS
H04N17/00
ELECTRICITY
Abstract
A method for determining extrinsic camera parameters includes: starting camera movement, capturing a first raw image with parallel first and second patches at a first point of time, and a second raw image with parallel third and fourth patches at a second point of time. A distance between the first and second patches and between the third and fourth patches is the same. A reference position A of a first patch image feature, a reference position C of a second patch image feature, an offset position B of the feature of the first patch in the third patch, and an offset position D of the feature of the second patch in the fourth patch are detected. An epipolar model is applied based on the positions A-D and a distance travelled by the camera between the first and second time points. Extrinsic camera parameters are determined from the epipolar model.
Claims
1. A method for determining extrinsic parameters of a camera, comprising: starting to move a camera; capturing, by the moving camera, a first raw image with a first patch and a second patch parallel to the first patch at a first point of time, and a second raw image with a third patch and a fourth patch parallel to the third patch at a second point of time, wherein a distance between the first patch and the second patch is the same as a distance between the third patch and the fourth patch; detecting a reference position A of at least one image feature in the first patch, a reference position C of at least one image feature in the second patch, an offset position B of the at least one image feature of the first patch in the third patch, and an offset position D of the at least one image feature of the second patch in the fourth patch; applying an epipolar model based on the reference positions A and C, the offset positions B and D and a determined distance travelled by the moving camera between the first point of time and the second point of time; and determining extrinsic parameters of the camera as an output of the epipolar model.
2. The method of claim 1, wherein the movement of the camera is a linear movement, a circular movement, or both; and wherein the distance travelled by the moving camera is determined by at least one of an external sensor or measurement data.
3. The method of claim 1, wherein the camera is a fisheye camera, and wherein detecting a reference position A, an offset position B, a reference position C, and an offset position D comprise a ground plane mapping of the first, the second, the third and the fourth patches to obtain corresponding patches as 2-dimensional ground plane images in a virtual plane in a pre-defined image format.
4. The method of claim 3, wherein the first, the second, the third and the fourth patches in the virtual plane are pre-processed, wherein the pre-processing comprises subtracting a mean brightness value, and applying a Gaussian window, wherein the Gaussian window has a maximum in a center of an image, and a minimum at edges of the image.
5. The method of any of the previous claim 1, wherein the offset position B of the third patch with respect to the reference position A of the first patch, and the offset position D of the fourth patch with respect to the reference position C of the second patch are determined by performing a phase correlation.
6. The method of claim 5, wherein the phase correlation comprises a Fast Fourier Transformation.
7. The methods of claim 1, wherein the reference positions A and C, and the offset positions B and D are relative positions and the offset is determined using a gradient based similarity measure.
8. The method claim 1, wherein the positions A, B, C and D are positions in a coordinate system, wherein an origin of the coordinate system coincides with a lens of the camera; and wherein detecting a reference position A, an offset position B, a reference position C, and an offset position D further comprises determining ground plane unit vectors from the origin of the coordinate system to the reference positions A and C, and to the offset positions B and D.
9. The method of claim 8, wherein of applying an epipolar model comprises using the ground plane unit vectors to determine in a first sub-step a first direction V from reference position A to the offset position C, which is the same direction as from the reference position B to the offset position D, and a second direction W from the reference position A to the reference position B, which is the same direction as from the offset position C to the offset position D, determining a normal vector N=V×W of the first direction V and the second direction W, and determining a height of the camera by determining the vectors from the origin to real positions A′, B′, C′ and D′ corresponding to the image positions A, B, C and D, respectively.
10. A single camera calibration system for calibrating a camera, comprising: a camera controller configured to control a camera to be calibrated such that the camera captures, when in motion, a first raw image with a first patch and a second patch parallel to the first patch at a first point of time, and a second raw image with a third patch and a fourth patch parallel to the third patch at a second point of time, wherein a distance between the first patch and the second patch is the same as a distance between the third patch and the fourth patch; and a processing module, configured to detect a reference position A of at least one image feature in the first patch, a reference position C of at least one image feature in the second patch, an offset position B of the at least one feature of the first patch in the third patch, and an offset position D of the at least one feature of the second patch in the fourth patch; apply an epipolar model based on the reference positions A and C, the offset positions B and D and a determined distance travelled by the moving camera between the first point of time and the second point of time; and determine extrinsic parameters of the camera as an output of the epipolar model.
11. The single camera calibration system of claim 1, further comprising the camera controlled by the camera controller, wherein the camera is mounted on a vehicle.
12. A vehicle comprising the single camera calibration system for calibrating the camera according to claim 10.
13. Use of the single camera calibration system according to claim 11 for determining the extrinsic parameters of the camera mounted on the vehicle.
14. A computer program element, comprising instructions which, when the program element is executed by a computer, cause the computer to carry out the method of claim 1.
15. A computer-readable medium comprising instructions which, when executed by a computer, cause the computer to carry out the method of claim 1.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0032] Exemplary embodiments of the disclosure will be described in the following with reference to the following drawings.
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045] The figures are merely schematic representations and serve only to illustrate embodiments of the present disclosure. Identical or equivalent elements are in principle provided with the same reference signs.
DETAILED DESCRIPTION
[0046]
[0047]
[0048] At each moment (and in short time interval) the rear wheel's center is rotating along a center whose circumference the vehicle moves, as shown in
[0049] Referring to
[0050] Referring now to
[0051] Referring to
[0052] The above procedure is done on the two patches extracted from the left at two different points of time and from the right side of the camera at these two different points of time. This will provide four feature points and essentially four camera rays 801, 802, 803, 804 associated with these features as shown in
[0053] In the following, the epipolar model for computing the extrinsics is explained. The model is based on the unit vectors above which are supposed to have their origin at the camera lens and of a spherical camera, so that they intersect the sphere of the camera at positions or points A, B, C, and D.
[0054] For the epipolar model presented here, the spherical camera may be mounted on a vehicle. The direction “up” is defined as a normal to the road surface (also if the road is inclined). This direction is just a point on the sphere seen from the camera lens as origin. Another important direction is direction Forward. It is parallel to or lies on the long axis of the car, in the plane of the road surface, and therefore coincides with the direction where vehicle moves provided it moves straight forward. We refer to these directions as “direction Up” and “direction Forward”. They are represented by two dots in the spherical camera. These two dots along with camera height include all the sought extrinsic parameters.
[0055] There also exists direction to the Right which is just a cross product Forward x Up. The three vectors Up, Forward and Right, as vector-columns in camera coordinates include a matrix M which is the output of the single camera calibration algorithm, along with the current camera height. Matrix M may be designated as “matrix of camera rotation”.
[0056] In the case that the vehicle is rotating at with a constant angle, Ackerman's steering model is applied, according to which to illustrate how the camera position moves due to the current speed and steering of the vehicle, Ackerman's steering model is applied, as shown in
[0057] In the following the epipolar model and the application of the epipolar model for calculating the extrinsics are explained in the following.
[0058]
[0059] However, the three known points O, A, B define a plane passing through them. This plane is defined by its orthogonal vector which can be found as a cross product of two vectors in this plane, which is the normal vector N(O, A, B)=OA×OB. Now, suppose we have two parallel segments defined by the real points A′C′ and B′D′ as depicted in
[0060] We conclude, that the parallel segments A′C′ and B′D′ (depicted in the camera as AC and BD) are both parallel to vector V=(OA×OC)×(OB×OD). The sign is checked by dot-product (.Math.) of vectors: [0061] If V.Math.AC>0 then V and A′C′ have the same direction [0062] If V.Math.AC<0 then V and A′C′ have opposite directions
In the parallelogram A′C′D′B′ with points ACDB in the spherical image a 3D construction can be performed. Using above formulas for parallel segments we find the two directions of the sides of the parallelogram as, V=(OA×OC)×(OB×OD) and W=(OA×OB)×(OC×OD). The normal to the parallelogram is their cross-product V x W. We define outer normal N as follows, [0063] If (V×W).Math.OA<0 then N=V×W/norm(V×W); [0064] If (V×W).Math.OA>0 then N=−V×W/norm(V×W);
[0065] Here, OA can be safely replaced by Oft OC or OD.
[0066] Considering now the projection O′ of O to the plane of the parallelogram, if denoting H as length of O′O, we can express [0067] OA′=OA*H/(−N.Math.OA) [0068] OB′=OB*H/(−N.Math.OB) [0069] OC′=OC*H/(−N.Math.OC) [0070] OD′=OD*H/(−N.Math.OD)
[0071] Therefore, norm (B′A′)=norm (OA*H/(−N.Math.OA)−OB*H/(−N.OB)) From here, H=norm (B′A′)/norm (OA/(−N.Math.OA)−OB/(−N.Math.OB))
[0072] Thus, knowing the length of one side of the parallelogram (in our example length A′B′), then we can determine the position all its four vertices in the space expressed in camera coordinates.
[0073] In a simple first scenario 1, the camera moves straight without rotation. Suppose a camera moves straight parallel to the road without rotations as shown in
[0074] Now supposing in the first scenario that the vehicle moves straight without rotation, then vector V is the vector of the straight movement of the vehicle. Since speed and time between the two frames are known from the CAN data, we know the length of V. Therefore, using the formulas derived above for the parallelogram, we can compute the direction of V, the normal N, and the distance H form the camera to the road. These parameters define the sought extrinsics in this simple scenario.
[0075] In a second scenario, the camera moves with a rotation along a known axis and with a known angle. This scenario can be reduced to the previous one if we compensate the rotation, that is, rotate camera back. The camera rotates around axis OZ which is orthogonal to the road. In this case, OZ is known in the camera coordinates. Designating the known angle of rotation, which occurred between the two frames, as CarAngleOfRotation Rotation matrix for a rotation around the known axis OZ_iter with known angle is described by Rodrigues formula, it is computed as [0076] Rodrigues (OZ_iter*CarAngleOfRotation).
[0077] Now, let us consider how the rotation can be compensated. Please notice, that the camera really moves in curved way, but since we are interested only in the two positions and we can adopt that camera moved straight between them, just along the Epipole vector. The movement of the camera between the frames can be described in two stages: First, straight movement along the Epipole vector V without rotation. Second, a rotation (to CarAngleOfRotation) to the camera at its new position is applied. After the first movement, the points A′, C′, will become B′=A′-V and D′=C′−V, and the four points form a parallelogram, exactly in the same manner as in the previous section. Then, at the second movement, points B and D rotate with the inverse of Rodrigues(OZ_iter*CarAngleOfRotation). This may be understood by the following consideration: if the camera rotated to the right, then the visible image rotated to the left. After the whole movement and the first and second steps described above have been accomplished, we can see the points as B_ and D_ in the spherical image, i.e., they are available for the computation. However, we would like to get B and D, which are not directly available. [0078] OB=Rodrigues (OZ*CarAngleOfRotation)*OB_; [0079] OD=Rodrigues (OZ*CarAngleOfRotation)*OD_;
[0080] Then, we end up with the first scenario 1, so that we can find the Epipole V, compute the normal N, and the height of the camera using the fact that the length of the Epipole is known due to known ego motion of the vehicle and the camera.
[0081] Note, that we compute normal N. If all the conditions hold exactly, N should be equal to OZ.
[0082] Since we know the angle between the Epipole V and the direction Forward, we can find the direction Forward by rotating V around N to that known angle. We conclude that we obtain the direction Up as N, direction Forward, and the height of the camera, and thus the extrinsics.
[0083] An optimal estimator is proposed that provides a more precise measurement of the extrinsic parameters during calibration procedure. The spread of the calibration measurements gets wider because of physical mounting deviations of the camera therefore affecting precision. The optimal estimator takes the history of sample calibrations over time and iteratively adjusts the extrinsic samples into a converged output by applying sample statistics and combined error analysis.
[0084] Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from the study of the drawings, the disclosure, and the appended claims. In the claims the word “comprising” does not exclude other elements or steps and the indefinite article “a” or “an” does not exclude a plurality. A single processor or other unit may fulfil the functions of several items or steps recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. A computer program may be stored/distributed on a suitable medium such as an optical storage medium or a solid-state medium supplied together with or as part of other hardware, but may also be distributed in other forms, such as via the Internet or other wired or wireless telecommunication systems. Any reference signs in the claims should not be construed as limiting the scope of the claims.