OpenCV imread(filename) fails in debug mode when using release libraries

后端 未结 6 2139
逝去的感伤
逝去的感伤 2020-11-29 03:23

I have some C++ code and everything was working fine with OpenCV except the function imread(file). It was finding correctly th

6条回答
  •  野性不改
    2020-11-29 04:24

    Use FORWARD slash (/), instead of a backward slash (). Even in Windows!

    Incorrect:

    cv::imread("C:\example\1.jpg");
    

    Correct:

    cv::imread("C:/example/1.jpg");
    

提交回复
热议问题