c++ - VS2013 debug mode opencv cannot open local images
怪我咯
怪我咯 2017-05-16 13:26:41
0
1
681

Problem: VS2013community+opencv2.4.13.x86 cannot open local images in debug mode, prompting error:

But you can run the generated exe file directly by entering the debugging directory

code:



#include "stdafx.h"
#include "opencv2\highgui\highgui.hpp"

int main(int argc, char ** argv)
{
    IplImage* img = cvLoadImage("template.bmp");
    printf("%d", img->imageSize);
    cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE);
    cvShowImage("ExampleImage1", img);
    cvWaitKey(0);
    cvRelease((void **)(&img));
    cvDestroyWindow("Example1");
    return 0;
}
怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
漂亮男人

The default running directory is not the compilation directory, but the root directory by default

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template