vrcore  0.45
visuReal Messkern
 All Classes Files Functions Variables
camcalib_data.h
Go to the documentation of this file.
1 #ifndef VRCORE_CAMCALIB_DATA
2 #define VRCORE_CAMCALIB_DATA
3 
4 namespace cv
5 {
6 typedef Matx<double, 8, 1> Matx81d;
7 }
8 
9 namespace vr
10 {
11 
12 const cv::Size noSize{0, 0};
13 const cv::Rect noRect{0, 0, 0, 0};
14 const cv::Matx81d noDistortionCoeffs{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
15 
25  cv::Matx33d cameraMatrix;
26  cv::Matx81d distortionCoeffs;
27  cv::Size imageSize; // Photo
28  cv::Size videoSize; // Video
36  cv::Matx33d getCameraMatrix(
37  const cv::Size& scaledSize = noSize,
38  const cv::Rect& clipping = noRect,
39  const bool letterboxed = false) const;
40 };
41 
42 // cx = 543.64534750988003
43 // cy = 424.99674926231330
44 //
45 // Obacht!!!
46 // Wahrscheinlich beziehen sich diese Daten auf ein auf 1113 x 628 skaliertes
47 // Zwischenbild (vgl. rev 0 dieser Datei und frühere Versionen von
48 // MeasuringHead::undistortImage() im https://hg.visureal.eu:8552/hg/vrcore/
49 // Repository). cx und cy weichen auch stark von der Mitte ab.
50 static const CameraCalibData calib_iPad_2_rearCam_zoom4x = {
51  {
52  3.7894127152414831e+003, 0., 5.4364534750988003e+002,
53  0., 3.8160421503625466e+003, 4.2499674926231330e+002,
54  0., 0., 1.
55  },
56  {
57  4.7886813122787544e+000, 7.1672755112535427e+001,
58  1.9312141282855966e-001, -1.7426126324367353e-002,
59  -2.3716394862029779e+003
60  },
61  {960, 720},
62  {1280, 720}
63 };
64 
65 /*
66 calibration_time: "Sa 03 Okt 2015 03:35:00 CEST"
67 nframes: 20
68 image_width: 960
69 image_height: 720
70 board_width: 8
71 board_height: 6
72 square_size: 30.
73 flags: 0
74 camera_matrix: !!opencv-matrix
75  rows: 3
76  cols: 3
77  dt: d
78  data: [ 1.1666278513269360e+03, 0., 4.9573534693659877e+02, 0.,
79  1.1580356770394480e+03, 3.4477456794217534e+02, 0., 0., 1. ]
80 distortion_coefficients: !!opencv-matrix
81  rows: 12
82  cols: 1
83  dt: d
84  data: [ -6.1308260595379940e+00, -5.0247887425017836e+01,
85  8.6735748913811204e-05, 4.7342681038781376e-04,
86  3.1176279158212014e+02, -6.0511993354263591e+00,
87  -5.1306296677890487e+01, 3.1528251356174894e+02, 0., 0., 0., 0. ]
88 avg_reprojection_error: 5.5602541679290773e-01
89 per_view_reprojection_errors: !!opencv-matrix
90  rows: 20
91  cols: 1
92  dt: f
93  data: [ 4.73575532e-01, 6.39105201e-01, 4.75118548e-01,
94  5.32871962e-01, 6.24507308e-01, 5.47239482e-01, 6.19755983e-01,
95  4.26893324e-01, 5.34244955e-01, 5.20598650e-01, 4.72686082e-01,
96  5.51671624e-01, 6.31343126e-01, 9.74626243e-01, 4.92901325e-01,
97  4.57406729e-01, 3.32555860e-01, 4.66269553e-01, 6.11197174e-01,
98  4.45656717e-01 ]
99 */
100 static const CameraCalibData calib_iPad_2_rearCam = {
101  {
102  1.1666278513269360e+03, 0., 4.9573534693659877e+02,
103  0., 1.1580356770394480e+03, 3.4477456794217534e+02,
104  0., 0., 1.
105  },
106  {
107  -6.1308260595379940e+00, -5.0247887425017836e+01,
108  8.6735748913811204e-05, 4.7342681038781376e-04,
109  3.1176279158212014e+02, -6.0511993354263591e+00,
110  -5.1306296677890487e+01, 3.1528251356174894e+02
111  },
112  {960, 720},
113  {1280, 720}
114 };
115 
116 // Alles mm
117 const double approxdist = 250.0;
118 const double f3 = 4.28;
119 const double fA = 3.3;
120 const double pixelSize = 0.00175;
121 const double f_3 = (1.0 / (1.0 / f3 - 1.0 / approxdist)) / pixelSize;
122 const double f_A = (1.0 / (1.0 / fA - 1.0 / approxdist)) / pixelSize;
123 // TODO: synthetisch!
124 static const CameraCalibData calib_iPad_3_rearCam = {
125  {
126  f_3, 0., 2591 * 0.5,
127  0., f_3, 1935 * 0.5,
128  0., 0., 1.
129  },
130  { // von calib_iPad_2_rearCam
131  -6.1308260595379940e+00, -5.0247887425017836e+01,
132  8.6735748913811204e-05, 4.7342681038781376e-04,
133  3.1176279158212014e+02, -6.0511993354263591e+00,
134  -5.1306296677890487e+01, 3.1528251356174894e+02
135  },
136  {2592, 1936},
137  {1920, 1080}
138 };
139 // TODO: synthetisch!
140 static const CameraCalibData calib_iPad_Air_rearCam = {
141  {
142  f_A, 0., 2591 * 0.5,
143  0., f_A, 1935 * 0.5,
144  0., 0., 1.
145  },
146  { // von calib_iPad_2_rearCam
147  -6.1308260595379940e+00, -5.0247887425017836e+01,
148  8.6735748913811204e-05, 4.7342681038781376e-04,
149  3.1176279158212014e+02, -6.0511993354263591e+00,
150  -5.1306296677890487e+01, 3.1528251356174894e+02
151  },
152  {2592, 1936},
153  {1920, 1080}
154 };
155 
156 /*
157 calibration_time: "Sa 26 Sep 2015 04:37:56 CEST"
158 nframes: 45
159 image_width: 2592
160 image_height: 1936
161 board_width: 11
162 board_height: 7
163 square_size: 15.
164 flags: 0
165 camera_matrix: !!opencv-matrix
166  rows: 3
167  cols: 3
168  dt: d
169  data: [ 9.2595451544568041e+03, 0., 1.4345459116403201e+03, 0.,
170  9.5754714965878557e+03, 1.0578714277919958e+03, 0., 0., 1. ]
171 distortion_coefficients: !!opencv-matrix
172  rows: 5
173  cols: 1
174  dt: d
175  data: [ 5.3560790994798939e+00, 2.3068059804111670e+02,
176  5.6245809696731541e-02, 1.0654538258853928e-01,
177  -1.3237953124032669e+04 ]
178 avg_reprojection_error: 3.5653432190464054e+00
179 */
180 static const CameraCalibData calib_iPad_3_rearCam_zoom4x = {
181  {
182  9.2595451544568041e+03, 0., 1.4345459116403201e+03,
183  0., 9.5754714965878557e+03, 1.0578714277919958e+03,
184  0., 0., 1.
185  },
186  {
187  5.3560790994798939e+00, 2.3068059804111670e+02,
188  5.6245809696731541e-02, 1.0654538258853928e-01,
189  -1.3237953124032669e+04
190  },
191  {2592, 1936},
192  {1920, 1080}
193 };
194 
195 /*
196 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 11 -h 7 -s 15 -su -r180 -o iPad_3_rear_zoom4x-rot180.yml -oe iPad_3_rear_zoom4x_imagelist.xml
197 calibration_time: "Fr 09 Okt 2015 00:31:36 CEST"
198 nframes: 45
199 image_width: 2592
200 image_height: 1936
201 board_width: 11
202 board_height: 7
203 square_size: 15.
204 flags: 0
205 camera_matrix: !!opencv-matrix
206  rows: 3
207  cols: 3
208  dt: d
209  data: [ 9.8685045537678816e+03, 0., 1.3224031459369317e+03, 0.,
210  1.0426871878584370e+04, 9.8384405365999976e+02, 0., 0., 1. ]
211 distortion_coefficients: !!opencv-matrix
212  rows: 12
213  cols: 1
214  dt: d
215  data: [ 9.7035842468746285e+00, -2.0240372351113992e+03,
216  1.5084206798289397e-02, 2.5390312245979037e-02,
217  -2.0978931329088013e+04, 3.8267967008418822e+00,
218  -2.3907054934578578e+03, 2.1536535456318426e+04, 0., 0., 0., 0. ]
219 avg_reprojection_error: 5.6078094860742986e+00
220 */
221 static const CameraCalibData calib_iPad_3_rearCam_zoom4x_rot180 = {
222  {
223  9.8685045537678816e+03, 0., 1.3224031459369317e+03,
224  0., 1.0426871878584370e+04, 9.8384405365999976e+02,
225  0., 0., 1.
226  },
227  {
228  9.7035842468746285e+00, -2.0240372351113992e+03,
229  1.5084206798289397e-02, 2.5390312245979037e-02,
230  -2.0978931329088013e+04, 3.8267967008418822e+00,
231  -2.3907054934578578e+03, 2.1536535456318426e+04
232  },
233  {2592, 1936},
234  {1920, 1080}
235 };
236 
237 /*
238 %YAML:1.0
239 calibration_time: "Di 01 Mär 2016 09:29:57 CET"
240 nframes: 42
241 image_width: 1296
242 image_height: 968
243 board_width: 11
244 board_height: 7
245 square_size: 15.
246 aspectRatio: 1.
247 flags: 6
248 camera_matrix: !!opencv-matrix
249  rows: 3
250  cols: 3
251  dt: d
252  data: [ 4.9460365421521146e+03, 0., 6.4750000000000000e+02, 0.,
253  4.9460365421521146e+03, 4.8350000000000000e+02, 0., 0., 1. ]
254 distortion_coefficients: !!opencv-matrix
255  rows: 5
256  cols: 1
257  dt: d
258  data: [ 5.7239511412908701e+00, 3.5567711297498403e+02,
259  -5.4996068923167541e-03, 1.4118273073931320e-02,
260  -2.4918485718166841e+04 ]
261 avg_reprojection_error: 1.9451644708827676e+00
262 */
263 
264 static const CameraCalibData calib_iPad_3_rearCam_zoom4x_fixed_small = {
265  {
266  4.9460365421521146e+03, 0., 6.4750000000000000e+02,
267  0., 4.9460365421521146e+03, 4.8350000000000000e+02,
268  0., 0., 1.
269  },
270  {
271  5.7239511412908701e+00, 3.5567711297498403e+02,
272  -5.4996068923167541e-03, 1.4118273073931320e-02,
273  -2.4918485718166841e+04
274  },
275  {1296, 968},
276  {1920, 1080}
277 };
278 
279 /*
280 %YAML:1.0
281 calibration_time: "Di 01 Mär 2016 09:48:24 CET"
282 nframes: 45
283 image_width: 2592
284 image_height: 1936
285 board_width: 11
286 board_height: 7
287 square_size: 15.
288 aspectRatio: 1.
289 flags: 6
290 camera_matrix: !!opencv-matrix
291  rows: 3
292  cols: 3
293  dt: d
294  data: [ 9.8022514418767842e+03, 0., 1.2955000000000000e+03, 0.,
295  9.8022514418767842e+03, 9.6750000000000000e+02, 0., 0., 1. ]
296 distortion_coefficients: !!opencv-matrix
297  rows: 5
298  cols: 1
299  dt: d
300  data: [ 5.7961817437643077e+00, 3.2153758645291367e+02,
301  -4.3648335712944009e-03, 1.2748327435237777e-02,
302  -2.2764965618405120e+04 ]
303 avg_reprojection_error: 3.7827563471596637e+00
304 */
305 static const CameraCalibData calib_iPad_3_rearCam_zoom4x_fixed = {
306  {
307  9.8022514418767842e+03, 0., 1.2955000000000000e+03,
308  0., 9.8022514418767842e+03, 9.6750000000000000e+02,
309  0., 0., 1.
310  },
311  {
312  5.7961817437643077e+00, 3.2153758645291367e+02,
313  -4.3648335712944009e-03, 1.2748327435237777e-02,
314  -2.2764965618405120e+04
315  },
316  {2592, 1936},
317  {1920, 1080}
318 };
319 
320 /*
321 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 11 -h 7 -s 15 -su -o iPad_4_rear_zoom4x.yml -oe iPad_4_rear_zoom4x_imagelist.xml
322 calibration_time: "Mi 07 Okt 2015 16:28:07 CEST"
323 nframes: 46
324 image_width: 2592
325 image_height: 1936
326 board_width: 11
327 board_height: 7
328 square_size: 15.
329 flags: 0
330 camera_matrix: !!opencv-matrix
331  rows: 3
332  cols: 3
333  dt: d
334  data: [ 9.5042900268119101e+03, 0., 1.3686897347437935e+03, 0.,
335  9.5555840716770854e+03, 9.6000130812219732e+02, 0., 0., 1. ]
336 distortion_coefficients: !!opencv-matrix
337  rows: 12
338  cols: 1
339  dt: d
340  data: [ -1.2032517239108715e+01, -3.1000447260435731e+03,
341  1.8389167709105078e-02, 6.6884962318512639e-02,
342  -4.8859201276784916e+03, -2.1666246178588121e+01,
343  -2.6528100980657478e+03, 5.1475145075507080e+03, 0., 0., 0., 0. ]
344 avg_reprojection_error: 3.0560719812201818e+00
345 */
346 static const CameraCalibData calib_iPad_4_rearCam_zoom4x = {
347  {
348  9.5042900268119101e+03, 0., 1.3686897347437935e+03,
349  0., 9.5555840716770854e+03, 9.6000130812219732e+02,
350  0., 0., 1.
351  },
352  {
353  -1.2032517239108715e+01, -3.1000447260435731e+03,
354  1.8389167709105078e-02, 6.6884962318512639e-02,
355  -4.8859201276784916e+03, -2.1666246178588121e+01,
356  -2.6528100980657478e+03, 5.1475145075507080e+03
357  },
358  {2592, 1936},
359  {1920, 1080}
360 };
361 /*
362 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 11 -h 7 -s 15 -su -o iPad_4_rear_zoom4x-rot180.yml -oe iPad_4_rear_zoom4x_imagelist.xml
363 calibration_time: "Do 08 Okt 2015 23:16:03 CEST"
364 nframes: 46
365 image_width: 2592
366 image_height: 1936
367 board_width: 11
368 board_height: 7
369 square_size: 15.
370 flags: 0
371 camera_matrix: !!opencv-matrix
372  rows: 3
373  cols: 3
374  dt: d
375  data: [ 1.0169592429473709e+04, 0., 1.2723005153067686e+03, 0.,
376  1.0591180815723745e+04, 9.9616943203795938e+02, 0., 0., 1. ]
377 distortion_coefficients: !!opencv-matrix
378  rows: 12
379  cols: 1
380  dt: d
381  data: [ -2.8923786212150873e+01, -3.7479089071539574e+03,
382  -3.8131102006118802e-03, -1.2930037678332975e-02,
383  -3.7209825598768675e+03, -3.9863899767272102e+01,
384  -2.9812569882632238e+03, 3.2532711992772670e+03, 0., 0., 0., 0. ]
385 avg_reprojection_error: 4.7927178430980177e+00
386 */
387 static const CameraCalibData calib_iPad_4_rearCam_zoom4x_rot180 = {
388  {
389  1.0169592429473709e+04, 0., 1.2723005153067686e+03,
390  0., 1.0591180815723745e+04, 9.9616943203795938e+02,
391  0., 0., 1.
392  },
393  {
394  -2.8923786212150873e+01, -3.7479089071539574e+03,
395  -3.8131102006118802e-03, -1.2930037678332975e-02,
396  -3.7209825598768675e+03, -3.9863899767272102e+01,
397  -2.9812569882632238e+03, 3.2532711992772670e+03
398  },
399  {2592, 1936},
400  {1920, 1080}
401 };
402 
403 /*
404 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 13 -h 9 -s 20 -su -o iPad_4_front_landscape.yml -oe iPad_4_front_landscape_imagelist.xml
405 calibration_time: "Mi 07 Okt 2015 22:16:01 CEST"
406 nframes: 46
407 image_width: 1280
408 image_height: 960
409 board_width: 13
410 board_height: 9
411 square_size: 20.
412 flags: 0
413 camera_matrix: !!opencv-matrix
414  rows: 3
415  cols: 3
416  dt: d
417  data: [ 1.2468750149255566e+03, 0., 6.4908604310039141e+02, 0.,
418  1.2451201921576749e+03, 4.7997189256904863e+02, 0., 0., 1. ]
419 distortion_coefficients: !!opencv-matrix
420  rows: 12
421  cols: 1
422  dt: d
423  data: [ 3.5682706398788291e+01, -1.1698429601543776e+02,
424  1.1170857258377136e-03, -9.7012290245197547e-04,
425  6.8010249081800907e+02, 3.5951491402223425e+01,
426  -1.1967412895144355e+02, 6.9307526465437149e+02, 0., 0., 0., 0. ]
427 avg_reprojection_error: 2.2313818119042667e-01
428 */
429 static const CameraCalibData calib_iPad_4_frontCam_landscape = {
430  {
431  1.2468750149255566e+03, 0., 6.4908604310039141e+02,
432  0., 1.2451201921576749e+03, 4.7997189256904863e+02,
433  0., 0., 1.
434  },
435  {
436  3.5682706398788291e+01, -1.1698429601543776e+02,
437  1.1170857258377136e-03, -9.7012290245197547e-04,
438  6.8010249081800907e+02, 3.5951491402223425e+01,
439  -1.1967412895144355e+02, 6.9307526465437149e+02
440  },
441  {1280, 960},
442  {1280, 720}
443 };
444 
445 // vario inset
446 // Calibration data iPad 4 FaceTime HD camera
447 
448 // cx = 477.00449552966205
449 // cy = 646.69950530065023
450 static const CameraCalibData calib_iPad_4_frontCam_portrait = {
451  {
452  1.2483748520357178e+03, 0., 4.7700449552966205e+02,
453  0., 1.2467598850866611e+03, 6.4669950530065023e+02,
454  0., 0., 1.
455  },
456  {
457  -3.9201825078858825e-02, 4.0674431484054674e-01,
458  -2.4554224032551160e-03, -1.7658977908004223e-03,
459  -1.4846440061519319e+00
460  },
461  {960, 1280},
462  {720, 1280}
463 };
464 /*
465 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 11 -h 7 -s 15 -su -o iPad_Air_rear_zoom4x.yml -oe iPad_Air_rear_zoom4x_imagelist.xml
466 calibration_time: "Mo 28 Sep 2015 23:41:05 CEST"
467 nframes: 24
468 image_width: 2592
469 image_height: 1936
470 board_width: 11
471 board_height: 7
472 square_size: 15.
473 flags: 0
474 camera_matrix: !!opencv-matrix
475  rows: 3
476  cols: 3
477  dt: d
478  data: [ 1.0116499409813559e+04, 0., 1.5746979808517026e+03, 0.,
479  1.0681894820973139e+04, 9.3679857087799519e+02, 0., 0., 1. ]
480 distortion_coefficients: !!opencv-matrix
481  rows: 12
482  cols: 1
483  dt: d
484  data: [ 3.6908355060486349e+00, -3.6085037425530192e+02,
485  -1.5774941246848532e-02, 2.9520031045756423e-01,
486  6.0629027462754129e+03, -8.6368868926878477e+00,
487  1.7997373386203080e+02, -7.2229743844353552e+03, 0., 0., 0., 0. ]
488 avg_reprojection_error: 5.9523558292218217e+00
489 */
490 static const CameraCalibData calib_iPad_Air_rearCam_zoom4x = {
491  {
492  1.0116499409813559e+04, 0., 1.5746979808517026e+03,
493  0., 1.0681894820973139e+04, 9.3679857087799519e+02,
494  0., 0., 1.
495  },
496  {
497  3.6908355060486349e+00, -3.6085037425530192e+02,
498  -1.5774941246848532e-02, 2.9520031045756423e-01,
499  6.0629027462754129e+03, -8.6368868926878477e+00,
500  1.7997373386203080e+02, -7.2229743844353552e+03
501  },
502  {2592, 1936},
503  {1920, 1080}
504 };
505 /*
506 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 11 -h 7 -s 15 -su -r180 -o iPad_Air_rear_zoom4x-rot180.yml -oe iPad_Air_rear_zoom4x_imagelist.xml
507 calibration_time: "Do 08 Okt 2015 23:39:50 CEST"
508 nframes: 24
509 image_width: 2592
510 image_height: 1936
511 board_width: 11
512 board_height: 7
513 square_size: 15.
514 flags: 0
515 camera_matrix: !!opencv-matrix
516  rows: 3
517  cols: 3
518  dt: d
519  data: [ 9.3305682439286702e+03, 0., 1.1198385260329981e+03, 0.,
520  9.4328036138233547e+03, 6.4279002473646540e+02, 0., 0., 1. ]
521 distortion_coefficients: !!opencv-matrix
522  rows: 12
523  cols: 1
524  dt: d
525  data: [ 2.4492194912067196e+00, -4.7728438578564052e+01,
526  -2.8773737182838416e-01, -1.7749503123461377e-01,
527  -2.4122102644903121e+03, -4.1220420534431952e+00,
528  -1.8208432766568393e+02, 5.3680938186016811e+03, 0., 0., 0., 0. ]
529 avg_reprojection_error: 3.1160171212729919e+00
530 */
531 static const CameraCalibData calib_iPad_Air_rearCam_zoom4x_rot180 = {
532  {
533  9.3305682439286702e+03, 0., 1.1198385260329981e+03,
534  0., 9.4328036138233547e+03, 6.4279002473646540e+02,
535  0., 0., 1.
536  },
537  {
538  2.4492194912067196e+00, -4.7728438578564052e+01,
539  -2.8773737182838416e-01, -1.7749503123461377e-01,
540  -2.4122102644903121e+03, -4.1220420534431952e+00,
541  -1.8208432766568393e+02, 5.3680938186016811e+03
542  },
543  {2592, 1936},
544  {1920, 1080}
545 };
546 
547 /*
548 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 13 -h 9 -s 20 -su -o iPad_Air_front_landscape.yml -oe iPad_Air_front_imagelist.xml
549 calibration_time: "Mi 07 Okt 2015 16:34:02 CEST"
550 nframes: 52
551 image_width: 1280
552 image_height: 960
553 board_width: 13
554 board_height: 9
555 square_size: 20.
556 flags: 0
557 camera_matrix: !!opencv-matrix
558  rows: 3
559  cols: 3
560  dt: d
561  data: [ 1.1689702692589599e+03, 0., 6.3184738163529823e+02, 0.,
562  1.1680229211851376e+03, 4.7392325852903485e+02, 0., 0., 1. ]
563 distortion_coefficients: !!opencv-matrix
564  rows: 12
565  cols: 1
566  dt: d
567  data: [ 1.7058281331501217e+01, -7.3691225259331745e+01,
568  -1.7222950678405082e-04, -8.3282277761684287e-04,
569  4.6691301210467270e+02, 1.7193845987498683e+01,
570  -7.5441669888443428e+01, 4.7494681210907652e+02, 0., 0., 0., 0. ]
571 avg_reprojection_error: 1.6552941110945515e-01
572 */
573 static const CameraCalibData calib_iPad_Air_frontCam_landscape = {
574  {
575  1.1689702692589599e+03, 0., 6.3184738163529823e+02,
576  0., 1.1680229211851376e+03, 4.7392325852903485e+02,
577  0., 0., 1.
578  },
579  {
580  1.7058281331501217e+01, -7.3691225259331745e+01,
581  -1.7222950678405082e-04, -8.3282277761684287e-04,
582  4.6691301210467270e+02, 1.7193845987498683e+01,
583  -7.5441669888443428e+01, 4.7494681210907652e+02
584  },
585  {1280, 960},
586  {1280, 720}
587 };
588 
589 /*
590 ../opencv-3.0.0/build/bin/cpp-example-calibration -w 13 -h 9 -s 20 -su -o iPad_Air_front_portrait.yml -oe iPad_Air_front_imagelist.xml
591 calibration_time: "Mi 07 Okt 2015 17:19:35 CEST"
592 nframes: 51
593 image_width: 960
594 image_height: 1280
595 board_width: 13
596 board_height: 9
597 square_size: 20.
598 flags: 0
599 camera_matrix: !!opencv-matrix
600  rows: 3
601  cols: 3
602  dt: d
603  data: [ 1.1680304763923468e+03, 0., 4.8513196323943106e+02, 0.,
604  1.1689427983169521e+03, 6.3171919352291047e+02, 0., 0., 1. ]
605 distortion_coefficients: !!opencv-matrix
606  rows: 12
607  cols: 1
608  dt: d
609  data: [ 1.7317817953296760e+01, -7.5687945762069646e+01,
610  -8.4804403571975815e-04, 1.6204945021162760e-04,
611  4.7221830316448927e+02, 1.7454588643176358e+01,
612  -7.7454129753329738e+01, 4.8029235531578450e+02, 0., 0., 0., 0. ]
613 avg_reprojection_error: 1.6581672547378193e-01
614 */
615 
616 // Diesselben Bilder wie calib_iPad_Air_frontCam_landscape, aber um 90° im
617 // Uhrzeigersinn gedreht, also Hochformat wie für die vario inset-Aufnahmen.
618 // Dabei werden fx <-> fy sowie cx <-> cy vertauscht, außerdem ändern sich die
619 // tangentialen Verzerrungskoeffizienten offenbar gemäß (p: portrait,
620 // l: landscape):
621 // p1(p) <-> p2(l)
622 // p2(p) <-> -p1(l)
623 // Mathematisch noch zu überprüfen.
624 static const CameraCalibData calib_iPad_Air_frontCam_portrait = {
625  {
626  1.1680304763923468e+03, 0., 4.8513196323943106e+02,
627  0., 1.1689427983169521e+03, 6.3171919352291047e+02,
628  0., 0., 1.
629  },
630  {
631  1.7317817953296760e+01, -7.5687945762069646e+01,
632  -8.4804403571975815e-04, 1.6204945021162760e-04,
633  4.7221830316448927e+02, 1.7454588643176358e+01,
634  -7.7454129753329738e+01, 4.8029235531578450e+02
635  },
636  {960, 1280},
637  {720, 1280}
638 };
639 
640 // cx = 910.61374890803233
641 // cy = 1311.6034753748663
642 // Zoomfaktor = 2.35
643 static const CameraCalibData calib_iPad_mini_3_rearCam_x2_35 = {
644  {
645  5.6028700468379966e+03, 0., 9.1061374890803233e+02,
646  0., 5.5940743788821637e+03, 1.3116034753748663e+03,
647  0., 0., 1.
648  },
649  { -2.2075448994311495e-01, 5.9878817296941174e+00,
650  1.5048342251242698e-04, 2.6981175730256957e-04,
651  -3.6988157649993227e+01
652  },
653  {1936, 2592},
654  {1080, 1920}
655 };
656 /*
657 calibration_time: "So 26 Jul 2015 23:21:11 CEST"
658 nframes: 21
659 image_width: 736
660 image_height: 992
661 board_width: 7
662 board_height: 11
663 square_size: 15.
664 flags: 0
665 camera_matrix: !!opencv-matrix
666  rows: 3
667  cols: 3
668  dt: d
669  data: [ 2.3582190931716591e+03, 0., 3.3380389355527933e+02, 0.,
670  2.3523709685953509e+03, 4.0753526579501010e+02, 0., 0., 1. ]
671 distortion_coefficients: !!opencv-matrix
672  rows: 5
673  cols: 1
674  dt: d
675  data: [ 4.5439879320237248e-01, -1.1921038438520792e+01,
676  -9.3079619022046079e-03, -2.3115936289204463e-02,
677  1.2278377253122122e+02 ]
678 avg_reprojection_error: 5.2954487958372598e-01
679  */
680 // Kalibrationsdaten beziehen sich auf den Ausschnitt
681 // cv::Rect(600, 800, 736, 992) des Originalbilds!
682 static const CameraCalibData calib_iPad_mini_3_rearCam_nozoom = {
683  {
684  2.3582190931716591e+03, 0., 3.3380389355527933e+02,
685  0., 2.3523709685953509e+03, 4.0753526579501010e+02,
686  0., 0., 1.
687  },
688  {
689  4.5439879320237248e-01, -1.1921038438520792e+01,
690  -9.3079619022046079e-03, -2.3115936289204463e-02,
691  1.2278377253122122e+02
692  },
693  {736, 992},
694  {1080, 1920}
695 };
696 
697 // fixed principal point -
698 // Keine erkennbaren Vorteile, minimal größerer Reprojektionsfehler.
699 // Kalibrationsdaten beziehen sich auf den Ausschnitt
700 // cv::Rect(600, 800, 736, 992) des Originalbilds!
701 static const CameraCalibData calib_iPad_mini_3_rearCam_nozoom_fixedpp = {
702  {
703  2.3577662647005759e+03, 0., 3.6750000000000000e+02,
704  0., 2.3521934054392336e+03, 4.9550000000000000e+02,
705  0., 0., 1.
706  },
707  {
708  5.2877710151812574e-01, -1.9793797743454540e+01,
709  8.3774379031104056e-03, -1.8526619946233582e-02,
710  2.7792649278247893e+02
711  },
712  {736, 992},
713  {1080, 1920}
714 };
715 
716 /*
717 %YAML:1.0
718 calibration_time: "Di 26 Jan 2016 01:26:57 CET"
719 nframes: 58
720 image_width: 2448
721 image_height: 3264
722 board_width: 6
723 board_height: 9
724 square_size: 10.
725 flags: 0
726 camera_matrix: !!opencv-matrix
727  rows: 3
728  cols: 3
729  dt: d
730  data: [ 1.0387709754707341e+04, 0., 1.1762352006212288e+03, 0.,
731  1.0425164156530476e+04, 1.7160395454621357e+03, 0., 0., 1. ]
732 distortion_coefficients: !!opencv-matrix
733  rows: 12
734  cols: 1
735  dt: d
736  data: [ 5.8821035255325694e+02, -3.0162504245138830e+03,
737  4.3681894923031043e-03, -1.3438127106211353e-03,
738  1.6348631870473655e+03, 5.7367394027014166e+02,
739  -2.6579062176832476e+03, -1.6499556827711961e+03, 0., 0., 0., 0. ]
740 avg_reprojection_error: 1.1284129533535332e+00
741 */
742 static const CameraCalibData calib_iPad_mini_4_rearCam_x3_7 = {
743  {
744  1.0387709754707341e+04, 0., 1.1762352006212288e+03,
745  0., 1.0425164156530476e+04, 1.7160395454621357e+03,
746  0., 0., 1.
747  },
748  {
749  5.8821035255325694e+02, -3.0162504245138830e+03,
750  4.3681894923031043e-03, -1.3438127106211353e-03,
751  1.6348631870473655e+03, 5.7367394027014166e+02,
752  -2.6579062176832476e+03, -1.6499556827711961e+03 },
753  {2448, 3264},
754  {1080, 1920}
755 };
756 
757 /*
758 %YAML:1.0
759 calibration_time: "Mo 14 Dez 2015 07:52:45 CET"
760 nframes: 35
761 image_width: 2448
762 image_height: 3264
763 board_width: 11
764 board_height: 7
765 square_size: 15.
766 flags: 0
767 camera_matrix: !!opencv-matrix
768  rows: 3
769  cols: 3
770  dt: d
771  data: [ 1.2549150420466220e+04, 0., 1.0908356273440502e+03, 0.,
772  1.2380558370046379e+04, 1.8789283245574488e+03, 0., 0., 1. ]
773 distortion_coefficients: !!opencv-matrix
774  rows: 12
775  cols: 1
776  dt: d
777  data: [ 8.2904183322390281e+02, 5.0432913469372971e+02,
778  1.7058076662340289e-02, -6.6032114069397635e-03,
779  8.6720254645264849e+03, 8.1774601053200934e+02,
780  9.3605507948984814e+02, -8.7696738844559241e+03, 0., 0., 0., 0. ]
781 avg_reprojection_error: 2.5191235622743511e+00
782 */
783 static const CameraCalibData calib_iPad_mini_4_rearCam_x4_2 = {
784  {
785  1.2549150420466220e+04, 0., 1.0908356273440502e+03,
786  0., 1.2380558370046379e+04, 1.8789283245574488e+03,
787  0., 0., 1.
788  },
789  {
790  8.2904183322390281e+02, 5.0432913469372971e+02,
791  1.7058076662340289e-02, -6.6032114069397635e-03,
792  8.6720254645264849e+03, 8.1774601053200934e+02,
793  9.3605507948984814e+02, -8.7696738844559241e+03 },
794  {2448, 3264},
795  {0, 0}
796 };
797 
798 /*
799 %YAML:1.0
800 calibration_time: "Mi 02 Mär 2016 12:12:20 CET"
801 nframes: 36
802 image_width: 756
803 image_height: 460
804 board_width: 9
805 board_height: 6
806 square_size: 10.
807 aspectRatio: 1.
808 flags: 6
809 camera_matrix: !!opencv-matrix
810  rows: 3
811  cols: 3
812  dt: d
813  data: [ 4.8193595615580034e+03, 0., 3.7750000000000000e+02, 0.,
814  4.8193595615580034e+03, 2.2950000000000000e+02, 0., 0., 1. ]
815 distortion_coefficients: !!opencv-matrix
816  rows: 5
817  cols: 1
818  dt: d
819  data: [ 4.7528484352091818e+00, 3.0518115907084007e+02,
820  -2.2325818785215994e-02, -4.4496544968155097e-03,
821  -1.0868220106559160e+02 ]
822 avg_reprojection_error: 1.2934955258722738e-01
823 */
824 static const CameraCalibData calib_iPad_2_rearCam_zoom4x_app_fixed = {
825  {
826  4.8193595615580034e+03, 0., 3.7750000000000000e+02,
827  0., 4.8193595615580034e+03, 2.2950000000000000e+02,
828  0., 0., 1.
829  },
830  {
831  4.7528484352091818e+00, 3.0518115907084007e+02,
832  -2.2325818785215994e-02, -4.4496544968155097e-03,
833  -1.0868220106559160e+02
834  },
835  {756, 460},
836  {0, 0}
837 };
838 
839 /*
840 %YAML:1.0
841 calibration_time: "Mi 02 Mär 2016 09:54:45 CET"
842 nframes: 23
843 image_width: 756
844 image_height: 460
845 board_width: 9
846 board_height: 6
847 square_size: 10.
848 aspectRatio: 1.
849 flags: 6
850 camera_matrix: !!opencv-matrix
851  rows: 3
852  cols: 3
853  dt: d
854  data: [ 4.8651049501569305e+03, 0., 3.7750000000000000e+02, 0.,
855  4.8651049501569305e+03, 2.2950000000000000e+02, 0., 0., 1. ]
856 distortion_coefficients: !!opencv-matrix
857  rows: 5
858  cols: 1
859  dt: d
860  data: [ 5.4690661102420250e+00, 2.1104709915479322e+02,
861  -2.5941341463122526e-02, -2.5713792285843844e-03,
862  -2.5659714974242019e+02 ]
863 avg_reprojection_error: 1.0723026385050025e-01
864 */
865 static const CameraCalibData calib_iPad_3_rearCam_zoom4x_app_fixed = {
866  {
867  4.8651049501569305e+03, 0., 3.7750000000000000e+02,
868  0., 4.8651049501569305e+03, 2.2950000000000000e+02,
869  0., 0., 1.
870  },
871  {
872  5.4690661102420250e+00, 2.1104709915479322e+02,
873  -2.5941341463122526e-02, -2.5713792285843844e-03,
874  -2.5659714974242019e+02
875  },
876  {756, 460},
877  {0, 0}
878 };
879 
880 /*
881 %YAML:1.0
882 calibration_time: "Mi 02 Mär 2016 11:58:56 CET"
883 nframes: 15
884 image_width: 756
885 image_height: 460
886 board_width: 9
887 board_height: 6
888 square_size: 10.
889 aspectRatio: 1.
890 flags: 6
891 camera_matrix: !!opencv-matrix
892  rows: 3
893  cols: 3
894  dt: d
895  data: [ 4.8631864086178330e+03, 0., 3.7750000000000000e+02, 0.,
896  4.8631864086178330e+03, 2.2950000000000000e+02, 0., 0., 1. ]
897 distortion_coefficients: !!opencv-matrix
898  rows: 5
899  cols: 1
900  dt: d
901  data: [ 7.2822369265859974e+00, 4.0311011348947872e+01,
902  -3.7334029256838673e-02, -5.5806023213158832e-03,
903  4.2580621132781571e-01 ]
904 avg_reprojection_error: 1.0990147359693271e-01
905 */
906 static const CameraCalibData calib_iPad_4_rearCam_zoom4x_app_fixed = {
907  {
908  4.8631864086178330e+03, 0., 3.7750000000000000e+02,
909  0., 4.8631864086178330e+03, 2.2950000000000000e+02,
910  0., 0., 1.
911  },
912  {
913  7.2822369265859974e+00, 4.0311011348947872e+01,
914  -3.7334029256838673e-02, -5.5806023213158832e-03,
915  4.2580621132781571e-01
916  },
917  {756, 460},
918  {0, 0}
919 };
920 
921 /*
922 %YAML:1.0
923 calibration_time: "Mi 02 Mär 2016 09:50:25 CET"
924 nframes: 25
925 image_width: 756
926 image_height: 460
927 board_width: 9
928 board_height: 6
929 square_size: 10.
930 aspectRatio: 1.
931 flags: 6
932 camera_matrix: !!opencv-matrix
933  rows: 3
934  cols: 3
935  dt: d
936  data: [ 4.7028871986809436e+03, 0., 3.7750000000000000e+02, 0.,
937  4.7028871986809436e+03, 2.2950000000000000e+02, 0., 0., 1. ]
938 distortion_coefficients: !!opencv-matrix
939  rows: 5
940  cols: 1
941  dt: d
942  data: [ 3.7912880303805010e+00, 3.9573011397160417e+02,
943  -1.2549608703483301e-02, -9.7242820869163499e-03,
944  -9.4248798175403280e+01 ]
945 avg_reprojection_error: 1.3749507488360149e-01
946 */
947 static const CameraCalibData calib_iPad_Air_rearCam_zoom4x_app_fixed = {
948  {
949  4.7028871986809436e+03, 0., 3.7750000000000000e+02,
950  0., 4.7028871986809436e+03, 2.2950000000000000e+02,
951  0., 0., 1.
952  },
953  {
954  3.7912880303805010e+00, 3.9573011397160417e+02,
955  -1.2549608703483301e-02, -9.7242820869163499e-03,
956  -9.4248798175403280e+01
957  },
958  {756, 460},
959  {0, 0}
960 };
961 
962 /*
963 %YAML:1.0
964 calibration_time: "Mi 02 Mär 2016 12:17:56 CET"
965 nframes: 14
966 image_width: 756
967 image_height: 460
968 board_width: 9
969 board_height: 6
970 square_size: 10.
971 aspectRatio: 1.
972 flags: 6
973 camera_matrix: !!opencv-matrix
974  rows: 3
975  cols: 3
976  dt: d
977  data: [ 4.6617494614137358e+03, 0., 3.7750000000000000e+02, 0.,
978  4.6617494614137358e+03, 2.2950000000000000e+02, 0., 0., 1. ]
979 distortion_coefficients: !!opencv-matrix
980  rows: 5
981  cols: 1
982  dt: d
983  data: [ 3.2849503218305780e+00, 4.1265859264366600e+02,
984  -5.4896493161305810e-03, -1.8512749056537825e-02,
985  -2.9265287250068519e+02 ]
986 avg_reprojection_error: 1.3479625144047097e-01
987 */
988 static const CameraCalibData calib_iPad_Air_2_rearCam_zoom4x_app_fixed = {
989  {
990  4.6617494614137358e+03, 0., 3.7750000000000000e+02,
991  0., 4.6617494614137358e+03, 2.2950000000000000e+02,
992  0., 0., 1.
993  },
994  {
995  3.2849503218305780e+00, 4.1265859264366600e+02,
996  -5.4896493161305810e-03, -1.8512749056537825e-02,
997  -2.9265287250068519e+02
998  },
999  {756, 460},
1000  {0, 0}
1001 };
1002 
1003 
1004 
1005 inline CameraCalibData getZoomedCalibData(const CameraCalibData& src,
1006  const double zoom, const cv::Size dstSize)
1007 {
1008  CameraCalibData dst;
1009  const cv::Matx33d& cm = src.cameraMatrix;
1010  double fx = cm(0, 0) * zoom;
1011  double fy = cm(1, 1) * zoom;
1012  double cx = (dstSize.width - 1) * 0.5 + (cm(0, 2) - (src.imageSize.width - 1) * 0.5) * zoom;
1013  double cy = (dstSize.height - 1) * 0.5 + (cm(1, 2) - (src.imageSize.height - 1) * 0.5) * zoom;
1014  dst.cameraMatrix =
1015  {
1016  fx, 0., cx,
1017  0., fy, cy,
1018  0., 0., 1.
1019  };
1020  dst.distortionCoeffs = src.distortionCoeffs;
1021  dst.imageSize = dstSize;
1022  return dst;
1023 }
1024 
1025 static const CameraCalibData calib_iPad_mini_3_rearCam_x3_2 = getZoomedCalibData(calib_iPad_mini_3_rearCam_nozoom, 3.2, cv::Size(1936, 2592));
1026 static const CameraCalibData calib_iPad_mini_3_rearCam_x4_2 = getZoomedCalibData(calib_iPad_mini_3_rearCam_nozoom, 4.2, cv::Size(1936, 2592));
1027 
1035 bool getCameraMatrix(const ExposureArrangement exposureArrangement,
1036  cv::Matx33d& cameraMatrix,
1037  const bool profile = false);
1038 
1045 bool getDistortionCoefficients(const ExposureArrangement exposureArrangement,
1046  cv::OutputArray distortionCoeffs);
1047 
1056 bool getIntrinsicCameraParameters(const ExposureArrangement exposureArrangement,
1057  cv::Matx33d& cameraMatrix,
1058  cv::OutputArray distortionCoeffs,
1059  const bool profile = false);
1060 
1070 bool undistort(const ExposureArrangement exposureArrangement,
1071  const cv::Mat& src, cv::Mat& dst,
1072  const bool profile = false,
1073  cv::InputArray newCameraMatrix = cv::noArray());
1074 
1080 cv::Size getScaledSize(const ExposureArrangement exposureArrangement);
1081 
1082 }
1083 
1084 #endif // VRCORE_CAMCALIB_DATA
Intrinsic camera parameters, see http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d...
Definition: camcalib_data.h:24
cv::Matx33d getCameraMatrix(const cv::Size &scaledSize=noSize, const cv::Rect &clipping=noRect, const bool letterboxed=false) const
Definition: camcalib_data.cpp:6