|
| 1 | +<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> |
| 2 | +<!-- |
| 3 | + This file can provide additional camera calibration settings beyond those built into the SDK itself. |
| 4 | + Each calibration is for a particular camera (indicated by USB vid & pid pair) and a particular |
| 5 | + capture resolution for the camera. Note: it is very important when capturing images used to calibrate |
| 6 | + a camera that the image acquisition tool can actually control this capture resolution within the camera |
| 7 | + itself and that you use this setting correctly. Many image acquistion tools do not in fact provide |
| 8 | + this level of control. |
| 9 | +
|
| 10 | + Beyond simply providing additional, new camera calibrations, calibrations provided herein can |
| 11 | + *replace/update* those that are builtin to the SDK. This matching is keyed, of course, by the |
| 12 | + (vid, pid, size) triple. Further, if such a calibration has the 'remove' attribute with value 'true', |
| 13 | + any existing calibration with that key is removed (and the calibration itself not added). |
| 14 | +
|
| 15 | + Calibrations are internally processed according to aspect ratio. If a format is requested in a size |
| 16 | + that is not calibrated, but a calibration does exist for the same aspect ratio on the same camera, |
| 17 | + then the latter will be scaled to accommodate the request. For example, if a 640x480 calibration |
| 18 | + is requested but only a 800x600 calibration exists for that camera, then the 800x600 is scaled |
| 19 | + down to service the 640x480 request. |
| 20 | +
|
| 21 | + Further, it is important to note that if *no* calibrations exist for a given camera, then Vuforia |
| 22 | + is offered the entire range of capture resolutions that the hardware can support (and it does its |
| 23 | + best to deal with the lack of calibration). However, if *any* calibrations are provided for a camera, |
| 24 | + then capture resolutions in those aspect ratios supported by the camera for which any calibrations |
| 25 | + are *not* provided are *not* offered. Thus, if you calibrate a camera but fail to calibrate all |
| 26 | + the camera's supported aspect ratios, you limit the choices of capture resolutions that Vuforia can |
| 27 | + select from. |
| 28 | +
|
| 29 | + One image acquisition program that supports control of camera capture resolution is YouCam 7: |
| 30 | + https://www.cyberlink.com/products/youcam/features_en_US.html |
| 31 | +
|
| 32 | + Programs that can process acquired images to determine camera calibration settings include: |
| 33 | + https://www.3dflow.net/3df-zephyr-free/ (see "Utilities/Images/Launch Camera Calibration" therein) |
| 34 | + http://graphics.cs.msu.ru/en/node/909 |
| 35 | + Note that the type of images that must be acquired in order to calibrate is specific to the |
| 36 | + calibration software used. |
| 37 | +
|
| 38 | + The required contents are illustrated here by example. Note that for the attribute names, both the |
| 39 | + camelCase or the underscore_variations are supported; they are equivalent. The attributes for |
| 40 | + each Calibration are as follows: |
| 41 | +
|
| 42 | + size (int pair): space separated camera resolution (width, height). |
| 43 | + focalLength (float pair): space separated focal length value. |
| 44 | + principalPoint (float pair): space separated principal point values (width, height). |
| 45 | + distortionCoefficients (an 8-element float array): distortion coefficients in the following form |
| 46 | + (r:radial, t:tangential): [r0, r1, t0, t1, r2, r3, r4, r5] |
| 47 | + see https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html |
| 48 | +
|
| 49 | + The examples here are commented out as the values are built-in to the FTC SDK. They serve instead |
| 50 | + here as examples on how make your own. |
| 51 | +
|
| 52 | +--> |
| 53 | +<Calibrations> |
| 54 | + |
| 55 | + <!-- ======================================================================================= --> |
| 56 | + |
| 57 | + <!-- Microsoft Lifecam HD 3000 v1, Calibrated by PTC using unknown tooling --> |
| 58 | + <!-- <Camera vid="Microsoft" pid="0x0779"> |
| 59 | + <Calibration |
| 60 | + size="640 480" |
| 61 | + focalLength="678.154f, 678.17f" |
| 62 | + principalPoint="318.135f, 228.374f" |
| 63 | + distortionCoefficients="0.154576f, -1.19143f, 0f, 0f, 2.06105f, 0f, 0f, 0f" |
| 64 | + /> |
| 65 | + </Camera> --> |
| 66 | + |
| 67 | + <!-- ======================================================================================= --> |
| 68 | + |
| 69 | + <!-- Microsoft Lifecam HD 3000 v2, Calibrated by PTC using unknown tooling --> |
| 70 | + <!-- <Camera vid="Microsoft" pid="0x0810"> |
| 71 | + <Calibration |
| 72 | + size="640 480" |
| 73 | + focalLength="678.154f, 678.17f" |
| 74 | + principalPoint="318.135f, 228.374f" |
| 75 | + distortionCoefficients="0.154576f, -1.19143f, 0f, 0f, 2.06105f, 0f, 0f, 0f" |
| 76 | + /> |
| 77 | + </Camera> --> |
| 78 | + |
| 79 | + <!-- ======================================================================================= --> |
| 80 | + |
| 81 | + <!-- Logitech HD Webcam C310, Calibrated by by Robert Atkinson, 2018.05.30 using 3DF Zephyr --> |
| 82 | + <!-- <Camera vid="Logitech" pid="0x081B"> |
| 83 | + <Calibration |
| 84 | + size="640 480" |
| 85 | + focalLength="821.993f, 821.993f" |
| 86 | + principalPoint="330.489f, 248.997f" |
| 87 | + distortionCoefficients="-0.018522, 1.03979, 0, 0, -3.3171, 0, 0, 0" |
| 88 | + /> |
| 89 | +
|
| 90 | + <Calibration |
| 91 | + size="640 360" |
| 92 | + focalLength="715.307f, 715.307f" |
| 93 | + principalPoint="319.759f, 188.917f" |
| 94 | + distortionCoefficients="-0.0258948, 1.06258, 0, 0, -3.40245, 0, 0, 0" |
| 95 | + /> |
| 96 | + </Camera> --> |
| 97 | + |
| 98 | + <!-- ======================================================================================= --> |
| 99 | + |
| 100 | + <!-- Logitech HD Pro Webcam C920, Calibrated by Robert Atkinson, 2018.05.30 using 3DF Zephyr --> |
| 101 | + <!-- <Camera vid="Logitech" pid="0x082D"> |
| 102 | +
|
| 103 | + <Calibration |
| 104 | + size="640 480" |
| 105 | + focalLength="622.001f, 622.001f" |
| 106 | + principalPoint="319.803f, 241.251f" |
| 107 | + distortionCoefficients="0.1208, -0.261599, 0, 0, 0.10308, 0, 0, 0" |
| 108 | + /> |
| 109 | +
|
| 110 | + <Calibration |
| 111 | + size="800 600" |
| 112 | + focalLength="775.79f, 775.79f" |
| 113 | + principalPoint="400.898f, 300.79f" |
| 114 | + distortionCoefficients="0.112507, -0.272067, 0, 0, 0.15775, 0, 0, 0" |
| 115 | + /> |
| 116 | +
|
| 117 | + <Calibration |
| 118 | + size="640 360" |
| 119 | + focalLength="463.566f, 463.566f" |
| 120 | + principalPoint="316.402f, 176.412f" |
| 121 | + distortionCoefficients="0.111626 , -0.255626, 0, 0, 0.107992, 0, 0, 0" |
| 122 | + /> |
| 123 | +
|
| 124 | + <Calibration |
| 125 | + size="1920, 1080" |
| 126 | + focalLength="1385.92f , 1385.92f" |
| 127 | + principalPoint="951.982f , 534.084f" |
| 128 | + distortionCoefficients="0.117627, -0.248549, 0, 0, 0.107441, 0, 0, 0" |
| 129 | + /> |
| 130 | +
|
| 131 | + <Calibration |
| 132 | + size="800, 448" |
| 133 | + focalLength="578.272f , 578.272f" |
| 134 | + principalPoint="402.145f , 221.506f" |
| 135 | + distortionCoefficients="0.12175, -0.251652 , 0, 0, 0.112142, 0, 0, 0" |
| 136 | + /> |
| 137 | +
|
| 138 | + <Calibration |
| 139 | + size="864, 480" |
| 140 | + focalLength="626.909f , 626.909f" |
| 141 | + principalPoint="426.007f , 236.834f" |
| 142 | + distortionCoefficients="0.120988, -0.253336 , 0, 0, 0.102445, 0, 0, 0" |
| 143 | + /> |
| 144 | +
|
| 145 | + </Camera> --> |
| 146 | + |
| 147 | + <!-- ======================================================================================= --> |
| 148 | + |
| 149 | + <!-- Logitech HD Webcam C270, Calibrated by Noah Andrews, 2019.03.13 using 3DF Zephyr --> |
| 150 | + <!--<Camera vid="Logitech" pid="0x0825"> |
| 151 | + <Calibration |
| 152 | + size="640 480" |
| 153 | + focalLength="822.317f, 822.317f" |
| 154 | + principalPoint="319.495f, 242.502f" |
| 155 | + distortionCoefficients="-0.0449369, 1.17277, 0, 0, -3.63244, 0, 0, 0" |
| 156 | + /> |
| 157 | + </Camera> --> |
| 158 | + |
| 159 | + <!-- ======================================================================================= --> |
| 160 | + |
| 161 | +</Calibrations> |
0 commit comments