Skip to content

Commit

Permalink
Fixed traincascade read issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sourin committed Aug 31, 2016
1 parent d06bdd5 commit d2e2300
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/traincascade/imagestorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ bool CvCascadeImageReader::NegReader::create( const string _filename, Size _winS
while( !file.eof() )
{
std::getline(file, str);
str.erase(str.find_last_not_of(" \n\r\t")+1);
if (str.empty()) break;
if (str.at(0) == '#' ) continue; /* comment */
imgFilenames.push_back(str);
Expand Down

0 comments on commit d2e2300

Please sign in to comment.