I have a
cv::Mat image;
object, which I loaded an image to from a file, it reads it correctly and all.
Now I have written a functio
Try image.clone() for coping images
if(!image.empty()) { //your_code } else std::cout<<"Emty "
check the matrix before you convert.
Try using different dst image:
cv::Mat grayImage; cv::cvtColor(image, grayImage, CV_RGB2GRAY);