fixing undesired behaviour
authorStevenPuttemans <steven.puttemans@kuleuven.be>
Wed, 4 Mar 2015 10:54:08 +0000 (11:54 +0100)
committerStevenPuttemans <steven.puttemans@kuleuven.be>
Wed, 4 Mar 2015 11:03:33 +0000 (12:03 +0100)
apps/traincascade/imagestorage.cpp

index a7cc6ce..ed1db76 100644 (file)
@@ -32,20 +32,12 @@ bool CvCascadeImageReader::NegReader::create( const string _filename, Size _winS
     if ( !file.is_open() )
         return false;
 
-    size_t pos = _filename.rfind('\\');
-    char dlmrt = '\\';
-    if (pos == string::npos)
-    {
-        pos = _filename.rfind('/');
-        dlmrt = '/';
-    }
-    dirname = pos == string::npos ? "" : _filename.substr(0, pos) + dlmrt;
     while( !file.eof() )
     {
         std::getline(file, str);
         if (str.empty()) break;
         if (str.at(0) == '#' ) continue; /* comment */
-        imgFilenames.push_back(dirname + str);
+        imgFilenames.push_back(str);
     }
     file.close();