| ARToolKit | Mailing List Archive |
|
| From: | =?ISO-8859-1?Q?=22Bj=F6rn_Schwerdtfeger=22?= <bjoern.abi99@g ......> | Received: | Feb 17, 2005 |
| To | artoolkit@h .................. | ||
| Subject: | calib camera with matlab | ||
Hi, I would like to calibrate the ARToolKit with the Matlab Toolbox Calibration (http://www.vision.caltech.edu/bouguetj/calib_doc). I know that some of you already asked for it in this mailing list. However, there was not a direct solution mentioned, until know. I tried to combine both, but something isn’t right: Matlab delivers the following: Focal Length: fc (2x1) the focal distance (a unique value in mm) Principal point: cc (2x1) Skew: alpha_c (1x1) angle between the x and y pixel axes (assume to be 90°) Distortion: kc (5x1) radial and tangential distortions and defines the intrinsic matrix: fc(0) alpha_c*fc(0) cc(0) 0 fc(1) cc(1) 0 0 1 the ARToolKit uses the following Matrix (without taking into account the skew): param.mat : Sx*f 0 X0 0 Sy*f Y0 0 0 1 Then comes what I did : the Matlab Parameter into the param.mat: fc(0) 0 cc(0) 0 fc(1) cc(1) 0 0 1 the distortion param.dist_factor[0] = cc(0) //central point of distortion param.dist_factor[1] = cc(1) //central point of distortion param.dist_factor[2] = ?; //coefficient of distortion param.dist_factor[3] = ?; //ratio of distortion I am not sure about the values, I've chosen and what to put for param.dist_factor[2],[3]? Thanks for any ideas! Björn |
|||
| From: | Hirokazu Kato <kato@s ...................> | Received: | Feb 21, 2005 |
| To | <bjoern.abi99@g ......> | ||
| Subject: | Re: calib camera with matlab | ||
>the ARToolKit uses the following Matrix (without taking into account the
>skew):
>
>param.mat :
>
>Sx*f 0 X0
>0 Sy*f Y0
>0 0 1
>
>Then comes what I did :
>
>the Matlab Parameter into the param.mat:
>
>fc(0) 0 cc(0)
>0 fc(1) cc(1)
>0 0 1
You can use skew parameter instead of 0.
>param.dist_factor[0] = cc(0) //central point of distortion
>param.dist_factor[1] = cc(1) //central point of distortion
>param.dist_factor[2] = ?; //coefficient of distortion
>param.dist_factor[3] = ?; //ratio of distortion
These values are used in only two functions:
int arParamObserv2Ideal( double dist_factor[4], double ox, double oy,
double *ix, double *iy )
int arParamIdeal2Observ( double dist_factor[4], double ix, double iy,
double *ox, double *oy )
So easy way is to replace these two functions for Matlab distortion parameters.
I think the distortion model in ARToolKit is different from Matlab's one.
------------------------------------------------------------------
Hirokazu Kato
Graduate School of Engineering Science
Osaka University Phone: +81-6-6850-6381
Email: kato@s ................... Fax: +81-6-6850-6341
URL: http://www.sys.im.hiroshima-cu.ac.jp/people/kato/
|
|||