• Keine Ergebnisse gefunden

7. Tracking in Unknown Scenes 89

7.4. Feature Prediction

iterative image alignment method as the one presented in Section 6.5.

In order to compute H from the image homography HI, the scale factor λ has to be determined. The image homography HI can be transformed into the camera coordinate system by

HL =K−1HIK. (7.16)

If the relation between HL and the motion parameters of the camera (R,t) and the struc-ture parameters (n,d) is written as

HL =λH =λ(∆R+ ∆tnT

d ), (7.17)

then the scale factorλ can be computed by

|λ|=σ2(HL), (7.18)

where σ2(HL) is the second largest singular value of HL. The proof can be found in [67], p.135.

By assuming that the normal vectorn˜c0 =dnc0 is non-unit, the valuedof equation (7.17) can be neglected, and the normal vector must satisfy the following equation

(1

λHL−∆R) = ∆t˜nTc0. (7.19)

Transposing and multiplying this equation with ∆t results in the least squares solution for n˜c0:

˜

nc0 = 1

∆tT∆t(1

λHL−∆R)T∆t. (7.20)

Then the unit normal nc0 and the scale factor d can be determined by normalizing n˜c0. Since this equation computes the normal vector nc0 in the coordinate system of the rst camera, it must be transformed into the world coordinate system by

nw =R−10 nc0. (7.21)

Now the vector nw can be regarded as a measurement of the surface normal, which will be used for a robust estimation of the surface orientation.

7.4. Feature Prediction

If an image feature is occluded or cannot be tracked because of reections, these feature points needs to be predicted so that the local search of the template-based tracking can be successful. With no proper prediction the starting point for the iterative image alignment

7. Tracking in Unknown Scenes

would be further away from the solution and the chances for convergence are getting lower with every frame, at which the tracking of this feature failed. Moreover, feature points which move out of the camera image and are not visible in the current frame any more should not be discarded. If the camera moves back and an already reconstructed feature point gets visible again, this points needs to be predicted so that the feature tracking step can be carried out correctly.

The most straightforward method for feature prediction is to use the camera pose of the last frame, assuming that the pose estimation was successful. A more sophisticated approach is to use a Kalman lter with a kinematic motion model. With such a lter the current camera pose can be extrapolated for a proximate camera frame, which results in a more precise prediction. If other input devices like an inertial sensor are integrated into the tracking system, they can also be used to provide a more accurate prediction of the camera pose.

7.4.1. Image Position Prediction

If the approximate camera pose is known, it can be used to predict all feature points, where the tracking step failed in the last frame. Predicting the position of a template is fairly simple. If M is the reconstructed 3D point, the image position of this feature can be estimated by projecting the point M into the image with the current camera parameters. With the intrinsic camera matrixK the homogeneous image positionm˜0 can be computed with

˜

m0 =K(RM +t), (7.22)

where the camera rotation and translation used for the prediction is given byR and t.

7.4.2. Warp Prediction

If a warp shall be predicted in the image, the 3D geometry of the template needs to be available. A simple approximated method for predicting an ane warp is to use the unit vectors of the ane transformation. When a feature is detected for the rst time, it is assumed that the initial captured patch is observed from an orthogonal direction of the patch plane, and the 2D unit vectors of the ane transformation are un-projected with the 3D position of the regarded feature point. This yields two vectors which approximately describe the orientation of the template in 3D space. If oine models are used, e.g. a reference image of a poster, these 3D unit vectors of the ane transformation can be determined exactly.

For a prediction of an ane warp with a given camera pose, the 3D unit vectors can also simply be projected into the image, and the ane warp can be derived from the projected unit vector.

For a more accurate tracking of templates in camera images with a wide eld of view, the warp function can be modeled with a homography. A homography correctly models the transformation of a plane for a perspective camera projection. In equation (7.12) it

7.4. Feature Prediction can be seen that the surface normal of a plane is related to the homography mapping of a template between two images. If a surface normal of a template is reconstructed or given from a 3D model, this normal vector nw can be used to predict the homography.

Together with the 3D position Mw and the relative camera rotation ∆R and relative camera translation ∆t, the homography of an image patch can be calculated.

Since the equation

d=nTc0Mc0 =nTc0(R0Xp+t0) (7.23)

must be satised for any point Xp on the plane P, the predicted homography H˜ can be calculated by

H˜ = ∆R+ ∆tnTc0

nTc0(R0Mw+t0). (7.24)

Since we are interested in a prediction of a warp function in the image coordinate system, the homography H˜ has to be projected into image space. For this homography, which transforms a point in the image of the rst camera to the second camera, we get

I ∼KHK˜ −1. (7.25)

The homography H˜I describes the transformation from a template in the initial camera image to the current camera image.

If a feature is initialized at the 2D image position p = (px, py)T the homography which represents the current warp of the template is initialized with

H0 =

1 0 px 0 1 py 0 0 1

. (7.26)

To obtain the homography in the image of the current camera pose, H˜I has to be trans-formed by the initial homography H0. Finally the prediction of the homography in the current camera image can be computed by

H = ˜HIH0. (7.27)

The undened scale factor ofH can be eliminated by normalization with the last element ofH. With the warp parameters ofHthe iterative template alignment with a projective warp function is initialized.

7.4.3. Prediction of the Illumination Parameters

Since the illumination can change signicantly if the feature has not been observed for a long time, the illumination parameters also need to be predicted. This is very important for the convergence behavior, because if the illumination parameters are too far away from the solution, the whole iteration process is likely to diverge.

7. Tracking in Unknown Scenes

If µt and µ0 are the mean intensity values of the current and the initial patch, and if σt and σ0 are their standard deviations respectively, then the contrast λ and brightness δ can be predicted by

λ=σt

σ0 (7.28)

δ =µt− σt

σ0µ0. (7.29)

The predicted illumination parameters λ and δ describe the illumination correction of a patch, which is extracted out of the current image, thatT(x) =λI(g(x;p)) +δ holds.