Improve accuracy about calculation of transformation
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!
You think + - 2 mm and + - 0.5 degree are big errors? I worked with solvePnP and your values look typical.
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.
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.
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.
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.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.