First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

click to hide/show revision 2
No.2 Revision

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.