Line | |
---|
1 | % readradfiles reads the BlueC *.rad files |
---|
2 | % |
---|
3 | % *.rad files contain paprameters of the radial distortion |
---|
4 | % [K,kc] = readradfiles(name) |
---|
5 | % name ... name of the *.rad file with its full path |
---|
6 | % |
---|
7 | % K ... 3x3 calibration matrix |
---|
8 | % kc ... 4x1 vector of distortion parameters |
---|
9 | % |
---|
10 | % $Id: readradfile.m,v 2.0 2003/06/19 12:07:16 svoboda Exp $ |
---|
11 | function [K,kc] = readradfiles(name); |
---|
12 | |
---|
13 | fid = fopen(name,'r'); |
---|
14 | if fid<0 |
---|
15 | error(sprintf('Could not open %s. Missing rad files?',name')) |
---|
16 | end |
---|
17 | |
---|
18 | for i=1:3, |
---|
19 | for j=1:3, |
---|
20 | buff = fgetl(fid); |
---|
21 | K(i,j) = str2num(buff(7:end)); |
---|
22 | end |
---|
23 | end |
---|
24 | |
---|
25 | buff = fgetl(fid); |
---|
26 | for i=1:4, |
---|
27 | buff = fgetl(fid); |
---|
28 | kc(i) = str2num(buff(7:end)); |
---|
29 | end |
---|
30 | |
---|
31 | fclose(fid); |
---|
32 | |
---|
33 | return; |
---|
34 | |
---|
35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.