Hello,
I am working with Lunar South Pole stereo data and have successfully generated a DEM that is structurally very sound. However, I am facing A issue with its absolute placement relative to my reference DEM (LOLA: LDEM_87s_5mpp.tif).
My generated DEM sits a few kilometers away from where it should actually be. The rotation (angle) is slightly off, and it needs a translation (forward/backward shift) to sit perfectly over the reference DEM.
When I attempt to align it, the DEM seems to sit around the main target position across different iterations, but it refuses to lock onto the exact coordinates.
The pipeline I followed is:
Bundle adjust, parallel_stereo, point2dem
Multiple iterations of pc_align after the parallel_stereo's point2dem, hoping it would eventually settle.
Using pc_align with a specifically calculated --max-displacement based on the measured distance difference.
Applying the --highest-accuracy, algorithm flags in pc_align.
Running map projection, gcp_gen followed by bundle_adjust and then mapproject and many other pipelines and commands i tried.
Despite these efforts, the DEM keeps shifting around the true position rather than snapping into place.
Help me with:
What is the recommended flags to handle a shift of a few kilometers or make a little rotation using pc_align command and it's iterations?
If I want to strictly correct the angle and bring the DEM forward/backward manually, what pipeline can be followed?
Thank you so much.
--
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/8c3b4652-36bf-4c48-ba6f-6438be0e6d2bn%40googlegroups.com.
Hello,
Thanks for the helpful advice. To give you a bit more context, we are actually generating a DEM using Chandrayaan-2 OHRC data.
The new ASP 3.7 documentation explicitly mentions that the OHRC DEM is usually shifted relative to LOLA by about 4 km along the satellite track, which causes the default pc_align to fail.
Given our specific dataset and this known offset, I have two questions on how to proceed with the reference and resampling:
Which reference is better? For running pc_align and point2dem, is it better to use the CSV track points (lola.csv) or the ldem_27s_5mpp.tif as our reference?
What resolution should we use for resampling? The reference ldem_27s_5mpp.tif has a resolution of 5, while the OHRC data is extremely high resolution of ~0.28/0.31.
The ASP 3.7 documentation notes that for manual alignment, both the OHRC DEM and the LOLA point cloud were gridded to a 10 m grid size using the same projection before manually picking visually similar features to bring the clouds closer. So what resolution should we use 5 or 10 for OHRC dem generation?
The new ASP 3.7 documentation explicitly mentions that the OHRC DEM is usually shifted relative to LOLA by about 4 km along the satellite track, which causes the default pc_align to fail.Given our specific dataset and this known offset, I have two questions on how to proceed with the reference and resampling:
Which reference is better? For running pc_align and point2dem, is it better to use the CSV track points (lola.csv) or the ldem_27s_5mpp.tif as our reference?
What resolution should we use for resampling? The reference ldem_27s_5mpp.tif has a resolution of 5, while the OHRC data is extremely high resolution of ~0.28/0.31.
The ASP 3.7 documentation notes that for manual alignment, both the OHRC DEM and the LOLA point cloud were gridded to a 10 m grid size using the same projection before manually picking visually similar features to bring the clouds closer. So what resolution should we use 5 or 10 for OHRC dem generation?
Thank you so much for the detailed guidance and the documentations helped alot.
Following your explanation, I resampled and gridded the source data at 5 meters to match the ldem_27s_5mpp.tif reference layer. I then hillshaded both layers, manually picked tie-points using stereo_gui to generate a .match file, and ran pc_align with the following command pc_align \
--num-iterations 0 \This steps worked really well, the 5m output DEM is now tightly registered and sits exactly in the correct place when overlaid on the reference LDEM.
I have a critical follow-up question regarding how to perform pc_align on OHRC's native resolution of 0.28m using 5m based pc_align output to achieve OHRC aligned DEM at 0.28m?
Following your explanation, I resampled and gridded the source data at 5 meters to match the ldem_27s_5mpp.tif reference layer. I then hillshaded both layers, manually picked tie-points using stereo_gui to generate a .match file, and ran pc_align
This steps worked really well, the 5m output DEM is now tightly registered and sits exactly in the correct place when overlaid on the reference LDEM.
I have a critical follow-up question regarding how to perform pc_align on OHRC's native resolution of 0.28m using 5m based pc_align output to achieve OHRC aligned DEM at 0.28m?
pc_align ldem_5m.tif dem_5m.tif -o pc_align_output/run <with extra options>
Now you should be able to do:
pc_align ldem_5m.tif dem_0.28m.tif -o pc_align_0.28m/run --max-displacement 100 --initial-transform pc_align_output/run-transform.txt --save-transformed-source-points
So, this aligns to the 5m cloud not the resampled OHRC DEM at 5 m, but the fine resolution DEM you have at 0.28 m, it uses a small max-displacement (100 m beause clouds are now close) and it uses the previous aligment transform as helper. I think this should work. I am guessing here a little, but looks legit. So basically this resumes with pervious transform and continues the process but with the finer quality DEM.
You can grid the obtained saved cloud with point2dem and see if you still get it to be where you want to be.
The problem is that the 5m ldem is not great. Could be good, but maybe not enough. The gold standard is aligning directly to the LOLA RDR shots. So it is suggested to do the additional indepdenent alignemnt as follows, and see which you like more.
LOLA RDR shots can be downloaded for a given extent. We explain somewhere in the doc. The direct link is https://ode.rsl.wustl.edu/moon/tools?displaypage=lolardr. For LOLA RDR, which is a CSV file, you should specify --csv-format as described here: https://stereopipeline.readthedocs.io/en/latest/outputfiles.html#lola-with-radius-in-km
Then, since this is sparse, the order of clouds should be reversed (this is a limitation of our algorithm we use). So the invocation should be:
pc_align dem_0.28m.tif lola_rdr.csv -o pc_align_0.28m_lola/run --max-displacement 100 --initial-transform pc_align_output/run-inverse-transform.txt --save-transformed-source-points --csv-format '1:lon 2:lat 3:radius_km'.
You can peek in your CSV LOLA file to ensure that it agrees with the fields you see there.
So, this second command basically swaps the cloud order, introduces LOLA as a cloud, and uses the inverse transform instead of the direct one because the order was swapped.
This should hopefully give almost same result as the previous one, which you can check. You can grid both aligned OHRC DEMs and see how they compare to each other and the reference gridded LOLA.
It is important to note that precise alignment is very tricky. There likely can be a residual error or disagement between the two modalities. The one based on LOLA is likely safer as it does not have gridding error.
Thank you so much, it worked incredibly well. I followed both paths you outlined, and we could generate the 0.28m resolution OHRC DEM with accurate global placement.
However, we are now encountering two specific issues with the output that we need your help with:
1. While the global alignment is good, the registration is not completely uniform across the entire strip. The specific craters and areas where we manually picked match points with coincidences well with ldem_27s_5mpp.tif. However, the areas where match points are not selected show a little offset around 50 meters, even though we had taken in total about 12 match points that too covering all directions of the dem_5m.tif.
Thank you so much, it worked incredibly well. I followed both paths you outlined, and we could generate the 0.28m resolution OHRC DEM with accurate global placement.
However, we are now encountering two specific issues with the output that we need your help with:
1. While the global alignment is good, the registration is not completely uniform across the entire strip. The specific craters and areas where we manually picked match points with coincidences well with ldem_27s_5mpp.tif. However, the areas where match points are not selected show a little offset around 50 meters, even though we had taken in total about 12 match points that too covering all directions of the dem_5m.tif.
How can we achieve a consistent, uniform placement throughout the entire DEM?
2. The output DEM is introducing unwanted interpolation that fills up holes and the shadowed area which shouldn't be filled. We tried using --search-radius-factor to 10 and then 100 hoping to resolve it, but it doesn't make any diffrence.
How can this interpolation be resolved and shadowed areas kept from filling up?
--
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/0a6a9c12-ada6-478e-a8d7-62c03b205b72n%40googlegroups.com.