HTLife / tumvi_fisheye_calib

Image undistortion example with OpenCV Python for TUM Visual-Inertial Dataset
47 stars 18 forks source link

radtan distortion #3

Open ycdfwzy opened 3 years ago

ycdfwzy commented 3 years ago

Hello, I tried to use the script to undistort images in tumvi dataset. The results showed that the equidistant distortion model fitted well, but the radial tangential distortion didn't. Hasn't this script supported radtan distortion well yet, or Have I done something wrong? @HTLife

% omni-radtan-512
intri = [1.792187901303534, 533.340727445877, 533.2556495307942, 254.64689387916482, 256.4835490935692];
D = [-0.05972430882700243, 0.17468739202093328, 0.000737218969875311, 0.000574074894976456];
xi = intri(1);
fu = intri(2);
fv = intri(3);
pu = intri(4);
pv = intri(5);
K = [fu fu*cot(xi) pu; 0 fv pv; 0 0 1];

unImgRadtan = camera.Undistort(img, D, K, 'radtan');
figure;
imshow(unImgRadtan);
title('radtan');