error in parallel_stereo

22 views
Skip to first unread message

Mauro S

unread,
Aug 17, 2022, 1:57:00 PM8/17/22
to Ames Stereo Pipeline Support
hello all,

Trying to do some tereo but I get this error:
(asp) planetas@DESKTOP-SQPQAK8:/mnt/e/testpipe/hale$ parallel_stereo ESP_crop_mp.tif PSP_crop_mp.tif
Traceback (most recent call last):
  File "/mnt/d/ASP/libexec/parallel_stereo", line 777, in <module>
    opt.seed_mode = parse_corr_seed_mode(opt.stereo_file)
  File "/mnt/d/ASP/libexec/stereo_utils.py", line 292, in parse_corr_seed_mode
    for line in fh:
  File "/mnt/d/ASP/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 948: invalid continuation byte

the tif files are the result of croping HIRISE images to a smaller area, then du bundle adjustment and  mapproject them. 
as it mention the utf-8 problem I run 

export LC_ALL=en_US.UTFexport LC_ALL=en_US.UTF-8

export LANG=en_US.UTF-8

export LC_TIME=en_US.UTF-8

but still the same error jump. I did the crop with ISIS any comment where to start to look is welcome.

Oleg Alexandrov

unread,
Aug 17, 2022, 2:13:29 PM8/17/22
to Mauro S, Ames Stereo Pipeline Support
It looks like you have some funny characters in your stereo.default file. Try to see if this works for you:

Open the file "/mnt/d/ASP/libexec/stereo_utils.py, and go to the text: 

fh = open(filename, "r")

Replace that text with:

    fh = open(filename, "r", encoding='utf8', errors='ignore')

See if the error is still there. I plan to add this fix to our code, to ignore accents and other stuff in stereo.default.



--
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/e050b0b9-7e3e-47b6-83aa-7392898fec29n%40googlegroups.com.

Mauro S

unread,
Aug 18, 2022, 8:21:09 AM8/18/22
to Ames Stereo Pipeline Support
Thanks Oleg, indeed I comented (#) some lines and  I wrote in spanish with accent... my bad.

That error was fixed but now I run into this one
>>parallel_stereo -t isismapisis ESP_crop_mp.tif PSP_crop_mp.tif stereo/MAP --bundle-adjust-prefix bahirise/BA

Error: **I/O ERROR** Unable to open [].
        --> Setting number of processing threads to: 4
Using stereo file ./stereo.default.
num_stereo_pairs,1
Using session: isismapisis

None

Traceback (most recent call last):
  File "/mnt/d/ASP/libexec/parallel_stereo", line 815, in <module>
    settings = run_and_parse_output("stereo_parse", args, sep, opt.verbose)
  File "/mnt/d/ASP/libexec/asp_system_utils.py", line 294, in run_and_parse_output
    raise Exception('Failed executing: ' + " ".join(call))
Exception: Failed executing: /mnt/d/ASP/libexec/stereo_parse -t isismapisis ESP_crop_mp.tif PSP_crop_mp.tif stereo/MAP --bundle-adjust-prefix bahirise/BA --corr-seed-mode 1 --stereo-file ./stereo.default

it is not clear for me what can not open, the camera model maybe?

Oleg Alexandrov

unread,
Aug 18, 2022, 10:26:54 AM8/18/22
to Mauro S, Ames Stereo Pipeline Support
You are missing some parameters. See: https://stereopipeline.readthedocs.io/en/latest/next_steps.html#example-for-isis-images:

parallel_stereo   left_proj.tif right_proj.tif left.cub right.cub   run_map/run run_nomap/run-DEM.tif


Mauro S

unread,
Aug 18, 2022, 12:17:05 PM8/18/22
to Oleg Alexandrov, Ames Stereo Pipeline Support
That was it, I was missing the original non projected cub files in the command line.
Thanks for pointing that out
Reply all
Reply to author
Forward
0 new messages