can't run stereo with mapprojected images

54 views
Skip to first unread message

shusu....@gmail.com

unread,
Mar 7, 2024, 6:46:48 PMMar 7
to Ames Stereo Pipeline Support
Dear ASP community,

I was running stereo with mapprojected images. The HiRISE images were first mapprojected by an HRSC DTM. The stereo command is as follows:
parallel_stereo --stereo-algorithm asp_bm --subpixel-mode 2 --subpixel-kernel 65 65 --bundle-adjust-prefix bundle_adjust/BA ESP_024243_1560_RED_mapbyHRSC.mos_hijitreged.norm.project.tif ESP_024388_1560_RED_mapbyHRSC.mos_hijitreged.norm.project.tif ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED.mos_hijitreged.norm.cub stereo_BM_mapHRSC_1560/stereo h0563_0000_dt4.img 

However, I got an error report:
Error: **I/O ERROR** Unable to open [].
--> Setting number of processing threads to: 16
Stereo file ./stereo.default could not be found. Will use default settings and command line options only.
num_stereo_pairs,1
Using session: isismapisis
Loading isis cameras used in mapprojection.
Traceback (most recent call last):
  File "/opt/conda/envs/isis/bin/parallel_stereo", line 898, in <module>
    settings = run_and_parse_output("stereo_parse", args, sep, opt.verbose)
  File "/opt/conda/envs/isis/libexec/asp_system_utils.py", line 298, in run_and_parse_output
    raise Exception('Failed executing: ' + " ".join(call))
Exception: Failed executing: /opt/conda/envs/isis/bin/stereo_parse --stereo-algorithm asp_bm --subpixel-mode 2 --subpixel-kernel 65 65 --bundle-adjust-prefix bundle_adjust/BA ESP_024243_1560_RED_mapbyHRSC.mos_hijitreged.norm.project.tif ESP_024388_1560_RED_mapbyHRSC.mos_hijitreged.norm.project.tif ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED.mos_hijitreged.norm.cub stereo_BM_mapHRSC_1560/stereo h0563_0000_dt4.img --corr-seed-mode 1

It seems that the program can't open the mapprojected ".tif" files. However, I checked the mapprojected ".tif" files in Arcgis, and they looked fine. I also tried stereo without mapprojecting the images in advance, command was: parallel_stereo --stereo-algorithm asp_bm --subpixel-mode 2 --subpixel-kernel 65 65 --bundle-adjust-prefix bundle_adjust/BA ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED.mos_hijitreged.norm.cub stereo_nomap_1560_BM_BA/stereo. And this one worked well.

So, I am not sure what was going wrong when I ran stereo with the mapprojected images. Could you please help analyze this issue? Thank you in advance.

Yours sincerely,
Shu





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

unread,
Mar 7, 2024, 7:58:26 PMMar 7
to shusu....@gmail.com, Ames Stereo Pipeline Support
I tried precisely your first command that is failing for you and it worked well for me (I copied some files to match your names).

Try to run gdalinfo -stats on your cub files and see what happens. You can try to mapproject again the cub files, while ensuring the same projection (--t_srs) and grid size (--tr) is used for both. You can mapproject onto a small DEM, so the problem is easy to reproduce. 

If no luck, you can try running just the stereo_parse command, as you do for parallel_stereo, and share the full output. so you can run it as follows:

 stereo_parse --stereo-algorithm asp_bm --subpixel-mode 2 --subpixel-kernel 65 65 --bundle-adjust-prefix bundle_adjust/BA ESP_024243_1560_RED_mapbyHRSC.mos_hijitreged.norm.project.tif ESP_024388_1560_RED_mapbyHRSC.mos_hijitreged.norm.project.tif ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED.mos_hijitreged.norm.cub stereo_BM_mapHRSC_1560/stereo h0563_0000_dt4.img --corr-seed-mode 1

If no luck at all, you can share your data, but it better be a small example with cropped inputs rather than a full HiRISE run.



From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of shusu....@gmail.com <shusu....@gmail.com>
Sent: Thursday, March 7, 2024 3:46 PM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] [BULK] can't run stereo with mapprojected images
 
CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.



--
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/e96b0385-8a46-4a40-94ef-6ec4a3abb1d4n%40googlegroups.com.

