Special use case for generating NAC orthophotos

4 views
Skip to first unread message

John Pierangelo

unread,
May 21, 2026, 1:53:45 PM (5 days ago) May 21
to Ames Stereo Pipeline Support
Hello,

I am working with NAC stereo DTMs produced by a workflow that divides two NAC pairs into four stereo models to mitigate internal seams. Along with this, I am producing a DTM mosaic of all of the pairs, then doing a final alignment with the mosaic with pc_align and point2dem. 

I am exploring avenues of generating orthophotos from the final pc_align-point2dem sequence on a full NAC stereo site's mosaic. I notice that --orthoimage is pretty strict about the input rectified images having the same dimensions as pc_align's output point cloud. Here is a simplified example workflow:

- Run stereo on (ID1L, ID2L) (ID1R, ID2R) (ID1L, ID2R) (ID1R, ID2L)
pc_align first two pairs to LOLA, pc-align other pairs to the first for seam mitigation
- Produce DEMs for each pairing, mosaic them together

Make a positional adjustment to DTM mosaic:
pc_align \
"$input_dtm_mosaic"-LOLA.csv "$input_dtm_mosaic" \
--max-displacement 100 \
--max-num-source-points 20000000 \
--datum D_MOON \
--csv-format '1:lon 2:lat 3:radius_km' \
--save-transformed-source-points \
-o "$input_dtm_mosaic"-FINAL-PC_LOLA

point2dem \
--datum D_MOON \
--errorimage \
--t_srs '$srs' \
-o $input_dtm_mosaic-FINAL \
--dem-spacing "$output_res" \
--dem-hole-fill-len 10 \
$input_dtm_mosaic-FINAL-PC_LOLA-trans_source.tif

If I am correct, the input to point2dem orthos is the output of stereo_pprc is (L.tif R.tif). I have attempted inputting the ortho-rectified image mosaic into point2dem. This failed, as the areas between that and the transformed point cloud changed due to adjustments between the larger left-left and right-right-pairs and smaller left-right pairs. While I could do a translation of the orthomosaic with the trasformation matrix of pc_align, it would be ideal if there is a way to regenerate the orthoimage/mosaic with the adjusted DTM mosaic. I welcome any suggestions you may have for methods to do this. This was a whole lot information, so please ask for any clarification you may need.

- John

Oleg Alexandrov

unread,
May 21, 2026, 2:08:54 PM (5 days ago) May 21
to John Pierangelo, Ames Stereo Pipeline Support
Our point2dem --orthoimage workflow is very tied to PC.tif and L.tif being precisely one-to-one. The only kind of manipulation that will work is, I guess, to move PC.tif with some alignment transform, which won't change its size or structure, then use point3dem with that. Once you move from PC.tif to DEM, you can't go back. 

If you have DEMs, the only way to create orthoimages is with mapproject, and that is very much the suggested approach.

The pc_align command is not sufficiently accurate for you to get DEMs that you later merge and for that to result in seamless ortho mosaics. Any small rotation or translation error will result in a seam.

The only way we were able to do "full NAC stereo site's mosaic" is to do bundle adjustment with lots of matches of all relevant NAC files. Then these are moved as a group to align to LOLA, say. Then you make joint stereo DEMs, from some pairs of your bundle-adjusted cameras, then you mapproject onto that each image. Then you merge the ortho images with dem_mosaic. One has to be careful with areas in shadow. We have some options with dem_mosaic for thresholdiing, doing max, etc.

Some minor inaccuracies may still result if there is jitter. Any stereo pairs should also have a good convergence angle (say no less than 15 degrees).

Global registration can be quite hard to get it right. We did it on a very large scale, say 50 x 40 km at 1 m/pixel, for LRO NAC with more than 3000 images, but it is a pain.

Our Shape-from-Shading recipe, where acccurate registration is a huge prerequsiite, is described here, and it addressses various things related to registration. https://stereopipeline.readthedocs.io/en/latest/sfs_usage.html#large-scale-sfs





--
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/51366379-3601-4841-b62f-2075debd4341n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages