How to rebuild RPC file after image clipping?

134 views
Skip to first unread message

Anna D.

unread,
Apr 12, 2022, 4:19:59 AM4/12/22
to Ames Stereo Pipeline Support
Hello,
I am pretty new (and nube :) ) in ASP. Please, guide me with my question:

I have a large-covering stereo images (Earth data, SPOT 7 exactly) with an associated RPC file as *.xml . I would like to make a DEM for a smaller region than the images actually cover. How can I clip the images and rebuild the associated RPC?
I found the clipping option in <mapproject> tool , but the <parallel_stereo> tool finished with an error "RPCModel: GDAL resource appears not to have RPC metadata." (   I do no specify RPC_*.xml file as it stays for a big source images)

Thanks, A.

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

unread,
Apr 12, 2022, 11:59:51 AM4/12/22
to Ames Stereo Pipeline Support, Anna D.
I am pretty new (and nube :) ) in ASP. 

Nube today, expert tomorrow. 🙂

You don't need to rebuild the RPC, the original RPC will work by making adjustments to the images. One approach is to invoke stereo_gui with the same options as you'd like to do stereo with, select regions with the mouse, and run parallel_stereo from the GUI (https://stereopipeline.readthedocs.io/en/latest/tools/stereo_gui.html). (Note that I just found that the GUI got broken within the last weeks and put a fix, which will be up tomorrow, but the official 3.0.0 version should work in the meantime). 

A second option, if you have a DEM of the area you care for (which can be further cropped as stated here: https://stereopipeline.readthedocs.io/en/latest/tools/stereo_gui.html#finding-pixel-values-and-region-bounds), the left and right images can be mapprojected onto that DEM and stereo run with obtained mapprojected clips, original cameras, and that initial DEM clip, as stated here: https://stereopipeline.readthedocs.io/en/latest/next_steps.html#running-stereo-with-mapprojected-images).



From: 'Anna D.' via Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Sent: Tuesday, April 12, 2022 1:19 AM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] How to rebuild RPC file after image clipping?
 
--
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/5d2f80a2-19ec-4e85-ba2c-dab3d6ff7440n%40googlegroups.com.

Anna D.

unread,
Apr 13, 2022, 2:45:58 AM4/13/22
to Ames Stereo Pipeline Support
Thanks a lot! 
The second solution (crop and run parallel_stereo with the source PRC) managed my problem.
The first-one didn't work properly, parallel_stereo raised an error a bit after the start. Perhaps because there is no "-t rps" option when launching stereo_gui which seems important for my case. 

PS My special thanks to the authors for automatic identification of already-done jobs when the processing is restarted after a system crash 💗 


вторник, 12 апреля 2022 г. в 18:59:51 UTC+3, oleg.al...@nasa.gov:

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

unread,
Apr 13, 2022, 12:50:10 PM4/13/22
to Ames Stereo Pipeline Support, Anna D.
Glad the mapprojection worked when it comes to running small clips. That is a good approach if your underlying DEM is reasonably well-registered with the images you use. 

The -t rpc option can be passed to stereo_gui (and the gui silently accepts all other parallel_stereo options as of recently) which will then passed on to parallel_stereo if invoked from the gui later. And my fix to the gui made it to the latest build at https://github.com/NeoGeographyToolkit/StereoPipeline/releases (not that you need any of this for now). 

My special thanks to the authors for automatic identification of already-done jobs when the processing is restarted after a system crash 

That was a user-requested feature and I am glad it is of use. 

From: 'Anna D.' via Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Sent: Tuesday, April 12, 2022 11:45 PM

To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: Re: [EXTERNAL] How to rebuild RPC file after image clipping?
 
Reply all
Reply to author
Forward
0 new messages