Dear DAVID Community,

As you are probably aware, the entire DAVID company, team and product range has been integrated into HP Inc.
This forum is now read-only. Relevant content has been migrated to HP and merged into HP's Support Forums on November 1, 2016.

To start new discussions for 3D Scanning, please register and post your new topic at the HP Support Forums

Tsai/Matlab format of Calibration Files

Problems, solutions and discussion about scanning with a video projector and stripe patterns.

Tsai/Matlab format of Calibration Files

Postby Booley » Wed Jun 25, 2014 4:13 pm

I'm trying to understand what the parameters the DAVID camera and projector .cal files for structured lighting represents. I've done some research on the wiki, this forum, and other places, and so far I understand most of it. However, I could find no documentation for the below. I have two questions about the files:


1) If the camera calibration file is in the Tsai format, then how does the N, O, A, and P vectors from DAVID correspond to R and T, the rotation and translation transformation vectors in Tsai model? (To my understanding P is the camera position and A is its direction, and N and O specify the x and y axes, but I'm still unsure how R and T can be obtained from these).


2) I noticed the projector calibration file has listed at the top
Code: Select all
<camera_model>CameraMatlab</camera_model>

whereas the camera calibration file reads
Code: Select all
<camera_model>CameraTsai</camera_model>

Theoretically the projector can be modeled with a pinhole model like the camera but with light traveling the opposite direction, so why is one done in Matlab and the other done in Tsai?


Furthermore, how are the Matlab parameters read, if they do not (apparently) correspond to Tsai? I found here that the projector calibration parameters very closely match these but not quite (again, the N, O, A, P vectors throw me off; worse yet, there are two sets, where the second set is 4x1 instead of 3x1):
Code: Select all
<nx>0.99887019023609613</nx>
<ny>0.037563830463145931</ny>
<nz>0.029108447204222367</nz>
<ox>0.033819231002507985</ox>
<oy>-0.99220950999286783</oy>
<oz>0.11990224307373148</oz>
<ax>0.033385665668127298</ax>
<ay>-0.11878235104866891</ay>
<az>-0.99235888186041188</az>
<px>-9.2966764494201239</px>
<py>-9.682944298807838</py>
<pz>149.13370814351458</pz>

Same as above but has a w parameter?
<MotionType>FixedPose</MotionType>
<Pose>
<nx>0.99887019023609613</nx>
<ny>0.037563830463145931</ny>
<nz>0.029108447204222367</nz>
<nw>0</nw>
<ox>0.033819231002507985</ox>
<oy>-0.99220950999286783</oy>
<oz>0.11990224307373148</oz>
<ow>0</ow>
<ax>0.033385665668127298</ax>
<ay>-0.11878235104866891</ay>
<az>-0.99235888186041188</az>
<aw>0</aw>
<px>-9.2966764494201239</px>
<py>-9.682944298807838</py>
<pz>149.13370814351458</pz>
<pw>1</pw>
</Pose>



Any help in understanding how these calibration files translate to the Tsai model would be greatly appreciated! :D
Booley
 
Posts: 3
Joined: Tue Jun 24, 2014 8:26 pm

Re: Tsai/Matlab format of Calibration Files

Postby Booley » Wed Jun 25, 2014 5:22 pm

Ah I'm sorry for the double post but I couldn't find the edit button...

I noticed that in the Advanced Settings section in DAVID there is an option to set the Projector Calibration model: two options are TS11 and MA16 (I may have the numbers wrong). Do these correspond to Tsai and Matlab, or just coincidences? If they do relate, then why is there no such option for the camera?
Booley
 
Posts: 3
Joined: Tue Jun 24, 2014 8:26 pm

Re: Tsai/Matlab format of Calibration Files

Postby Sven » Fri Jun 27, 2014 10:28 am

Hi Booley,

The difference between TS11 and MA16 are non-linear lens distortion parameters. They have different advantages and disadvantages.
For projectors, often MA16 is slightly better, but sometime, depending on model and setup, MA16 is very imprecise, causing distorted scans. So in general we recommend TS11 (default setting).
Please understand that I can't go much into detail here.

About N, O, A, P:
You are right about the meaning of these vectors.
You can interpret them as a 4x4 homogeneous transformation matrix (add bottom row "w", always: 0 0 0 1) which represents the position and orientation of the camera/projector. N,O,A can also be interpreted as a 3x3 rotation matrix.
These matrices can be converted to other representations of rotation, like RPY angles...

Sven
User avatar
Sven
DAVID Developer
 
Posts: 1541
Joined: Mon Jan 22, 2007 8:59 am
Location: Braunschweig, Germany


Return to Structured Light Scanning

Who is online

Users browsing this forum: No registered users and 1 guest

cron