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
493 stars 173 forks source link

Make unaligned disparity computation work for very large images #226

Closed oleg-alexandrov closed 1 year ago

oleg-alexandrov commented 5 years ago

The code in stereo_tri for creating an unaligned disparity, that can be used for alignment using bundle adjustment creates the images fully in memory, and that does not work for images bigger than 80,000 pixels. That code was meant only for aerial images, which are never that big. The code should be changed to work on small tiles as we do with other large image processing.

ScottMcMichael commented 5 years ago

Added in 63c31cf399323d2a69dddc6a155c2669c8e26354. Not tested with map projected images yet.

jchollingsworth commented 5 years ago

Did you manage to make any progress with unaligning disparities for large mapprojected images?... I've been having problems unaligning such disparities using the build from 14th April 2019... e.g. stereo_tri -t opticalbarmapopticalbar --alignment-method none $WDIR/DS1105-2248DF076_MP.tif $WDIR/DS1105-2248DA082_MP.tif $WDIR/$prefix-DS1105-2248DF076.tsai $WDIR/$prefix-DS1105-2248DA082.tsai $WDIR/for_aft/unaligned/dem $DEM --unalign-disparity --threads $THREADS

this is the error message: terminate called recursively terminate called after throwing an instance of 'terminate called recursively vw::ArgumentErr' terminate called recursively terminate called recursively terminate called recursively what(): rasterize: Source and destination must have same dimensions. terminate called recursively terminate called recursively ./launch_dem_obar3.sh: line 151: 23910 Aborted stereo_tri -t opticalbarmapopticalbar --alignment-method none $WDIR/DS1105-2248DF076_MP.tif $WDIR/DS1105-2248DA082_MP.tif $WDIR/$prefix-DS1105-2248DF076.tsai $WDIR/$prefix-DS1105-2248DA082.tsai $WDIR/for_aft/unaligned/dem $DEM --unalign-disparity --threads $THREADS

jchollingsworth commented 5 years ago

Just to follow up on this... I also now have the same error unaligning disparities from small mapprojected images. In fact, I found that with an older build (3rd March 2019), I could successfully unalign these images. But, with a more recent build (14th April 2019, i.e. post 63c31cf), it fails. It's not a memory issue... the problem is with : what(): rasterize: Source and destination must have same dimensions.

ScottMcMichael commented 5 years ago

Unfortunately I don't know when I will have time to fix this, all of my time is on non-ASP projects now =(

oleg-alexandrov commented 1 year ago

This got fixed. Has been working quite well in practice with large images with no issues.