1
votes

I'd like to get the pose (translation: x, y, z and rotation: Rx, Ry, Rz in World coordinate system) of the overhead camera. I got many object points and image points by moving the ChArUco calibration board with a robotic arm (like this https://www.youtube.com/watch?v=8q99dUPYCPs). Because of that, I already have exact positions of all the object points.

In order to feed many points to solvePnP, I set the first detected pattern (ChArUco board) as the first object and used it as the object coordinate system's origin. Then, I added the detected object points (from the second pattern to the last) to the first detected object points' coordinate system (the origin of the object frame is the origin of the first object).

After I got the transformation between the camera and the object's coordinate frame, I calculated the camera's pose based on that transformation.

The result looked pretty good at first, but when I measured the camera's absolute pose by using a ruler or a tape measure, I noticed that the extrinsic calibration result was around 15-20 millimeter off for z direction (the height of the camera), though almost correct for the others (x, y, Rx, Ry, Rz). The result was same even I changed the range of the object points by moving a robotic arm differently, it always ended up to have a few centimeters off for the height.

Has anyone experienced the similar problem before? I'd like to know anything I can try. What is the common mistake when the depth direction (z) is inaccurate?

1
You measure the distance from the object to which part of the camera, exactly? The lens? The light-sensitive imaging sensor inside the camera? Which one is your camera pose with respect to?mikkola
I measured from the lens.kangaroo
After spending a lot of time, I noticed that the output from the camera was rectified by default. Using the unrectified image solved this issue, though I still have a centimeter off for y-direction in the camera frame when I get pointcloud data from the camera.kangaroo

1 Answers

0
votes

I don't know how you measure the z but I believe that what you're measuring with the ruler is not z but the euclidean distance which is computed like so:

d=std::sqrt(x*x+y*y+z*z);

Let's take an example, if x=2; y=2; z=2; then d will be d~3,5 so 3.5-2=1.5 is the difference you get between z and the ruler when you said around 15-20 millimeter off for z direction.