| 1 |
The test and validation tools used in the development of the b-spline |
| 2 |
interpolated models live here. |
| 3 |
|
| 4 |
First I wanted to come up with a surface parametrization scheme. I wanted to |
| 5 |
project the full almost-360deg view into some sort of 2D domain that is |
| 6 |
cartesian-ish. Then I would grid this cartesian 2D domain with a regular grid of |
| 7 |
control points, and I'd spline that. But does such a mapping exist? What is it? |
| 8 |
|
| 9 |
The |
| 10 |
|
| 11 |
show-fisheye-grid.py |
| 12 |
|
| 13 |
script exists for this purpose. It takes in an existing model, grids the imager, |
| 14 |
unprojects the points, and projects the vectors back to a number of common |
| 15 |
fisheye projections. I applied this to some wide models I had (their inaccurate |
| 16 |
OPENCV8 fits), and observed that the stereographic model works well here: a |
| 17 |
cartensian grid in the imager produces a cartesian-ish grid in the stereographic |
| 18 |
projection. The other projections look like they'd work also. The pinhole |
| 19 |
projection most notably does NOT work; its projections run off to infinity at |
| 20 |
the edges. |
| 21 |
|
| 22 |
Then I needed to find a surface representation, and the expressions. I'm using |
| 23 |
b-splines: they have nice continuity properties, and they have nice local |
| 24 |
support: so my jacobian will remain sparse. The |
| 25 |
|
| 26 |
bsplines.py |
| 27 |
|
| 28 |
script derives and validates the spline equations. fpbisp.py is a part of that. |
| 29 |
|
| 30 |
Then I implemented the spline equations in mrcal.c, and wanted to make sure the |
| 31 |
behavior was correct. This is done by the |
| 32 |
|
| 33 |
verify-interpolated-surface.py |
| 34 |
|
| 35 |
script. It produces a random splined model, projects it with mrcal, and |
| 36 |
visualizes the sparse control point surface with the dense sampled surface. The |
| 37 |
sampled surface should appear smooth, and should be guided by the control |
| 38 |
points. This tool is the first test that the mrcal projection is implemented |
| 39 |
correctly |