Processing math: 100%

[Reference] Camera refinement

March 06, 2015

To implement efficient camera refinement, I need to derive the Jacobian of the residial vector w.r.t. camera parameters.

The parameterization of camera orientation deserves special discussion. We prefer a parameterization that is free of constraints, so quaternions and rotation matrices aren't an option, leaving euler angles or an axis/angle vector. Both parameterizations have singularities, but we can avoid them by centering the parameterization at the camera's current orientation. If we don't expect to drift too far from the current orientation, this should be okay; otherwise we can reparameterize after every step. We follow Hartley and Zisserman's approach and use axis-angle parameterization. For all other parameters, we will use no transformation.

Let the vector tr represent a rotation of angle rr around axis ˆtr, and let Rtr be the corresponding rotation matrix. Let K be the intrinsic matrix, and let t0 be the translation vector.

The transformation of a point from from world coordinates to homogeneous image coordinates is using the camera P

xh(P)=KRtr,R(Xt0).

We seek the Jacobian of this transformation centered on the current camera, P:

Jh(P)=xh(P)(fx,fy,s,x0,y0,tr,t0)=(JKJtrJt0) , whereJK=xh(P)(fx,fy,s,x0,y0)Jtr=xh(P)(tr,t0)Jt0=xh(P)(t0)

Deriving Jtr

When centered at the current camera, the rotation vector is zero, tr=(0,0,0). For small tr, the rotation matrix is approximated by Rtr=I+[tr]×. The Jacobian of rotation RtrX is then [X]×, and the jacobian of xh is

Jtr=K[Xc]×

where Xc=R(Xt0) is the point in camera coordinates.

Deriving Jt0 and JK

The other derivatives are straightforward to derive.

The Jacobian w.r.t. translation is:

Jt0=KR

The Jacobian w.r.t. intrinsic parameters is

JK=xh(fx,fy,s,x0,y0)=(Xc,10Xc,2Xc,300Xc,200Xc,300000)

Jacobian of residuals

We've derived the jacobian of the transformation from world to homogeneous image coordinates w.r.t. each camera parameter. To get the Jacobian of the residuals, it remains to transform to nonhomogeneous screen coordinates.

x=(xh,1/xh,3,xh,2/xh,3)

The Jacobian of this is

Jx(xh)=(1xh,30xh,1x2h,301xh,3xh,2x2h,3)=1xc,3(10x101x2)

where xc,3 is the point's depth in camera coordinates, and (x1,x2) is the point in nonhomogeneous image coordinates.

The Jacobian of the residuals w.r.t. camera parameters is then

J=JxJh=Jx[JKJtrJt0]

In what follows, we'll drop the Jx and use JK to refer to the Jacobian of the residuals (and likewise for Jtr and Jt0). In other words, let JKJxJK.

Full Jacobian with Shared Intrinsics

We now derive the Jacobian of all residuals in all views, where cameras share the same intrinsic parameters.

Let JKij be the Jacobian of residuals the jth point in view i w.r.t. intrinsic parameters, and let JRi,j be the same w.r.t. rotation. Let Jti be the Jacobian w.r.t. translation in view i.

The full Jacobian is a block matrix with form:

J=(AllJK11JK12JK13JK11JK12JK13Camera 1JR11Jt1JR12Jt1JR13Jt1000000Camera 2000000JR11Jt1JR12Jt1JR13Jt1000000)
Posted by Kyle Simek