Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the Mat you tried to feed into cvtColor was simply invalid / empty. most likely your csv file contained invalid filenames.

add a check after imread(), to make sure, you're working on valid data :

       Mat m = imread(path, 1);
       if (m.empty())
             cerr << path << " could not be read." << endl;