From 9d204039305ee731b63558bbb33da86189d19fa9 Mon Sep 17 00:00:00 2001 From: Mathieu Labbe Date: Fri, 30 Jan 2015 18:07:28 -0500 Subject: [PATCH] Simplified rtabmap-imagesJoiner tools --- tools/ImagesJoiner/main.cpp | 109 +++++++------------ utilite/include/rtabmap/utilite/UDirectory.h | 6 + utilite/src/UDirectory.cpp | 11 ++ 3 files changed, 57 insertions(+), 69 deletions(-) diff --git a/tools/ImagesJoiner/main.cpp b/tools/ImagesJoiner/main.cpp index 54ce7f71..7a7ee600 100644 --- a/tools/ImagesJoiner/main.cpp +++ b/tools/ImagesJoiner/main.cpp @@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "rtabmap/utilite/ULogger.h" #include "rtabmap/utilite/UTimer.h" #include "rtabmap/utilite/UDirectory.h" +#include "rtabmap/utilite/UFile.h" #include "rtabmap/utilite/UConversion.h" #include #include @@ -35,97 +36,70 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. void showUsage() { printf("Usage:\n" - "imagesJoiner.exe \"# (see below)\" \"type\" [option]\n" - " # : Name pattern is how the file names are formatted (in number).\n" - " Examples: 4 for pictures with 0001.jpg, 0002.jpg, ..., 0010.jpg, 0100.jpg, 1000.jpg, ...\n" - " 1 for pictures with 1.jpg, 2.jpg, ..., 10.jpg, 100.jpg, 1000.jpg, ...\n" - " type : is the extension (jpg, bmp, png...)\n" + "imagesJoiner.exe [option] path\n" " Options:\n" - " -inv option for copying odd images on the right\n" - " -d # destination filename size\n"); + " -inv option for copying odd images on the right\n\n"); exit(1); } int main(int argc, char * argv[]) { - if(argc < 3) + if(argc < 2) { showUsage(); } bool inv = false; - unsigned int sizeFileName = std::atoi(argv[1]); - int sizeTargetFileName = sizeFileName; - - std::string type = argv[2]; - for(int i=3; i