RPCModel: GDAL resource appears not to have RPC metadata.

111 views
Skip to first unread message

he luo

unread,
Jan 31, 2021, 7:14:26 AM1/31/21
to Ames Stereo Pipeline Support
Hello 
I am using the ASP program to create DEM with worldview-2 stereoscopic images, but I have encountered a problem that I cannot solve by myself.
The command I used is as follows:
bundle_adjust 15JUL24042129-P1BS_R1C1-054471964020_01_P001.TIF \                      15JUL24042233-P1BS_R1C1-054471964020_01_P001.TIF \
              15JUL24042129-P1BS_R1C1-054471964020_01_P001.XML \
15JUL24042233-P1BS_R1C1-054471964020_01_P001.XML \
              onegcp.gcp -t dg --datum WGS_1984 --use-lon-lat-height-gcp-error \
              -o p1/run_ba/run --num-passes 2 
mapproject -t rpc --t_srs "+proj=utm +units=m +k=0.9996 +zone=46 +datum=WGS84" \
           --tr 0.5 dem-adj.tif \
           15JUL24042129-P1BS_R1C1-054471964020_01_P001.TIF \
           --bundle-adjust-prefix p1/run_ba/run \
           p1/left_mapped_ba.tif
mapproject -t rpc --t_srs "+proj=utm +units=m +k=0.9996 +zone=46 +datum=WGS84" \
           --tr 0.5 dem-adj.tif \
           15JUL24042233-P1BS_R1C1-054471964020_01_P001.TIF \
          --bundle-adjust-prefix p1/run_ba/run \
           p1/right_mapped_ba.tif
In order to execute the stereo_gui command, after running the mapproject command, I renamed the "run-15JUL24042129-P1BS_R1C1-054471964020_01_P001.adjust" and "run-15JUL24042233-P1BS_R1C1-054471964020_01_P001.adjust" in the bundle_adjust run result to "run-mapped_baped_ba. adjust" and "run-right_mapped_ba.adjust"
stereo_gui --alignment-method none \
           --stereo-algorithm 1 \
           --sgm-collar-size 512 \
           --corr-tile-size 1024 \
           --corr-memory-limit-mb 13000 \
           --threads 12 \
           --cost-mode 4 --corr-kernel 7 7 \
           --subpixel-mode 7 \
           p1/left_mapped_ba.tif p1/right_mapped_ba.tif \
           --bundle-adjust-prefix p1/run_ba/run \
           p1/run_pc/out dem-adj.tif
The above process can run successfully on one workstation, but when the stereo_gui is executed on another computer, the error shown in the picture appears
1.png
Is my data processing process correct? ? If it is correct, where did it go wrong?
Hope someone can solve my problem, thanks

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

unread,
Jan 31, 2021, 1:30:00 PM1/31/21
to he luo, Ames Stereo Pipeline Support
It looks as if your new mapprojected images are in a subdirectory but the XML files are not copied there. I will suggest you keep all your inputs and the images you mapproject in the same place, so that the software can find them. So, instead of p1/left_mapped_ba.tif you can just have left_mapped_ba.tif (or just copy your xml files to p1).



From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of he luo <helu...@gmail.com>
Sent: Sunday, January 31, 2021 4:14 AM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] RPCModel: GDAL resource appears not to have RPC metadata.
 
--
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/661acda5-c1b8-444d-9e0d-58070cc980c3n%40googlegroups.com.

he luo

unread,
Jan 31, 2021, 9:53:45 PM1/31/21
to Ames Stereo Pipeline Support
Thank you for your answers, but I still have some doubts.
According to your suggestion, should I use the original image XML camera file when executing mapproject instead of the bundle_adjust output file?
Also, I see that the rpb file will be output after the mapproject command is completed, so should I use the camera file output from mapproject in the stereo_gui command, or should I use the camera file output by bundle_adjust in the stereo_gui command?

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

unread,
Feb 1, 2021, 12:17:38 PM2/1/21
to he luo, Ames Stereo Pipeline Support
Ah, I see that you say:

The above process can run successfully on one workstation, but when the stereo_gui is executed on another computer, the error shown in the picture appears

That may be a file system issue. Do the two computers share the same file system? Or you have to copy the files over? If you copy them over, maybe you are not copying the whole set.

Or maybe there are some hard-coded paths in the files we write with mapproject (which I doubt). 

That software did not change for a long time, so I think it is more likely something on your side.

Oleg


Sent: Sunday, January 31, 2021 6:53 PM

To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: Re: [EXTERNAL] RPCModel: GDAL resource appears not to have RPC metadata.
 

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

unread,
Feb 1, 2021, 12:20:35 PM2/1/21
to he luo, Ames Stereo Pipeline Support, Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]
And to continue on the previous message, and to answer your questions:

> According to your suggestion, should I use the original image XML camera file when executing mapproject instead of the bundle_adjust output file?

As before, first try to run eveything on one comptuer only, and avoid using a subdirectory for some files only. Just to make sure we rule out the obvious issues.

When you do mapproject, you should use the image only, and the --bundle-adjust-prefix. I think you are doing that well.

I am only saying that those .xml files are loaded by the program later, and if they are not in the right place, or not with the right name, they won't be found.

> Also, I see that the rpb file will be output after the mapproject command is completed, so should I use the camera file output from mapproject in the stereo_gui command, or should I use the camera file output by bundle_adjust in the stereo_gui command?

I think you should use the images only, as before, with --bundle-adjust-prefix. Hopefully the new rpb file will be located automatically and loaded.



From: 'Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]' via Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Sent: Monday, February 1, 2021 9:17 AM
To: he luo <helu...@gmail.com>; Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>

he luo

unread,
Feb 1, 2021, 9:53:17 PM2/1/21
to Ames Stereo Pipeline Support
Thank you very much for your answer
Reply all
Reply to author
Forward
0 new messages