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
478 stars 168 forks source link

Issue of generating only low-resolution DEMs #411

Closed silverbean-j closed 8 months ago

silverbean-j commented 8 months ago

Hello ASP Team,

I am using ASP to generate DEMs. However, I've encountered an issue where only low-resolution DEMs are being created, and I'm unable to generate high-resolution DEMs.

The command I'm using is as follows: parallel_stereo > point2dem. However, in the resulting files, I only get PC_sub files with low resolution, and the high-resolution PC files are missing.

I initially conducted tests using ASTER satellite imagery, but I encountered the same issue with other satellite imagery that I would like to work with personally.

Here are my system details:

Operating System: Ubuntu Linux

ASP Version:
NASA Ames Stereo Pipeline 3.4.0-alpha
Build ID: 1a50ea02
Build date: 2023-09-16

Built against:
NASA Vision Workbench 3.4.0-alpha
Build ID: 5088e058
USGS ISIS 8.0.0
Boost C++ Libraries 1.72.0
GDAL 3.5.3 | 20221027

I hope you can guide me if I'm using the wrong approach causing this bug or if there's a solution to enable the creation of high-resolution DEMs. Your assistance is greatly appreciated.

Thank you for taking the time to read this.

Sincerely,

ShashankBice commented 8 months ago

Hi @silverbean-j, Could you share the log file so that we can see what happened when you tried to process which will help us in debugging? You could run your command as parallel_stereo <the parameters you use> | tee stereo_output.log. And then share the stereo_output.log with us?

Cheers, Shashank

silverbean-j commented 8 months ago

Hello,

Fortunately, I was able to successfully create a DEM using Aster satellite imagery by revisiting your manual. However, I'm still encountering the same issue when trying to create a DEM for the satellite imagery I want to produce personally.

This is the log file for the specific satellite:

While the multi-spectral image with a GSD of 2m is being generated without any resolution issues, the panchromatic image with a GSD of 0.5m is only producing low-resolution results.

For your reference, the specifications of the satellite I'm using are similar to WorldView, and the size of the panchromatic image is approximately 35,000x25,000.

The command I used is as follows:

parallel_stereo -t rpc --stereo-algorithm asp_mgm --subpixel-mode 9 --alignment-method affineepipolar img01_P.tif img02_P.tif img01_Aux.xml img02_Aux.xml C4try03/try03 | tee stereo_output.log

Thank you very much for your response.

oleg-alexandrov commented 8 months ago

A satellite like PlanetScope is not great for stereo, because, as I recall, the images mostly face forward, so there is no baseline. Stereo needs different perspectives. ( https://stereopipeline.readthedocs.io/en/latest/examples/stereo_pairs.html)

I see no log of how you ran the tool. By that, what is meant is a text file having all the text that stereo produced in the terminal.

I suggest looking at all that text and searching for convergence angle. If it tells you it is very small, like under 3 degrees, that is not good. Here's a sample of such text:

Convergence angle percentiles (in degrees) based on interest point matches: 25% 42.4481, 50% 43.1319, 75% 44.0485.

You can also search for it in the output directory, in the log file whose name is like run/run-log-stereo_pprc*.txt

In short, in your case the problem is likely with the data.

You will likely have more luck with Planet SkySat data. That we support well, but there are many images that need to be processed together, which makes the processing harder. ( https://stereopipeline.readthedocs.io/en/latest/examples/skysat.html)

On Thu, Oct 12, 2023 at 6:34 PM silverbean-j @.***> wrote:

Hello,

Fortunately, I was able to successfully create a DEM using Aster satellite imagery by revisiting your manual. However, I'm still encountering the same issue when trying to create a DEM for the satellite imagery I want to produce personally.

This is the log file for the specific satellite:

While the multi-spectral image with a GSD of 2m is being generated without any resolution issues, the panchromatic image with a GSD of 0.5m is only producing low-resolution results.

For your reference, the specifications of the satellite I'm using are similar to PlanetScope, and the size of the panchromatic image is approximately 35,000x25,000.

The command I used is as follows:

parallel_stereo -t rpc --stereo-algorithm asp_mgm --subpixel-mode 9 --alignment-method affineepipolar img01_P.tif img02_P.tif img01_Aux.xml img02_Aux.xml C4try03/try03 | tee stereo_output.log

Thank you very much for your response.

— Reply to this email directly, view it on GitHub https://github.com/NeoGeographyToolkit/StereoPipeline/issues/411#issuecomment-1760632624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKDU3A5VRC332SME5ADNZLX7CLD3AVCNFSM6AAAAAA54ZVGZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRQGYZTENRSGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

silverbean-j commented 6 months ago

Hello team,

I did not reopen the issue as my current question is not related to the previous one. However, I encountered an issue. Currently, I am using ASP (Ames Stereo Pipeline) version StereoPipeline-3.3.0-Linux within a Docker container running an Ubuntu image. When I entered a command, I encountered this error. Please note that the .xml file I used contains RPC information related to the image (LINEOFFSET, SAMPOFFSET, LINESCALE, etc.).

The imagery I'm working with is similar to WorldView. The reason I proceeded this way is that previously, when I entered the command in a similar manner, it resulted in the successful output of the DEM.

Could you kindly let me know if the command I'm using is incorrect or if I might have misunderstood something?

I would truly appreciate your assistance. Thank you.

//command
docker exec -it asp /StereoPipeline-3.3.0-Linux/bin/parallel_stereo -t rpc --stereo-algorithm asp_mgm --subpixel-mode 9 --alignment-method affineepipolar /data/20231206-152102/ref_img.tif /data/20231206-152102/ref_img.xml /data/20231206-152102/tar_img.tif /data/20231206-152102/tar_img.xml /data/20231206-152102/tmp_output

//error message
        --> Setting number of processing threads to: 4
Stereo file ./stereo.default could not be found. Will use default settings and command line options only.
num_stereo_pairs,1
Will refine the disparity using the ASP subpixel-mode: 9.
Using session: rpc
Loading camera model: /data/20231206-152102/ref_img.tif /data/20231206-152102/ref_img.xml
Unable to load RPC model from either /data/20231206-152102/ref_img.tif or /data/20231206-152102/ref_img.xml.
Not an image /data/20231206-152102/ref_img.xml
RPCModel: GDAL resource appears not to have RPC metadata.
Traceback (most recent call last):
  File "/StereoPipeline-3.3.0-Linux/libexec/parallel_stereo", line 898, in <module>
    settings = run_and_parse_output("stereo_parse", args, sep, opt.verbose)
  File "/StereoPipeline-3.3.0-Linux/libexec/asp_system_utils.py", line 298, in run_and_parse_output
    raise Exception('Failed executing: ' + " ".join(call))
Exception: Failed executing: /StereoPipeline-3.3.0-Linux/libexec/stereo_parse -t rpc --stereo-algorithm asp_mgm --subpixel-mode 9 --alignment-method affineepipolar /data/20231206-152102/ref_img.tif /data/20231206-152102/ref_img.xml /data/20231206-152102/tar_img.tif /data/20231206-152102/tar_img.xml /data/20231206-152102/tmp_output --corr-seed-mode 1
rbeyer commented 6 months ago

You really should open a new issue if it is different. Even if small. Otherwise, it is hard for us to tell if there is really something that needs attention.

Fortunately, this is an easy one. You called “parallell_stereo” with file1.tif file1.xml file2.tif file2.xml, but the order must be file1.tif file2.tif file1.xml file2.xml. The way you've entered it, ASP thinks that data/20231206-152102/ref_img.xml is an image file, and that /data/20231206-152102/tar_img.tif is a camera model file. Switching the order should get it running correctly.