NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
479 stars 168 forks source link

Changing bundle adjust behavior #270

Closed oleg-alexandrov closed 10 months ago

oleg-alexandrov commented 5 years ago

Bundle adjustment was coded up by using some infrastructure from stereo, which has been implicitly assuming that the images have big footprint, so the heights in z are smaller than the lengths in x and y, cameras are reasonably accurate, and there is always a good datum.

None of these are always true, and then bundle adjustment can filter outliers way too aggressively and preamaturely. The good news is that in bundle adjustment we can filter outliers by reprojection error that we can't do in stereo, and also by other means. We can take advantage of this and disable or delay some of the stereo-inspired filtering. The following changes are proposed for bundle adjustment:

The idea is that we will allow bundle adjustment to start with more matches, perhaps even more outliers as well, and filter them later, when cameras are accurate.

oleg-alexandrov commented 5 years ago

I did all these except giving stereo the option of using the filtered match file from bundle adjustment. The user still has to copy the file by hand if wants to use it.

I did a lot of testing and results change little. They will have impact only in some narrow situations but the current defaults are a more sensible way forward.

Some tuning of params will still be required every now and then. A stereo pair where a quarter of the planet is seen from very different perspective is different from a stereo pair with a 2 km footprint and a huge focal length and a 1 km mountain, which is different from the snowman shape that we processed that year. Such extreme situations could still use some custom attention.

oleg-alexandrov commented 10 months ago

The options --match-files-prefix, --clean-match-files-prefix, --matches-per-tile, --mapprojected-data, and making --skip-rough-homography the default should address all these.