pixel lock / staircase artifacts

13 views
Skip to first unread message

James Hollingsworth

unread,
Jun 24, 2026, 11:40:11 AM (13 days ago) Jun 24
to Ames Stereo Pipeline Support
Hi Oleg,

Do you have any advice for how to combat pixel-lock when using asp_mgm to make a DEM?

I have a case where the stereoscopic signal is fairly small (gentle slopes), and on particular aspects I often see a staircase artifact, which I'm pretty sure is pixel-lock associated with the correlator (I used: --stereo-algorithm asp_mgm --corr-kernel 9 9 --cost-mode 3 --subpixel-mode 10 in the screenshot below). It correlates with higher intersection errors in the -IntersectionErr.tif map, so it's definitely a correlation artifact.

If I use EMB, then I mostly get rid of this problem (maybe because the subpixel accuracy is a little better?)... but at the cost of decreased spatial detail, and often other problems (not witchstanding increased run times).

Looking at the stereo_corr and stereo_rfne options, there doesn't look to be too many ways to tune the mgm/sgm options (e.g. playing wiht P1 and P2, or perhaps making them dependent on image intensity gradients, etc)... also, I think(?) prefiltering doesn't work when using sgm, whereas maybe a little bit of smoothing could help? 

Anyhow, just thought I would ask in case you had thoughts... (I'll try using the different sub-pixel modes, but from memory I think I found 10 to be the best for minimizing this?).

Cheers! J

steps.png

Oleg Alexandrov

unread,
Jun 24, 2026, 12:30:43 PM (13 days ago) Jun 24
to James Hollingsworth, Ames Stereo Pipeline Support
James,

Two things can help here. First, blur a little bit the problematic terrain you are getting so these artifacts disappear, mapproject onto it, and redo stereo. The new DEM will be smooth there, left and right images will maprroject in good agement, so the disparity will be close to constant, which should attenuate any such artifacts.

Second, our best subpixel mode is 2. Very slow, but it does more honest work than subpixel-mode 10 I think. You can also try mode 9 and 3. Mode 3 is faster than mode 2. Mode 2 tries to do a local affine fit which should help with better disparity refinement.

These two options, of re-mapproect and change of subpixel mode can be combined but likely can try to do one first then see if second makes a difference.

I know extra mapprojection is an extra step, but such experiments can be done on a very small clip, which you can crop from the DEM (such as 1024 x 1024 pixels), when it should run fast.

Semi-relatedly we have a new tool that does mapprojection and stereo fully in parallel over tiles, including preprocessing all from a single invocation which simplifies the workflow, with the only global work being merging the final DEM portions. https://stereopipeline.readthedocs.io/en/latest/tools/stereo_dist.html#stereo-dist (won't help directly with your problem but will speed up experimenting).


--
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/31d8fe93-9d80-4e57-95a6-6eb8b926d810n%40googlegroups.com.

James Hollingsworth

unread,
Jul 4, 2026, 9:03:57 AM (4 days ago) Jul 4
to Ames Stereo Pipeline Support
Thanks Oleg... that's helpful :)

So subpixel mode 2 works very well in this case. I'll update you with some cool stuff in the near(ish) future!

J

Reply all
Reply to author
Forward
0 new messages