0

I have just started using opencv2.3 and followed all the steps given in the Answer to my previous topic load library error. Then, I wrote a simple code from a tutorial

#include <cv.h>
#include <highgui.h>
using namespace cv;
int main(int argc, char** argv) {
    Mat img = imread("C:\OpenCV2.3\pic1.jpg");
    if (!img.data) {
      printf( " No image data \n " );
      return -1;
    }
    namedWindow("Example1", CV_WINDOW_AUTOSIZE);
    imshow("Example1", img);
    waitKey(0);
    return 1;
}

which returns errors as specified in why-is-visual-studio-2010-not-able-to-find-open-pdb-files. After following the answer and checking the Symbol download,the warnings remain! Moreover, I cannot see the image show. I am perplexed as to what else to do and this is all so overwhelming. Kindly let me know what is wrong.

Community
  • 1
  • 1
George Roy
  • 307
  • 1
  • 3
  • 8

1 Answers1

2

Were you able to compile and run the program or not? It's not clear.

Anyway, there's one problem with your code. You need to use double slashes:

Mat img = imread("C:\\OpenCV2.3\\pic1.jpg");!
karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • Thanx.The warnings are not there anymore and the program also returns an output. However, the problem of load library persists as mentioned in my previous thread which is answered by you :( – George Roy Feb 29 '12 at 06:55