Hillshade comparasion with Mapprojected NAC for SFS verifications

32 views
Skip to first unread message

Sébastien

unread,
Mar 24, 2025, 3:03:35 PMMar 24
to Ames Stereo Pipeline Support

Hello,

I'm verifying the results of shade and shading by comparing a map-projected, bundle-adjusted NAC image that I omitted from the SFS process. I then extract elevation and azimuth values from this image and use them to generate a Hillshade. Additionally, I generated hillshades using ArcGIS for comparison.

I noticed that the Ames Stereo Pipeline (ASP) hillshade has significantly higher elevation values compared to the NAC image, whereas the ArcGIS hillshade results are much closer to the NAC-derived values.

I know this is a broad question, but is this a good approach for validating an SFS DEM? Are there better validation methods or best practices? Also, is hillshade a reliable tool for assessing shadow data, or is there a more accurate way to generate hillshades that remain true to the NAC image?

Any insights or recommendations would be greatly appreciated!

Oleg Alexandrov

unread,
Mar 24, 2025, 3:34:58 PMMar 24
to Sébastien, Ames Stereo Pipeline Support
I am glad you are working with the SfS tool. 

> I then extract elevation and azimuth values from this image and use them to generate a Hillshade. 

I am not sure how you can create a hillshade from a map-projected, bundle-adjusted NAC image. Hillshade is used on DEMs instead.

>I know this is a broad question, but is this a good approach for validating an SFS DEM? Are there better validation methods or best practices?

The approach I use starts by making sure the bundle-adjusted mapprojected NAC images appear correctly aligned on top of the input DEM used for SfS and to each other. That can be done in ArcGIS by visual inspection. Any misalignment will likely result in not good results.

After the SfS DEM is created, it is good to inspect it too, visually, to the earlier data. This DEM can be hillshaded too, like the earlier DEM.

These will give one an idea about horizontal alignment. For vertical alignment, one can try to run our "geodiff" program to take the difference between the produced SfS DEM and your input DEM. Hopefully these should not differ by 1-5 m. The purpose of SfS is refinement only, so need to have small differences.

It is also advised to use images with several illumination conditions, as that gives much better results than a single image or all images looking about the same.

Hope things work out. 


--
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 visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/4c2e6477-34e5-42b4-a464-22521f2bc574n%40googlegroups.com.

Sébastien

unread,
Mar 31, 2025, 12:10:39 PMMar 31
to Ames Stereo Pipeline Support
I may not have expressed myself clearly earlier. I generated an SfS DEM following all the steps outlined in the   overview of SfS and am satisfied with the results*. 

Now, I want to derive shadow data at different moments using the hillshade tool. I used a NAC as a reference as follows:

1. Run sfs --query to get the solar azimuth and elevation for a specific NAC image (M119881578RE).

2. Generate a Hillshaded Image with the values:

hillshade -a -58.08276180250607 -e 1.435152967466534 SFS_DEM-Blended.tif -o   SFS_DEM-NAC-Clone-M119881578RE.tif

 This NAC image is map-projected, bundle-adjusted, and point-cloud-aligned:

M119881578RE.map.png
 

This hillshaded DEM is cropped to match the NAC image (some artifacts are present but ignored for now).  


I compared the fully shaded zones and noticed visible differences. Some variation is expected, but even the shadow direction appears inconsistent. Is there a way to make the hillshade tool produce results that are more faithful to reality?

M119881578RE-Clone-Cropped.png

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

unread,
Mar 31, 2025, 12:17:08 PMMar 31
to Sébastien, Ames Stereo Pipeline Support
>I compared the fully shaded zones and noticed visible differences.
>Is there a way to make the hillshade tool produce results that are more faithful to reality?

The hillshade program is a very simple tool and does not work properly in occluded or shaded areas. 

You will need a program that can do ray-tracing correctly. 


From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of Sébastien <sebasti...@gmail.com>
Sent: Monday, March 31, 2025 9:10 AM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] [BULK] Re: Hillshade comparasion with Mapprojected NAC for SFS verifications
 
CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.



--
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.

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

unread,
Mar 31, 2025, 12:24:22 PMMar 31
to Sébastien, Ames Stereo Pipeline Support, Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]
To add to previous email:

>even the shadow direction appears inconsistent.

The hillshade program predates the SfS program. I am not even sure that the azimuth and elevation as defined in SfS is the same as in this program.

I was shown at some point some renderings drawn with some external program that showed good agreement between SfS-created terrain that is lit with desired illumination and and an actual image, but I don't know how that was produced.


From: 'Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]' via Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Sent: Monday, March 31, 2025 9:16 AM
To: Sébastien <sebasti...@gmail.com>; Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: Re: [EXTERNAL] [BULK] Re: Hillshade comparasion with Mapprojected NAC for SFS verifications
 

Matthew Hutton

unread,
Apr 8, 2025, 5:26:46 AMApr 8
to Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC], Sébastien, Ames Stereo Pipeline Support

The azimuth printed by sfs --query is indeed different to that which ASP hillshade expects. The elevation is the same.

 

Sébastien, since your image is near the south pole, I assume you are using a south polar stereographic projection. In that case the azimuth expected by ASP hillshade is 270 – ([sfs --query azimuth] + [longitude of DEM centre]).

You can find the longitude of the DEM centre with gdalinfo.

 

I expect that if using the north polar stereographic projection then the azimuth expected by ASP hillshade should be 90 – ([sfs --query azimuth] – [longitude of DEM centre]); and using equirectangular projection away from the poles it should be 270 – ([sfs --query azimuth]). But I haven’t tested those.

 

 

This hillshaded DEM is cropped to match the NAC image (some artifacts are present but ignored for now).  

 

I compared the fully shaded zones and noticed visible differences. Some variation is expected, but even the shadow direction appears inconsistent. Is there a way to make the hillshade tool produce results that are more faithful to reality?

--
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 visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/0a852053-8777-4b17-a861-65052d311fa5n%40googlegroups.com.

--
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 visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/MN2PR09MB5449D1C80684D024D288595788AD2%40MN2PR09MB5449.namprd09.prod.outlook.com.

--
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.

This message is intended only for the recipient(s) named above. It may contain proprietary information and/or protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect personal data, in case of data privacy queries, please contact the ESA Data Protection Officer (d...@esa.int).
Reply all
Reply to author
Forward
0 new messages