shusu....@gmail.com

unread,
Mar 11, 2024, 6:47:42 PMMar 11
to Ames Stereo Pipeline Support
Dear Oleg,

Thanks for your kind help.

According to your advice, I first mapprojected a small region of HiRISE onto a small DEM:
mapproject h0563_0000_dt4_sub1560.tif ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024243_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif --tr 0.5 --t_pixelwin 3000 3000 5000 5000 --bundle-adjust-prefix bundle_adjust/BA
mapproject h0563_0000_dt4_sub1560.tif ESP_024388_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif --tr 0.5 --t_pixelwin 3000 3000 5000 5000 --bundle-adjust-prefix bundle_adjust/BA


Then, I ran gdalinfo -stats both on cub files and mapprojected files. Both seem to have the correct information (please see the attachment). The mapprojected images have projection from the HRSC DTM.

After that, I tried stereo_parse command: 
stereo_parse --stereo-algorithm asp_bm --subpixel-mode 2 --subpixel-kernel 65 65 --bundle-adjust-prefix bundle_adjust/BA ESP_024243_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif ESP_024388_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED.mos_hijitreged.norm.cub stereo_BM_mapHRSC_1560_sub1/stereo h0563_0000_dt4_sub1560.tif --corr-seed-mode 1

Unfortunately, it still failed:
 --> Setting number of processing threads to: 16
Stereo file ./stereo.default could not be found. Will use default settings and command line options only.
num_stereo_pairs,1
Using session: isismapisis
Loading isis cameras used in mapprojection.
Error: **I/O ERROR** Unable to open [].

The above error report is not clear. But since you have succeeded in running the above command, I am a bit suspicious of the ISIS or ASP software installed on my computer. Because last week I updated the kernel files. Do you think it could be a software problem that caused the error while running stereo with mapprojected images?

Best regards,
Shu


Outputs_gdalinfo.txt

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

unread,
Mar 11, 2024, 7:02:11 PMMar 11
to shusu....@gmail.com, Ames Stereo Pipeline Support
No luck reproducing this. It tried your commands precisely, but without  --t_pixelwin, and I used --tr 0.000106 because my DEM is in deegrees. Then I ran stereo_parse, as you did. I get:

Creating output directory: "stereo_BM_mapHRSC_1560_sub1".
Using session: isismapisis
Warning: Missing field value for: CAMERA_FILE in ESP_024243_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif.
Warning: Using: ESP_024243_1560_RED.mos_hijitreged.norm.cub instead.
Warning: Missing field value for: CAMERA_FILE in ESP_024388_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif.
Warning: Using: ESP_024388_1560_RED.mos_hijitreged.norm.cub instead.
Mapprojected images bundle adjustment prefixes: bundle_adjust/BA bundle_adjust/BA
Mapprojection cameras: ESP_024243_1560_RED.mos_hijitreged.norm.cub ESP_024388_1560_RED.mos_hijitreged.norm.cub
Mapprojection cam types: isis isis
Using adjusted camera model: bundle_adjust/BA-ESP_024243_1560_RED.mos_hijitreged.norm.adjust
Using adjusted camera model: bundle_adjust/BA-ESP_024388_1560_RED.mos_hijitreged.norm.adjust
Loading camera model: ESP_024243_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif ESP_024243_1560_RED.mos_hijitreged.norm.cub
Using adjusted camera model: bundle_adjust/BA-ESP_024243_1560_RED.mos_hijitreged.norm.adjust
Loading camera model: ESP_024388_1560_RED_mapbyHRSC_sub1.mos_hijitreged.norm.project.tif ESP_024388_1560_RED.mos_hijitreged.norm.cub
Using adjusted camera model: bundle_adjust/BA-ESP_024388_1560_RED.mos_hijitreged.norm.adjust
Warning: Changing the alignment method to 'none' as the images are map-projected.
Distance between camera centers in meters: 76862.

and so on.

You can try getting the latest build from https://github.com/NeoGeographyToolkit/StereoPipeline/releases.

If still no luck, you can share your data, but hopefully with the .cub files cropped to some smaller area. If you share data, it is best to not send that by email, and to write to me only, not the whole list, with a link like Google Drive having it.





Sent: Monday, March 11, 2024 3:47 PM

