[37] | 1 | % Config configuration file for self-calibration experiments |
---|
| 2 | % |
---|
| 3 | % config = configdata(experiment) |
---|
| 4 | % |
---|
| 5 | % experiment ... string with an experiment name |
---|
| 6 | |
---|
| 7 | % $Author: svoboda $ |
---|
| 8 | % $Revision: 2.9 $ |
---|
| 9 | % $Id: configdata.m,v 2.9 2005/05/23 16:23:35 svoboda Exp $ |
---|
| 10 | % $State: Exp $ |
---|
| 11 | |
---|
| 12 | function config = configdata(experiment) |
---|
| 13 | |
---|
| 14 | if nargin<1, |
---|
| 15 | display('No name of the experiment specified: >>basic<< used as default') |
---|
| 16 | experiment = 'basic'; |
---|
| 17 | end |
---|
| 18 | |
---|
| 19 | if strcmp(experiment,'basic') |
---|
| 20 | error; |
---|
| 21 | elseif strcmp(experiment,'G9') |
---|
| 22 | config.paths.data = ['/local/MultiCam/Data/CalibrationG9_20050502/']; |
---|
| 23 | config.files.basename = 'cam'; |
---|
| 24 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 25 | config.files.imnames = ['img0%d','_*.']; |
---|
| 26 | % config.files.idxcams = [1:11,13:16]; % related to the imnames |
---|
| 27 | config.files.idxcams = [1:4]; |
---|
| 28 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 29 | config.imgs.LEDcolor = 'red'; % color of the laser pointer |
---|
| 30 | config.imgs.LEDthr = 30; |
---|
| 31 | config.imgs.subpix = 1/3; |
---|
| 32 | config.cal.nonlinpar = [50,0,1,0,0,0]; |
---|
| 33 | config.cal.NL_UPDATE = [1,0,1,0,0,0]; |
---|
| 34 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 35 | config.cal.GLOBAL_ITER_THR = 0.5; |
---|
| 36 | config.cal.GLOBAL_ITER_MAX = 5; |
---|
| 37 | config.cal.INL_TOL = 10; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 38 | config.cal.NUM_CAMS_FILL = 10; |
---|
| 39 | config.cal.DO_BA = 1; |
---|
| 40 | config.cal.UNDO_RADIAL= 0; % CalTech (BlueC compatible) |
---|
| 41 | config.cal.MIN_PTS_VAL = 30; |
---|
| 42 | config.cal.NTUPLES = 3; |
---|
| 43 | % config.cal.cams2use = [1:11,13:16]; % if use of some cams only is required |
---|
| 44 | elseif strcmp(experiment,'2410ViRoom') |
---|
| 45 | config.paths.data = ['/home/svoboda/viroomData/ViRoom/Calib/20021024Calib/']; |
---|
| 46 | config.files.basename = 'vr'; |
---|
| 47 | config.paths.img = config.paths.data; |
---|
| 48 | config.files.imnames = 'vr%0.2d_image.*.'; |
---|
| 49 | config.files.idxcams = [0:3]; % related to the imnames |
---|
| 50 | config.files.imgext = 'jpg'; |
---|
| 51 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 52 | config.imgs.LEDcolor = 'intensity'; % color of the laser pointer |
---|
| 53 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 54 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 55 | config.cal.GLOBAL_ITER_THR = 1.5; |
---|
| 56 | config.cal.NL_UPDATE = [1,0,1,0,0,0]; |
---|
| 57 | config.cal.INL_TOL = 10; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 58 | config.cal.DO_BA = 1; |
---|
| 59 | config.cal.START_BA = 1; |
---|
| 60 | config.cal.UNDO_RADIAL= 0; |
---|
| 61 | config.cal.NUM_CAMS_FILL = 1; |
---|
| 62 | elseif strcmp(experiment,'oscar2c1p') |
---|
| 63 | config.paths.data = ['/home/svoboda/viroomData/oscar/oscar_2c1p/']; |
---|
| 64 | config.paths.img = [config.paths.data,'cam%d/']; |
---|
| 65 | config.files.imnames = 'oscar2c1p_'; |
---|
| 66 | config.files.basename = 'oscar'; |
---|
| 67 | config.files.idxcams = [1:2]; % related to the imnames |
---|
| 68 | config.files.idxproj = [3]; % related to the projectors |
---|
| 69 | config.cal.cams2use = [1:3]; |
---|
| 70 | config.files.imgext = 'jpg'; |
---|
| 71 | config.files.projdata = [config.paths.data,'files.txt']; % contains the projector data |
---|
| 72 | config.imgs.LEDsize = 25; % avg diameter of a LED in pixels |
---|
| 73 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 74 | config.imgs.subpix = 1/3; % scale of the required subpixel accuracy |
---|
| 75 | config.imgs.res = [1392,1024]; |
---|
| 76 | config.imgs.projres = [1024,768]; % projector resolution |
---|
| 77 | config.cal.DO_GLOBAL_ITER = 0; |
---|
| 78 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 79 | config.cal.GLOBAL_ITER_THR = 0.5; |
---|
| 80 | config.cal.nonlinpar = [30,1,1,1,1,1]; |
---|
| 81 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 82 | config.cal.INL_TOL = 2; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 83 | config.cal.NUM_CAMS_FILL = 10; |
---|
| 84 | config.cal.DO_BA = 0; |
---|
| 85 | config.cal.UNDO_RADIAL= 0; |
---|
| 86 | config.cal.MIN_PTS_VAL = 30; |
---|
| 87 | config.cal.NTUPLES = 2; |
---|
| 88 | config.cal.SQUARE_PIX = 1; |
---|
| 89 | elseif strcmp(experiment,'oscardemo') |
---|
| 90 | config.paths.data = ['/home.zam/svoboda/Work/SelfCalibExtern/']; |
---|
| 91 | config.paths.img = [config.paths.data,'cam%d/']; |
---|
| 92 | config.files.imnames = 'demo3p3c_'; |
---|
| 93 | config.files.basename = 'oscar'; |
---|
| 94 | config.files.idxcams = [1:3]; % related to the imnames |
---|
| 95 | config.files.idxproj = [4:6]; % related to the projectors |
---|
| 96 | config.files.imgext = 'jpg'; |
---|
| 97 | config.files.projdata = [config.paths.data,'calib_3p3c_p3.txt']; % contains the projector data |
---|
| 98 | config.imgs.LEDsize = 25; % avg diameter of a LED in pixels |
---|
| 99 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 100 | config.imgs.subpix = 1/3; % scale of the required subpixel accuracy |
---|
| 101 | config.imgs.res = [1392,1024]; |
---|
| 102 | config.imgs.projres = [1024,768]; % projector resolution |
---|
| 103 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 104 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 105 | config.cal.GLOBAL_ITER_THR = 1; |
---|
| 106 | config.cal.nonlinpar = [15,0,1,0,0,0]; |
---|
| 107 | config.cal.NL_UPDATE = [1,0,1,1,0,0]; |
---|
| 108 | config.cal.INL_TOL = 3; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 109 | config.cal.NUM_CAMS_FILL = 3; |
---|
| 110 | config.cal.DO_BA = 0; |
---|
| 111 | config.cal.START_BA = 0; % do BA in intermediate steps |
---|
| 112 | config.cal.UNDO_RADIAL= 0; |
---|
| 113 | config.cal.MIN_PTS_VAL = 30; |
---|
| 114 | config.cal.NTUPLES = 3; |
---|
| 115 | config.cal.SQUARE_PIX = 1; % 0 works surprisingly far better than 1 (special cameras or projectors?) |
---|
| 116 | config.cal.cams2use = [1,2,3] %,4,5,6]; |
---|
| 117 | elseif strcmp(experiment,'0801BlueCRZ') |
---|
| 118 | config.paths.data = ['/local/MultiCam/Data/CalibData4Testing/20030108_BigBlueC/Calib/']; |
---|
| 119 | config.files.basename = 'atlantic'; |
---|
| 120 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 121 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 122 | config.files.idxcams = [3:18]; % related to the imnames |
---|
| 123 | config.files.imgext = 'jpg'; |
---|
| 124 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 125 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 126 | config.imgs.LEDthr = 30; |
---|
| 127 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 128 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 129 | config.cal.GLOBAL_ITER_THR = 0.2; |
---|
| 130 | config.cal.nonlinpar = [70,0,1,0,0,0]; |
---|
| 131 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 132 | config.cal.INL_TOL = 10; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 133 | config.cal.NUM_CAMS_FILL = 15; |
---|
| 134 | config.cal.DO_BA = 1; |
---|
| 135 | config.cal.UNDO_RADIAL= 0; |
---|
| 136 | config.cal.MIN_PTS_VAL = 200; |
---|
| 137 | config.cal.NTUPLES = 3; |
---|
| 138 | config.imgs.subpix = 1/5; |
---|
| 139 | % config.cal.cams2use = 4; |
---|
| 140 | elseif strcmp(experiment,'BlueCRZ') |
---|
| 141 | config.paths.data = ['/local/MultiCam/Data/CalibData4Testing/20030626_BigBlueC/']; |
---|
| 142 | config.files.basename = 'atlantic'; |
---|
| 143 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 144 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 145 | config.files.idxcams = [3:12,14:18]; % related to the imnames |
---|
| 146 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 147 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 148 | config.imgs.subpix = 1/3; |
---|
| 149 | config.cal.nonlinpar = [70,0,1,0,0,0]; |
---|
| 150 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 151 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 152 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 153 | config.cal.GLOBAL_ITER_THR = 0.3; |
---|
| 154 | config.cal.INL_TOL = 10; % |
---|
| 155 | config.cal.NUM_CAMS_FILL = 15; |
---|
| 156 | config.cal.DO_BA = 0; |
---|
| 157 | config.cal.MIN_PTS_VAL = 30; |
---|
| 158 | config.cal.UNDO_RADIAL= 0; |
---|
| 159 | config.cal.NTUPLES = 3; |
---|
| 160 | config.cal.SQUARE_PIX = 1; |
---|
| 161 | % config.cal.cams2use = [3:12,14:18]; |
---|
| 162 | % config.cal.cams2use = [5,6,12]; |
---|
| 163 | % config.cal.cams2use = [3,4,5,6,9,10,17,18]; |
---|
| 164 | elseif strcmp(experiment,'BlueCHoengg') |
---|
| 165 | config.paths.data = ['/local/MultiCam/Data/CalibData4Testing/20030615_Hoengg/']; |
---|
| 166 | config.files.basename = 'arctic'; |
---|
| 167 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 168 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 169 | % config.files.idxcams = [1:11,13:16]; % related to the imnames |
---|
| 170 | config.files.idxcams = [1:16]; |
---|
| 171 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 172 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 173 | config.imgs.subpix = 1/5; |
---|
| 174 | config.cal.nonlinpar = [70,0,1,0,0,0]; |
---|
| 175 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 176 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 177 | config.cal.GLOBAL_ITER_THR = 0.5; |
---|
| 178 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 179 | config.cal.INL_TOL = 10; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 180 | config.cal.NUM_CAMS_FILL = 10; |
---|
| 181 | config.cal.DO_BA = 0; |
---|
| 182 | config.cal.UNDO_RADIAL= 0; % CalTech (BlueC compatible) |
---|
| 183 | config.cal.MIN_PTS_VAL = 30; |
---|
| 184 | config.cal.NTUPLES = 3; |
---|
| 185 | % config.cal.cams2use = [1:11,13:16]; % if use of some cams only is required |
---|
| 186 | elseif strcmp(experiment,'TestData') |
---|
| 187 | config.paths.data = ['/local/MultiCam/Data/TestData/']; |
---|
| 188 | config.files.basename = 'arctic'; |
---|
| 189 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 190 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 191 | config.files.idxcams = [1:13,15,16]; |
---|
| 192 | config.imgs.LEDsize = 3; % avg diameter of a LED in pixels |
---|
| 193 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 194 | config.imgs.subpix = 1/3; |
---|
| 195 | config.imgs.LEDthr = 30; |
---|
| 196 | config.cal.nonlinpar = [70,0,1,0,0,0]; |
---|
| 197 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 198 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 199 | config.cal.GLOBAL_ITER_THR = 0.2; |
---|
| 200 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 201 | config.cal.INL_TOL = 5; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 202 | config.cal.NUM_CAMS_FILL = 10; |
---|
| 203 | config.cal.DO_BA = 1; |
---|
| 204 | config.cal.UNDO_RADIAL= 0; % CalTech (BlueC compatible) |
---|
| 205 | config.cal.MIN_PTS_VAL = 30; |
---|
| 206 | config.cal.NTUPLES = 3; |
---|
| 207 | config.cal.cams2use = [2:3,16]; |
---|
| 208 | elseif strcmp(experiment,'OneSideH0105') |
---|
| 209 | config.paths.data = ['/datagrid/MultiCam/Data/OneSideCams/Hoengg0105/']; |
---|
| 210 | config.files.basename = 'arctic'; |
---|
| 211 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 212 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 213 | config.files.idxcams = [1:5]; % related to the imnames |
---|
| 214 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 215 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 216 | config.imgs.subpix = 1/5; |
---|
| 217 | config.cal.nonlinpar = [70,0,1,0,0,0]; |
---|
| 218 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 219 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 220 | config.cal.GLOBAL_ITER_THR = 0.2; |
---|
| 221 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 222 | config.cal.INL_TOL = 5; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 223 | config.cal.NUM_CAMS_FILL = 10; |
---|
| 224 | config.cal.DO_BA = 0; |
---|
| 225 | config.cal.UNDO_RADIAL= 0; % CalTech (BlueC compatible) |
---|
| 226 | config.cal.MIN_PTS_VAL = 30; |
---|
| 227 | config.cal.NTUPLES = 3; |
---|
| 228 | config.cal.cams2use = [3,4,5]; % if use of some cams only is required |
---|
| 229 | elseif strcmp(experiment,'OneSideH1416') |
---|
| 230 | config.paths.data = ['/datagrid/MultiCam/Data/OneSideCams/Hoengg1416/']; |
---|
| 231 | config.files.basename = 'arctic'; |
---|
| 232 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 233 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 234 | config.files.idxcams = [14:16]; % related to the imnames |
---|
| 235 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 236 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 237 | config.imgs.subpix = 1/5; |
---|
| 238 | config.cal.nonlinpar = [70,0,1,0,0,0]; |
---|
| 239 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 240 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 241 | config.cal.GLOBAL_ITER_THR = 0.15; |
---|
| 242 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 243 | config.cal.INL_TOL = 10; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 244 | config.cal.NUM_CAMS_FILL = 10; |
---|
| 245 | config.cal.DO_BA = 0; |
---|
| 246 | config.cal.UNDO_RADIAL= 0; % CalTech (BlueC compatible) |
---|
| 247 | config.cal.MIN_PTS_VAL = 30; |
---|
| 248 | config.cal.NTUPLES = 3; |
---|
| 249 | config.cal.cams2use = [14:16]; % if use of some cams only is required |
---|
| 250 | elseif strcmp(experiment,'ViRoom20030611') |
---|
| 251 | config.paths.data = ['/datagrid/MultiCam/Data/Calib.ViRoom/20030611Calib2/']; |
---|
| 252 | config.files.basename = 'viroom'; |
---|
| 253 | config.paths.img = [config.paths.data,'Images/']; |
---|
| 254 | config.files.imnames = 'calib2_%0.2d_*'; |
---|
| 255 | config.files.idxcams = [10,11,20,21,30,40]; % related to the imnames |
---|
| 256 | config.files.imgext = 'jpg'; |
---|
| 257 | config.imgs.LEDsize = 9; % avg diameter of a LED in pixels |
---|
| 258 | config.imgs.LEDcolor = 'red'; % color of the laser pointer |
---|
| 259 | config.imgs.LEDthr = 100; % acceptance threshold for the LED |
---|
| 260 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 261 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 262 | config.cal.GLOBAL_ITER_THR = 1; |
---|
| 263 | config.cal.nonlinpar = [50,0,1,0,0,0]; |
---|
| 264 | config.cal.NL_UPDATE = [1,0,1,0,0,0]; |
---|
| 265 | config.cal.INL_TOL = 10; |
---|
| 266 | config.cal.START_BA = 1; % do BA in all intermediate steps |
---|
| 267 | config.cal.DO_BA = 1; |
---|
| 268 | config.cal.UNDO_RADIAL= 0; |
---|
| 269 | config.cal.NUM_CAMS_FILL = 3; |
---|
| 270 | config.cal.NTUPLES = 3; |
---|
| 271 | config.cal.SQUARE_PIX = 1; |
---|
| 272 | config.cal.planarcams = [1:6]; |
---|
| 273 | % config.cal.cams2use = [20,21,30,40]; |
---|
| 274 | config.imgs.subpix = 1/2; |
---|
| 275 | config.cal.MIN_PTS_VAL = 20; |
---|
| 276 | elseif strcmp(experiment,'ViRoom20030724') |
---|
| 277 | config.paths.data = ['/home/svoboda/viroomData/ViRoom/Calib/20030724Calib/']; |
---|
| 278 | config.files.basename = 'viroom'; |
---|
| 279 | config.paths.img = [config.paths.data,'cam%d/']; |
---|
| 280 | config.files.imnames = 'calib%d*'; |
---|
| 281 | config.files.idxcams = [10,11,20,21,30,40,41]; % related to the imnames |
---|
| 282 | config.files.imgext = 'jpg'; |
---|
| 283 | % config.files.maxid = 499; % maximum number of allowed img indexes |
---|
| 284 | % config.files.posid = [10:13]; % position of the Id |
---|
| 285 | config.imgs.LEDsize = 9; % avg diameter of a LED in pixels |
---|
| 286 | config.imgs.LEDcolor = 'red'; % color of the laser pointer |
---|
| 287 | config.imgs.LEDthr = 70; % acceptance threshold for the LED |
---|
| 288 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 289 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 290 | config.cal.GLOBAL_ITER_THR = 1; |
---|
| 291 | config.cal.nonlinpar = [50,0,1,0,0,0]; |
---|
| 292 | config.cal.NL_UPDATE = [1,0,1,0,0,0]; |
---|
| 293 | config.cal.INL_TOL = 10; |
---|
| 294 | config.cal.START_BA = 1; % do BA in all intermediate steps |
---|
| 295 | config.cal.DO_BA = 1; |
---|
| 296 | config.cal.UNDO_RADIAL= 0; |
---|
| 297 | config.cal.NUM_CAMS_FILL = 4; |
---|
| 298 | config.cal.NTUPLES = 3; |
---|
| 299 | config.cal.SQUARE_PIX = 1; |
---|
| 300 | % config.cal.cams2use = [10,11,40,41]; |
---|
| 301 | config.cal.planarcams = [1,3:7]; |
---|
| 302 | config.imgs.subpix = 1/3; |
---|
| 303 | config.cal.MIN_PTS_VAL = 20; |
---|
| 304 | elseif strcmp(experiment,'Erlangen') |
---|
| 305 | config.paths.data = ['/local/MultiCam/Data/CalibData4Testing/Erlangen_Viroom/']; |
---|
| 306 | config.files.basename = 'erlangen'; |
---|
| 307 | config.paths.img = [config.paths.data,'Images/']; |
---|
| 308 | config.files.imnames = 'cal%0.2d_*'; |
---|
| 309 | config.files.idxcams = [70,71,72,80,81,82]; % related to the imnames |
---|
| 310 | config.files.imgext = 'jpg'; |
---|
| 311 | config.imgs.LEDsize = 9; % avg diameter of a LED in pixels |
---|
| 312 | config.imgs.subpix = 1/3; |
---|
| 313 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 314 | config.cal.DO_GLOBAL_ITER = 0; |
---|
| 315 | config.cal.GLOBAL_ITER_MAX = 5; |
---|
| 316 | config.cal.GLOBAL_ITER_THR = 1.5; |
---|
| 317 | config.cal.nonlinpar = [50,0,1,0,0,0]; |
---|
| 318 | config.cal.NL_UPDATE = [1,0,1,0,0,0]; |
---|
| 319 | config.cal.INL_TOL = 5; |
---|
| 320 | config.cal.START_BA = 1; % do BA in all intermediate steps |
---|
| 321 | config.cal.DO_BA = 1; |
---|
| 322 | config.cal.UNDO_RADIAL= 0; |
---|
| 323 | config.cal.NUM_CAMS_FILL = 2; |
---|
| 324 | config.cal.NTUPLES = 3; |
---|
| 325 | config.cal.SQUARE_PIX = 1; |
---|
| 326 | % config.cal.cams2use = [70,71,72,80,82]; |
---|
| 327 | config.cal.MIN_PTS_VAL = 20; |
---|
| 328 | elseif strcmp(experiment,'extern') |
---|
| 329 | config.paths.data = ['/home.zam/svoboda/Work/SelfCalibExtern/']; |
---|
| 330 | config.files.basename = 'void'; |
---|
| 331 | config.paths.img = [config.paths.data,config.files.basename,'%d/']; |
---|
| 332 | config.files.imnames = [config.files.basename,'%d.pvi.*.']; |
---|
| 333 | config.files.idxcams = [1:32]; % related to the imnames |
---|
| 334 | config.files.imgext = 'jpg'; |
---|
| 335 | config.imgs.LEDsize = 7; % avg diameter of a LED in pixels |
---|
| 336 | config.imgs.LEDcolor = 'green'; % color of the laser pointer |
---|
| 337 | config.cal.DO_GLOBAL_ITER = 1; |
---|
| 338 | config.cal.GLOBAL_ITER_MAX = 10; |
---|
| 339 | config.cal.GLOBAL_ITER_THR = 0.3; |
---|
| 340 | config.cal.nonlinpar = [50,0,1,0,0,0]; |
---|
| 341 | config.cal.NL_UPDATE = [1,1,1,1,1,1]; |
---|
| 342 | config.cal.INL_TOL = 10; % if UNDO_RADIAL than it may be relatively small <1 |
---|
| 343 | config.cal.NUM_CAMS_FILL = 15; % with 30 it gets unstable after some iteration loops |
---|
| 344 | config.cal.DO_BA = 1; |
---|
| 345 | config.cal.UNDO_RADIAL= 0; |
---|
| 346 | config.cal.MIN_PTS_VAL = 30; |
---|
| 347 | config.cal.NTUPLES = 2; |
---|
| 348 | config.imgs.subpix = 1/5; |
---|
| 349 | config.cal.SQUARE_PIX = 1; |
---|
| 350 | % config.cal.cams2use = 4; |
---|
| 351 | else |
---|
| 352 | error('Configdata: wrong identifier of the data set'); |
---|
| 353 | end |
---|
| 354 | |
---|
| 355 | % camera indexes handling |
---|
| 356 | try, config.cal.cams2use; catch, config.cal.cams2use = config.files.idxcams; end |
---|
| 357 | |
---|
| 358 | % Default initial settings for the estiamtion of the nonlinear distortion |
---|
| 359 | % (1) ... camera view angle |
---|
| 360 | % (2) ... estimate principal point? |
---|
| 361 | % (3:4) ... parameters of the radial distortion |
---|
| 362 | % (5:6) ... parameters of the tangential distortion |
---|
| 363 | try, config.cal.nonlinpar; catch, config.cal.nonlinpar = [50,0,1,0,0,0]; end |
---|
| 364 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 365 | % adding more and more non-linear paramaters might be tricky |
---|
| 366 | % in case of bad data. You may fall in the trap of overfitting |
---|
| 367 | % You may want to disable this |
---|
| 368 | % update all possible parameters by default |
---|
| 369 | try, config.cal.NL_UPDATE; catch, config.cal.NL_UPDATE = [1,1,1,1,1,1]; end |
---|
| 370 | |
---|
| 371 | |
---|
| 372 | |
---|
| 373 | % configuration of the for the calibration process |
---|
| 374 | try, config.cal.SQUARE_PIX; catch, config.cal.SQUARE_PIX = 1;end % most of the cameras have square pixels |
---|
| 375 | try, config.cal.START_BA; catch, config.cal.START_BA = 0; end |
---|
| 376 | try, config.cal.DO_GLOBAL_ITER; catch, config.cal.DO_GLOBAL_ITER = 1; end |
---|
| 377 | try, config.cal.GLOBAL_ITER_THR; catch, config.cal.GLOBAL_ITER_THR = 1; end |
---|
| 378 | try, config.cal.GLOBAL_ITER_MAX; catch, config.cal.GLOBAL_ITER_MAX = 10; end |
---|
| 379 | try, config.cal.INL_TOL; catch, config.cal.INL_TOL = 5; end; |
---|
| 380 | try, config.cal.NUM_CAMS_FILL; catch, config.cal.NUM_CAMS_FILL = 12; end; |
---|
| 381 | try, config.cal.DO_BA; catch, config.cal.DO_BA = 0; end; |
---|
| 382 | try, config.cal.UNDO_RADIAL; catch, config.cal.UNDO_RADIAL = 0; end; |
---|
| 383 | try, config.cal.UNDO_HEIKK; catch, config.cal.UNDO_HEIKK = 0; end; % only for testing, not a part of standard package |
---|
| 384 | try, config.cal.NTUPLES; catch, config.cal.NTUPLES = 3; end; % size of the camera tuples, 2-5 implemented |
---|
| 385 | try, config.cal.MIN_PTS_VAL; catch, config.cal.MIN_PTS_VAL = 30; end; % minimal number of correnspondences in the sample |
---|
| 386 | |
---|
| 387 | % image extensions |
---|
| 388 | try, config.files.imgext; catch, config.files.imgext = 'jpg'; end; |
---|
| 389 | |
---|
| 390 | % image resolution |
---|
| 391 | try, config.imgs.res; catch, config.imgs.res = [640,480]; end; |
---|
| 392 | |
---|
| 393 | % scale for the subpixel accuracy |
---|
| 394 | % 1/3 is a good compromise between speed and accuracy |
---|
| 395 | % for high-resolution images or bigger LEDs you may try, 1/1 or 1/2 |
---|
| 396 | try, config.imgs.subpix; catch, config.imgs.subpix = 1/3; end; |
---|
| 397 | |
---|
| 398 | % data names |
---|
| 399 | try, config.files.Pmats; catch, config.files.Pmats = [config.paths.data,'Pmatrices.dat']; end; |
---|
| 400 | try, config.files.points; catch, config.files.points = [config.paths.data,'points.dat']; end; |
---|
| 401 | try, config.files.IdPoints; catch, config.files.IdPoints = [config.paths.data,'IdPoints.dat']; end; |
---|
| 402 | try, config.files.Res; catch, config.files.Res = [config.paths.data,'Res.dat']; end; |
---|
| 403 | try, config.files.IdMat; catch, config.files.IdMat = [config.paths.data,'IdMat.dat']; end; |
---|
| 404 | try, config.files.inidx; catch, config.files.inidx = [config.paths.data,'idxin.dat']; end; |
---|
| 405 | try, config.files.avIM; catch, config.files.avIM = [config.paths.data,'camera%d.average.tiff']; end; |
---|
| 406 | try, config.files.stdIM; catch, config.files.stdIM = [config.paths.data,'camera%d.std.tiff']; end; |
---|
| 407 | try, config.files.CalPar; catch, config.files.CalPar = [config.paths.data,'camera%d.cal']; end; |
---|
| 408 | try, config.files.CalPmat; catch, config.files.CalPmat = [config.paths.data,'camera%d.Pmat.cal']; end; |
---|
| 409 | try, config.files.StCalPar; catch, config.files.StCalPar = [config.paths.data,config.files.basename,'%d.cal']; end; |
---|
| 410 | try, config.files.rad; catch, config.files.rad = [config.paths.data,config.files.basename,'%d.rad']; end; |
---|
| 411 | try, config.files.heikkrad; catch, config.files.heikkrad = [config.paths.data,config.files.basename,'%d.heikk']; end; |
---|
| 412 | try, config.files.Pst; catch, config.files.Pst = [config.paths.data,'Pst.dat']; end; |
---|
| 413 | try, config.files.Cst; catch, config.files.Cst = [config.paths.data,'Cst.dat']; end; |
---|
| 414 | try, config.files.points4cal; catch, config.files.points4cal = [config.paths.data,'cam%d.points4cal.dat']; end; |
---|