Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

..... is not a valid path, and you have to CHECK if imread actually returned a valid image.

..... is not a valid path, path your image was never loaded, and you have to CHECK if imread actually returned a valid image.image:

  image = imread(some_invalid_path);
  if (image.empty())
       // you can't go on !

then, if you load a grayscale (single channel) image, you cannot split() it into 3 channels.