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
490 stars 172 forks source link

Have mapproject generate antialised images #80

Closed oleg-alexandrov closed 1 year ago

oleg-alexandrov commented 11 years ago

mapproject does (bicubic) interpolation. When being used to generate low-res imagery, this of course results in aliasing. It would be nice, per Ben, to add to it the ability to create antialised images.

The same applies to dg_mosaic.

I would argue that this, if ever implemented, should be done carefully or as an option, to not increase the run-time when this is not necessary.

I am not sure how much of a priority to assign to this item. As Ben points out, one can use gdalwarp to do the job.

oleg-alexandrov commented 1 year ago

It is better to mapproject at native resolution (which is auto-determined) then use gdal_translate -r average to reduce the resolution. This is an option in GDAL (that did not exist back then) which should help avoid aliasing.

If several input images exist, it is likely best to mapproject them using the same --tr value first before resampling as above.

Our point2dem can also resample a georeferenced image using weighted average. (A point cloud must be created first, as documented in https://stereopipeline.readthedocs.io/en/latest/tools/pc_align.html#creating-a-point-cloud-from-a-dem).

Then, stereo_gui --create-image-pyramids-only can be run in batch mode with no gui to create lower-resolution antialiased images. (https://stereopipeline.readthedocs.io/en/latest/tools/stereo_gui.html)