source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/RadialDistortions/readradfile.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 673 bytes
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 $
11function [K,kc] = readradfiles(name);
12
13fid = fopen(name,'r');
14if fid<0
15  error(sprintf('Could not open %s. Missing rad files?',name'))
16end
17 
18for i=1:3,
19  for j=1:3,
20        buff = fgetl(fid);
21        K(i,j) = str2num(buff(7:end));
22  end
23end
24
25buff = fgetl(fid);
26for i=1:4,
27  buff = fgetl(fid);
28  kc(i) = str2num(buff(7:end));
29end
30
31fclose(fid);
32
33return;
34
35       
Note: See TracBrowser for help on using the repository browser.