-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
DensifyPointCloud: --mask-path to specify folder containing mask images #940
Conversation
Don't think it should be called "ignore-mask-path" as it makes it sound the path is being ignored. |
@4CJ7T I chose that name because of the |
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.
LGTM, I will merge it after you point it to develop instead of master
VERBOSE("Image %s has non-empty maskName %s", image.name.c_str(), image.maskName.c_str()); | ||
return EXIT_FAILURE; | ||
} | ||
image.maskName = Util::ensureFolderSlash(OPT::strMaskPath) + Util::getFileNameExt(image.name); |
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.
you could also add here a check that the composed mask file name actually exists
Rebased onto the |
@@ -296,6 +298,23 @@ int main(int argc, LPCTSTR* argv) | |||
// load and estimate a dense point-cloud | |||
if (!scene.Load(MAKE_PATH_SAFE(OPT::strInputFileName))) | |||
return EXIT_FAILURE; | |||
if (!OPT::strMaskPath.empty()) { | |||
if (OPTDENSE::nIgnoreMaskLabel < 0) { |
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.
this check is probably not needed, as all you do here is setting the maskName variable, which will not be used if not requested; however can be saved and added to the MVS scene file; what do you think?
VERBOSE("Image %s has non-empty maskName %s", image.name.c_str(), image.maskName.c_str()); | ||
return EXIT_FAILURE; | ||
} | ||
image.maskName = Util::ensureFolderSlash(OPT::strMaskPath) + Util::getFileName(image.name) + ".mask.png"; |
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.
Util::ensureFolderSlash(OPT::strMaskPath) needs to be run once at the beginning only; and you should use ensureValidFolderPath instead, which does more checks
} | ||
image.maskName = Util::ensureFolderSlash(OPT::strMaskPath) + Util::getFileName(image.name) + ".mask.png"; | ||
if (!File::access(image.maskName)) { | ||
VERBOSE("Mask image %s not found in %s", image.maskName.c_str(), OPT::strMaskPath.c_str()); |
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.
do not print strMaskPath as that is included in the maskName now
@cdcseacave Thanks for your feedback, modified the patch accordingly. |
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.
Thank you, looking good!
No description provided.