-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nbuono/implement symphony dataset parser #333
Conversation
if (std::filesystem::exists(image_root_dir)) { | ||
surveys_.load(image_root_dir.string(), survey_list); | ||
} else { | ||
throw std::runtime_error("Error: The path '" + image_root_dir.string() + | ||
"' does not exist."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add //common:check
as a dependency, and #include "common/check.hh"
you can replace this with:
if (std::filesystem::exists(image_root_dir)) { | |
surveys_.load(image_root_dir.string(), survey_list); | |
} else { | |
throw std::runtime_error("Error: The path '" + image_root_dir.string() + | |
"' does not exist."); | |
} | |
CHECK(std::filesystem::exists(image_root_dir), "Image root does not exist!", image_root_dir); | |
surveys_.load(image_root_dir.string(), survey_list); |
This is will spit out a nice backtrace and you can add as many context variables as your want onto the end.
image = survey.loadImageByImageIndex(j); | ||
cv::imshow("Symphony Dataset Image", image); | ||
cv::waitKey(2); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any sanity checks you could add?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make sure the image is the right shape and isn't all black pixels. I suppose I could also hard code getting the images myself through the directory and make sure the files are the same too
Co-authored-by: Erick Fuentes <[email protected]>
public: | ||
DataParser(const std::filesystem::path &image_root_dir, | ||
const std::vector<std::string> &survey_list); | ||
~DataParser(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the automatically generated destructor sufficient? Could probably omit declaration/definition if it is.
…root_dir. NOTE: for some reason //experimental/learn_descriptors:symphony_lake_parser failed to build without specifying cxx17. I have no idea why.
No description provided.