To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: Re: [EXTERNAL] [BULK] can't run stereo with mapprojected images
 

Jenny Greenhorn

unread,
Jun 7, 2024, 3:23:17 PMJun 7
to Ames Stereo Pipeline Support
Hi all, 
I'm actually experiencing a similar issue on the CTX side. I'm processing CTX images P12_005904_1734_XI_06S177W (left) and F14_041230_1734_XN_06S177W (right), following the same steps as David Mayer (https://github.com/dpmayerUSGS/usgs_asp_scripts/tree/master), but not using his scripts directly. Thus far, I've (1) Calibrated and run even/odd detector correction to get lev1eo files, (2) run cam2map4stereo to get projection data, (2) Bundle adjusted lev1eo cubes, (3) Run parallel stereo on bundle adjusted lev1eo cubes, (4) run point2dem using projection data from cam2map4stereo output to get a rough DEM, (5) map projected left and right lev1eo cubes onto the rough DEM, and (6) attempted to run parallel_stereo using the bundle adjusted and map projected .tif files created in the previous step. Here are the exact commands I've run:
  1. cam2map4stereo.py {left.lev1eo.cub} {right.lev1eo.cub}
  2. bundle_adjust {left.lev1eo.cub} {right.lev1eo.cub} -o adjust/ba
  3. parallel_stereo --processes 2 --threads-multiprocess 8 --threads-singleprocess 16 --stop-point 5 --bundle-adjust-prefix adjust/ba --stereo-file {stereo.default} {left.lev1eo.cub} {right.lev1eo.cub} results_ba/{both}_ba
  4. parallel_stereo --processes 2 --threads-multiprocess 8 --threads-singleprocess 16 --entry-point 5 --bundle-adjust-prefix adjust/ba --stereo-file {stereo.default} {left.lev1eo.cub} {right.lev1eo.cub} results_ba/{both}_ba
  5. gdalsrsinfo -o proj4 {left.map.cub}
  6. point2dem --threads 16 --reference-spheroid mars --nodata -32767 --dem-spacing 100 --t_srs '+proj=sinu +lon_0=182.81888174087 +x_0=0 +y_0=0 +R=3396190 +units=m +no_defs' --dem-hole-fill-len 50 -o dem/{both}_ba_100_0 {both}_ba-PC_sub.tif
  7. gdaldem hillshade ./dem/{both}_ba_100_0-DEM.tif ./dem/{both}_ba_100_0-hillshade.tif
  8. mapproject -t isis {refdem.tif} {left.lev1eo.cub} {left}.ba.map.tif --mpp 6 --bundle-adjust-prefix adjust/ba
  9. mapproject -t isis {refdem.tif} {right.lev1eo.cub} {right}.ba.map.tif --mpp 6 --bundle-adjust-prefix adjust/ba
  10. parallel_stereo -t isis --stop-point 5 --bundle-adjust-prefix adjust/ba --stereo-file {stereo.default} {left.ba.map.tif} {right.ba.map.tif} {left.lev1eo.cub} {right.lev1eo.cub} results_map_ba/{both}_map_ba {refdem.tif}
Everything runs smoothly up until the last command in which I run parallel_stereo, which results in this error: 

Error: **I/O ERROR** Unable to open []. 
 --> Setting number of processing threads to: 4
Using stereo file stereo.default.example.
num_stereo_pairs,1
Using session: isismapisis
Loading isis cameras used in mapprojection.
Traceback (most recent call last): File "/parallel_stereo", line 922, in <module> settings = run_and_parse_output("stereo_parse", args, sep, opt.verbose)
File "/libexec/asp_system_utils.py", line 298, in run_and_parse_output raise
Exception('Failed executing: ' + " ".join(call))
Exception: Failed executing: /libexec/stereo_parse -t isis --bundle-adjust-prefix adjust/ba /results_ba/P12_005904_1734_XI_06S177W.ba.map.tif /results_ba/F14_041230_1734_XN_06S177W.ba.map.tif /P12_005904_1734_XI_06S177W/P12_005904_1734_XI_06S177W.lev1eo.cub /F14_041230_1734_XN_06S177W/F14_041230_1734_XN_06S177W.lev1eo.cub results_map_ba/P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_map_ba /results_ba/dem/P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_ba_100_0-DEM.tif --corr-seed-mode 1 --stereo-file /stereo.default.example

I have the outputs of every command documented in a Jupyter Notebook should anyone like to see and run that. Any help would be greatly appreciated. Please let me know if this is not the correct post for this and I will make a new one. 

Thanks,
Sabrina

Oleg Alexandrov

unread,
Jun 7, 2024, 5:40:05 PMJun 7
to Jenny Greenhorn, Ames Stereo Pipeline Support
This looks like an ISIS error. It is quite similar to what is here: https://stereopipeline.readthedocs.io/en/latest/installation.html#common-errors

Can you try to run stereo_parse alone, with precisely the same arguments, but without --entry-point, and see if you get a fuller message?

Your command and overall recipe looks good. I get good results on my side when using my own images, and without  --bundle-adjust-prefix  and without --stereo-file. Maybe you can try that as well. (Can also try wiping the stereo file, in case something funny is inside.)

It is kind of interesting that all your inputs are in the / directory. Normally these should be in folders in your home directory. Not sure that's the issue.

If really no luck, maybe you can share a testcase reproducing the problem, which should have all the inputs.



Jenny Greenhorn

unread,
Jun 27, 2024, 12:49:18 PM (6 days ago) Jun 27
to Ames Stereo Pipeline Support

Hi,

Thanks for your help and very sorry for the delay! Here’s what I’ve tried:


  1. Attempted to run using a new stereo file: stereo_parse -t isis --bundle-adjust-prefix adjust/ba --stereo-file {config1} '/mnt/scratch1/sabrina/asp_240605_ctx/results_ba/P12_005904_1734_XI_06S177W.ba.map.tif' '/mnt/scratch1/sabrina/asp_240605_ctx/results_ba/F14_041230_1734_XN_06S177W.ba.map.tif' {lefteocub} {righteocub} results_map_ba/{both}_map_ba {refdem}

--> Setting number of processing threads to: 4

Using stereo file /mnt/scratch1/StereoPipeline-3.4.0-alpha-2024-05-29-x86_64-Linux/stereo.default.example.

num_stereo_pairs,1

Using session: isismapisis

Loading isis cameras used in mapprojection.



Error: **I/O ERROR** Unable to open [].


  1. If I run the above command without the bundle adjust prefix or the stereo-file I get the same output as above
  1. If I run the above command without the reference dem argument the output is: 

--> Setting number of processing threads to: 4

Using stereo file /mnt/scratch1/StereoPipeline-3.4.0-alpha-2024-05-29-x86_64-Linux/stereo.default.example.

num_stereo_pairs,1

Using session: isis

Loading camera model: /mnt/scratch1/sabrina/asp_240605_ctx/results_ba/P12_005904_1734_XI_06S177W.ba.map.tif /mnt/scratch1/sabrina/asp_240605_ctx/P12_005904_1734_XI_06S177W/P12_005904_1734_XI_06S177W.lev1eo.cub

Using adjusted camera model: adjust/ba-P12_005904_1734_XI_06S177W.lev1eo.adjust

Loading camera model: /mnt/scratch1/sabrina/asp_240605_ctx/results_ba/F14_041230_1734_XN_06S177W.ba.map.tif /mnt/scratch1/sabrina/asp_240605_ctx/F14_041230_1734_XN_06S177W/F14_041230_1734_XN_06S177W.lev1eo.cub

Using adjusted camera model: adjust/ba-F14_041230_1734_XN_06S177W.lev1eo.adjust

Georef 1: -- Proj.4 Geospatial Reference Object --

PROJCS name: unknown

Transform  : Matrix3x3((6,0,-32217)(0,-6,-231699)(0,0,1))

Geodetic Datum --> Name: D_MARS  Spheroid: MARS  Semi-major axis: 3396190  Semi-minor axis: 3396190  Meridian: Reference Meridian at 0  Proj4 Str: +proj=sinu +lon_0=182.81888174087 +x_0=0 +y_0=0 +R=3396190 +units=m +no_defs

Proj.4 String: +proj=sinu +lon_0=182.81888174087 +x_0=0 +y_0=0 +units=m +over

Pixel Interpretation: pixel as area

longitude range: [0, 360]


Georef 2: -- Proj.4 Geospatial Reference Object --

PROJCS name: unknown

Transform  : Matrix3x3((6,0,-32217)(0,-6,-231699)(0,0,1))

Geodetic Datum --> Name: D_MARS  Spheroid: MARS  Semi-major axis: 3396190  Semi-minor axis: 3396190  Meridian: Reference Meridian at 0  Proj4 Str: +proj=sinu +lon_0=182.81888174087 +x_0=0 +y_0=0 +R=3396190 +units=m +no_defs

Proj.4 String: +proj=sinu +lon_0=182.81888174087 +x_0=0 +y_0=0 +units=m +over

Pixel Interpretation: pixel as area

longitude range: [0, 360]


Warning: It appears that the input images are map-projected. In that case a DEM needs to be provided for stereo to give correct results.

Distance between camera centers in meters: 82065.4.

multiview_command_10001,stereo_parse,-t,isis,--bundle-adjust-prefix,adjust/ba,--stereo-file,/mnt/scratch1/StereoPipeline-3.4.0-alpha-2024-05-29-x86_64-Linux/stereo.default.example,/mnt/scratch1/sabrina/asp_240605_ctx/results_ba/P12_005904_1734_XI_06S177W.ba.map.tif,/mnt/scratch1/sabrina/asp_240605_ctx/results_ba/F14_041230_1734_XN_06S177W.ba.map.tif,/mnt/scratch1/sabrina/asp_240605_ctx/P12_005904_1734_XI_06S177W/P12_005904_1734_XI_06S177W.lev1eo.cub,/mnt/scratch1/sabrina/asp_240605_ctx/F14_041230_1734_XN_06S177W/F14_041230_1734_XN_06S177W.lev1eo.cub,results_map_ba/P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_map_ba

in_file1,/mnt/scratch1/sabrina/asp_240605_ctx/results_ba/P12_005904_1734_XI_06S177W.ba.map.tif

in_file2,/mnt/scratch1/sabrina/asp_240605_ctx/results_ba/F14_041230_1734_XN_06S177W.ba.map.tif

cam_file1,/mnt/scratch1/sabrina/asp_240605_ctx/P12_005904_1734_XI_06S177W/P12_005904_1734_XI_06S177W.lev1eo.cub

cam_file2,/mnt/scratch1/sabrina/asp_240605_ctx/F14_041230_1734_XN_06S177W/F14_041230_1734_XN_06S177W.lev1eo.cub

input_dem,

extra_argument1,

extra_argument2,

extra_argument3,

stereo_session,isis

stereo_default_filename,/mnt/scratch1/StereoPipeline-3.4.0-alpha-2024-05-29-x86_64-Linux/stereo.default.example

left_image_crop_win,0,0,0,0

out_prefix,results_map_ba/P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_map_ba

left_image_size,10737,52084

right_image_size,10751,52057

trans_left_image,results_map_ba/P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_map_ba-L.tif

trans_right_image,results_map_ba/P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_map_ba-R.tif

trans_left_image_size,0,0

WKT--non-comma-separator--PROJCS["unknown",GEOGCS["D_MARS",DATUM["D_MARS",SPHEROID["MARS",3396190,0]],PRIMEM["Reference Meridian",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Sinusoidal"],PARAMETER["longitude_of_center",182.81888174087],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]

GeoTransform--non-comma-separator-- -32217,  6,  0,   -231699,  0,  -6

transformed_window,0,0,10737,52084

corr_tile_size,1024

rfne_tile_size,256

tri_tile_size,256

stereo_algorithm,asp_bm

alignment_method,affineepipolar

subpixel_mode,1

collar_size,0

corr_memory_limit_mb,4096

save_lr_disp_diff,0

correlator_mode,0


---

I thought the issue might have something to do with where my files were being stored, but I include the full path for every file in each command, and as you can see from the third run, parallel_stereo seems to be able to call the camera models without issue when the reference dem argument is excluded. I will attach the Jupyter notebook I'm running ASP out of, which includes the full file paths, commands, and outputs. 


Thank you for your help! I've been struggling with generating these DEMs for some time now and I'd really like to get to the bottom of this so I can make progress on my research. 

Jenny Greenhorn

unread,
Jun 27, 2024, 12:51:14 PM (6 days ago) Jun 27
to Ames Stereo Pipeline Support
asp_run_v2.ipynb.zip

Oleg Alexandrov

unread,
Jun 27, 2024, 1:11:06 PM (6 days ago) Jun 27
to Jenny Greenhorn, Ames Stereo Pipeline Support
This is a tough one, and a very rare situation, that I could not reproduce, which suggests something is not right on your system or with the workflow.

You could zip up and share (privately) your input data (images after mapprojection, cameras, reference DEM you mapproject to, and I can try to run it. 

This would be too big for an attachment, so should be stored on Google Drive or some other server and a link shared.



On Thu, Jun 27, 2024 at 9:51 AM Jenny Greenhorn <smartm...@gmail.com> wrote:

--
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.

Oleg Alexandrov

unread,
Jun 27, 2024, 4:46:48 PM (5 days ago) Jun 27
to Jenny Greenhorn, Ames Stereo Pipeline Support
I took a look at the data. One of the mapprojected images records how it was mapprojected, meaning the DEM used, etc, while the second one does not. That's a little odd. The fact that the image paths burned into the mapprojected image were absolute also made it tricky to reproduce this. After I overwrote that, the processing went fine.

The left image, P12_005904_1734_XI_06S177W.ba.map.tif, looks totally white, which is very odd.

The DEM used for mapprojection has a lot of very strong staircasing. I never saw it that bad. Likely not the problem here, but this will cause issues with quality and this should be redone at some point.

I will suggest methodically redoing all work on a small clip. Here's a list of detailed steps. It is suggested to work in the home directory, not in the root directory, and use relative paths. Steps:

- Get the latest build (to make sure we are all on the same page) from https://github.com/NeoGeographyToolkit/StereoPipeline/releases

- Run cam_test as a sanity check:

cam_test --image F14_041230_1734_XN_06S177W.lev1eo.cub --cam1 F14_041230_1734_XN_06S177W.lev1eo.cub --cam2 F14_041230_1734_XN_06S177W.lev1eo.cub --session1 isis --session2 isis
cam_test --image P12_005904_1734_XI_06S177W.lev1eo.cub --cam1 P12_005904_1734_XI_06S177W.lev1eo.cub --cam2 P12_005904_1734_XI_06S177W.lev1eo.cub --session1 isis --session2 isis              

These should give some stats, such as: 
cam2 to cam1 pixel diff
Min:    4.24714e-05

- Cut a piece from the DEM:

 gdal_translate -co compress=lzw -co TILED=yes -co INTERLEAVE=BAND -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 -srcwin 137 817 100 100  P12_005904_1734_XI_06S177W_F14_041230_1734_XN_06S177W_ba_100_0-DEM.tif dem.tif

- Mapproject left image onto this DEM at 6 mpp:

  mapproject --tr 6 dem.tif F14_041230_1734_XN_06S177W.lev1eo.cub F14_041230_1734_XN_06S177W.lev1eo.clip.map.tif
  mapproject --tr 6 dem.tif P12_005904_1734_XI_06S177W.lev1eo.cub P12_005904_1734_XI_06S177W.lev1eo.clip.map.tif

This should take 3 minutes or so.

- Inspect both of these in stereo_gui side by side:

stereo_gui F14_041230_1734_XN_06S177W.lev1eo.clip.map.tif P12_005904_1734_XI_06S177W.lev1eo.clip.map.tif

- Run stereo_pprc:

stereo_pprc P12_005904_1734_XI_06S177W.lev1eo.clip.map.tif F14_041230_1734_XN_06S177W.lev1eo.clip.map.tif P12_005904_1734_XI_06S177W.lev1eo.cub F14_041230_1734_XN_06S177W.lev1eo.cub results2/run dem.tif                                                                              

With this, things are working. Using parallel_stereo instead of stereo_pprc then goes through the rest of the steps.

- Going forward, it is suggested to use CSM cameras, as processing should be faster with those: https://stereopipeline.readthedocs.io/en/latest/examples/csm.html#the-usgs-csm-linescan-sensor

Let me know how it goes. Hopefully this is reproducible and then the original problem can be blamed on some glitch in processing.

Reply all
Reply to author
Forward
0 new messages