Closed PicoJr closed 2 years ago
This is a very good catch, thank you!
Yet, I hope you won't feel slighted if I say that I would rather not add your name to the list of authors. Bugfixes are very valuable, and they make a difference between a great package and a no-good package, but the bar for being included in the list of authors is higher than a bugfix. We receive a lot of valuable feedback from the community, via bug fixes, feature requests, bug reports, questions, documentation suggestions, and while all these result in improvements, most of the time they go unacknowledged as otherwise the list of authors would be too big to have any meaning.
If that is fine with you, I will pull only the fix itself.
This is a very good catch, thank you!
Yet, I hope you won't feel slighted if I say that I would rather not add your name to the list of authors. Bugfixes are very valuable, and they make a difference between a great package and a no-good package, but the bar for being included in the list of authors is higher than a bugfix. We receive a lot of valuable feedback from the community, via bug fixes, feature requests, bug reports, questions, documentation suggestions, and while all these result in improvements, most of the time they go unacknowledged as otherwise the list of authors would be too big to have any meaning.
If that is fine with you, I will pull only the fix itself.
Sure, I don't mind, please pull the fix =)
(edit): I opened the corresponding issue #349
Thank you! I did add your name in a comment in the tool itself. Credit is important. https://github.com/NeoGeographyToolkit/StereoPipeline/commit/a9133ac4267656f18447a9f057ca27b5010386a8#diff-112b3306a839cf78e7d89272b49252653c4f697d6c66d89ba2e38335b3faaa52
This tool has another quirk I hope to fix one day. It writes the descriptors to text, but does not bother to read them from text, so the tool is not quite reversible. Maybe one day.
Description
When there is exactly one IP record in the match file the script
parse_match_file.py
fails.Explanation:
np.genfromtxt
returns a tuple instead of an array cf https://stackoverflow.com/questions/24429822/genfromtxt-generates-tuples-so-does-recfromcsv.This is problematic: the scripts fails with
TypeError: len() of unsized object
when callinglen(im1_ip)
(same withlen(im2_ip)
.This PR reshapes the result so that it is always an array => prevents failure.
Related Issue
https://github.com/NeoGeographyToolkit/StereoPipeline/issues/349
Motivation and Context
This PR prevents a crash occurring when calling
parse_match_file.py
on a match file with a single IP Record for both or one image.How Has This Been Tested?
test.bin.txt
Without this PR
output:
With this PR
output:
Types of changes
Checklist:
Licensing:
This project is released under the LICENSE.