Improve accuracy about calculation of transformation

asked 2018-05-30 03:52:52 -0500

zdczdcc gravatar image

I'm trying to get a rigid transformation from a model body to a camera center(The model was binded on the camera.So the transformation between them is rigid.In fact,it's a OptiTrack model binded on a Kinect v1).The model body defined a coordinate system called BODY.The camera defined a coordinate system called CAM.The aruco marker defined a coordinate system called MARKER.

The OptiTrack SDK give me the high precision transformation from BODY to MARKER,marked as tf_b2m.I'm using opencv solvePnP to get the transformation from MARKER to CAM,marked as tf_m2c.So i could get the transformation from BODY to CAM tf_b2c=tf_m2c*tf_b2m.

Theoretically,the tf_b2c should be a constant transformation.But i get about (+-10mm,+-5mm,+-2mm) in translation vector,(+-5 degree,+-1 degree,+-0.5 degree) in rotation euler angle.

Now i think the such big error because of solvePnP or camera calibration.I'm using Kinect v1 with resolution 640x480.And i'm using the opencv 3.4.0 to calibrate the Kinect several times and get stable intrinsic parameters. Please give some help about improve accuracy of camera calibration or solvePnP.

And any idea is appreciated. Thanks a lot!

edit retag flag offensive close merge delete

Comments

1

You think + - 2 mm and + - 0.5 degree are big errors? I worked with solvePnP and your values look typical.

ya_ocv_user gravatar imageya_ocv_user ( 2018-05-30 07:42:11 -0500 )edit

I think + - 2mm is good,too.But the x-axis,y-axis has big errors.How could you get such precision(+ - 2mm)?By using industrial undistorted camera calibrated by the factory or normal camera calibrated by yourself.And you got such precision in 640x480 or higher image resolution.I'm confused about this.

zdczdcc gravatar imagezdczdcc ( 2018-05-30 21:05:52 -0500 )edit

Always need to consider relative error. I don't know the distance of your object from camera, but 5 degree doesn't seem very large. I remember that when I tried this task, I saw complains about precision. Search existing answers on the topic and you will be able to estimate the state of the art for this function. You can start looking to the right side of the screen right now. Also calibrateCamera() returns reprojection error. This is a guidance on what you can expect from this method.

ya_ocv_user gravatar imageya_ocv_user ( 2018-05-31 01:24:28 -0500 )edit

My question is, what is the instantaneous FOV of the camera? IE: if it's 60 degrees total FOV, with a resolution of 640, then the IFOV is 0.093 degrees. And also, what pixel spot size on the marker? IE: at that distance, the IFOV covers x millimeters, or whatever unit is appropriate.

Tetragramm gravatar imageTetragramm ( 2018-05-31 16:57:29 -0500 )edit
1

Hi,ya.Hi Tetragramm.Thanks for your help!I've solved the problem.The reason is that the OptiTrack sent me worse track result with highlight face on the Kinect.Finally,i used the Kinect v1,calibrated by OpenCV 3.4.0,in 640x480 resolution,detected aruco markers(modified the algorithm by myself) get about (+-3mm,+-1mm,+-0.5mm) and (+-0.3 degree,+-0.2 degree,+-0.3 degree).Hope could help someone.

zdczdcc gravatar imagezdczdcc ( 2018-06-01 00:07:49 -0500 )edit

Hi Tetragramm,the kinect v1's IFOV=0.095875.The IFOV covers about 500 mm * 0.095875 degree / 62 degree=0.773185mm.I want to make the x-axis'e error smaller.Is it necessary to use a high resolution camera or other method.

zdczdcc gravatar imagezdczdcc ( 2018-06-01 00:14:14 -0500 )edit