SFS Not Respecting --crop-win?

26 views
Skip to first unread message

astr...@gmail.com

unread,
Feb 2, 2022, 12:45:27 PM2/2/22
to Ames Stereo Pipeline Support
I'm experimenting with SFS now on CTX imagery of Mars.  I have a fairly flat region that does show some relief, and I made a stereo-based DTM to use as my base.  Ross has told me for years that anything-CTX takes a long time, and to try cropping (or a "toy" area).

My stereo-based DTM is about 5500 x 8500 pixels, so I chose an area of interest and set crop-win as 3500 3000 100 100 (or the last two as 500 500, initially) to try to just do a 1 kpix (or 0.25 Mpix initially) area.

However, when SFS starts up, it gives the entire DTM's dimensions, and while I thought that might be just for informational purposes, the RAM usage quickly ballooned to >55 GB.  I've been doing ~1 Mpix DTMs the last few days with RAM use closer to 10 GB, so it appears as though (a) I'm not understanding how --crop-win works, or (b) SFS is not respecting the cropping in this case.

I'll also note that I had to go with sfs because parallel_sfs claimed that you can't use --crop-win with it.  It would be nice if that were a feature, given that one of the points Oleg made to me a few days ago was parallel_sfs could be used to cut down on the RAM use since it chops things into a bunch of tiles so if there are more tiles than CPU threads, you're using less RAM than if you did the whole thing at once.

Thanks,
Stuart

Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]

unread,
Feb 2, 2022, 1:00:07 PM2/2/22
to astr...@gmail.com, Ames Stereo Pipeline Support
If you have a big DEM and want to run SfS on it, you need to crop it to exactly the site you want, with gdal_translate, then use parallel_sfs. 

The SfS tool does not give reliable results for Mars. The tool does support the Hapke model, and also modeling the atmospheric haze (as an additive term to the reflectance, and a polynomial expression too), and it does give plausible results, but, unlike for the Moon, the aspect ratio is not right. Part of it may be because, as I saw in the literature, different parts of Mars need different choices for the Hapke coefficients.

As it is, the tool was validated only for the Moon with LRO NAC data. Even there, the issue of small crater depth is still being worked on. 

From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of astr...@gmail.com <astr...@gmail.com>
Sent: Wednesday, February 2, 2022 9:45 AM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] SFS Not Respecting --crop-win?
 
--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/d8b72eb0-682f-4453-bace-ada42531769cn%40googlegroups.com.

astr...@gmail.com

unread,
Feb 2, 2022, 1:40:04 PM2/2/22
to Ames Stereo Pipeline Support
Ah, okay.  You might want to update the documentation about --crop-win, if it can't be used to pick a window in an arbitrarily large image.  The documentation states: "Crop the input DEM to this region before continuing."  Which at least to me - and given the name - makes me think I can run it on a small part of a larger DEM/image set.

And yes, very much yes: Mars' photometric function is a major set of words I won't use online.  That's related to some other work I'm doing, so I'm pretty familiar with just how much of a pain it is.  Sato et al. (2014) did a resolved Hapke parameter set for the Moon, spatially resolving it and solving for the parameters in 1° x 1° tiles across the surface (within ±70° latitude) in seven LROC-WAC colors.  The same thing would need to be done for Mars, but not only resolving spatially, but temporally due to weather and dust transport and seasonal ice/frost.

What I'm hoping is that on the ~1 km level, I can get a somewhat reliable answer of, "This mountain is around 300 meters high," understanding that it might carry a ~10–20% uncertainty.  I'm looking at some mud volcanoes in Elysium that are resolved in CTX, very resolved in HiRISE, but way too small for even a raw MOLA shot.  I don't care about the elevation of flows I see off of them, or even the depth of their collapsed central calderas, just a general idea of how tall they are from the surrounding surface.  Is that a reasonable use for SfS given all the caveats?

- Stuart

