Ask Your Question

Revision history [back]

Can you change the line image = imread("OpenCV.jpg", CV_LOAD_IMAGE_COLOR); // Read the file to image = imread("OpenCV.jpg"); // Read the file and see if that fixes the problem? Also, try to run the code through debugger and find out which line throws exception.

Can you change the line image = imread("OpenCV.jpg", CV_LOAD_IMAGE_COLOR); // Read the file to image = imread("OpenCV.jpg"); // Read the file and see if that fixes the problem? Also, try to run the code through debugger and find out which line throws exception.

Also, make sure that the image is appropriately named (OpenCV.jpg) and in the proper path. You can set up the working directory in Visual Studio settings.