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

Follow processing DG raw images tutorial but results are problematic #351

Closed jiangye-dm closed 2 years ago

jiangye-dm commented 2 years ago

Describe the bug Follow Section 4.1 in the user's guide. Download the system-ready Stockholm image. Run stereo. It runs fine. But the result seems weird (see attached image of out-PC.tif). In the created DEM tif all pixels are 255

To Reproduce Steps to reproduce the behavior:

  1. Download system-ready Stockholm images from https://resources.maxar.com/optical-imagery
  2. Follow the instruction in Section 4.1 and run
    stereo -t dg --subpixel-mode 1 --alignment-method affineepipolar \
    Stockholm_System-Ready_Stereo_50cm/056082198020/056082198020_01_P001_PAN/12FEB16101327-P1BS-056082198020_01_P001.TIF \
    Stockholm_System-Ready_Stereo_50cm/056082198020/056082198020_01_P001_PAN/12FEB16101426-P1BS-056082198020_01_P001.TIF \
    Stockholm_System-Ready_Stereo_50cm/056082198020/056082198020_01_P001_PAN/12FEB16101327-P1BS-056082198020_01_P001.XML \
    Stockholm_System-Ready_Stereo_50cm/056082198020/056082198020_01_P001_PAN/12FEB16101426-P1BS-056082198020_01_P001.XML dg/out
  3. Create DEM
    point2dem dg/output-PC.tif

Expected behavior DEM similar to Figure 4.1

Error Logs, Terminal Captures, Screenshots Show out-PC.tif

Screen Shot 2021-12-01 at 1 37 11 PM

Your Environment (please complete the following information):

oleg-alexandrov commented 2 years ago

It is not possible for the DEM to have only the values of 255. Sure you can get junk, not not 255 throughout.

Try to do gdalinfo -stats on your DEM and share the results. Or you can open the DEM in stereo_gui then then hillshade it. It is likely some mistake in visualization somewhere.

jiangye-dm commented 2 years ago

I just noticed by running point2dem dg/output-PC.tif, it creates out.obj, out.png and out.mtl. The png has only 255. There is no tif created. Does out-PC.tif (showed above) looks normal?

oleg-alexandrov commented 2 years ago

You may have ran point2mesh instead of point2dem. If you are very sure you ran point2dem, you can try deleting your build and getting a new one from https://github.com/NeoGeographyToolkit/StereoPipeline/releases.

Our own very lengthy daily regression with the latest build runs fine and point2dem produces lots of valid DEMs in Tif format.

jiangye-dm commented 2 years ago

I did mistakenly use point2mesh. I changed to point2dem and it generates valid DEM. Thank you!