Beyer, Ross A. (ARC-SST)[SETI INSTITUTE]

unread,
Feb 2, 2022, 1:48:19 PM2/2/22
to astr...@gmail.com, Ames Stereo Pipeline Support

Stuart,

 

Are you saying that you have CTX stereo of these mud volcanoes, or just single images?

 

If you have CTX or HiRISE stereo coverage of these things, then you could certainly experiment to see if sfs helps resolve them.

 

If you only have mono CTX or HiRISE, and the only terrain is MOLA to start from, I’m not sure how sfs will perform.

 

If you need stereo coverage, you can request it via https://www.uahirise.org/hiwish/ (when HiRISE takes a stereo pair, we can kindly ask CTX to “ridge along” which is why there is frequently a CTX pair where there is a HiRISE pair, and vice-versa).

-- 

Ross A. Beyer

http://RossBeyer.net/science/

Beyer, Ross A. (ARC-SST)[SETI INSTITUTE]

unread,
Feb 2, 2022, 1:50:06 PM2/2/22
to astr...@gmail.com, Ames Stereo Pipeline Support

*ride along*

 

Yikes, I can’t even blame auto-correct for that.

 

-- 

Ross A. Beyer

http://RossBeyer.net/science/

 

astr...@gmail.com

unread,
Feb 2, 2022, 1:54:14 PM2/2/22
to Ames Stereo Pipeline Support
Hi Ross:

I have CTX stereo of them about a quarter of the area they cover -- these specific ones just cover a few square degrees of Mars.  They are barely resolvable in CTX stereo, though.  When I say they are "resolvable," they are around 30 CTX pixels across, so if using a normal 3–4x coarsening for the stereo DTM, it's 10 pixels.  Tops.  So, the best stereo I have gotten for them from CTX is to basically acknowledge they are there as a small blip.  That's why I'm hoping that kinda "painting" the SfS over them from CTX will resolve them better.

HiRISE mono exists for one or two of them, I've not found a HiRISE stereopair specifically, but I can look again.  Making a HiRISE stereo DTM was "a whole 'nother" can of worms that I didn't quite want to get into right now, but I might need to.

- Stuart

Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]

unread,
Feb 2, 2022, 1:54:24 PM2/2/22
to astr...@gmail.com, Ames Stereo Pipeline Support
Stuart,

The SfS tool can use the --crop-win option, as the doc says. Now, if your crop win is big, sfs will run out of memory. The parallel_sfs tool can't use this crop win option, coz it does its own internal cropping and tiling logic, and it would be pain to support this option on top of that, but the doc does not claim parallel_stereo supports this. So the doc is consistent, if perhaps things appear unexpected.

Oleg


Sent: Wednesday, February 2, 2022 10:40 AM

To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: Re: [EXTERNAL] SFS Not Respecting --crop-win?
 

astr...@gmail.com

unread,
Feb 2, 2022, 2:05:48 PM2/2/22
to Ames Stereo Pipeline Support
Oleg: Okay, thanks.

Ross: I just checked again, and there are maybe 2–3 HiRISE images with these specific features I'm interested in, but none are in stereo.  There's an adjacent field of similar features that has one HiRISE stereopair.  I might try to use SFS to paint HiRISE over the CTX DTM, but something tells me that that might not work too well.

- Stuart

Beyer, Ross A. (ARC-SST)[SETI INSTITUTE]

unread,
Feb 2, 2022, 2:09:59 PM2/2/22
to astr...@gmail.com, Ames Stereo Pipeline Support

Stuart,

 

Yes, if you can control the HiRISE to the CTX, make a CTX stereo model, and then orthoproject the HiRISE onto that stereo model to see what it looks like and make sure that it looks good, and then feed all of the source images (with their solid control to each other and the terrain) and the CTX stereo model to sfs, that might give you something that could be useable.

-- 

Ross A. Beyer

http://RossBeyer.net/science/

 

Reply all
Reply to author
Forward
0 new messages