0
votes

Calibration:

I have calibrated the camera using this vision toolbox in Matlab. I used checkerboard images to do so. After calibration I get the following:

    >> cameraParams

cameraParams = 

  cameraParameters with properties:

   Camera Intrinsics
    IntrinsicMatrix: [3x3 double]
        FocalLength: [1.0446e+03 1.0428e+03]
     PrincipalPoint: [604.1474 359.7477]
               Skew: 3.5436

   Lens Distortion
        RadialDistortion: [0.0397 0.0798 -0.2034]
    TangentialDistortion: [-0.0063 -0.0165]

   Camera Extrinsics
      RotationMatrices: [3x3x18 double]
    TranslationVectors: [18x3 double]

   Accuracy of Estimation
    MeanReprojectionError: 0.1269
       ReprojectionErrors: [48x2x18 double]
        ReprojectedPoints: [48x2x18 double]

   Calibration Settings
                        NumPatterns: 18
                        WorldPoints: [48x2 double]
                         WorldUnits: 'mm'
                       EstimateSkew: 1
    NumRadialDistortionCoefficients: 3
       EstimateTangentialDistortion: 1

I know the transformation from the camera's coordinates to the checkerboard coordinates: R1, t1. How can I figure out the transformation between the checkerboard and a perpendicular plane: R2, t2. Given that this plane is parallel to the ground and at a height 193.040 cm from it.

Note: This question is sort of subpart of Calibration of images to obtain a top-view for points that lie on a same plane. I posted it, to ask a generalized question. enter image description here

1

1 Answers

2
votes

So, IIRC the view coordinate system in the toolbox are defined with the origin at the top-left corner the checkerboard, x axis toward the right and y axis downward (and of course the z axis is the cross product of x and y).This is easy to verify, just back-project points [0; 0; 0], [10; 0; 0] and [0; 10; 0] on top of one of the calibration images and see where they fall.

Let's call this the "calibration view" frame. Let's also call "floor" the second plane you are interested in.

Now let's assume (big assumption) that you carefully placed the checkerboard in that view so that it was orthogonal to the floor, and with its horizontal edge parallel to the floor. This means that the x axis of the calibration view frame is parallel to the floor, and the y axis is orthogonal to the floor.

Therefore the floor is parallel to the (x, z) plane of the calibration view frame. Therefore, if

Rc = [x y z] 

is the rotation of the calibration view w.r.t the camera, then the floor has rotation

Rf = [x z y] 

(assuming the normal vector of the floor goes into it. If you prefer that it goes up from it, then it would be Rf = [z x -y]).

Further, let's call H the distance (height) of the origin of the calibration view frame from the floor. Remembering that the y axis of that frame is pointing toward the floor, we see that the point F = [0; H; 0] (in view frame coordinates) is on the floor, and we can use it as the origin of the floor frame.

In camera coordinates, vector F is represented by:

Fc = Rc * F = Rc * [0; H; 0]

and if Tc is the (calibrated) translation w.r.t. the camera of the calibration view frame, then that same point on the floor is, in camera coordinates:

F = Tc + Fc

So the 3x4 coordinate transform matrix from the floor to the camera is

Q = [Rf, F]

This should give you a decent estimate, provided that your assumptions hold.

Of course, a much better way to proceed would be to take an image of the checkerboard on the floor...