From ebc0625f04e1f34fc53be20c749c5c24fbe0a090 Mon Sep 17 00:00:00 2001 From: Alex Fan Date: Sun, 29 Oct 2017 16:45:44 +0800 Subject: [PATCH] Correcting 'rd' images paths in `prep_pmvs.sh`. --- src/Bundle2PMVS.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle2PMVS.cpp b/src/Bundle2PMVS.cpp index c8813ea..878fbee 100644 --- a/src/Bundle2PMVS.cpp +++ b/src/Bundle2PMVS.cpp @@ -213,7 +213,8 @@ void WritePMVS(const char *output_path, fclose(f); int last_dot = images[i].rfind('.', images[i].length()-1); - std::string basename = images[i].substr(0, last_dot); + int last_slash = images[i].rfind('/', last_dot-1); + std::string basename = images[i].substr(last_slash + 1, last_dot - last_slash - 1); fprintf(f_scr, "mv pmvs/%s.rd.jpg %s/visualize/%08d.jpg\n", basename.c_str(), output_path, count);