OpenCV 2.0 C++ API using imshow: returns unhandled exception and “bad-flag”

后端 未结 6 1032
生来不讨喜
生来不讨喜 2020-12-07 02:08

I\'m trying to use the new OpenCV 2.0 API in MS Visual C++ 2008 and wrote this simple program:

cv::Mat img1 = cv::imread(\"image.jpg\",1);
cv::namedWindow(\"         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 02:57

    I believe this might be related to unicode.

    Try the macro _TEXT()

    For example:

    cv::Mat img1 = cv::imread(_TEXT("image.jpg"),1);
    

    Unicode in Visual C++ 2

提交回复
热议问题