First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered Apr 18 '13

berak gravatar image

believe it or not, your src img must be empty !

thow in a check before processing it:

Mat _orange = imread("orange.jpg");
if ( _orange.empty() )
{
     cerr << "foul orange!" << endl;
}