Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

most probably, your image was not loaded due to a typo (user error)

try this:

Mat img=imread("/home/m/1.jpg"); // "/home", not "home"

if (img.empty()) { // only fools don't check...
     cerr << "image not loaded !" << endl;
     return -1;
}

most probably, your image was not loaded due to a typo (user error)

try this:

Mat img=imread("/home/m/1.jpg"); // "/home", not "home"
"home" ??

if (img.empty()) { // only fools don't check...
     cerr << "image not loaded !" << endl;
     return -1;
}